Add a control to set intra-refresh period.
Unified · Split
| @@ -1175,9 +1175,24 @@ enum v4l2_mpeg_video_h264_entropy_mode - · 1174 unmodified lines | ||
| 1175 | 1175 | macroblocks refreshed every frame. Each frame a successive set of |
| 1176 | 1176 | macroblocks is refreshed until the cycle completes and starts from |
| 1177 | 1177 | 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. | |
| 1179 | 1181 | Applicable to H264, H263 and MPEG4 encoder. |
| 1180 | 1182 | |
| 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 | + | |
| 1181 | 1196 | ``V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (boolean)`` |
| 1182 | 1197 | Frame level rate control enable. If this control is disabled then |
| 1183 | 1198 | the quantization parameter for each frame type is constant and set |
| @@ -833,6 +833,7 @@ const char *v4l2_ctrl_get_name(u32 id) · 832 unmodified lines | ||
| 833 | 833 | case V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE: return "Decoder Slice Interface"; |
| 834 | 834 | case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER: return "MPEG4 Loop Filter Enable"; |
| 835 | 835 | 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"; | |
| 836 | 837 | case V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE: return "Frame Level Rate Control Enable"; |
| 837 | 838 | case V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE: return "H264 MB Level Rate Control"; |
| 838 | 839 | 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 | ||
| 1258 | 1259 | case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE: |
| 1259 | 1260 | case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: |
| 1260 | 1261 | case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY: |
| 1262 | + case V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD: | |
| 1261 | 1263 | *type = V4L2_CTRL_TYPE_INTEGER; |
| 1262 | 1264 | break; |
| 1263 | 1265 | case V4L2_CID_MPEG_VIDEO_LTR_COUNT: |
| @@ -435,6 +435,7 @@ enum v4l2_mpeg_video_multi_slice_mode { · 434 unmodified lines | ||
| 435 | 435 | #define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_CODEC_BASE+233) |
| 436 | 436 | #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_CODEC_BASE+234) |
| 437 | 437 | #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) | |
| 438 | 439 | |
| 439 | 440 | /* CIDs for the MPEG-2 Part 2 (H.262) codec */ |
| 440 | 441 | #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_CODEC_BASE+270) |