]> git.sesse.net Git - vlc/blobdiff - include/vpar_blocks.h
Nettoyage et commentationnement.
[vlc] / include / vpar_blocks.h
index 5ee3641dab5d67d2b7a81561e377056bc8c5d0b8..0bedd16589d458f23665c93a773cb123c864d845 100644 (file)
  *****************************************************************************/
 
 /*****************************************************************************
- * Function pointers
- *****************************************************************************/
-typedef void (*f_parse_mb_t)( struct vpar_thread_s*, int *, int, int,
-                              boolean_t, int, int, int, boolean_t);
-
-/*****************************************************************************
- * macroblock_t : information on a macroblock
+ * macroblock_t : information on a macroblock passed to the video_decoder
+ *                thread
  *****************************************************************************/
 typedef struct macroblock_s
 {
+    picture_t *             p_picture;          /* current frame in progress */
+
     int                     i_mb_type;                    /* macroblock type */
     int                     i_coded_block_pattern;
-    int                     i_chroma_nb_blocks;  /* nb of bks for a chr comp */
-    picture_t *             p_picture;
+                                                 /* which blocks are coded ? */
+    int                     i_chroma_nb_blocks;         /* number of blocks for
+                                                         * chroma components */
     
     /* IDCT information */
     dctelem_t               ppi_blocks[12][64];                    /* blocks */
     f_idct_t                pf_idct[12];             /* sparse IDCT or not ? */
-    int                     pi_sparse_pos[12];
+    int                     pi_sparse_pos[12];             /* position of the
+                                                            * non-NULL coeff */
 
     /* Motion compensation information */
     f_motion_t              pf_motion;    /* function to use for motion comp */
-    picture_t *             p_backward;
-    picture_t *             p_forward;
-    int                     ppi_field_select[2][2];
-    int                     pppi_motion_vectors[2][2][2];
-    int                     ppi_dmv[2][2];
+    picture_t *             p_backward;          /* backward reference frame */
+    picture_t *             p_forward;            /* forward reference frame */
+    int                     ppi_field_select[2][2];      /* field to use to
+                                                          * form predictions */
+    int                     pppi_motion_vectors[2][2][2];  /* motion vectors */
+    int                     ppi_dmv[2][2];    /* differential motion vectors */
+                            /* coordinates of the block in the picture */
     int                     i_l_x, i_c_x;
     int                     i_motion_l_y;
     int                     i_motion_c_y;
@@ -63,20 +64,27 @@ typedef struct macroblock_s
 } macroblock_t;
 
 /*****************************************************************************
- * macroblock_parsing_t : parser context descriptor #3
+ * macroblock_parsing_t : macroblock context & predictors
  *****************************************************************************/
 typedef struct
 {
-    int                     i_motion_type, i_mv_count, i_mv_format;
-    boolean_t               b_dmv, b_dct_type;
-
-    int                     i_l_x, i_l_y, i_c_x, i_c_y;
+    unsigned char       i_quantizer_scale;        /* scale of the quantization
+                                                   * matrices                */
+    int                 pi_dc_dct_pred[3];          /* ISO/IEC 13818-2 7.2.1 */
+    int                 pppi_pmv[2][2][2];  /* Motion vect predictors, 7.6.3 */
+
+    /* Context used to optimize block parsing */
+    int                 i_motion_type, i_mv_count, i_mv_format;
+    boolean_t           b_dmv, b_dct_type;
+
+    /* Coordinates of the upper-left pixel of the macroblock, in lum and
+     * chroma */
+    int                 i_l_x, i_l_y, i_c_x, i_c_y;
 } macroblock_parsing_t;
 
 /*****************************************************************************
  * lookup_t : entry type for lookup tables                                   *
  *****************************************************************************/
-
 typedef struct lookup_s
 {
     int    i_value;
@@ -86,7 +94,6 @@ typedef struct lookup_s
 /******************************************************************************
  * ac_lookup_t : special entry type for lookup tables about ac coefficients
  *****************************************************************************/ 
-
 typedef struct dct_lookup_s
 {
     char   i_run;
@@ -118,12 +125,12 @@ typedef struct dct_lookup_s
 #define MB_ERROR                        (-1)
 
 /* Scan */
-#define SCAN_ZIGZAG                         0
-#define SCAN_ALT                            1
+#define SCAN_ZIGZAG                     0
+#define SCAN_ALT                        1
 
 /* Constant for block decoding */
-#define DCT_EOB                                 64
-#define DCT_ESCAPE                              65
+#define DCT_EOB                         64
+#define DCT_ESCAPE                      65
 
 /*****************************************************************************
  * Constants