[FFmpeg-devel] [PATCH] lavc/vaapi_encode: remove consistency check of depth for each component

Linjie Fu linjie.fu at intel.com
Tue Sep 24 12:29:01 EEST 2019


Previously, consistency check of depth is introduced to make sure
each component of the pixel format has the same depth.

Since Y410(with a different depth in alpha channel) is supported for
ICL+, this check should be removed to make the encoder work.

Signed-off-by: Linjie Fu <linjie.fu at intel.com>
---
 libavcodec/vaapi_encode.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
index cb598d5..ba7a432 100644
--- a/libavcodec/vaapi_encode.c
+++ b/libavcodec/vaapi_encode.c
@@ -1236,14 +1236,6 @@ static av_cold int vaapi_encode_profile_entrypoint(AVCodecContext *avctx)
                ctx->input_frames->sw_format);
         return AVERROR(EINVAL);
     }
-    depth = desc->comp[0].depth;
-    for (i = 1; i < desc->nb_components; i++) {
-        if (desc->comp[i].depth != depth) {
-            av_log(avctx, AV_LOG_ERROR, "Invalid input pixfmt (%s).\n",
-                   desc->name);
-            return AVERROR(EINVAL);
-        }
-    }
     av_log(avctx, AV_LOG_VERBOSE, "Input surface format is %s.\n",
            desc->name);
 
-- 
2.7.4



More information about the ffmpeg-devel mailing list