History

media: v4l2-ctrls: Add intra-refresh period control

Add a control to set intra-refresh period.

Stanimir Varbanov committed 5 years ago

Commit 9d5adee1 parent ea9f9113 files · +19 −1Browse files

Unified · Split

3 files
  1. Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +16 −1
  2. drivers/media/v4l2-core/v4l2-ctrls-defs.c +2 −0
  3. include/uapi/linux/v4l2-controls.h +1 −0
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst+16−1
@@ -1175,9 +1175,24 @@ enum v4l2_mpeg_video_h264_entropy_mode - · 1174 unmodified lines
11751175 macroblocks refreshed every frame. Each frame a successive set of
11761176 macroblocks is refreshed until the cycle completes and starts from
11771177 the top of the frame. Setting this control to zero means that
1178− macroblocks will not be refreshed.
1178+ macroblocks will not be refreshed. Note that this control will not
1179+ take effect when ``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD`` control
1180+ is set to non zero value.
11791181 Applicable to H264, H263 and MPEG4 encoder.
11801182
1183+``V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD (integer)``
1184+ Intra macroblock refresh period. This sets the period to refresh
1185+ the whole frame. In other words, this defines the number of frames
1186+ for which the whole frame will be intra-refreshed. An example:
1187+ setting period to 1 means that the whole frame will be refreshed,
1188+ setting period to 2 means that the half of macroblocks will be
1189+ intra-refreshed on frameX and the other half of macroblocks
1190+ will be refreshed in frameX + 1 and so on. Setting the period to
1191+ zero means no period is specified.
1192+ Note that if the client sets this control to non zero value the
1193+ ``V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB`` control shall be
1194+ ignored. Applicable to H264 and HEVC encoders.
1195+
11811196 ``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)``
11821197 Frame level rate control enable. If this control is disabled then
11831198 the quantization parameter for each frame type is constant and set
drivers/media/v4l2-core/v4l2-ctrls-defs.c+2−0
@@ -833,6 +833,7 @@ const char *v4l2_ctrl_get_name(u32 id) · 832 unmodified lines
833833 case V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE: return "Decoder Slice Interface";
834834 case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER: return "MPEG4 Loop Filter Enable";
835835 case V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB: return "Number of Intra Refresh MBs";
836+ case V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD: return "Intra Refresh Period";
836837 case V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE: return "Frame Level Rate Control Enable";
837838 case V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE: return "H264 MB Level Rate Control";
838839 case V4L2_CID_MPEG_VIDEO_HEADER_MODE: return "Sequence Header Mode";
@@ -1258,6 +1259,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, · 419 unmodified lines
12581259 case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE:
12591260 case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:
12601261 case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY:
1262+ case V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD:
12611263 *type = V4L2_CTRL_TYPE_INTEGER;
12621264 break;
12631265 case V4L2_CID_MPEG_VIDEO_LTR_COUNT:
include/uapi/linux/v4l2-controls.h+1−0
@@ -435,6 +435,7 @@ enum v4l2_mpeg_video_multi_slice_mode { · 434 unmodified lines
435435 #define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_CODEC_BASE+233)
436436 #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_CODEC_BASE+234)
437437 #define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (V4L2_CID_CODEC_BASE+235)
438+#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD (V4L2_CID_CODEC_BASE+236)
438439
439440 /* CIDs for the MPEG-2 Part 2 (H.262) codec */
440441 #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_CODEC_BASE+270)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t