]> git.sesse.net Git - vlc/blobdiff - include/vpar_headers.h
* vpar_blocks.c : Correction d'une erreur introduite hier soir avec
[vlc] / include / vpar_headers.h
index 7f2a7cd71b6e93eee3e6c652fadea234691c8ffa..97039ea426bf0559e10e632303d55cd4016abdc9 100644 (file)
 /*****************************************************************************
  * 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;
@@ -38,23 +42,28 @@ extern int *    pi_default_nonintra_quant;
  *****************************************************************************/
 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
@@ -76,10 +85,11 @@ typedef struct picture_parsing_s
     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;
     boolean_t           b_repeat_first_field;
-    int                 i_lum_incr, i_chroma_incr;
+    int                 i_l_stride, i_c_stride;
 
     /* Used for second field management */
     int                 i_current_structure;
@@ -90,7 +100,7 @@ typedef struct picture_parsing_s
     /* 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;
@@ -105,6 +115,18 @@ typedef struct slice_parsing_s
     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
  *****************************************************************************/
@@ -147,3 +169,10 @@ typedef struct slice_parsing_s
 #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 );