summaryrefslogtreecommitdiff
path: root/libavfilter/video.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-04-11 22:40:59 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-21 22:42:20 +0200
commitd74078270198b97fdda258840f0d501a3ffcc693 (patch)
treedef8ec4ca1be2dfc6cf70526685a818b4769e496 /libavfilter/video.c
parenta3d790f1977ed6c326eb93bb61757297a7905dcc (diff)
downloadffmpeg-d74078270198b97fdda258840f0d501a3ffcc693.tar.gz
avfilter/video: Add ff_default_get_video_buffer2() to set specific alignment
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/video.c')
-rw-r--r--libavfilter/video.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavfilter/video.c b/libavfilter/video.c
index b2f0cdf88a..e9eb110ff4 100644
--- a/libavfilter/video.c
+++ b/libavfilter/video.c
@@ -38,13 +38,12 @@ AVFrame *ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
return ff_get_video_buffer(link->dst->outputs[0], w, h);
}
-AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
+AVFrame *ff_default_get_video_buffer2(AVFilterLink *link, int w, int h, int align)
{
AVFrame *frame = NULL;
int pool_width = 0;
int pool_height = 0;
int pool_align = 0;
- int align = av_cpu_max_align();
enum AVPixelFormat pool_format = AV_PIX_FMT_NONE;
if (link->hw_frames_ctx &&
@@ -94,6 +93,11 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
return frame;
}
+AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
+{
+ return ff_default_get_video_buffer2(link, w, h, av_cpu_max_align());
+}
+
AVFrame *ff_get_video_buffer(AVFilterLink *link, int w, int h)
{
AVFrame *ret = NULL;