This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: mediatek: vcodec: Set the supported h264 profile for each 
platform
Author:  Yunfei Dong <yunfei.d...@mediatek.com>
Date:    Mon Oct 23 11:06:37 2023 +0800

Set the maximum H264 codec profile for each platform.
The various mediatek platforms support different profiles for decoding,
the profile of the codec limits the capabilities for decoding.

Signed-off-by: Yunfei Dong <yunfei.d...@mediatek.com>
Reviewed-by: Sebastian Fricke <sebastian.fri...@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno 
<angelogioacchino.delre...@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fri...@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 .../vcodec/decoder/mtk_vcodec_dec_stateless.c         | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

---

diff --git 
a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c 
b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
index f68518ba57c5..a93098b3a390 100644
--- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
+++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
@@ -559,6 +559,20 @@ static void mtk_vcodec_dec_fill_h264_level(struct 
v4l2_ctrl_config *cfg,
        };
 }
 
+static void mtk_vcodec_dec_fill_h264_profile(struct v4l2_ctrl_config *cfg,
+                                            struct mtk_vcodec_dec_ctx *ctx)
+{
+       switch (ctx->dev->chip_name) {
+       case MTK_VDEC_MT8188:
+       case MTK_VDEC_MT8195:
+               cfg->max = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10;
+               break;
+       default:
+               cfg->max = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH;
+               break;
+       };
+}
+
 static void mtk_vcodec_dec_fill_h265_level(struct v4l2_ctrl_config *cfg,
                                           struct mtk_vcodec_dec_ctx *ctx)
 {
@@ -587,6 +601,11 @@ static void mtk_vcodec_dec_reset_controls(struct 
v4l2_ctrl_config *cfg,
                mtk_vcodec_dec_fill_h265_level(cfg, ctx);
                mtk_v4l2_vdec_dbg(3, ctx, "h265 supported level: %lld %lld", 
cfg->max, cfg->def);
                break;
+       case V4L2_CID_MPEG_VIDEO_H264_PROFILE:
+               mtk_vcodec_dec_fill_h264_profile(cfg, ctx);
+               mtk_v4l2_vdec_dbg(3, ctx, "h264 supported profile: %lld %lld", 
cfg->max,
+                                 cfg->menu_skip_mask);
+               break;
        default:
                break;
        };

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to