diff options
author | Arun Kumar K <arun.kk@samsung.com> | 2012-10-03 21:19:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-05 21:42:17 -0400 |
commit | 2e81dde94316dfaa19f0b6f9d4131ef7eaf124a3 (patch) | |
tree | 729db0ebf3bdb55540b89c4410a35811f1bbdfc7 /drivers/media/v4l2-core | |
parent | 4d08f670e63200cc092724de8c95f81df606b1a5 (diff) |
[media] v4l: Add control definitions for new H264 encoder features
New controls are added for supporting H264 encoding features like:
- MVC frame packing,
- flexible macroblock ordering,
- arbitrary slice ordering,
- hierarchical coding.
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-ctrls.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 207bcd8dee11..f6ee201d9347 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c | |||
@@ -384,6 +384,25 @@ const char * const *v4l2_ctrl_get_menu(u32 id) | |||
384 | "Extended SAR", | 384 | "Extended SAR", |
385 | NULL, | 385 | NULL, |
386 | }; | 386 | }; |
387 | static const char * const h264_fp_arrangement_type[] = { | ||
388 | "Checkerboard", | ||
389 | "Column", | ||
390 | "Row", | ||
391 | "Side by Side", | ||
392 | "Top Bottom", | ||
393 | "Temporal", | ||
394 | NULL, | ||
395 | }; | ||
396 | static const char * const h264_fmo_map_type[] = { | ||
397 | "Interleaved Slices", | ||
398 | "Scattered Slices", | ||
399 | "Foreground with Leftover", | ||
400 | "Box Out", | ||
401 | "Raster Scan", | ||
402 | "Wipe Scan", | ||
403 | "Explicit", | ||
404 | NULL, | ||
405 | }; | ||
387 | static const char * const mpeg_mpeg4_level[] = { | 406 | static const char * const mpeg_mpeg4_level[] = { |
388 | "0", | 407 | "0", |
389 | "0b", | 408 | "0b", |
@@ -508,6 +527,10 @@ const char * const *v4l2_ctrl_get_menu(u32 id) | |||
508 | return h264_profile; | 527 | return h264_profile; |
509 | case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC: | 528 | case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC: |
510 | return vui_sar_idc; | 529 | return vui_sar_idc; |
530 | case V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE: | ||
531 | return h264_fp_arrangement_type; | ||
532 | case V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE: | ||
533 | return h264_fmo_map_type; | ||
511 | case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL: | 534 | case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL: |
512 | return mpeg_mpeg4_level; | 535 | return mpeg_mpeg4_level; |
513 | case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE: | 536 | case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE: |
@@ -643,6 +666,22 @@ const char *v4l2_ctrl_get_name(u32 id) | |||
643 | case V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH: return "Horizontal Size of SAR"; | 666 | case V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH: return "Horizontal Size of SAR"; |
644 | case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE: return "Aspect Ratio VUI Enable"; | 667 | case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE: return "Aspect Ratio VUI Enable"; |
645 | case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC: return "VUI Aspect Ratio IDC"; | 668 | case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC: return "VUI Aspect Ratio IDC"; |
669 | case V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING: return "H264 Enable Frame Packing SEI"; | ||
670 | case V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0: return "H264 Set Curr. Frame as Frame0"; | ||
671 | case V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE: return "H264 FP Arrangement Type"; | ||
672 | case V4L2_CID_MPEG_VIDEO_H264_FMO: return "H264 Flexible MB Ordering"; | ||
673 | case V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE: return "H264 Map Type for FMO"; | ||
674 | case V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP: return "H264 FMO Number of Slice Groups"; | ||
675 | case V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION: return "H264 FMO Direction of Change"; | ||
676 | case V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE: return "H264 FMO Size of 1st Slice Grp"; | ||
677 | case V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH: return "H264 FMO No. of Consecutive MBs"; | ||
678 | case V4L2_CID_MPEG_VIDEO_H264_ASO: return "H264 Arbitrary Slice Ordering"; | ||
679 | case V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER: return "H264 ASO Slice Order"; | ||
680 | case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING: return "Enable H264 Hierarchical Coding"; | ||
681 | case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE: return "H264 Hierarchical Coding Type"; | ||
682 | case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER:return "H264 Number of HC Layers"; | ||
683 | case V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP: | ||
684 | return "H264 Set QP Value for HC Layers"; | ||
646 | case V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP: return "MPEG4 I-Frame QP Value"; | 685 | case V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP: return "MPEG4 I-Frame QP Value"; |
647 | case V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP: return "MPEG4 P-Frame QP Value"; | 686 | case V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP: return "MPEG4 P-Frame QP Value"; |
648 | case V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP: return "MPEG4 B-Frame QP Value"; | 687 | case V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP: return "MPEG4 B-Frame QP Value"; |
@@ -657,6 +696,7 @@ const char *v4l2_ctrl_get_name(u32 id) | |||
657 | case V4L2_CID_MPEG_VIDEO_VBV_SIZE: return "VBV Buffer Size"; | 696 | case V4L2_CID_MPEG_VIDEO_VBV_SIZE: return "VBV Buffer Size"; |
658 | case V4L2_CID_MPEG_VIDEO_DEC_PTS: return "Video Decoder PTS"; | 697 | case V4L2_CID_MPEG_VIDEO_DEC_PTS: return "Video Decoder PTS"; |
659 | case V4L2_CID_MPEG_VIDEO_DEC_FRAME: return "Video Decoder Frame Count"; | 698 | case V4L2_CID_MPEG_VIDEO_DEC_FRAME: return "Video Decoder Frame Count"; |
699 | case V4L2_CID_MPEG_VIDEO_VBV_DELAY: return "Initial Delay for VBV Control"; | ||
660 | 700 | ||
661 | /* CAMERA controls */ | 701 | /* CAMERA controls */ |
662 | /* Keep the order of the 'case's the same as in videodev2.h! */ | 702 | /* Keep the order of the 'case's the same as in videodev2.h! */ |
@@ -854,6 +894,8 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, | |||
854 | case V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE: | 894 | case V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE: |
855 | case V4L2_CID_MPEG_VIDEO_H264_PROFILE: | 895 | case V4L2_CID_MPEG_VIDEO_H264_PROFILE: |
856 | case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC: | 896 | case V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC: |
897 | case V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE: | ||
898 | case V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE: | ||
857 | case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL: | 899 | case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL: |
858 | case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE: | 900 | case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE: |
859 | case V4L2_CID_JPEG_CHROMA_SUBSAMPLING: | 901 | case V4L2_CID_JPEG_CHROMA_SUBSAMPLING: |