]> git.sesse.net Git - vlc/blob - include/vdec_ext-plugins.h
* introduced a memalign wrapper that will align the memory manually if
[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.10 2002/04/05 01:05:22 gbazin 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     /* Should be kept aligned ! */
31     dctelem_t *             pi_block;                               /* block */
32     void *                  pi_block_orig;        /* pointer before memalign */
33     void                ( * pf_idct )   ( dctelem_t *, yuv_data_t *, int,
34                                           void *, int );
35                                         /* sparse IDCT or not, add or copy ? */
36     int                     i_sparse_pos;                  /* position of the
37                                                             * non-NULL coeff */
38 } idct_inner_t;
39
40 typedef struct motion_inner_s
41 {
42     boolean_t               b_average;                          /* 0 == copy */
43     int                     i_x_pred, i_y_pred;            /* motion vectors */
44     yuv_data_t *            pp_source[3];
45     int                     i_dest_offset, i_src_offset;
46     int                     i_stride, i_height;
47     boolean_t               b_second_half;
48 } motion_inner_t;
49
50 typedef struct macroblock_s
51 {
52     int                     i_mb_modes;
53
54     /* IDCT information */
55     idct_inner_t            p_idcts[12];
56     u16                     i_coded_block_pattern;
57                                                  /* which blocks are coded ? */
58     yuv_data_t *            p_y_data;
59     yuv_data_t *            p_u_data;
60     yuv_data_t *            p_v_data;
61                                                     /* pointers to the position
62                                                      * in the final picture  */
63
64     /* Motion compensation information */
65     motion_inner_t          p_motions[8];
66     int                     i_nb_motions;
67     yuv_data_t *            pp_dest[3];
68
69 } macroblock_t;
70
71 /* Macroblock Modes */
72 #define MB_INTRA                        1
73 #define MB_PATTERN                      2
74 #define MB_MOTION_BACKWARD              4
75 #define MB_MOTION_FORWARD               8
76 #define MB_QUANT                        16
77 #define DCT_TYPE_INTERLACED             32
78
79 /*****************************************************************************
80  * vdec_thread_t: video decoder thread descriptor
81  *****************************************************************************/
82 typedef struct vdec_thread_s
83 {
84     vlc_thread_t        thread_id;                /* id for thread functions */
85     boolean_t           b_die;
86
87     /* IDCT iformations */
88     void *              p_idct_data;
89
90     /* Input properties */
91     struct vdec_pool_s * p_pool;
92 } vdec_thread_t;
93