]> git.sesse.net Git - vlc/blob - include/vpar_blocks.h
Encore du debuggage.
[vlc] / include / vpar_blocks.h
1 /*****************************************************************************
2  * vpar_blocks.h : video parser blocks management
3  * (c)1999 VideoLAN
4  *****************************************************************************
5  *****************************************************************************
6  * Requires:
7  *  "config.h"
8  *  "common.h"
9  *  "mtime.h"
10  *  "vlc_thread.h"
11  *  "input.h"
12  *  "video.h"
13  *  "video_output.h"
14  *  "decoder_fifo.h"
15  *  "video_fifo.h"
16  *****************************************************************************/
17
18 /*****************************************************************************
19  * macroblock_t : information on a macroblock
20  *****************************************************************************/
21 typedef struct macroblock_s
22 {
23     picture_t *             p_picture;
24     int                     i_structure;
25     int                     i_l_x, i_l_y;    /* position of macroblock (lum) */
26     int                     i_c_x, i_c_y; /* position of macroblock (chroma) */
27     int                     i_chroma_nb_blocks;  /* nb of bks for a chr comp */
28     int                     i_l_stride;           /* number of data_t to ignore
29                                                                        * when changing lines     */
30     int                     i_c_stride;                  /* idem, for chroma */
31     
32     /* IDCT information */
33     elem_t                  ppi_blocks[12][64];                    /* blocks */
34     f_idct_t                pf_idct[12];             /* sparse IDCT or not ? */
35     int                     pi_sparse_pos[12];
36
37     /* Motion compensation information */
38     f_motion_t              pf_motion;    /* function to use for motion comp */
39     f_chroma_motion_t       pf_chroma_motion;
40     picture_t *             p_backward;
41     picture_t *             p_forward;
42     int                     ppi_field_select[2][2];
43     int                     pppi_motion_vectors[2][2][2];
44     int                     pi_dm_vector[2];
45    
46     /* AddBlock information */
47     f_addb_t                pf_addb[12];      /* pointer to the Add function */
48     data_t *                p_data[12];              /* pointer to the position
49                                                       * in the final picture */
50     int                     i_addb_l_stride, i_addb_c_stride;
51 } macroblock_t;
52
53 /*****************************************************************************
54  * macroblock_parsing_t : parser context descriptor #3
55  *****************************************************************************/
56 typedef struct
57 {
58     int                     i_mb_type, i_motion_type, i_mv_count, i_mv_format;
59     boolean_t               b_dmv;
60     /* AddressIncrement information */
61     int                     i_addr_inc;
62
63     /* Macroblock Type */
64     int                     i_coded_block_pattern;
65     boolean_t               b_dct_type;
66
67     int                     i_l_x, i_l_y, i_c_x, i_c_y;
68 } macroblock_parsing_t;
69
70 /******************************************************************************
71  * lookup_t : entry type for lookup tables                                    *
72  ******************************************************************************/
73
74 typedef struct lookup_s
75 {
76     int    i_value;
77     int    i_length;
78 } lookup_t;
79
80 /*****************************************************************************
81  * Standard codes
82  *****************************************************************************/
83 /* Macroblock types */
84 #define MB_INTRA                        1
85 #define MB_PATTERN                      2
86 #define MB_MOTION_BACKWARD              4
87 #define MB_MOTION_FORWARD               8
88 #define MB_QUANT                        16
89
90 /* Motion types */
91 #define MOTION_FIELD                    1
92 #define MOTION_FRAME                    2
93 #define MOTION_16X8                     2
94 #define MOTION_DMV                      3
95
96 /* Macroblock Address Increment types */
97 #define MB_ADDRINC_ESCAPE               8
98 #define MB_ADDRINC_STUFFING             15
99
100 /* Error constant for lookup tables */
101 #define MB_ERROR                        (-1)
102
103 /* Scan */
104 #define SCAN_ZIGZAG                         0
105 #define SCAN_ALT                            1
106
107 /*****************************************************************************
108  * Prototypes
109  *****************************************************************************/
110 void vpar_InitCrop( struct vpar_thread_s* p_vpar );
111 int vpar_CodedPattern420( struct vpar_thread_s* p_vpar );
112 int vpar_CodedPattern422( struct vpar_thread_s* p_vpar );
113 int vpar_CodedPattern444( struct vpar_thread_s* p_vpar );
114 int  vpar_IMBType( struct vpar_thread_s* p_vpar );
115 int  vpar_PMBType( struct vpar_thread_s* p_vpar );
116 int  vpar_BMBType( struct vpar_thread_s* p_vpar );
117 int  vpar_DMBType( struct vpar_thread_s* p_vpar );