Mercurial > libavcodec.hg
comparison h264.h @ 8079:2d3c7cd7d143 libavcodec
Replace literally hardcoded max slice number by named constant.
author | michael |
---|---|
date | Tue, 28 Oct 2008 22:50:16 +0000 |
parents | 58a16a83f4e2 |
children | e61f76efc9f3 |
comparison
equal
deleted
inserted
replaced
8078:c23f2088d7c0 | 8079:2d3c7cd7d143 |
---|---|
56 /* Compiling in interlaced support reduces the speed | 56 /* Compiling in interlaced support reduces the speed |
57 * of progressive decoding by about 2%. */ | 57 * of progressive decoding by about 2%. */ |
58 #define ALLOW_INTERLACE | 58 #define ALLOW_INTERLACE |
59 | 59 |
60 #define ALLOW_NOCHROMA | 60 #define ALLOW_NOCHROMA |
61 | |
62 /** | |
63 * The maximum number of slices supported by the decoder. | |
64 * must be a power of 2 | |
65 */ | |
66 #define MAX_SLICES 16 | |
61 | 67 |
62 #ifdef ALLOW_INTERLACE | 68 #ifdef ALLOW_INTERLACE |
63 #define MB_MBAFF h->mb_mbaff | 69 #define MB_MBAFF h->mb_mbaff |
64 #define MB_FIELD h->mb_field_decoding_flag | 70 #define MB_FIELD h->mb_field_decoding_flag |
65 #define FRAME_MBAFF h->mb_aff_frame | 71 #define FRAME_MBAFF h->mb_aff_frame |
294 uint32_t (*dequant4_coeff[6])[16]; | 300 uint32_t (*dequant4_coeff[6])[16]; |
295 uint32_t (*dequant8_coeff[2])[64]; | 301 uint32_t (*dequant8_coeff[2])[64]; |
296 int dequant_coeff_pps; ///< reinit tables when pps changes | 302 int dequant_coeff_pps; ///< reinit tables when pps changes |
297 | 303 |
298 int slice_num; | 304 int slice_num; |
299 uint8_t *slice_table_base; | 305 uint16_t *slice_table_base; |
300 uint8_t *slice_table; ///< slice_table_base + 2*mb_stride + 1 | 306 uint16_t *slice_table; ///< slice_table_base + 2*mb_stride + 1 |
301 int slice_type; | 307 int slice_type; |
302 int slice_type_nos; ///< S free slice type (SI/SP are remapped to I/P) | 308 int slice_type_nos; ///< S free slice type (SI/SP are remapped to I/P) |
303 int slice_type_fixed; | 309 int slice_type_fixed; |
304 | 310 |
305 //interlacing specific flags | 311 //interlacing specific flags |
364 Picture *long_ref[32]; | 370 Picture *long_ref[32]; |
365 Picture default_ref_list[2][32]; ///< base reference list for all slices of a coded picture | 371 Picture default_ref_list[2][32]; ///< base reference list for all slices of a coded picture |
366 Picture ref_list[2][48]; /**< 0..15: frame refs, 16..47: mbaff field refs. | 372 Picture ref_list[2][48]; /**< 0..15: frame refs, 16..47: mbaff field refs. |
367 Reordered version of default_ref_list | 373 Reordered version of default_ref_list |
368 according to picture reordering in slice header */ | 374 according to picture reordering in slice header */ |
369 int ref2frm[16][2][64]; ///< reference to frame number lists, used in the loop filter, the first 2 are for -2,-1 | 375 int ref2frm[MAX_SLICES][2][64]; ///< reference to frame number lists, used in the loop filter, the first 2 are for -2,-1 |
370 Picture *delayed_pic[MAX_DELAYED_PIC_COUNT+2]; //FIXME size? | 376 Picture *delayed_pic[MAX_DELAYED_PIC_COUNT+2]; //FIXME size? |
371 int outputed_poc; | 377 int outputed_poc; |
372 | 378 |
373 /** | 379 /** |
374 * memory management control operations buffer. | 380 * memory management control operations buffer. |