1 /*****************************************************************************
2 * vdec_common.h : structures from the video decoder exported to plug-ins
3 *****************************************************************************
4 * Copyright (C) 1999, 2000 VideoLAN
5 * $Id: vdec_ext-plugins.h,v 1.2 2001/07/18 14:21:00 massiot Exp $
7 * Authors: Christophe Massiot <massiot@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
27 typedef void (*f_motion_t)( struct macroblock_s * );
29 /*****************************************************************************
30 * macroblock_t : information on a macroblock passed to the video_decoder
32 *****************************************************************************/
33 typedef struct macroblock_s
35 picture_t * p_picture; /* current frame in progress */
37 int i_mb_type; /* macroblock type */
38 int i_coded_block_pattern;
39 /* which blocks are coded ? */
40 int i_chroma_nb_blocks; /* number of blocks for
41 * chroma components */
43 /* IDCT information */
44 dctelem_t ppi_blocks[12][64]; /* blocks */
45 void ( * pf_idct[12] ) ( void *, dctelem_t*, int );
46 /* sparse IDCT or not ? */
47 int pi_sparse_pos[12]; /* position of the
50 /* Motion compensation information */
51 f_motion_t pf_motion; /* function to use for motion comp */
52 picture_t * p_backward; /* backward reference frame */
53 picture_t * p_forward; /* forward reference frame */
54 int ppi_field_select[2][2]; /* field to use to
56 int pppi_motion_vectors[2][2][2]; /* motion vectors */
57 int ppi_dmv[2][2]; /* differential motion vectors */
58 /* coordinates of the block in the picture */
62 int i_l_stride; /* number of yuv_data_t to
63 * ignore when changing line */
64 int i_c_stride; /* idem, for chroma */
65 boolean_t b_P_second; /* Second field of a P picture ?
66 * (used to determine the predicting
68 boolean_t b_motion_field; /* Field we are predicting
69 * (top field or bottom field) */
71 /* AddBlock information */
72 yuv_data_t * p_data[12]; /* pointer to the position
73 * in the final picture */
74 int i_addb_l_stride, i_addb_c_stride;
75 /* nb of coeffs to jump when changing lines */
78 /* Macroblock types */
81 #define MB_MOTION_BACKWARD 4
82 #define MB_MOTION_FORWARD 8
86 #define MOTION_FIELD 1
87 #define MOTION_FRAME 2
93 #define BOTTOM_FIELD 2
94 #define FRAME_STRUCTURE 3
96 /*****************************************************************************
97 * vdec_thread_t: video decoder thread descriptor
98 *****************************************************************************/
99 typedef struct vdec_thread_s
101 vlc_thread_t thread_id; /* id for thread functions */
104 /* IDCT iformations */
107 /* Input properties */
108 struct vdec_pool_s * p_pool;