]> git.sesse.net Git - vlc/blob - include/vpar_blocks.h
* Ajout de la fonction MacroBlockAddressIncrement dans vpar_blocks.c
[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_backw_top;
41     picture_t *             p_backw_bot;
42     picture_t *             p_forw_top;
43     picture_t *             p_forw_bot;
44     int                     i_field_select_backw_top, i_field_select_backw_bot;
45     int                     i_field_select_forw_top, i_field_select_forw_bot;
46     int                     pi_motion_vectors_backw_top[2];
47     int                     pi_motion_vectors_backw_bot[2];
48     int                     pi_motion_vectors_forw_top[2];
49     int                     pi_motion_vectors_forw_bot[2];
50
51     /* AddBlock information */
52     f_addb_t                pf_addb[12];      /* pointer to the Add function */
53     data_t *                p_data[12];              /* pointer to the position
54                                                       * in the final picture */
55 } macroblock_t;
56
57 /*****************************************************************************
58  * macroblock_parsing_t : parser context descriptor #3
59  *****************************************************************************/
60 typedef struct
61 {
62     int                     i_mb_type, i_motion_type, i_mv_count, i_mv_format;
63     /* AddressIncrement information */
64     int                     i_addr_inc;
65     int                     i_coded_block_pattern;
66     boolean_t               b_dct_type;
67
68     int                     i_l_x, i_l_y, i_c_x, i_c_y;
69 } macroblock_parsing_t;
70
71 /*****************************************************************************
72  * Standard codes
73  *****************************************************************************/
74 /* Macroblock types */
75 #define MB_INTRA                        1
76 #define MB_PATTERN                      2
77 #define MB_MOTION_BACKWARD              4
78 #define MB_MOTION_FORWARD               8
79 #define MB_QUANT                        16
80
81 /* Motion types */
82 #define MOTION_FIELD                    1
83 #define MOTION_FRAME                    2
84 #define MOTION_16X8                     2
85 #define MOTION_DMV                      3
86
87 /* Macroblock Address Increment types */
88 #define MACROBLOCK_ESCAPE               8
89 #define MACROBLOCK_STUFFING             15
90
91 /*****************************************************************************
92  * Prototypes
93  *****************************************************************************/
94 int vpar_CodedPattern420( struct vpar_thread_s* p_vpar );
95 int vpar_CodedPattern422( struct vpar_thread_s* p_vpar );
96 int vpar_CodedPattern444( struct vpar_thread_s* p_vpar );
97 int  vpar_IMBType( struct vpar_thread_s* p_vpar );
98 int  vpar_PMBType( struct vpar_thread_s* p_vpar );
99 int  vpar_BMBType( struct vpar_thread_s* p_vpar );
100 int  vpar_DMBType( struct vpar_thread_s* p_vpar );