@@ -84,16 +84,7 @@ static av_cold void uninit(AVFilterContext *ctx)
static int query_formats(AVFilterContext *ctx)
{
- // If you add something here also add it in vidstabutils.c
- static const enum AVPixelFormat pix_fmts[] = {
- AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P,
- AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUVA420P,
- AV_PIX_FMT_YUV440P, AV_PIX_FMT_GRAY8,
- AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, AV_PIX_FMT_RGBA,
- AV_PIX_FMT_NONE
- };
-
- return ff_set_common_formats_from_list(ctx, pix_fmts);
+ return ff_set_common_formats_from_list(ctx, ff_vidstab_pix_fmts);
}
static int config_input(AVFilterLink *inlink)
@@ -123,16 +123,7 @@ static av_cold void uninit(AVFilterContext *ctx)
static int query_formats(AVFilterContext *ctx)
{
- // If you add something here also add it in vidstabutils.c
- static const enum AVPixelFormat pix_fmts[] = {
- AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P,
- AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUVA420P,
- AV_PIX_FMT_YUV440P, AV_PIX_FMT_GRAY8,
- AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, AV_PIX_FMT_RGBA,
- AV_PIX_FMT_NONE
- };
-
- return ff_set_common_formats_from_list(ctx, pix_fmts);
+ return ff_set_common_formats_from_list(ctx, ff_vidstab_pix_fmts);
}
@@ -20,6 +20,14 @@
#include "vidstabutils.h"
+const enum AVPixelFormat ff_vidstab_pix_fmts[] = {
+ AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P,
+ AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUVA420P,
+ AV_PIX_FMT_YUV440P, AV_PIX_FMT_GRAY8,
+ AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, AV_PIX_FMT_RGBA,
+ AV_PIX_FMT_NONE
+};
+
/** convert AV's pixelformat to vid.stab pixelformat */
VSPixelFormat ff_av2vs_pixfmt(AVFilterContext *ctx, enum AVPixelFormat pf)
{
@@ -25,6 +25,8 @@
#include "avfilter.h"
+extern const enum AVPixelFormat ff_vidstab_pix_fmts[];
+
/* Conversion routines between libav* and vid.stab */
/**
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavfilter/vf_vidstabdetect.c | 11 +---------- libavfilter/vf_vidstabtransform.c | 11 +---------- libavfilter/vidstabutils.c | 8 ++++++++ libavfilter/vidstabutils.h | 2 ++ 4 files changed, 12 insertions(+), 20 deletions(-)