[FFmpeg-devel] [PATCH V1] avfilter: Add constant VAAPI_VPP_BACKGROUND_BLACK

Zachary Zhou zachary.zhou at intel.com
Tue Dec 25 08:03:30 EET 2018


Signed-off-by: Zachary Zhou <zachary.zhou at intel.com>
---
 libavfilter/vaapi_vpp.h            | 2 ++
 libavfilter/vf_deinterlace_vaapi.c | 2 +-
 libavfilter/vf_misc_vaapi.c        | 2 +-
 libavfilter/vf_procamp_vaapi.c     | 2 +-
 libavfilter/vf_scale_vaapi.c       | 2 +-
 5 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vaapi_vpp.h b/libavfilter/vaapi_vpp.h
index 0bc31018d4..bdf3bbaccc 100644
--- a/libavfilter/vaapi_vpp.h
+++ b/libavfilter/vaapi_vpp.h
@@ -27,6 +27,8 @@
 
 #include "avfilter.h"
 
+#define VAAPI_VPP_BACKGROUND_BLACK 0xff000000  //Black in ARGB format
+
 typedef struct VAAPIVPPContext {
     const AVClass *class;
 
diff --git a/libavfilter/vf_deinterlace_vaapi.c b/libavfilter/vf_deinterlace_vaapi.c
index f7a262d0c6..97aee6588f 100644
--- a/libavfilter/vf_deinterlace_vaapi.c
+++ b/libavfilter/vf_deinterlace_vaapi.c
@@ -256,7 +256,7 @@ static int deint_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
             ff_vaapi_vpp_colour_standard(input_frame->colorspace);
 
         params.output_region = NULL;
-        params.output_background_color = 0xff000000;
+        params.output_background_color = VAAPI_VPP_BACKGROUND_BLACK;
         params.output_color_standard = params.surface_color_standard;
 
         params.pipeline_flags = 0;
diff --git a/libavfilter/vf_misc_vaapi.c b/libavfilter/vf_misc_vaapi.c
index 30b808a993..e227c9ff6b 100644
--- a/libavfilter/vf_misc_vaapi.c
+++ b/libavfilter/vf_misc_vaapi.c
@@ -174,7 +174,7 @@ static int misc_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
         ff_vaapi_vpp_colour_standard(input_frame->colorspace);
 
     params.output_region = NULL;
-    params.output_background_color = 0xff000000;
+    params.output_background_color = VAAPI_VPP_BACKGROUND_BLACK;
     params.output_color_standard = params.surface_color_standard;
 
     params.pipeline_flags = 0;
diff --git a/libavfilter/vf_procamp_vaapi.c b/libavfilter/vf_procamp_vaapi.c
index 10eccbe97d..46f3ab6465 100644
--- a/libavfilter/vf_procamp_vaapi.c
+++ b/libavfilter/vf_procamp_vaapi.c
@@ -171,7 +171,7 @@ static int procamp_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame
         ff_vaapi_vpp_colour_standard(input_frame->colorspace);
 
     params.output_region = NULL;
-    params.output_background_color = 0xff000000;
+    params.output_background_color = VAAPI_VPP_BACKGROUND_BLACK;
     params.output_color_standard = params.surface_color_standard;
 
     params.pipeline_flags = 0;
diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c
index b06ae764bf..3699363140 100644
--- a/libavfilter/vf_scale_vaapi.c
+++ b/libavfilter/vf_scale_vaapi.c
@@ -133,7 +133,7 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
         ff_vaapi_vpp_colour_standard(input_frame->colorspace);
 
     params.output_region = 0;
-    params.output_background_color = 0xff000000;
+    params.output_background_color = VAAPI_VPP_BACKGROUND_BLACK;
     params.output_color_standard = params.surface_color_standard;
 
     params.pipeline_flags = 0;
-- 
2.17.1



More information about the ffmpeg-devel mailing list