|
39 | 39 | #define EXT_START_CODE 0x000001b5 |
40 | 40 | #define USER_START_CODE 0x000001b2 |
41 | 41 | #define CAVS_START_CODE 0x000001b0 |
| 42 | +#define VIDEO_SEQ_END_CODE 0x000001b1 |
42 | 43 | #define PIC_I_START_CODE 0x000001b3 |
43 | 44 | #define PIC_PB_START_CODE 0x000001b6 |
| 45 | +#define VIDEO_EDIT_CODE 0x000001b7 |
44 | 46 |
|
45 | 47 | #define A_AVAIL 1 |
46 | 48 | #define B_AVAIL 2 |
@@ -164,30 +166,62 @@ struct dec_2dvlc { |
164 | 166 | typedef struct AVSFrame { |
165 | 167 | AVFrame *f; |
166 | 168 | int poc; |
| 169 | + int outputed; |
| 170 | + |
| 171 | + AVBufferRef *hwaccel_priv_buf; |
| 172 | + void *hwaccel_picture_private; |
167 | 173 | } AVSFrame; |
168 | 174 |
|
169 | 175 | typedef struct AVSContext { |
170 | 176 | AVCodecContext *avctx; |
| 177 | + int got_pix_fmt; |
171 | 178 | BlockDSPContext bdsp; |
172 | 179 | H264ChromaContext h264chroma; |
173 | 180 | VideoDSPContext vdsp; |
174 | 181 | CAVSDSPContext cdsp; |
175 | 182 | GetBitContext gb; |
176 | 183 | AVSFrame cur; ///< currently decoded frame |
177 | 184 | AVSFrame DPB[2]; ///< reference frames |
| 185 | + AVSFrame out[3]; ///< output queue, size 2 maybe enough |
178 | 186 | int dist[2]; ///< temporal distances from current frame to ref frames |
179 | 187 | int low_delay; |
180 | 188 | int profile, level; |
181 | 189 | int aspect_ratio; |
182 | 190 | int mb_width, mb_height; |
183 | 191 | int width, height; |
184 | 192 | int stream_revision; ///<0 for samples from 2006, 1 for rm52j encoder |
185 | | - int progressive; |
| 193 | + int progressive_seq; |
| 194 | + int progressive_frame; |
186 | 195 | int pic_structure; |
| 196 | + int no_forward_ref_flag; |
| 197 | + int pb_field_enhanced_flag; ///< only used in GUANGDIAN |
187 | 198 | int skip_mode_flag; ///< select between skip_count or one skip_flag per MB |
188 | 199 | int loop_filter_disable; |
189 | 200 | int alpha_offset, beta_offset; |
190 | 201 | int ref_flag; |
| 202 | + |
| 203 | + /** \defgroup guangdian profile |
| 204 | + * @{ |
| 205 | + */ |
| 206 | + int aec_flag; |
| 207 | + int weight_quant_flag; |
| 208 | + int chroma_quant_param_delta_cb; |
| 209 | + int chroma_quant_param_delta_cr; |
| 210 | + uint8_t wqm_8x8[64]; |
| 211 | + /**@}*/ |
| 212 | + |
| 213 | + /** \defgroup slice weighting |
| 214 | + * FFmpeg don't support slice weighting natively, but maybe needed for HWaccel. |
| 215 | + * @{ |
| 216 | + */ |
| 217 | + uint32_t slice_weight_pred_flag : 1; |
| 218 | + uint32_t mb_weight_pred_flag : 1; |
| 219 | + uint8_t luma_scale[4]; |
| 220 | + int8_t luma_shift[4]; |
| 221 | + uint8_t chroma_scale[4]; |
| 222 | + int8_t chroma_shift[4]; |
| 223 | + /**@}*/ |
| 224 | + |
191 | 225 | int mbx, mby, mbidx; ///< macroblock coordinates |
192 | 226 | int flags; ///< availability flags of neighbouring macroblocks |
193 | 227 | int stc; ///< last start code |
|
0 commit comments