]> git.sesse.net Git - vlc/blob - include/vdec_ext-plugins.h
d6ee8f11ae49127555095c327ff41762331b5f9a
[vlc] / include / vdec_ext-plugins.h
1 /*****************************************************************************
2  * vdec_ext-plugins.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.3 2001/08/22 17:21:45 massiot Exp $
6  *
7  * Authors: Christophe Massiot <massiot@via.ecp.fr>
8  *
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.
13  * 
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.
18  *
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  *****************************************************************************/
23  
24 /*****************************************************************************
25  * macroblock_t : information on a macroblock passed to the video_decoder
26  *                thread
27  *****************************************************************************/
28 typedef struct idct_inner_s
29 {
30     dctelem_t               pi_block[64];                           /* block */
31     void                ( * pf_idct )   ( void *, dctelem_t*, int );
32                                                      /* sparse IDCT or not ? */
33     int                     i_sparse_pos;                  /* position of the
34                                                             * non-NULL coeff */
35     yuv_data_t *            p_dct_data;              /* pointer to the position
36                                                       * in the final picture */
37 } idct_inner_t;
38
39 typedef struct motion_inner_s
40 {
41     boolean_t               b_average;                          /* 0 == copy */
42     int                     i_x_pred, i_y_pred;            /* motion vectors */
43     yuv_data_t *            pp_source[3];
44     int                     i_dest_offset, i_src_offset;
45     int                     i_stride, i_height;
46     boolean_t               b_second_half;
47 } motion_inner_t;
48
49 typedef struct macroblock_s
50 {
51     int                     i_mb_modes;
52
53     /* IDCT information */
54     idct_inner_t            p_idcts[6];
55     int                     i_coded_block_pattern;
56                                                  /* which blocks are coded ? */
57     int                     i_lum_dct_stride, i_chrom_dct_stride;
58                                  /* nb of coeffs to jump when changing lines */
59
60     /* Motion compensation information */
61     motion_inner_t          p_motions[8];
62     int                     i_nb_motions;
63     yuv_data_t *            pp_dest[3];
64 } macroblock_t;
65
66 /* Macroblock Modes */
67 #define MB_INTRA                        1
68 #define MB_PATTERN                      2
69 #define MB_MOTION_BACKWARD              4
70 #define MB_MOTION_FORWARD               8
71 #define MB_QUANT                        16
72 #define DCT_TYPE_INTERLACED             32
73
74 /*****************************************************************************
75  * vdec_thread_t: video decoder thread descriptor
76  *****************************************************************************/
77 typedef struct vdec_thread_s
78 {
79     vlc_thread_t        thread_id;                /* id for thread functions */
80     boolean_t           b_die;
81
82     /* IDCT iformations */
83     void *              p_idct_data;
84
85     /* Input properties */
86     struct vdec_pool_s * p_pool;
87 } vdec_thread_t;
88