linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] new control V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME
@ 2016-01-14  8:33 Wu-Cheng Li
  2016-01-14  8:33 ` [PATCH v2 1/2] v4l: add V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME Wu-Cheng Li
  2016-01-14  8:33 ` [PATCH v2 2/2] s5p-mfc: add the support of V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME Wu-Cheng Li
  0 siblings, 2 replies; 7+ messages in thread
From: Wu-Cheng Li @ 2016-01-14  8:33 UTC (permalink / raw)
  To: pawel, mchehab, hverkuil, k.debski, crope, standby24x7,
	wuchengli, nicolas.dufresne, ricardo.ribalda, ao2, bparrot,
	kyungmin.park, jtp.park
  Cc: linux-media, linux-kernel, linux-api, linux-arm-kernel,
	tiffany.lin, djkurtz

v2 changes the control to button type and adds the support to s5p-mfc.

Wu-Cheng Li (2):
  v4l: add V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME.
  s5p-mfc: add the support of V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME.

 Documentation/DocBook/media/v4l/controls.xml |  8 ++++++++
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 13 +++++++++++++
 drivers/media/v4l2-core/v4l2-ctrls.c         |  2 ++
 include/uapi/linux/v4l2-controls.h           |  1 +
 4 files changed, 24 insertions(+)

-- 
2.6.0.rc2.230.g3dd15c0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] v4l: add V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME.
  2016-01-14  8:33 [PATCH v2 0/2] new control V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME Wu-Cheng Li
@ 2016-01-14  8:33 ` Wu-Cheng Li
  2016-01-14  8:54   ` Hans Verkuil
  2016-01-14  8:33 ` [PATCH v2 2/2] s5p-mfc: add the support of V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME Wu-Cheng Li
  1 sibling, 1 reply; 7+ messages in thread
From: Wu-Cheng Li @ 2016-01-14  8:33 UTC (permalink / raw)
  To: pawel, mchehab, hverkuil, k.debski, crope, standby24x7,
	wuchengli, nicolas.dufresne, ricardo.ribalda, ao2, bparrot,
	kyungmin.park, jtp.park
  Cc: linux-media, linux-kernel, linux-api, linux-arm-kernel,
	tiffany.lin, djkurtz

Some drivers also need a control like
V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE to force an encoder
I frame. Add a general V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME
so the new drivers and applications can use it.

Signed-off-by: Wu-Cheng Li <wuchengli@chromium.org>
---
 Documentation/DocBook/media/v4l/controls.xml | 8 ++++++++
 drivers/media/v4l2-core/v4l2-ctrls.c         | 2 ++
 include/uapi/linux/v4l2-controls.h           | 1 +
 3 files changed, 11 insertions(+)

diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index f13a429..6760cf5 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -2330,6 +2330,14 @@ vertical search range for motion estimation module in video encoder.</entry>
 	      </row>
 
 	      <row><entry></entry></row>
+	      <row id="v4l2-mpeg-video-force-i-frame">
+		<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME</constant>&nbsp;</entry>
+		<entry>button</entry>
+	      </row><row><entry spanname="descr">Force an I frame for the next queued buffer. Applicable to encoders.
+This is a general, codec-agnostic keyframe control.</entry>
+	      </row>
+
+	      <row><entry></entry></row>
 	      <row>
 		<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE</constant>&nbsp;</entry>
 		<entry>integer</entry>
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index c9d5537..33ecb7b 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -747,6 +747,7 @@ const char *v4l2_ctrl_get_name(u32 id)
 	case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE:		return "Horizontal MV Search Range";
 	case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:		return "Vertical MV Search Range";
 	case V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER:		return "Repeat Sequence Header";
+	case V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME:			return "Force an I frame";
 
 	/* VPX controls */
 	case V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS:		return "VPX Number of Partitions";
@@ -985,6 +986,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
 	case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:
 		*type = V4L2_CTRL_TYPE_INTEGER;
 		break;
+	case V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME:
 	case V4L2_CID_PAN_RESET:
 	case V4L2_CID_TILT_RESET:
 	case V4L2_CID_FLASH_STROBE:
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index 2d225bc..1c911b8 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -390,6 +390,7 @@ enum v4l2_mpeg_video_multi_slice_mode {
 #define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER		(V4L2_CID_MPEG_BASE+226)
 #define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE		(V4L2_CID_MPEG_BASE+227)
 #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE		(V4L2_CID_MPEG_BASE+228)
+#define V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME		(V4L2_CID_MPEG_BASE+229)
 
 #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)
-- 
2.6.0.rc2.230.g3dd15c0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] s5p-mfc: add the support of V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME.
  2016-01-14  8:33 [PATCH v2 0/2] new control V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME Wu-Cheng Li
  2016-01-14  8:33 ` [PATCH v2 1/2] v4l: add V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME Wu-Cheng Li
