1 /*****************************************************************************
2 * vpar_blocks.h : video parser blocks management
4 *****************************************************************************
5 *****************************************************************************
16 *****************************************************************************/
18 /*****************************************************************************
19 * macroblock_t : information on a macroblock
20 *****************************************************************************/
21 typedef struct macroblock_s
23 picture_t * p_picture;
26 int i_l_x, i_l_y; /* position of macroblock (lum) */
27 int i_c_x, i_c_y; /* position of macroblock (chroma) */
28 int i_chroma_nb_blocks; /* nb of bks for a chr comp */
30 /* IDCT information */
31 elem_t ppi_blocks[12][64]; /* blocks */
32 f_idct_t pf_idct[12]; /* sparse IDCT or not ? */
33 int pi_sparse_pos[12];
35 /* Motion compensation information */
36 f_motion_t pf_motion; /* function to use for motion comp */
37 f_chroma_motion_t pf_chroma_motion;
38 picture_t * p_backw_top;
39 picture_t * p_backw_bot;
40 picture_t * p_forw_top;
41 picture_t * p_forw_bot;
42 int i_field_select_backw_top, i_field_select_backw_bot;
43 int i_field_select_forw_top, i_field_select_forw_bot;
44 int pi_motion_vectors_backw_top[2];
45 int pi_motion_vectors_backw_bot[2];
46 int pi_motion_vectors_forw_top[2];
47 int pi_motion_vectors_forw_bot[2];
49 /* AddBlock information */
51 data_t * p_data[12]; /* positions of blocks in picture */
52 int i_lum_incr, i_chroma_incr;
55 /*****************************************************************************
56 * macroblock_parsing_t : parser context descriptor #3
57 *****************************************************************************/
60 int i_mb_type, i_motion_type, i_mv_count, i_mv_format;
61 int i_coded_block_pattern;
63 } macroblock_parsing_t;
65 /*****************************************************************************
67 *****************************************************************************/
68 /* Macroblock types */
71 #define MB_MOTION_BACKWARD 4
72 #define MB_MOTION_FORWARD 8
76 #define MOTION_FIELD 1
77 #define MOTION_FRAME 2
81 /*****************************************************************************
83 *****************************************************************************/
84 int vpar_CodedPattern420( struct vpar_thread_s* p_vpar );
85 int vpar_CodedPattern422( struct vpar_thread_s* p_vpar );
86 int vpar_CodedPattern444( struct vpar_thread_s* p_vpar );
87 int vpar_IMBType( struct vpar_thread_s* p_vpar );
88 int vpar_PMBType( struct vpar_thread_s* p_vpar );
89 int vpar_BMBType( struct vpar_thread_s* p_vpar );
90 int vpar_DMBType( struct vpar_thread_s* p_vpar );