[COMMON] media: mfc: support H264 5.2 level
authorSunyoung Kang <sy0816.kang@samsung.com>
Thu, 8 Aug 2019 10:51:46 +0000 (19:51 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Fri, 30 Aug 2019 07:58:56 +0000 (16:58 +0900)
Change-Id: I128a614127cec65d56e8e1edf5aa151846f3c777
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
drivers/media/platform/exynos/mfc/exynos_mfc_media.h
drivers/media/platform/exynos/mfc/mfc_enc_internal.h
drivers/media/platform/exynos/mfc/mfc_enc_v4l2.c

index 8c7bd16ab1d037190c83658c6eb0ff1db129ee2e..3a51f78a2f7a904686222dc16578d3b68e4cba1a 100644 (file)
@@ -60,6 +60,9 @@ enum v4l2_mpeg_video_hevc_hierarchical_coding_type {
 /* new entry for enum v4l2_mpeg_video_mpeg4_level */
 #define V4L2_MPEG_VIDEO_MPEG4_LEVEL_6                  8
 
+/* new entry for enum v4l2_mpeg_video_h264_level */
+#define V4L2_MPEG_VIDEO_H264_LEVEL_5_2                 16
+
 /* new entry for enum v4l2_mpeg_video_header_mode */
 #define V4L2_MPEG_VIDEO_HEADER_MODE_AT_THE_READY       2
 
index 5f685d5bd54dcd8f067786bbb287673dbe50fd80..a99238b13b4a0f67ceae7db15cccc18ccfc49dbf 100644 (file)
@@ -461,7 +461,7 @@ static struct v4l2_queryctrl controls[] = {
                .type = V4L2_CTRL_TYPE_INTEGER,
                .name = "H264 level",
                .minimum = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
-               .maximum = V4L2_MPEG_VIDEO_H264_LEVEL_5_1,
+               .maximum = V4L2_MPEG_VIDEO_H264_LEVEL_5_2,
                .step = 1,
                .default_value = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
        },
index fa0f70b3cf063284b764b5156a94c2e6f3fe3263..ba2f144e8e6f246e89af5ba5043ef26d68c5d274 100644 (file)
@@ -1002,7 +1002,7 @@ static int mfc_enc_g_ctrl(struct file *file, void *priv,
 
 static inline int __mfc_enc_h264_level(enum v4l2_mpeg_video_h264_level lvl)
 {
-       static unsigned int t[V4L2_MPEG_VIDEO_H264_LEVEL_5_1 + 1] = {
+       static unsigned int t[V4L2_MPEG_VIDEO_H264_LEVEL_5_2 + 1] = {
                /* V4L2_MPEG_VIDEO_H264_LEVEL_1_0   */ 10,
                /* V4L2_MPEG_VIDEO_H264_LEVEL_1B    */ 9,
                /* V4L2_MPEG_VIDEO_H264_LEVEL_1_1   */ 11,
@@ -1019,6 +1019,7 @@ static inline int __mfc_enc_h264_level(enum v4l2_mpeg_video_h264_level lvl)
                /* V4L2_MPEG_VIDEO_H264_LEVEL_4_2   */ 42,
                /* V4L2_MPEG_VIDEO_H264_LEVEL_5_0   */ 50,
                /* V4L2_MPEG_VIDEO_H264_LEVEL_5_1   */ 51,
+               /* V4L2_MPEG_VIDEO_H264_LEVEL_5_2   */ 52,
        };
        return t[lvl];
 }