[FFmpeg-devel] [PATCH 2/2] lavfi: add gbrap support to some filters

Paul B Mahol onemda at gmail.com
Tue May 7 11:39:11 CEST 2013


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavfilter/vf_blend.c         | 2 +-
 libavfilter/vf_extractplanes.c | 3 ++-
 libavfilter/vf_geq.c           | 2 +-
 libavfilter/vf_histogram.c     | 3 ++-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c
index e855b28..b4c62ba 100644
--- a/libavfilter/vf_blend.c
+++ b/libavfilter/vf_blend.c
@@ -283,7 +283,7 @@ static int query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA420P,
         AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_YUVJ422P,AV_PIX_FMT_YUVJ420P,
         AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV410P,
-        AV_PIX_FMT_GBRP, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
+        AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
     };
 
     ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c
index 9c2c6b7..84e620a 100644
--- a/libavfilter/vf_extractplanes.c
+++ b/libavfilter/vf_extractplanes.c
@@ -75,8 +75,9 @@ static int query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_YUV444P16BE, AV_PIX_FMT_YUVA444P16BE,
         AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A,
         AV_PIX_FMT_GRAY16LE, AV_PIX_FMT_GRAY16BE,
-        AV_PIX_FMT_GBRP,
+        AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,
         AV_PIX_FMT_GBRP16LE, AV_PIX_FMT_GBRP16BE,
+        AV_PIX_FMT_GBRAP16LE, AV_PIX_FMT_GBRAP16BE,
         AV_PIX_FMT_NONE,
     };
     static const enum AVPixelFormat out8_pixfmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE };
diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c
index 89467bc..a5396f8 100644
--- a/libavfilter/vf_geq.c
+++ b/libavfilter/vf_geq.c
@@ -165,7 +165,7 @@ static int geq_query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_NONE
     };
     static const enum PixelFormat rgb_pix_fmts[] = {
-        AV_PIX_FMT_GBRP,
+        AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,
         AV_PIX_FMT_NONE
     };
     if (geq->is_rgb) {
diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c
index 3daa482..f3fc9ff 100644
--- a/libavfilter/vf_histogram.c
+++ b/libavfilter/vf_histogram.c
@@ -80,7 +80,7 @@ static const enum AVPixelFormat color_pix_fmts[] = {
 
 static const enum AVPixelFormat levels_pix_fmts[] = {
     AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVJ444P,
-    AV_PIX_FMT_GRAY8, AV_PIX_FMT_GBRP, AV_PIX_FMT_NONE
+    AV_PIX_FMT_GRAY8, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_NONE
 };
 
 static int query_formats(AVFilterContext *ctx)
@@ -119,6 +119,7 @@ static int config_input(AVFilterLink *inlink)
     h->ncomp = desc->nb_components;
 
     switch (inlink->format) {
+    case AV_PIX_FMT_GBRAP:
     case AV_PIX_FMT_GBRP:
         h->bg_color = black_gbrp_color;
         h->fg_color = white_gbrp_color;
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list