media: v4l2-ctrl: add control for long term reference.
Subsystems (2)
PATCH v4 1/1 media: v4l2-ctrl: add control for long term reference.
Long Term Reference (LTR) frames are the frames that are encoded sometime in the past and stored in the DPB buffer list to be used as reference to encode future frames.
This change adds controls to enable this feature.
--- .../userspace-api/media/v4l/ext-ctrls-codec.rst | 18 ++++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 14 ++++++++++++++ include/uapi/linux/v4l2-controls.h | 3 +++ 3 files changed, 35 insertions(+)
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +18 -0
@@ -4450,3 +4450,21 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - - Selecting this value specifies that HEVC slices are expected to be prefixed by Annex B start codes. According to :ref:`hevc` valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001. + +``V4L2_CID_MPEG_VIDEO_LTR_COUNT (integer)`` + Specifies the number of Long Term Reference (LTR) frames encoder needs + to generate or keep. This is applicable to H264 and HEVC encoder. + +``V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (integer)`` + The current frame is marked as a Long Term Reference (LTR) frame + and given this LTR index which ranges from 0 to LTR_COUNT-1. + This is applicable to H264 and HEVC encoder and can be applied using + Request Api. + Source Rec. ITU-T H.264 (06/2019); Table 7.9 + +``V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (bitmask)`` + Specifies the Long Term Reference (LTR) frame(s) to be used for + encoding the current frame. + This provides a bitmask which consists of bits [0, LTR_COUNT-1]. + This is applicable to H264 and HEVC encoder and can be applied using + Request Api.
drivers/media/v4l2-core/v4l2-ctrls.c +14 -0
@@ -958,6 +958,9 @@ const char *v4l2_ctrl_get_name(u32 id)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_KEY_FRAME :return "Force Key Frame" ; +case V4L2_CID_MPEG_VIDEO_LTR_COUNT :return "LTR Count" ; +case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX :return "frame LTR index" ; +case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES :return "Use LTR Frame(s)" ;case V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS :return "MPEG-2 Slice Parameters" ;case V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION :return "MPEG-2 Quantization Matrices" ;case V4L2_CID_MPEG_VIDEO_FWHT_PARAMS :return "FWHT Stateless Parameters" ;
@@ -1273,6 +1276,17 @@ 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_LTR_COUNT : + *type =V4L2_CTRL_TYPE_INTEGER ; +break ; +case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX : + *type =V4L2_CTRL_TYPE_INTEGER ; + *flags |=V4L2_CTRL_FLAG_EXECUTE_ON_WRITE ; +break ; +case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES : + *type =V4L2_CTRL_TYPE_BITMASK ; + *flags |=V4L2_CTRL_FLAG_EXECUTE_ON_WRITE ; +break ;case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME :case V4L2_CID_PAN_RESET :case V4L2_CID_TILT_RESET :
include/uapi/linux/v4l2-controls.h +3 -0
@@ -421,6 +421,9 @@ enum v4l2_mpeg_video_multi_slice_mode {#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_KEY_FRAME (V4L2_CID_MPEG_BASE+229) +#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_MPEG_BASE + 230) +#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_MPEG_BASE + 231) +#define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_MPEG_BASE + 232)/* CIDs for the MPEG-2 Part 2 (H.262) codec */ #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_MPEG_BASE+270)
Signature · 1 line
2.7.4
Quoted 43 lines · Dikshita Agarwal
Long Term Reference (LTR) frames are the frames that are encoded sometime in the past and stored in the DPB buffer list to be used as reference to encode future frames.
This change adds controls to enable this feature.Signed-off-by Dikshita Agarwal <[email protected]>--- .../userspace-api/media/v4l/ext-ctrls-codec.rst | 18 ++++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 14 ++++++++++++++ include/uapi/linux/v4l2-controls.h | 3 +++ 3 files changed, 35 insertions(+)Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +18
-0@@ -4450,3 +4450,21 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - - Selecting this value specifies that HEVC slices are expected to be prefixed by Annex B start codes. According to :ref:`hevc` valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001. + +``V4L2_CID_MPEG_VIDEO_LTR_COUNT (integer)`` + Specifies the number of Long Term Reference (LTR) frames encoder needs + to generate or keep. This is applicable to H264 and HEVC encoder. + +``V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (integer)`` + The current frame is marked as a Long Term Reference (LTR) frame + and given this LTR index which ranges from 0 to LTR_COUNT-1. + This is applicable to H264 and HEVC encoder and can be applied using + Request Api. + Source Rec. ITU-T H.264 (06/2019); Table 7.9 + +``V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (bitmask)`` + Specifies the Long Term Reference (LTR) frame(s) to be used for + encoding the current frame. + This provides a bitmask which consists of bits [0, LTR_COUNT-1]. + This is applicable to H264 and HEVC encoder and can be applied using + Request Api.drivers/media/v4l2-core/v4l2-ctrls.c +0
-0
drivers/media/v4l2-core/v4l2-ctrls.c const char *v4l2_ctrl_get_name(u32 id) · line 962
Quoted 5 lines
drivers/media/v4l2-core/v4l2-ctrls.c +2
-0@@ -958,6 +958,9 @@ const char *v4l2_ctrl_get_name(u32 id)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_KEY_FRAME :return "Force Key Frame" ; +case V4L2_CID_MPEG_VIDEO_LTR_COUNT :return "LTR Count" ; +case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX :return "frame LTR index" ;
"Frame LTR Index"
drivers/media/v4l2-core/v4l2-ctrls.c const char *v4l2_ctrl_get_name(u32 id) · line 963
Quoted 1 line
drivers/media/v4l2-core/v4l2-ctrls.c +1
-0+case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES :return "Use LTR Frame(s)" ;
Just: "Use LTR Frames". No '(s)'.
Quoted 27 lines
drivers/media/v4l2-core/v4l2-ctrls.c +11
-0case V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS :return "MPEG-2 Slice Parameters" ;case V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION :return "MPEG-2 Quantization Matrices" ;case V4L2_CID_MPEG_VIDEO_FWHT_PARAMS :return "FWHT Stateless Parameters" ;@@ -1273,6 +1276,17 @@ 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_LTR_COUNT : + *type =V4L2_CTRL_TYPE_INTEGER ; +break ; +case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX : + *type =V4L2_CTRL_TYPE_INTEGER ; + *flags |=V4L2_CTRL_FLAG_EXECUTE_ON_WRITE ; +break ; +case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES : + *type =V4L2_CTRL_TYPE_BITMASK ; + *flags |=V4L2_CTRL_FLAG_EXECUTE_ON_WRITE ; +break ;case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME :case V4L2_CID_PAN_RESET :case V4L2_CID_TILT_RESET :include/uapi/linux/v4l2-controls.h +0
-0
include/uapi/linux/v4l2-controls.h enum v4l2_mpeg_video_multi_slice_mode { · line 429
Quoted 9 lines
include/uapi/linux/v4l2-controls.h +3
-0@@ -421,6 +421,9 @@ enum v4l2_mpeg_video_multi_slice_mode {#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_KEY_FRAME (V4L2_CID_MPEG_BASE+229) +#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_MPEG_BASE + 230) +#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_MPEG_BASE + 231) +#define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_MPEG_BASE + 232)/* CIDs for the MPEG-2 Part 2 (H.262) codec */ #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_MPEG_BASE+270)
Note that this and the other patches from you that add V4L2_CID_MPEG_VIDEO controls will need to be rebased as soon as this PR is merged:
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
I recommend waiting until that's in.
I currently have the following patches from you adding new controls besides this one:
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
What is missing is driver support for these new controls. I recommend that, once the PR mentioned above is merged, you make a new series combining all three patches + patches that add support for this to the venus driver.
Regards,
Hans
Hi Hans,
Quoted 127 lines · Hans Verkuil
Quoted 55 lines · Dikshita Agarwal
Long Term Reference (LTR) frames are the frames that are encoded sometime in the past and stored in the DPB buffer list to be used as reference to encode future frames.
This change adds controls to enable this feature.Signed-off-by Dikshita Agarwal <[email protected]>--- .../userspace-api/media/v4l/ext-ctrls-codec.rst | 18 ++++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 14 ++++++++++++++ include/uapi/linux/v4l2-controls.h | 3 +++ 3 files changed, 35 insertions(+)Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +0
-1@@ -4450,3 +4450,21 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - - Selecting this value specifies that HEVC slices are expected to be prefixed by Annex B start codes. According to:ref:
hevcvalid start codes can be 3-bytes 0x000001 or 4-bytes
0x00000001.Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +3
-0+ +``V4L2_CID_MPEG_VIDEO_LTR_COUNT (integer)`` + Specifies the number of Long Term Reference (LTR) framesencoder needs
+ to generate or keep. This is applicable to H264 and HEVC
encoder.Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +3
-0+ +``V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (integer)`` + The current frame is marked as a Long Term Reference (LTR)frame
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +2
-0+ and given this LTR index which ranges from 0 to LTR_COUNT-1. + This is applicable to H264 and HEVC encoder and can be appliedusing
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +5
-0+ Request Api. + Source Rec. ITU-T H.264 (06/2019); Table 7.9 + +``V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (bitmask)`` + Specifies the Long Term Reference (LTR) frame(s) to be usedfor
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +2
-0+ encoding the current frame. + This provides a bitmask which consists of bits [0,LTR_COUNT-1].
+ This is applicable to H264 and HEVC encoder and can be applied
usingDocumentation/userspace-api/media/v4l/ext-ctrls-codec.rst +1
-0+ Request Api.drivers/media/v4l2-core/v4l2-ctrls.c +0
-0drivers/media/v4l2-core/v4l2-ctrls.c const char *v4l2_ctrl_get_name(u32 id) · line 964
Quoted 7 lines
drivers/media/v4l2-core/v4l2-ctrls.c +2
-0@@ -958,6 +958,9 @@ const char *v4l2_ctrl_get_name(u32 id) 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_KEY_FRAME :return "Force Key Frame" ; +case V4L2_CID_MPEG_VIDEO_LTR_COUNT :return "LTR Count" ; +case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX :return "frame LTR index" ;"Frame LTR Index"
drivers/media/v4l2-core/v4l2-ctrls.c const char *v4l2_ctrl_get_name(u32 id) · line 963
Quoted 1 line
drivers/media/v4l2-core/v4l2-ctrls.c +1
-0+case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES :return "Use LTR Frame(s)" ;Just: "Use LTR Frames". No '(s)'.
Quoted 42 lines
drivers/media/v4l2-core/v4l2-ctrls.c +0
-0case V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS: return "MPEG-2 SliceParameters";
caseV4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION: return "MPEG-2
Quantization Matrices";
caseV4L2_CID_MPEG_VIDEO_FWHT_PARAMS: return "FWHT Stateless
Parameters";drivers/media/v4l2-core/v4l2-ctrls.c +11
-0@@ -1273,6 +1276,17 @@ 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_LTR_COUNT : + *type =V4L2_CTRL_TYPE_INTEGER ; +break ; +case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX : + *type =V4L2_CTRL_TYPE_INTEGER ; + *flags |=V4L2_CTRL_FLAG_EXECUTE_ON_WRITE ; +break ; +case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES : + *type =V4L2_CTRL_TYPE_BITMASK ; + *flags |=V4L2_CTRL_FLAG_EXECUTE_ON_WRITE ; +break ;case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME :case V4L2_CID_PAN_RESET :drivers/media/v4l2-core/v4l2-ctrls.c +0
-0case V4L2_CID_TILT_RESET :include/uapi/linux/v4l2-controls.h +2
-0@@ -421,6 +421,9 @@ enum v4l2_mpeg_video_multi_slice_mode {#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_KEY_FRAME (V4L2_CID_MPEG_BASE+229) +#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_MPEG_BASE + 230) +#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (
V4L2_CID_MPEG_BASE+ 231)
+#defineV4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES
(V4L2_CID_MPEG_BASE+ 232)Quoted 3 lines
/* CIDs for the MPEG-2 Part 2 (H.262) codec */
#defineV4L2_CID_MPEG_VIDEO_MPEG2_LEVEL(V4L2_CID_MPEG_BASE+270)Note that this and the other patches from you that add
V4L2_CID_MPEG_VIDEOcontrols
will need to be rebased as soon as this PR is merged:https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
I recommend waiting until that's in.
I currently have the following patches from you adding new controls besides this one:
Quoted 8 lines
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/What is missing is driver support for these new controls. I recommend that, once the PR mentioned above is merged, you make a new series combining all three patches + patches that add support for this to the venus driver.
I will address all comments in the next version and will include driver implementation as well. Once all the driver changes are reviewed, I will make a series with all final patches, Hope that's fine.
Thanks,
Dikshita
Quoted 3 lines
Regards,
Hans
Quoted 143 lines · On 08/12/2020 17:44, [email protected] wrote:
Hi Hans,
Quoted 134 lines · Hans Verkuil
Quoted 57 lines · Dikshita Agarwal
Long Term Reference (LTR) frames are the frames that are encoded sometime in the past and stored in the DPB buffer list to be used as reference to encode future frames.
This change adds controls to enable this feature.Signed-off-by Dikshita Agarwal <[email protected]>--- .../userspace-api/media/v4l/ext-ctrls-codec.rst | 18 ++++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 14 ++++++++++++++ include/uapi/linux/v4l2-controls.h | 3 +++ 3 files changed, 35 insertions(+)Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +0
-1@@ -4450,3 +4450,21 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - - Selecting this value specifies that HEVC slices are expected to be prefixed by Annex B start codes. According to:ref:
hevcvalid start codes can be 3-bytes 0x000001 or 4-bytes
0x00000001.Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +3
-0+ +``V4L2_CID_MPEG_VIDEO_LTR_COUNT (integer)`` + Specifies the number of Long Term Reference (LTR) framesencoder needs
+ to generate or keep. This is applicable to H264 and HEVC
encoder.Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +3
-0+ +``V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (integer)`` + The current frame is marked as a Long Term Reference (LTR)frame
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +2
-0+ and given this LTR index which ranges from 0 to LTR_COUNT-1. + This is applicable to H264 and HEVC encoder and can be appliedusing
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +5
-0+ Request Api. + Source Rec. ITU-T H.264 (06/2019); Table 7.9 + +``V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (bitmask)`` + Specifies the Long Term Reference (LTR) frame(s) to be usedfor
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +2
-0+ encoding the current frame. + This provides a bitmask which consists of bits [0,LTR_COUNT-1].
+ This is applicable to H264 and HEVC encoder and can be applied
usingDocumentation/userspace-api/media/v4l/ext-ctrls-codec.rst +1
-0+ Request Api.drivers/media/v4l2-core/v4l2-ctrls.c +0
-0drivers/media/v4l2-core/v4l2-ctrls.c const char *v4l2_ctrl_get_name(u32 id) · line 964
Quoted 7 lines
drivers/media/v4l2-core/v4l2-ctrls.c +2
-0@@ -958,6 +958,9 @@ const char *v4l2_ctrl_get_name(u32 id) 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_KEY_FRAME :return "Force Key Frame" ; +case V4L2_CID_MPEG_VIDEO_LTR_COUNT :return "LTR Count" ; +case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX :return "frame LTR index" ;"Frame LTR Index"
drivers/media/v4l2-core/v4l2-ctrls.c const char *v4l2_ctrl_get_name(u32 id) · line 963
Quoted 1 line
drivers/media/v4l2-core/v4l2-ctrls.c +1
-0+case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES :return "Use LTR Frame(s)" ;Just: "Use LTR Frames". No '(s)'.
Quoted 43 lines
drivers/media/v4l2-core/v4l2-ctrls.c +0
-0case V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS: return "MPEG-2 SliceParameters";
caseV4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION: return "MPEG-2
Quantization Matrices";
caseV4L2_CID_MPEG_VIDEO_FWHT_PARAMS: return "FWHT Stateless
Parameters";drivers/media/v4l2-core/v4l2-ctrls.c +11
-0@@ -1273,6 +1276,17 @@ 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_LTR_COUNT : + *type =V4L2_CTRL_TYPE_INTEGER ; +break ; +case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX : + *type =V4L2_CTRL_TYPE_INTEGER ; + *flags |=V4L2_CTRL_FLAG_EXECUTE_ON_WRITE ; +break ; +case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES : + *type =V4L2_CTRL_TYPE_BITMASK ; + *flags |=V4L2_CTRL_FLAG_EXECUTE_ON_WRITE ; +break ;case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME :case V4L2_CID_PAN_RESET :drivers/media/v4l2-core/v4l2-ctrls.c +0
-0case V4L2_CID_TILT_RESET :include/uapi/linux/v4l2-controls.h +2
-0@@ -421,6 +421,9 @@ enum v4l2_mpeg_video_multi_slice_mode {#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_KEY_FRAME (V4L2_CID_MPEG_BASE+229) +#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_MPEG_BASE + 230) +#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (
V4L2_CID_MPEG_BASE+ 231)
+#defineV4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES
(V4L2_CID_MPEG_BASE+ 232)Quoted 3 lines
/* CIDs for the MPEG-2 Part 2 (H.262) codec */
#defineV4L2_CID_MPEG_VIDEO_MPEG2_LEVEL(V4L2_CID_MPEG_BASE+270)Note that this and the other patches from you that add
V4L2_CID_MPEG_VIDEOcontrols
will need to be rebased as soon as this PR is merged:https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
I recommend waiting until that's in.
I currently have the following patches from you adding new controls besides this one:
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/Quoted 6 lines
What is missing is driver support for these new controls. I recommend that, once
the PR mentioned above is merged, you make a new series combining all three
patches + patches that add support for this to the venus driver.
Quoted 4 lines
I will address all comments in the next version and will include driver implementation as well.
Once all the driver changes are reviewed, I will make a series with all final patches, Hope that's fine.
That sounds great!
Regards,
Hans
Quoted 7 lines
Thanks,
DikshitaQuoted 3 lines
Regards,
Hans