@ 2016-01-14  8:33 ` Wu-Cheng Li
  2016-01-14  8:56   ` Hans Verkuil
  1 sibling, 1 reply; 7+ messages in thread
From: Wu-Cheng Li @ 2016-01-14  8:33 UTC (permalink / raw)
  To: pawel, mchehab, hverkuil, k.debski, crope, standby24x7,
	wuchengli, nicolas.dufresne, ricardo.ribalda, ao2, bparrot,
	kyungmin.park, jtp.park
  Cc: linux-media, linux-kernel, linux-api, linux-arm-kernel,
	tiffany.lin, djkurtz

Signed-off-by: Wu-Cheng Li <wuchengli@chromium.org>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index 0434f02..de1d68d 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -212,6 +212,15 @@ static struct mfc_control controls[] = {
 		.menu_skip_mask = 0,
 	},
 	{
+		.id = V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME,
+		.type = V4L2_CTRL_TYPE_BUTTON,
+		.name = "Force an I frame",
+		.minimum = 0,
+		.maximum = 0,
+		.step = 0,
+		.default_value = 0,
+	},
+	{
 		.id = V4L2_CID_MPEG_VIDEO_VBV_SIZE,
 		.type = V4L2_CTRL_TYPE_INTEGER,
 		.minimum = 0,
@@ -1423,6 +1432,10 @@ static int s5p_mfc_enc_s_ctrl(struct v4l2_ctrl *ctrl)
 	case V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE:
 		ctx->force_frame_type = ctrl->val;
 		break;
+	case V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME:
+		ctx->force_frame_type
+			= V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME;
+		break;
 	case V4L2_CID_MPEG_VIDEO_VBV_SIZE:
 		p->vbv_size = ctrl->val;
 		break;
-- 
2.6.0.rc2.230.g3dd15c0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] v4l: add V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME.
  2016-01-14  8:33 ` [PATCH v2 1/2] v4l: add V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME Wu-Cheng Li
@ 2016-01-14  8:54   ` Hans Verkuil
  2016-01-14 15:01     ` Hans Verkuil
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Verkuil @ 2016-01-14  8:54 UTC (permalink / raw)
  To: Wu-Cheng Li, pawel, mchehab, k.debski, crope, standby24x7,
	nicolas.dufresne, ricardo.ribalda, ao2, bparrot, kyungmin.park,
	jtp.park
  Cc: linux-media, linux-kernel, linux-api, linux-arm-kernel,
	tiffany.lin, djkurtz

On 01/14/16 09:33, Wu-Cheng Li wrote:
> Some drivers also need a control like
> V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE to force an encoder
> I frame. Add a general V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME
> so the new drivers and applications can use it.
> 
> Signed-off-by: Wu-Cheng Li <wuchengli@chromium.org>
> ---
>  Documentation/DocBook/media/v4l/controls.xml | 8 ++++++++
>  drivers/media/v4l2-core/v4l2-ctrls.c         | 2 ++
>  include/uapi/linux/v4l2-controls.h           | 1 +
>  3 files changed, 11 insertions(+)
> 
> diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
> index f13a429..6760cf5 100644
> --- a/Documentation/DocBook/media/v4l/controls.xml
> +++ b/Documentation/DocBook/media/v4l/controls.xml
> @@ -2330,6 +2330,14 @@ vertical search range for motion estimation module in video encoder.</entry>
>  	      </row>
>  
>  	      <row><entry></entry></row>
> +	      <row id="v4l2-mpeg-video-force-i-frame">
> +		<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME</constant>&nbsp;</entry>
> +		<entry>button</entry>
> +	      </row><row><entry spanname="descr">Force an I frame for the next queued buffer. Applicable to encoders.
> +This is a general, codec-agnostic keyframe control.</entry>
> +	      </row>
> +
> +	      <row><entry></entry></row>
>  	      <row>
>  		<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE</constant>&nbsp;</entry>
>  		<entry>integer</entry>
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
> index c9d5537..33ecb7b 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls.c
> @@ -747,6 +747,7 @@ const char *v4l2_ctrl_get_name(u32 id)
>  	case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE:		return "Horizontal MV Search Range";
>  	case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:		return "Vertical MV Search Range";
>  	case V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER:		return "Repeat Sequence Header";
> +	case V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME:			return "Force an I frame";

I would suggest renaming this to Key Frame. This is consistent with the V4L2_BUF_FLAG_KEYFRAME
flag and, I think, also more generic than 'I Frame'.

So the define would become V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME and the control
description "Force Key Frame". The docbook text needs to be updated as well.

With those changes this looks good to me.

Regards,

	Hans

>  
>  	/* VPX controls */
>  	case V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS:		return "VPX Number of Partitions";
> @@ -985,6 +986,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
>  	case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:
>  		*type = V4L2_CTRL_TYPE_INTEGER;
>  		break;
> +	case V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME:
>  	case V4L2_CID_PAN_RESET:
>  	case V4L2_CID_TILT_RESET:
>  	case V4L2_CID_FLASH_STROBE:
> diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
> index 2d225bc..1c911b8 100644
> --- a/include/uapi/linux/v4l2-controls.h
> +++ b/include/uapi/linux/v4l2-controls.h
> @@ -390,6 +390,7 @@ enum v4l2_mpeg_video_multi_slice_mode {
>  #define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER		(V4L2_CID_MPEG_BASE+226)
>  #define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE		(V4L2_CID_MPEG_BASE+227)
>  #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE		(V4L2_CID_MPEG_BASE+228)
> +#define V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME		(V4L2_CID_MPEG_BASE+229)
>  
>  #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)
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] s5p-mfc: add the support of V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME.
  2016-01-14  8:33 ` [PATCH v2 2/2] s5p-mfc: add the support of V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME Wu-Cheng Li
