aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-04-11 22:40:59 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2022-06-14 16:54:58 +0200
commit1e99ff9d338b1573462d8a7a75bc523e9cb35085 (patch)
tree1a29c07a8e9dca75812f0e16e7a8083973d8060b
parentbdadddf530ea1bef4b58261fd5652c5a20c8a5a8 (diff)
downloadffmpeg-1e99ff9d338b1573462d8a7a75bc523e9cb35085.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> (cherry picked from commit d74078270198b97fdda258840f0d501a3ffcc693) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavfilter/video.c7
-rw-r--r--libavfilter/video.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/libavfilter/video.c b/libavfilter/video.c
index 6f9020b9fe..95ffea5699 100644
--- a/libavfilter/video.c
+++ b/libavfilter/video.c
@@ -41,7 +41,7 @@ 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)
{
int pool_width = 0;
int pool_height = 0;
@@ -89,6 +89,11 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
return ff_frame_pool_get(link->frame_pool);
}
+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;
diff --git a/libavfilter/video.h b/libavfilter/video.h
index 56c58d6766..f9174a4a0b 100644
--- a/libavfilter/video.h
+++ b/libavfilter/video.h
@@ -24,6 +24,7 @@
#include "avfilter.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 *ff_null_get_video_buffer(AVFilterLink *link, int w, int h);
/**