FFmpeg
cbs_vp8.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef AVCODEC_CBS_VP8_H
20 #define AVCODEC_CBS_VP8_H
21 
22 #include <stddef.h>
23 #include <stdint.h>
24 
25 #include "cbs.h"
26 
27 enum {
31 };
32 
33 enum {
36 };
37 
38 typedef struct VP8RawFrameHeader {
39  // frame tag
40  uint8_t frame_type;
41  uint8_t profile;
42  uint8_t show_frame;
44 
45  uint16_t width;
47  uint16_t height;
48  uint8_t vertical_scale;
49 
50  // frame header
51  uint8_t color_space;
52  uint8_t clamping_type;
53 
54  // segmentation
59  uint8_t segment_qp_update[4];
60  int8_t segment_qp[4];
64  uint8_t segment_probs[3];
65 
66  // loop filter
73  int8_t ref_lf_deltas[4];
75  int8_t mode_lf_deltas[4];
76 
78 
79  // qp
80  uint8_t base_qindex;
82  int8_t y1dc_delta_q;
84  int8_t y2dc_delta_q;
86  int8_t y2ac_delta_q;
88  int8_t uvdc_delta_q;
90  int8_t uvac_delta_q;
91 
92  // ref
100 
102 
103  // token probs
104  uint8_t coeff_prob_update[4][8][3][11];
105  uint8_t coeff_prob[4][8][3][11];
106 
109 
110  uint8_t prob_intra;
111  uint8_t prob_last;
112  uint8_t prob_golden;
113 
115  uint8_t intra_16x16_prob[4];
116 
118  uint8_t intra_chrome_prob[3];
119 
120  // mv probs
121  uint8_t mv_prob_update[2][19];
122  uint8_t mv_prob[2][19];
124 
125 typedef struct VP8RawFrame {
127 
128  uint8_t *data;
130  size_t data_size;
131 } VP8RawFrame;
132 
133 #endif /* AVCODEC_CBS_VP8_H */
VP8RawFrameHeader::mb_no_skip_coeff
uint8_t mb_no_skip_coeff
Definition: cbs_vp8.h:107
VP8RawFrameHeader::copy_buffer_to_golden
uint8_t copy_buffer_to_golden
Definition: cbs_vp8.h:95
VP8_START_CODE_1
@ VP8_START_CODE_1
Definition: cbs_vp8.h:29
VP8RawFrameHeader::refresh_entropy_probs
uint8_t refresh_entropy_probs
Definition: cbs_vp8.h:101
VP8RawFrameHeader::intra_16x16_prob
uint8_t intra_16x16_prob[4]
Definition: cbs_vp8.h:115
VP8RawFrameHeader::prob_golden
uint8_t prob_golden
Definition: cbs_vp8.h:112
VP8RawFrameHeader::intra_chrome_prob
uint8_t intra_chrome_prob[3]
Definition: cbs_vp8.h:118
VP8RawFrameHeader::intra_chrome_prob_update
uint8_t intra_chrome_prob_update
Definition: cbs_vp8.h:117
VP8RawFrameHeader::frame_type
uint8_t frame_type
Definition: cbs_vp8.h:40
VP8RawFrameHeader::update_segment_feature_data
uint8_t update_segment_feature_data
Definition: cbs_vp8.h:57
VP8RawFrameHeader::coeff_prob
uint8_t coeff_prob[4][8][3][11]
Definition: cbs_vp8.h:105
VP8_NON_KEY_FRAME
@ VP8_NON_KEY_FRAME
Definition: cbs_vp8.h:35
cbs.h
VP8RawFrameHeader::uvac_delta_q
int8_t uvac_delta_q
Definition: cbs_vp8.h:90
VP8RawFrameHeader::vertical_scale
uint8_t vertical_scale
Definition: cbs_vp8.h:48
VP8RawFrameHeader::segment_qp
int8_t segment_qp[4]
Definition: cbs_vp8.h:60
VP8RawFrameHeader::ref_frame_sign_bias_alternate
uint8_t ref_frame_sign_bias_alternate
Definition: cbs_vp8.h:98
VP8RawFrameHeader::show_frame
uint8_t show_frame
Definition: cbs_vp8.h:42
VP8RawFrameHeader::mode_lf_deltas_update
uint8_t mode_lf_deltas_update[4]
Definition: cbs_vp8.h:74
VP8RawFrameHeader::intra_16x16_prob_update
uint8_t intra_16x16_prob_update
Definition: cbs_vp8.h:114
VP8RawFrameHeader::loop_filter_sharpness
uint8_t loop_filter_sharpness
Definition: cbs_vp8.h:69
VP8RawFrameHeader::profile
uint8_t profile
Definition: cbs_vp8.h:41
VP8RawFrameHeader::y2dc_delta_q
int8_t y2dc_delta_q
Definition: cbs_vp8.h:84
VP8_KEY_FRAME
@ VP8_KEY_FRAME
Definition: cbs_vp8.h:34
VP8RawFrameHeader::horizontal_scale
uint8_t horizontal_scale
Definition: cbs_vp8.h:46
VP8RawFrameHeader::y2ac_delta_q
int8_t y2ac_delta_q
Definition: cbs_vp8.h:86
VP8RawFrameHeader::log2_token_partitions
uint8_t log2_token_partitions
Definition: cbs_vp8.h:77
VP8RawFrameHeader::color_space
uint8_t color_space
Definition: cbs_vp8.h:51
VP8RawFrameHeader::y2ac_delta_q_present
uint8_t y2ac_delta_q_present
Definition: cbs_vp8.h:85
VP8RawFrameHeader::mode_ref_lf_delta_update
uint8_t mode_ref_lf_delta_update
Definition: cbs_vp8.h:71
VP8RawFrameHeader
Definition: cbs_vp8.h:38
VP8RawFrameHeader::ref_lf_deltas
int8_t ref_lf_deltas[4]
Definition: cbs_vp8.h:73
VP8RawFrameHeader::uvdc_delta_q
int8_t uvdc_delta_q
Definition: cbs_vp8.h:88
VP8RawFrameHeader::y1dc_delta_q
int8_t y1dc_delta_q
Definition: cbs_vp8.h:82
VP8RawFrameHeader::mode_lf_deltas
int8_t mode_lf_deltas[4]
Definition: cbs_vp8.h:75
VP8RawFrameHeader::loop_filter_level
uint8_t loop_filter_level
Definition: cbs_vp8.h:68
VP8RawFrameHeader::uvac_delta_q_present
uint8_t uvac_delta_q_present
Definition: cbs_vp8.h:89
VP8RawFrame
Definition: cbs_vp8.h:125
VP8RawFrameHeader::copy_buffer_to_alternate
uint8_t copy_buffer_to_alternate
Definition: cbs_vp8.h:96
VP8RawFrameHeader::segment_probs
uint8_t segment_probs[3]
Definition: cbs_vp8.h:64
VP8RawFrameHeader::update_segment_map
uint8_t update_segment_map
Definition: cbs_vp8.h:56
VP8RawFrameHeader::segment_probs_update
uint8_t segment_probs_update[3]
Definition: cbs_vp8.h:63
VP8_START_CODE_0
@ VP8_START_CODE_0
Definition: cbs_vp8.h:28
VP8RawFrameHeader::y2dc_delta_q_present
uint8_t y2dc_delta_q_present
Definition: cbs_vp8.h:83
VP8RawFrameHeader::ref_frame_sign_bias_golden
uint8_t ref_frame_sign_bias_golden
Definition: cbs_vp8.h:97
VP8RawFrame::header
VP8RawFrameHeader header
Definition: cbs_vp8.h:126
VP8RawFrameHeader::refresh_golden_frame
uint8_t refresh_golden_frame
Definition: cbs_vp8.h:93
VP8_START_CODE_2
@ VP8_START_CODE_2
Definition: cbs_vp8.h:30
VP8RawFrameHeader::refresh_last_frame
uint8_t refresh_last_frame
Definition: cbs_vp8.h:99
VP8RawFrameHeader::refresh_alternate_frame
uint8_t refresh_alternate_frame
Definition: cbs_vp8.h:94
VP8RawFrameHeader::segmentation_enable
uint8_t segmentation_enable
Definition: cbs_vp8.h:55
VP8RawFrameHeader::segment_loop_filter_level_update
uint8_t segment_loop_filter_level_update[4]
Definition: cbs_vp8.h:61
VP8RawFrame::data_ref
AVBufferRef * data_ref
Definition: cbs_vp8.h:129
VP8RawFrameHeader::segment_loop_filter_level
int8_t segment_loop_filter_level[4]
Definition: cbs_vp8.h:62
VP8RawFrameHeader::y1dc_delta_q_present
uint8_t y1dc_delta_q_present
Definition: cbs_vp8.h:81
VP8RawFrameHeader::mv_prob_update
uint8_t mv_prob_update[2][19]
Definition: cbs_vp8.h:121
VP8RawFrameHeader::coeff_prob_update
uint8_t coeff_prob_update[4][8][3][11]
Definition: cbs_vp8.h:104
VP8RawFrameHeader::base_qindex
uint8_t base_qindex
Definition: cbs_vp8.h:80
VP8RawFrameHeader::first_partition_length_in_bytes
uint32_t first_partition_length_in_bytes
Definition: cbs_vp8.h:43
VP8RawFrameHeader::segment_feature_mode
uint8_t segment_feature_mode
Definition: cbs_vp8.h:58
VP8RawFrame::data_size
size_t data_size
Definition: cbs_vp8.h:130
AVBufferRef
A reference to a data buffer.
Definition: buffer.h:82
VP8RawFrameHeader::width
uint16_t width
Definition: cbs_vp8.h:45
VP8RawFrameHeader::prob_skip_false
uint8_t prob_skip_false
Definition: cbs_vp8.h:108
VP8RawFrameHeader::uvdc_delta_q_present
uint8_t uvdc_delta_q_present
Definition: cbs_vp8.h:87
VP8RawFrameHeader::loop_filter_type
uint8_t loop_filter_type
Definition: cbs_vp8.h:67
VP8RawFrameHeader::mv_prob
uint8_t mv_prob[2][19]
Definition: cbs_vp8.h:122
VP8RawFrameHeader::ref_lf_deltas_update
uint8_t ref_lf_deltas_update[4]
Definition: cbs_vp8.h:72
VP8RawFrameHeader::clamping_type
uint8_t clamping_type
Definition: cbs_vp8.h:52
VP8RawFrameHeader::mode_ref_lf_delta_enable
uint8_t mode_ref_lf_delta_enable
Definition: cbs_vp8.h:70
VP8RawFrameHeader::prob_intra
uint8_t prob_intra
Definition: cbs_vp8.h:110
VP8RawFrameHeader::segment_qp_update
uint8_t segment_qp_update[4]
Definition: cbs_vp8.h:59
VP8RawFrame::data
uint8_t * data
Definition: cbs_vp8.h:128
VP8RawFrameHeader::height
uint16_t height
Definition: cbs_vp8.h:47
VP8RawFrameHeader::prob_last
uint8_t prob_last
Definition: cbs_vp8.h:111