@ 2016-01-14  8:56   ` Hans Verkuil
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Verkuil @ 2016-01-14  8:56 UTC (permalink / raw)
  To: Wu-Cheng Li, pawel, mchehab, k.debski, crope, standby24x7,
	nicolas.dufresne, ricardo.ribalda, ao2, bparrot, kyungmin.park,
	jtp.park
  Cc: linux-media, linux-kernel, linux-api, linux-arm-kernel,
	tiffany.lin, djkurtz

On 01/14/16 09:33, Wu-Cheng Li wrote:
> Signed-off-by: Wu-Cheng Li <wuchengli@chromium.org>
> ---
>  drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> index 0434f02..de1d68d 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> @@ -212,6 +212,15 @@ static struct mfc_control controls[] = {
>  		.menu_skip_mask = 0,
>  	},
>  	{
> +		.id = V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME,
> +		.type = V4L2_CTRL_TYPE_BUTTON,
> +		.name = "Force an I frame",

Drop the name: this is a standard control, so the name will be filled in from
v4l2-ctrls.c.

Regards,

	Hans

> +		.minimum = 0,
> +		.maximum = 0,
> +		.step = 0,
> +		.default_value = 0,
> +	},
> +	{
>  		.id = V4L2_CID_MPEG_VIDEO_VBV_SIZE,
>  		.type = V4L2_CTRL_TYPE_INTEGER,
>  		.minimum = 0,
> @@ -1423,6 +1432,10 @@ static int s5p_mfc_enc_s_ctrl(struct v4l2_ctrl *ctrl)
>  	case V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE:
>  		ctx->force_frame_type = ctrl->val;
>  		break;
> +	case V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME:
> +		ctx->force_frame_type
> +			= V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME;
> +		break;
>  	case V4L2_CID_MPEG_VIDEO_VBV_SIZE:
>  		p->vbv_size = ctrl->val;
>  		break;
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] v4l: add V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME.
  2016-01-14  8:54   ` Hans Verkuil
@ 2016-01-14 15:01     ` Hans Verkuil
  2016-01-19  7:08       ` Wu-Cheng Li (李務誠)
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Verkuil @ 2016-01-14 15:01 UTC (permalink / raw)
  To: Wu-Cheng Li, pawel, mchehab, k.debski, crope, standby24x7,
	nicolas.dufresne, ricardo.ribalda, ao2, bparrot, kyungmin.park,
	jtp.park
  Cc: linux-media, linux-kernel, linux-api, linux-arm-kernel,
	tiffany.lin, djkurtz

Hi Wu-Cheng,

Your v3 didn't address these comments. Any reason for that or did you just miss this
email?

Just wondering,

	Hans

