1 /* SPDX-License-Identifier: GPL-2.0 */
3 * These are the VP8 state controls for use with stateless VP8
6 * It turns out that these structs are not stable yet and will undergo
7 * more changes. So keep them private until they are stable and ready to
8 * become part of the official public API.
14 #include <linux/types.h>
16 #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F')
18 #define V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER (V4L2_CID_MPEG_BASE + 2000)
19 #define V4L2_CTRL_TYPE_VP8_FRAME_HEADER 0x301
21 #define V4L2_VP8_SEGMENT_HEADER_FLAG_ENABLED 0x01
22 #define V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_MAP 0x02
23 #define V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_FEATURE_DATA 0x04
24 #define V4L2_VP8_SEGMENT_HEADER_FLAG_DELTA_VALUE_MODE 0x08
26 struct v4l2_vp8_segment_header {
29 __u8 segment_probs[3];
34 #define V4L2_VP8_LF_HEADER_ADJ_ENABLE 0x01
35 #define V4L2_VP8_LF_HEADER_DELTA_UPDATE 0x02
36 #define V4L2_VP8_LF_FILTER_TYPE_SIMPLE 0x04
37 struct v4l2_vp8_loopfilter_header {
38 __s8 ref_frm_delta[4];
39 __s8 mb_mode_delta[4];
46 struct v4l2_vp8_quantization_header {
56 struct v4l2_vp8_entropy_header {
57 __u8 coeff_probs[4][8][3][11];
59 __u8 uv_mode_probs[3];
64 struct v4l2_vp8_entropy_coder_state {
71 #define V4L2_VP8_FRAME_HEADER_FLAG_KEY_FRAME 0x01
72 #define V4L2_VP8_FRAME_HEADER_FLAG_EXPERIMENTAL 0x02
73 #define V4L2_VP8_FRAME_HEADER_FLAG_SHOW_FRAME 0x04
74 #define V4L2_VP8_FRAME_HEADER_FLAG_MB_NO_SKIP_COEFF 0x08
75 #define V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_GOLDEN 0x10
76 #define V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_ALT 0x20
78 #define VP8_FRAME_IS_KEY_FRAME(hdr) \
79 (!!((hdr)->flags & V4L2_VP8_FRAME_HEADER_FLAG_KEY_FRAME))
81 struct v4l2_ctrl_vp8_frame_header {
82 struct v4l2_vp8_segment_header segment_header;
83 struct v4l2_vp8_loopfilter_header lf_header;
84 struct v4l2_vp8_quantization_header quant_header;
85 struct v4l2_vp8_entropy_header entropy_header;
86 struct v4l2_vp8_entropy_coder_state coder_state;
91 __u8 horizontal_scale;
101 __u32 first_part_size;
102 __u32 first_part_header_bits;
103 __u32 dct_part_sizes[8];
106 __u64 golden_frame_ts;