1 /*******************************************************************************
2 * undec_picture.h: undecoded pictures type
4 *******************************************************************************
5 * This header is required by all modules which have to handle pictures. It
6 * includes all common video types and constants.
7 *******************************************************************************
12 *******************************************************************************/
14 /*******************************************************************************
15 * macroblock_info_t : information on a macroblock
16 *******************************************************************************/
22 (void *) p_idct_function[12](coeff_t * p_block);
24 int ppp_motion_vectors[2][2][2];
25 int pi_field_select[2][2];
28 /* Macroblock types */
31 #define MB_MOTION_BACKWARD 4
32 #define MB_MOTION_FORWARD 8
36 #define MOTION_FIELD 1
37 #define MOTION_FRAME 2
41 /*******************************************************************************
42 * undec_link_t : link to an undecoded picture
43 *******************************************************************************/
44 typedef struct undec_link_s
46 struct undec_picture_s * p_undec;
47 picture_t ** pp_frame;
50 /*******************************************************************************
51 * undec_picture_t: undecoded picture
52 *******************************************************************************
53 * Any picture destined to be decoded by a video decoder thread should be
54 * stored in this structure from it's creation to it's effective display.
55 *******************************************************************************/
56 typedef struct undec_picture_s
59 picture_t * p_picture;
63 int i_mb_height, i_mb_width;
67 macroblock_info_t * p_mb_info;
69 picture_t * p_backward_ref;
70 picture_t * p_forward_ref;
72 undec_link_t pp_referencing_undec[MAX_REFERENCING_UNDEC];
77 #define I_CODING_TYPE 1
78 #define P_CODING_TYPE 2
79 #define B_CODING_TYPE 3
80 #define D_CODING_TYPE 4 /* MPEG-1 ONLY */
81 /* other values are reserved */
85 #define BOTTOM_FIRST 2
86 #define FRAME_STRUCTURE 3
88 /*******************************************************************************
89 * pel_lookup_table_t : lookup table for pixels
90 *******************************************************************************/
97 typedef struct pel_lookup_table_s {
100 /* When the size of the picture changes, this structure is freed, so we
101 * keep a reference count. */
104 } pel_lookup_table_t;
106 #define LINK_LOOKUP(p_l) \
107 vlc_mutex_lock( (p_l)->lock ); \
108 (p_l)->i_refcount++; \
109 vlc_mutex_unlock( (p_l)->lock );
111 #define UNLINK_LOOKUP(p_l) \
112 vlc_mutex_lock( (p_l)->lock ); \
113 (p_l)->i_refcount--; \
114 if( (p_l)->i_refcount <= 0 ) \
116 vlc_mutex_unlock( (p_l)->lock ); \
119 vlc_mutex_unlock( (p_l)->lock );