]> git.sesse.net Git - vlc/blob - modules/codec/cinepak/cinepak.h
* ./modules/*: moved plugins to the new tree. Yet untested builds include
[vlc] / modules / codec / cinepak / cinepak.h
1 /*****************************************************************************
2  * cinepak.h: Cinepak video decoder
3  *****************************************************************************
4  * Copyright (C) 2001 VideoLAN
5  * $Id: cinepak.h,v 1.1 2002/08/04 17:23:42 sam Exp $
6  *
7  * Authors: Laurent Aimar <fenrir@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 #define CINEPAK_MAXSTRIP 32
25
26 typedef struct cinepak_codebook_s
27 {
28     u8 i_y[4];
29     u8 i_u, i_v;
30     
31 } cinepak_codebook_t;
32
33
34 typedef struct cinepak_context_s
35 {
36     int b_grayscale; /* force to grayscale */
37     
38     int i_width;
39     int i_height;
40
41     int i_stride_x;
42     int i_stride_y;
43      
44     u8  *p_y, *p_u, *p_v;
45
46     int i_stride[3]; /* our 3 planes */
47     int i_lines[3];
48     u8  *p_pix[3];
49     
50     cinepak_codebook_t codebook_v1[CINEPAK_MAXSTRIP][256];
51     cinepak_codebook_t codebook_v4[CINEPAK_MAXSTRIP][256];
52     
53 } cinepak_context_t;
54
55 typedef struct videodec_thread_s
56 {
57     decoder_fifo_t  *p_fifo;    
58
59     vout_thread_t   *p_vout; 
60
61     cinepak_context_t *p_context;
62
63     /* private */
64     mtime_t i_pts;
65     int     i_framesize;
66     byte_t  *p_framedata;
67 } videodec_thread_t;