On 01/14/16 09:54, Hans Verkuil wrote:
> On 01/14/16 09:33, Wu-Cheng Li wrote:
>> Some drivers also need a control like
>> V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE to force an encoder
>> I frame. Add a general V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME
>> so the new drivers and applications can use it.
>>
>> Signed-off-by: Wu-Cheng Li <wuchengli@chromium.org>
>> ---
>>  Documentation/DocBook/media/v4l/controls.xml | 8 ++++++++
>>  drivers/media/v4l2-core/v4l2-ctrls.c         | 2 ++
>>  include/uapi/linux/v4l2-controls.h           | 1 +
>>  3 files changed, 11 insertions(+)
>>
>> diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
>> index f13a429..6760cf5 100644
>> --- a/Documentation/DocBook/media/v4l/controls.xml
>> +++ b/Documentation/DocBook/media/v4l/controls.xml
>> @@ -2330,6 +2330,14 @@ vertical search range for motion estimation module in video encoder.</entry>
>>  	      </row>
>>  
>>  	      <row><entry></entry></row>
>> +	      <row id="v4l2-mpeg-video-force-i-frame">
>> +		<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME</constant>&nbsp;</entry>
>> +		<entry>button</entry>
>> +	      </row><row><entry spanname="descr">Force an I frame for the next queued buffer. Applicable to encoders.
>> +This is a general, codec-agnostic keyframe control.</entry>
>> +	      </row>
>> +
>> +	      <row><entry></entry></row>
>>  	      <row>
>>  		<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE</constant>&nbsp;</entry>
>>  		<entry>integer</entry>
>> diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
>> index c9d5537..33ecb7b 100644
>> --- a/drivers/media/v4l2-core/v4l2-ctrls.c
>> +++ b/drivers/media/v4l2-core/v4l2-ctrls.c
>> @@ -747,6 +747,7 @@ const char *v4l2_ctrl_get_name(u32 id)
>>  	case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE:		return "Horizontal MV Search Range";
>>  	case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:		return "Vertical MV Search Range";
>>  	case V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER:		return "Repeat Sequence Header";
>> +	case V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME:			return "Force an I frame";
> 
> I would suggest renaming this to Key Frame. This is consistent with the V4L2_BUF_FLAG_KEYFRAME
> flag and, I think, also more generic than 'I Frame'.
> 
> So the define would become V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME and the control
> description "Force Key Frame". The docbook text needs to be updated as well.
> 
> With those changes this looks good to me.
> 
> Regards,
> 
> 	Hans
> 
>>  
>>  	/* VPX controls */
>>  	case V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS:		return "VPX Number of Partitions";
>> @@ -985,6 +986,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
>>  	case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:
>>  		*type = V4L2_CTRL_TYPE_INTEGER;
>>  		break;
>> +	case V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME:
>>  	case V4L2_CID_PAN_RESET:
>>  	case V4L2_CID_TILT_RESET:
>>  	case V4L2_CID_FLASH_STROBE:
>> diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
>> index 2d225bc..1c911b8 100644
>> --- a/include/uapi/linux/v4l2-controls.h
>> +++ b/include/uapi/linux/v4l2-controls.h
>> @@ -390,6 +390,7 @@ enum v4l2_mpeg_video_multi_slice_mode {
>>  #define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER		(V4L2_CID_MPEG_BASE+226)
>>  #define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE		(V4L2_CID_MPEG_BASE+227)
>>  #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE		(V4L2_CID_MPEG_BASE+228)
>> +#define V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME		(V4L2_CID_MPEG_BASE+229)
>>  
>>  #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)
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] v4l: add V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME.
  2016-01-14 15:01     ` Hans Verkuil
@ 2016-01-19  7:08       ` Wu-Cheng Li (李務誠)
  0 siblings, 0 replies; 7+ messages in thread
From: Wu-Cheng Li (李務誠) @ 2016-01-19  7:08 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Wu-Cheng Li, pawel, mchehab, k.debski, Antti Palosaari,
	Masanari Iida, Nicolas Dufresne, Ricardo Ribalda Delgado, ao2,
	bparrot, kyungmin.park, jtp.park, linux-media, linux-kernel,
	linux-api, linux-arm-kernel, Tiffany Lin, Daniel Kurtz

Sorry. I missed the email because of wrong email client configuration.
I've uploaded v4 to address the comments.

