/*****************************************************************************
* Function pointers
*****************************************************************************/
-typedef (void *) f_slice_header_t( vpar_thread_t*, int*, int, elem_t*, u32);
+struct vpar_thread_s;
+
+typedef void (*f_slice_header_t)( struct vpar_thread_s*, int*, int, u32);
+typedef void (*f_chroma_pattern_t)( struct vpar_thread_s* );
+typedef int (*f_macroblock_type_t)( struct vpar_thread_s* );
/*****************************************************************************
* quant_matrix_t : Quantization Matrix
*****************************************************************************/
typedef struct quant_matrix_s
{
- int pi_matrix[64];
+ int * pi_matrix;
boolean_t b_allocated;
/* Has the matrix been allocated by vpar_headers ? */
} quant_matrix_t;
*****************************************************************************/
typedef struct sequence_s
{
- u32 i_height, i_width, i_chroma_width, i_size;
+ u32 i_height, i_width, i_size;
u32 i_mb_height, i_mb_width, i_mb_size;
unsigned int i_aspect_ratio;
double d_frame_rate;
- unsigned int i_chroma_format;
- int i_chroma_nb_blocks;
boolean_t b_mpeg2;
boolean_t b_progressive;
unsigned int i_scalable_mode;
f_slice_header_t pf_slice_header;
quant_matrix_t intra_quant, nonintra_quant;
quant_matrix_t chroma_intra_quant, chroma_nonintra_quant;
- (void *) pf_decode_mv( vpar_thread_t *, int );
- (void *) pf_decode_pattern( vpar_thread_t * );
+ void (*pf_decode_mv)( struct vpar_thread_s *, int );
+ f_chroma_pattern_t pf_decode_pattern;
+
+ /* Chromatic information */
+ unsigned int i_chroma_format;
+ int i_chroma_nb_blocks;
+ u32 i_chroma_width;
+ u32 i_chroma_mb_width, i_chroma_mb_height;
/* Parser context */
- picture_t * p_forward, p_backward;
+ picture_t * p_forward;
+ picture_t * p_backward;
+
+ /* Copyright extension */
+ boolean_t b_copyright_flag; /* Whether the following
+ information is significant
+ or not. */
+ u8 i_copyright_id;
+ boolean_t b_original;
+ u64 i_copyright_nb;
} sequence_t;
/*****************************************************************************
int ppi_f_code[2][2];
int i_intra_dc_precision;
boolean_t b_frame_pred_frame_dct, b_q_scale_type;
+ boolean_t b_intra_vlc_format;
boolean_t b_alternate_scan, b_progressive_frame;
boolean_t b_top_field_first, b_concealment_mv;
-
- int i_lum_incr, i_chroma_incr;
+ boolean_t b_repeat_first_field;
+ int i_l_stride, i_c_stride;
/* Used for second field management */
int i_current_structure;
/* Relative to the current field */
int i_coding_type, i_structure;
boolean_t b_frame_structure;
- (int *) pf_macroblock_type( vpar_thread_t * );
+ f_macroblock_type_t pf_macroblock_type;
boolean_t b_error;
} picture_parsing_t;
int pppi_pmv[2][2][2]; /* Motion vect predictors, 7.6.3 */
} slice_parsing_t;
+
+/*****************************************************************************
+ * mb_addr_inc_t : entry type for MacroblockAddressIncrement lookup table *
+ *****************************************************************************/
+
+typedef struct mb_addr_inc_s
+{
+ int i_value;
+ int i_length;
+} mb_addr_inc_t;
+
+
/*****************************************************************************
* Standard codes
*****************************************************************************/
#define TOP_FIELD 1
#define BOTTOM_FIELD 2
#define FRAME_STRUCTURE 3
+
+
+/*****************************************************************************
+ * Prototypes
+ *****************************************************************************/
+int vpar_NextSequenceHeader( struct vpar_thread_s * p_vpar );
+int vpar_ParseHeader( struct vpar_thread_s * p_vpar );