media: venus: venc: Set HDR10 PQ SEI property only for MAIN10 profile
authorStanimir Varbanov <stanimir.varbanov@linaro.org>
Fri, 2 Sep 2022 10:01:58 +0000 (12:01 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 09:21:44 +0000 (11:21 +0200)
The HDR10 PQ SEI should be set only when the codec is HEVC and
the profile is MAIN10, otherwise some artefacts could be produced
on the encoded bitstream.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/qcom/venus/venc.c

index cc08a3c..cdb1254 100644 (file)
@@ -698,7 +698,8 @@ static int venc_set_properties(struct venus_inst *inst)
                        return ret;
        }
 
-       if (inst->fmt_cap->pixfmt == V4L2_PIX_FMT_HEVC) {
+       if (inst->fmt_cap->pixfmt == V4L2_PIX_FMT_HEVC &&
+           ctr->profile.hevc == V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10) {
                struct hfi_hdr10_pq_sei hdr10;
                unsigned int c;