On Thu, Jan 14, 2016 at 7:01 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>
> Hi Wu-Cheng,
>
> Your v3 didn't address these comments. Any reason for that or did you just miss this
> email?
>
> Just wondering,
>
>         Hans
>
> On 01/14/16 09:54, Hans Verkuil wrote:
> > On 01/14/16 09:33, Wu-Cheng Li wrote:
> >> Some drivers also need a control like
> >> V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE to force an encoder
> >> I frame. Add a general V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME
> >> so the new drivers and applications can use it.
> >>
> >> Signed-off-by: Wu-Cheng Li <wuchengli@chromium.org>
> >> ---
> >>  Documentation/DocBook/media/v4l/controls.xml | 8 ++++++++
> >>  drivers/media/v4l2-core/v4l2-ctrls.c         | 2 ++
> >>  include/uapi/linux/v4l2-controls.h           | 1 +
> >>  3 files changed, 11 insertions(+)
> >>
> >> diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
> >> index f13a429..6760cf5 100644
> >> --- a/Documentation/DocBook/media/v4l/controls.xml
> >> +++ b/Documentation/DocBook/media/v4l/controls.xml
> >> @@ -2330,6 +2330,14 @@ vertical search range for motion estimation module in video encoder.</entry>
> >>            </row>
> >>
> >>            <row><entry></entry></row>
> >> +          <row id="v4l2-mpeg-video-force-i-frame">
> >> +            <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME</constant>&nbsp;</entry>
> >> +            <entry>button</entry>
> >> +          </row><row><entry spanname="descr">Force an I frame for the next queued buffer. Applicable to encoders.
> >> +This is a general, codec-agnostic keyframe control.</entry>
> >> +          </row>
> >> +
> >> +          <row><entry></entry></row>
> >>            <row>
> >>              <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE</constant>&nbsp;</entry>
> >>              <entry>integer</entry>
> >> diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
> >> index c9d5537..33ecb7b 100644
> >> --- a/drivers/media/v4l2-core/v4l2-ctrls.c
> >> +++ b/drivers/media/v4l2-core/v4l2-ctrls.c
> >> @@ -747,6 +747,7 @@ const char *v4l2_ctrl_get_name(u32 id)
> >>      case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE:             return "Horizontal MV Search Range";
> >>      case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:             return "Vertical MV Search Range";
> >>      case V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER:             return "Repeat Sequence Header";
> >> +    case V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME:                 return "Force an I frame";
> >
> > I would suggest renaming this to Key Frame. This is consistent with the V4L2_BUF_FLAG_KEYFRAME
> > flag and, I think, also more generic than 'I Frame'.
> >
> > So the define would become V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME and the control
> > description "Force Key Frame". The docbook text needs to be updated as well.
> >
> > With those changes this looks good to me.
> >
> > Regards,
> >
> >       Hans
> >
> >>
> >>      /* VPX controls */
> >>      case V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS:            return "VPX Number of Partitions";
> >> @@ -985,6 +986,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
> >>      case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:
> >>              *type = V4L2_CTRL_TYPE_INTEGER;
> >>              break;
> >> +    case V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME:
> >>      case V4L2_CID_PAN_RESET:
> >>      case V4L2_CID_TILT_RESET:
> >>      case V4L2_CID_FLASH_STROBE:
> >> diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
> >> index 2d225bc..1c911b8 100644
> >> --- a/include/uapi/linux/v4l2-controls.h
> >> +++ b/include/uapi/linux/v4l2-controls.h
> >> @@ -390,6 +390,7 @@ enum v4l2_mpeg_video_multi_slice_mode {
> >>  #define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER               (V4L2_CID_MPEG_BASE+226)
> >>  #define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE               (V4L2_CID_MPEG_BASE+227)
> >>  #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE               (V4L2_CID_MPEG_BASE+228)
> >> +#define V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME           (V4L2_CID_MPEG_BASE+229)
> >>
> >>  #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)
> >>
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-media" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-01-19  7:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-14  8:33 [PATCH v2 0/2] new control V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME Wu-Cheng Li
2016-01-14  8:33 ` [PATCH v2 1/2] v4l: add V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME Wu-Cheng Li
2016-01-14  8:54   ` Hans Verkuil
2016-01-14 15:01     ` Hans Verkuil
2016-01-19  7:08       ` Wu-Cheng Li (李務誠)
2016-01-14  8:33 ` [PATCH v2 2/2] s5p-mfc: add the support of V4L2_CID_MPEG_VIDEO_FORCE_I_FRAME Wu-Cheng Li
2016-01-14  8:56   ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).