aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s5p-mfc/s5p_mfc_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/s5p-mfc/s5p_mfc_enc.c')
-rw-r--r--drivers/media/video/s5p-mfc/s5p_mfc_enc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_enc.c b/drivers/media/video/s5p-mfc/s5p_mfc_enc.c
index acedb2004be3..03d83340e7fb 100644
--- a/drivers/media/video/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/video/s5p-mfc/s5p_mfc_enc.c
@@ -243,12 +243,6 @@ static struct mfc_control controls[] = {
243 .minimum = V4L2_MPEG_VIDEO_H264_LEVEL_1_0, 243 .minimum = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
244 .maximum = V4L2_MPEG_VIDEO_H264_LEVEL_4_0, 244 .maximum = V4L2_MPEG_VIDEO_H264_LEVEL_4_0,
245 .default_value = V4L2_MPEG_VIDEO_H264_LEVEL_1_0, 245 .default_value = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
246 .menu_skip_mask = ~(
247 (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_1) |
248 (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_2) |
249 (1 << V4L2_MPEG_VIDEO_H264_LEVEL_5_0) |
250 (1 << V4L2_MPEG_VIDEO_H264_LEVEL_5_1)
251 ),
252 }, 246 },
253 { 247 {
254 .id = V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL, 248 .id = V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL,
@@ -494,7 +488,7 @@ static struct mfc_control controls[] = {
494 .type = V4L2_CTRL_TYPE_MENU, 488 .type = V4L2_CTRL_TYPE_MENU,
495 .minimum = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED, 489 .minimum = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED,
496 .maximum = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED, 490 .maximum = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED,
497 .default_value = 0, 491 .default_value = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED,
498 .menu_skip_mask = 0, 492 .menu_skip_mask = 0,
499 }, 493 },
500 { 494 {
@@ -534,7 +528,7 @@ static struct mfc_control controls[] = {
534 .type = V4L2_CTRL_TYPE_MENU, 528 .type = V4L2_CTRL_TYPE_MENU,
535 .minimum = V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE, 529 .minimum = V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE,
536 .maximum = V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE, 530 .maximum = V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE,
537 .default_value = 0, 531 .default_value = V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE,
538 .menu_skip_mask = 0, 532 .menu_skip_mask = 0,
539 }, 533 },
540 { 534 {
@@ -907,6 +901,8 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
907 mfc_err("failed to try output format\n"); 901 mfc_err("failed to try output format\n");
908 return -EINVAL; 902 return -EINVAL;
909 } 903 }
904 v4l_bound_align_image(&pix_fmt_mp->width, 8, 1920, 1,
905 &pix_fmt_mp->height, 4, 1080, 1, 0);
910 } else { 906 } else {
911 mfc_err("invalid buf type\n"); 907 mfc_err("invalid buf type\n");
912 return -EINVAL; 908 return -EINVAL;