* [PATCH 1/3] v4l: add contorl definitions for codec devices.
@ 2012-03-02 2:17 Jeongtae Park
2012-03-02 8:13 ` Hans Verkuil
2012-03-02 8:45 ` Sylwester Nawrocki
0 siblings, 2 replies; 4+ messages in thread
From: Jeongtae Park @ 2012-03-02 2:17 UTC (permalink / raw)
To: linux-media, 'Kamil Debski'
Cc: janghyuck.kim, jaeryul.oh, 'Marek Szyprowski'
Add control definitions for controls specific to codec devices.
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kamil Debski <k.debski@samsung.com>
---
include/linux/videodev2.h | 51 ++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index b739d7d..a19512a 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -359,7 +359,9 @@ struct v4l2_pix_format {
/* two non contiguous planes - one Y, one Cr + Cb interleaved */
#define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */
+#define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */
#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */
+#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 macroblocks */
/* three non contiguous planes - Y, Cb, Cr */
#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
@@ -392,6 +394,7 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */
#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */
#define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */
+#define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC */
#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */
#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */
#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */
@@ -399,6 +402,7 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */
#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */
#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */
+#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
/* Vendor-specific formats */
#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
@@ -1458,17 +1462,18 @@ enum v4l2_mpeg_video_header_mode {
};
#define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_MPEG_BASE+217)
#define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_MPEG_BASE+218)
-#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_MPEG_BASE+219)
+#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BITS (V4L2_CID_MPEG_BASE+219)
#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_MPEG_BASE+220)
#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_MPEG_BASE+221)
enum v4l2_mpeg_video_multi_slice_mode {
V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0,
- V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1,
- V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2,
+ V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB = 1,
+ V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BITS = 2,
};
#define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222)
#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223)
#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224)
+#define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_BASE+225)
#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
@@ -1559,6 +1564,46 @@ enum v4l2_mpeg_video_h264_vui_sar_idc {
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16,
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17,
};
+#define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (V4L2_CID_MPEG_BASE+368)
+#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (V4L2_CID_MPEG_BASE+369)
+#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE (V4L2_CID_MPEG_BASE+370)
+enum v4l2_mpeg_video_h264_sei_fp_arrangement_type {
+ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD = 0,
+ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN = 1,
+ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW = 2,
+ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE = 3,
+ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM = 4,
+ V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL = 5,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_FMO (V4L2_CID_MPEG_BASE+371)
+#define V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE (V4L2_CID_MPEG_BASE+372)
+enum v4l2_mpeg_video_h264_fmo_map_type {
+ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES = 0,
+ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES = 1,
+ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER = 2,
+ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT = 3,
+ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN = 4,
+ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN = 5,
+ V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT = 6,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (V4L2_CID_MPEG_BASE+373)
+#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION (V4L2_CID_MPEG_BASE+374)
+enum v4l2_mpeg_video_h264_fmo_change_dir {
+ V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT = 0,
+ V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT = 1,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (V4L2_CID_MPEG_BASE+375)
+#define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (V4L2_CID_MPEG_BASE+376)
+#define V4L2_CID_MPEG_VIDEO_H264_ASO (V4L2_CID_MPEG_BASE+377)
+#define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (V4L2_CID_MPEG_BASE+378)
+#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (V4L2_CID_MPEG_BASE+379)
+#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE (V4L2_CID_MPEG_BASE+380)
+enum v4l2_mpeg_video_h264_hierarchical_coding_type {
+ V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B = 0,
+ V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P = 1,
+};
+#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (V4L2_CID_MPEG_BASE+381)
+#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (V4L2_CID_MPEG_BASE+382)
#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400)
#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401)
#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402)
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] v4l: add contorl definitions for codec devices.
2012-03-02 2:17 [PATCH 1/3] v4l: add contorl definitions for codec devices Jeongtae Park
@ 2012-03-02 8:13 ` Hans Verkuil
2012-03-07 10:10 ` Kamil Debski
2012-03-02 8:45 ` Sylwester Nawrocki
1 sibling, 1 reply; 4+ messages in thread
From: Hans Verkuil @ 2012-03-02 8:13 UTC (permalink / raw)
To: jtp.park
Cc: linux-media, 'Kamil Debski', janghyuck.kim, jaeryul.oh,
'Marek Szyprowski'
Hi Jeongtae!
Some review notes below...
On Friday, March 02, 2012 03:17:40 Jeongtae Park wrote:
> Add control definitions for controls specific to codec devices.
>
> Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Cc: Kamil Debski <k.debski@samsung.com>
> ---
> include/linux/videodev2.h | 51 ++++++++++++++++++++++++++++++++++++++++++--
> 1 files changed, 48 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index b739d7d..a19512a 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -359,7 +359,9 @@ struct v4l2_pix_format {
>
> /* two non contiguous planes - one Y, one Cr + Cb interleaved */
> #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */
> +#define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */
> #define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */
> +#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 macroblocks */
>
> /* three non contiguous planes - Y, Cb, Cr */
> #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
> @@ -392,6 +394,7 @@ struct v4l2_pix_format {
> #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */
> #define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */
> #define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */
> +#define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC */
> #define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */
> #define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */
> #define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */
> @@ -399,6 +402,7 @@ struct v4l2_pix_format {
> #define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */
> #define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */
> #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */
> +#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
Note that these new formats need to be documented in the spec as well.
>
> /* Vendor-specific formats */
> #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
> @@ -1458,17 +1462,18 @@ enum v4l2_mpeg_video_header_mode {
> };
> #define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_MPEG_BASE+217)
> #define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_MPEG_BASE+218)
> -#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_MPEG_BASE+219)
> +#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BITS (V4L2_CID_MPEG_BASE+219)
Why change from bytes to bits? That changes the meaning of this control.
> #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_MPEG_BASE+220)
> #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_MPEG_BASE+221)
> enum v4l2_mpeg_video_multi_slice_mode {
> V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0,
> - V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1,
> - V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2,
> + V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB = 1,
> + V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BITS = 2,
> };
> #define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222)
> #define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223)
> #define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224)
> +#define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_BASE+225)
>
> #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
> #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
> @@ -1559,6 +1564,46 @@ enum v4l2_mpeg_video_h264_vui_sar_idc {
> V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16,
> V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17,
> };
> +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (V4L2_CID_MPEG_BASE+368)
> +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (V4L2_CID_MPEG_BASE+369)
> +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE (V4L2_CID_MPEG_BASE+370)
> +enum v4l2_mpeg_video_h264_sei_fp_arrangement_type {
> + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD = 0,
> + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN = 1,
> + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW = 2,
> + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE = 3,
> + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM = 4,
> + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL = 5,
> +};
> +#define V4L2_CID_MPEG_VIDEO_H264_FMO (V4L2_CID_MPEG_BASE+371)
> +#define V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE (V4L2_CID_MPEG_BASE+372)
> +enum v4l2_mpeg_video_h264_fmo_map_type {
> + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES = 0,
> + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES = 1,
> + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER = 2,
> + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT = 3,
> + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN = 4,
> + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN = 5,
> + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT = 6,
> +};
> +#define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (V4L2_CID_MPEG_BASE+373)
> +#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION (V4L2_CID_MPEG_BASE+374)
> +enum v4l2_mpeg_video_h264_fmo_change_dir {
> + V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT = 0,
> + V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT = 1,
> +};
> +#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (V4L2_CID_MPEG_BASE+375)
> +#define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (V4L2_CID_MPEG_BASE+376)
> +#define V4L2_CID_MPEG_VIDEO_H264_ASO (V4L2_CID_MPEG_BASE+377)
> +#define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (V4L2_CID_MPEG_BASE+378)
> +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (V4L2_CID_MPEG_BASE+379)
> +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE (V4L2_CID_MPEG_BASE+380)
> +enum v4l2_mpeg_video_h264_hierarchical_coding_type {
> + V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B = 0,
> + V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P = 1,
> +};
> +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (V4L2_CID_MPEG_BASE+381)
> +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (V4L2_CID_MPEG_BASE+382)
Are these new controls generic for all H264 encoders, or specific to this
chip?
Also note that these new controls have to be documented in the spec as well.
> #define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400)
> #define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401)
> #define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402)
>
Regards,
Hans
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] v4l: add contorl definitions for codec devices.
2012-03-02 2:17 [PATCH 1/3] v4l: add contorl definitions for codec devices Jeongtae Park
2012-03-02 8:13 ` Hans Verkuil
@ 2012-03-02 8:45 ` Sylwester Nawrocki
1 sibling, 0 replies; 4+ messages in thread
From: Sylwester Nawrocki @ 2012-03-02 8:45 UTC (permalink / raw)
To: jtp.park
Cc: linux-media, 'Kamil Debski', janghyuck.kim, jaeryul.oh,
'Marek Szyprowski'
Hi Jongtae,
On 03/02/2012 03:17 AM, Jeongtae Park wrote:
> @@ -1458,17 +1462,18 @@ enum v4l2_mpeg_video_header_mode {
> };
> #define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_MPEG_BASE+217)
> #define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_MPEG_BASE+218)
> -#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_MPEG_BASE+219)
> +#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BITS (V4L2_CID_MPEG_BASE+219)
> #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_MPEG_BASE+220)
> #define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_MPEG_BASE+221)
> enum v4l2_mpeg_video_multi_slice_mode {
> V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0,
> - V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1,
> - V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2,
> + V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB = 1,
> + V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BITS = 2,
Should this be a separate bugfix patch ? We need to make sure the
applications work with older kernels too, perhaps a patch with
stable@vger.kernel.org at Cc would do.
Don't you need to update the multi_slice[] array in v4l2-ctrls.c
as well ? Now it is:
static const char * const multi_slice[] = {
"Single",
"Max Macroblocks",
"Max Bytes",
NULL,
};
And the corresponding individual controls:
case V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES: return "Maximum Bytes in a Slice";
case V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB: return "Number of MBs in a Slice";
Please make sure the descriptions are consistent with CIDs.
--
Regards,
Sylwester
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH 1/3] v4l: add contorl definitions for codec devices.
2012-03-02 8:13 ` Hans Verkuil
@ 2012-03-07 10:10 ` Kamil Debski
0 siblings, 0 replies; 4+ messages in thread
From: Kamil Debski @ 2012-03-07 10:10 UTC (permalink / raw)
To: 'Hans Verkuil', jtp.park
Cc: linux-media, janghyuck.kim, jaeryul.oh, Marek Szyprowski
Hi Hans, hi Jeongtae,
> From: Hans Verkuil [mailto:hverkuil@xs4all.nl]
> Sent: 02 March 2012 09:13
>
> Hi Jeongtae!
>
> Some review notes below...
>
> On Friday, March 02, 2012 03:17:40 Jeongtae Park wrote:
> > Add control definitions for controls specific to codec devices.
> >
> > Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
> > Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> > Cc: Kamil Debski <k.debski@samsung.com>
> > ---
> > include/linux/videodev2.h | 51
> ++++++++++++++++++++++++++++++++++++++++++--
> > 1 files changed, 48 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> > index b739d7d..a19512a 100644
> > --- a/include/linux/videodev2.h
> > +++ b/include/linux/videodev2.h
> > @@ -359,7 +359,9 @@ struct v4l2_pix_format {
> >
> > /* two non contiguous planes - one Y, one Cr + Cb interleaved */
> > #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12
> Y/CbCr 4:2:0 */
> > +#define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21
> Y/CrCb 4:2:0 */
> > #define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12
> Y/CbCr 4:2:0 64x32 macroblocks */
> > +#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12
> Y/CbCr 4:2:0 16x16 macroblocks */
> >
> > /* three non contiguous planes - Y, Cb, Cr */
> > #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12
> YUV420 planar */
> > @@ -392,6 +394,7 @@ struct v4l2_pix_format {
> > #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-
> 1/2/4 Multiplexed */
> > #define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264
> with start codes */
> > #define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264
> without start codes */
> > +#define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC
> */
> > #define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263
> */
> > #define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1
> ES */
> > #define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2
> ES */
> > @@ -399,6 +402,7 @@ struct v4l2_pix_format {
> > #define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid
> */
> > #define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE
> 421M Annex G compliant stream */
> > #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE
> 421M Annex L compliant stream */
> > +#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
>
> Note that these new formats need to be documented in the spec as well.
>
> >
> > /* Vendor-specific formats */
> > #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1
> YUV */
> > @@ -1458,17 +1462,18 @@ enum v4l2_mpeg_video_header_mode {
> > };
> > #define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC
> (V4L2_CID_MPEG_BASE+217)
> > #define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE
> (V4L2_CID_MPEG_BASE+218)
> > -#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES
> (V4L2_CID_MPEG_BASE+219)
> > +#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BITS
> (V4L2_CID_MPEG_BASE+219)
>
> Why change from bytes to bits? That changes the meaning of this control.
We had a discussion about this on irc with Hans. Let me paste a snippet:
Jun 08 09:58:36 <kdebski> hverkuil: in the first email you have wrote that you would like to add some more comments on the codec controls after you get yourself familiar with the standard. any progress on that?
Jun 08 10:06:17 <hverkuil> kdebski: yes, I want to go through the docbook patch again and check each item against the standard docs I have.
Jun 08 10:06:48 <hverkuil> I'll just make notes here as I go along and you can comment on it.
Jun 08 10:08:02 <hverkuil> I want to finish my review today if possible.
Jun 08 10:10:12 <hverkuil> kdebski: VIDEO_MAX_REF_PIC: is this H264 specific or is it also valid for MPEG4?
Jun 08 10:18:36 <hverkuil> kdebski: VIDEO_MULTI_SLICE_MODE: MAX_BITS: is this specific to your encoder, or is this part of the standard? And why is it in bits instead of bytes?
Jun 08 10:22:01 <kdebski> I have had a look at the most recent documentation for MFC and MAX_REF_PIC disappeared, previously I have categorised it as H264 only
Jun 08 10:24:15 <kdebski> in ffmpeg documentation it seems as a control that can be used in other codecs as well
Jun 08 10:25:37 <kdebski> VIDEO_MULTI_SLICE_MODE: MAX_BITS it can be set in x264 with --slice-max-size (it is in bytes there)
Jun 08 10:26:10 <hverkuil> Ah, so that slice mode is for x264, not h264?
Jun 08 10:26:33 <kdebski> hverkuil: for MFC it is bits
Jun 08 10:26:56 <kdebski> x264 is an open source h264 encoder
Jun 08 10:28:20 <hverkuil> so with MAX_BITS you can get variable number of MBs per slice, right?
Jun 08 10:28:56 <kdebski> yes
Jun 08 10:29:00 <hverkuil> I think I'd call it MAX_BYTES.
Although I wasn't too convinced whether it should be BITS or BYTES we have made a choice. It is in the mainline kernel. It is part of the API - changing it now could and probably will brake existing applications.
The idea was to model the controls on the arguments/parameters used by existing open source codecs, such as x264.
[snip]
Best wishes,
--
Kamil Debski
Linux Platform Group
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-07 10:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 2:17 [PATCH 1/3] v4l: add contorl definitions for codec devices Jeongtae Park
2012-03-02 8:13 ` Hans Verkuil
2012-03-07 10:10 ` Kamil Debski
2012-03-02 8:45 ` Sylwester Nawrocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.