From: Sunyoung Kang Date: Thu, 8 Aug 2019 10:51:46 +0000 (+0900) Subject: [COMMON] media: mfc: support H264 5.2 level X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=837aab770741084e6baa73f0549834b274a0061c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] media: mfc: support H264 5.2 level Change-Id: I128a614127cec65d56e8e1edf5aa151846f3c777 Signed-off-by: Sunyoung Kang --- diff --git a/drivers/media/platform/exynos/mfc/exynos_mfc_media.h b/drivers/media/platform/exynos/mfc/exynos_mfc_media.h index 8c7bd16ab1d0..3a51f78a2f7a 100644 --- a/drivers/media/platform/exynos/mfc/exynos_mfc_media.h +++ b/drivers/media/platform/exynos/mfc/exynos_mfc_media.h @@ -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 diff --git a/drivers/media/platform/exynos/mfc/mfc_enc_internal.h b/drivers/media/platform/exynos/mfc/mfc_enc_internal.h index 5f685d5bd54d..a99238b13b4a 100644 --- a/drivers/media/platform/exynos/mfc/mfc_enc_internal.h +++ b/drivers/media/platform/exynos/mfc/mfc_enc_internal.h @@ -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, }, diff --git a/drivers/media/platform/exynos/mfc/mfc_enc_v4l2.c b/drivers/media/platform/exynos/mfc/mfc_enc_v4l2.c index fa0f70b3cf06..ba2f144e8e6f 100644 --- a/drivers/media/platform/exynos/mfc/mfc_enc_v4l2.c +++ b/drivers/media/platform/exynos/mfc/mfc_enc_v4l2.c @@ -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]; }