Mercurial > libavcodec.hg
comparison vp56.h @ 5714:314be1cfdcb0 libavcodec
add a new vp6a codec (add alpha plan support to vp6)
author | aurel |
---|---|
date | Tue, 25 Sep 2007 19:12:46 +0000 |
parents | dae0f80edbb3 |
children | 51918cb97f6f |
comparison
equal
deleted
inserted
replaced
5713:f45228f65e06 | 5714:314be1cfdcb0 |
---|---|
88 | 88 |
89 struct vp56_context { | 89 struct vp56_context { |
90 AVCodecContext *avctx; | 90 AVCodecContext *avctx; |
91 DSPContext dsp; | 91 DSPContext dsp; |
92 ScanTable scantable; | 92 ScanTable scantable; |
93 AVFrame frames[3]; | 93 AVFrame frames[4]; |
94 AVFrame *framep[4]; | 94 AVFrame *framep[6]; |
95 uint8_t *edge_emu_buffer_alloc; | 95 uint8_t *edge_emu_buffer_alloc; |
96 uint8_t *edge_emu_buffer; | 96 uint8_t *edge_emu_buffer; |
97 vp56_range_coder_t c; | 97 vp56_range_coder_t c; |
98 vp56_range_coder_t cc; | 98 vp56_range_coder_t cc; |
99 vp56_range_coder_t *ccp; | 99 vp56_range_coder_t *ccp; |
100 int sub_version; | 100 int sub_version; |
101 | 101 |
102 /* frame info */ | 102 /* frame info */ |
103 int plane_width[3]; | 103 int plane_width[4]; |
104 int plane_height[3]; | 104 int plane_height[4]; |
105 int mb_width; /* number of horizontal MB */ | 105 int mb_width; /* number of horizontal MB */ |
106 int mb_height; /* number of vertical MB */ | 106 int mb_height; /* number of vertical MB */ |
107 int block_offset[6]; | 107 int block_offset[6]; |
108 | 108 |
109 int quantizer; | 109 int quantizer; |
135 int sample_variance_threshold; | 135 int sample_variance_threshold; |
136 | 136 |
137 uint8_t coeff_ctx[4][64]; /* used in vp5 only */ | 137 uint8_t coeff_ctx[4][64]; /* used in vp5 only */ |
138 uint8_t coeff_ctx_last[4]; /* used in vp5 only */ | 138 uint8_t coeff_ctx_last[4]; /* used in vp5 only */ |
139 | 139 |
140 int has_alpha; | |
141 | |
140 /* upside-down flipping hints */ | 142 /* upside-down flipping hints */ |
141 int flip; /* are we flipping ? */ | 143 int flip; /* are we flipping ? */ |
142 int frbi; /* first row block index in MB */ | 144 int frbi; /* first row block index in MB */ |
143 int srbi; /* second row block index in MB */ | 145 int srbi; /* second row block index in MB */ |
144 int stride[3]; /* stride for each plan */ | 146 int stride[4]; /* stride for each plan */ |
145 | 147 |
146 const uint8_t *vp56_coord_div; | 148 const uint8_t *vp56_coord_div; |
147 vp56_parse_vector_adjustment_t parse_vector_adjustment; | 149 vp56_parse_vector_adjustment_t parse_vector_adjustment; |
148 vp56_adjust_t adjust; | 150 vp56_adjust_t adjust; |
149 vp56_filter_t filter; | 151 vp56_filter_t filter; |
152 vp56_parse_vector_models_t parse_vector_models; | 154 vp56_parse_vector_models_t parse_vector_models; |
153 vp56_parse_coeff_models_t parse_coeff_models; | 155 vp56_parse_coeff_models_t parse_coeff_models; |
154 vp56_parse_header_t parse_header; | 156 vp56_parse_header_t parse_header; |
155 | 157 |
156 vp56_model_t *modelp; | 158 vp56_model_t *modelp; |
157 vp56_model_t models; | 159 vp56_model_t models[2]; |
158 }; | 160 }; |
159 | 161 |
160 | 162 |
161 void vp56_init(AVCodecContext *avctx, int flip); | 163 void vp56_init(AVCodecContext *avctx, int flip, int has_alpha); |
162 int vp56_free(AVCodecContext *avctx); | 164 int vp56_free(AVCodecContext *avctx); |
163 void vp56_init_dequant(vp56_context_t *s, int quantizer); | 165 void vp56_init_dequant(vp56_context_t *s, int quantizer); |
164 int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | 166 int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size, |
165 uint8_t *buf, int buf_size); | 167 uint8_t *buf, int buf_size); |
166 | 168 |