[cvs] / xvidcore / src / decoder.h Repository:
ViewVC logotype

Annotation of /xvidcore/src/decoder.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (view) (download)

1 : edgomez 1.7 /*****************************************************************************
2 :     *
3 :     * XVID MPEG-4 VIDEO CODEC
4 :     * - Decoder header -
5 :     *
6 : edgomez 1.11 * This file is part of XviD, a free MPEG-4 video encoder/decoder
7 :     *
8 :     * XviD is free software; you can redistribute it and/or modify it
9 :     * under the terms of the GNU General Public License as published by
10 :     * the Free Software Foundation; either version 2 of the License, or
11 : edgomez 1.7 * (at your option) any later version.
12 :     *
13 :     * This program is distributed in the hope that it will be useful,
14 : edgomez 1.11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 : edgomez 1.7 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 :     * GNU General Public License for more details.
17 :     *
18 :     * You should have received a copy of the GNU General Public License
19 : edgomez 1.11 * along with this program; if not, write to the Free Software
20 : edgomez 1.7 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 :     *
22 : edgomez 1.11 * Under section 8 of the GNU General Public License, the copyright
23 :     * holders of XVID explicitly forbid distribution in the following
24 :     * countries:
25 :     *
26 :     * - Japan
27 :     * - United States of America
28 :     *
29 :     * Linking XviD statically or dynamically with other modules is making a
30 :     * combined work based on XviD. Thus, the terms and conditions of the
31 :     * GNU General Public License cover the whole combination.
32 :     *
33 :     * As a special exception, the copyright holders of XviD give you
34 :     * permission to link XviD with independent modules that communicate with
35 :     * XviD solely through the VFW1.1 and DShow interfaces, regardless of the
36 :     * license terms of these independent modules, and to copy and distribute
37 :     * the resulting combined work under terms of your choice, provided that
38 :     * every copy of the combined work is accompanied by a complete copy of
39 :     * the source code of XviD (the version of XviD used to produce the
40 :     * combined work), being distributed under the terms of the GNU General
41 :     * Public License plus this exception. An independent module is a module
42 :     * which is not derived from or based on XviD.
43 :     *
44 :     * Note that people who make modified versions of XviD are not obligated
45 :     * to grant this special exception for their modified versions; it is
46 :     * their choice whether to do so. The GNU General Public License gives
47 :     * permission to release a modified version without this exception; this
48 :     * exception also makes it possible to release a modified version which
49 :     * carries forward this exception.
50 : edgomez 1.7 *
51 : edgomez 1.12 * $Id: decoder.h,v 1.11 2002/11/16 23:38:16 edgomez Exp $
52 : edgomez 1.7 *
53 :     ****************************************************************************/
54 :    
55 : Isibaar 1.1 #ifndef _DECODER_H_
56 :     #define _DECODER_H_
57 :    
58 :     #include "xvid.h"
59 :     #include "portab.h"
60 :     #include "global.h"
61 :     #include "image/image.h"
62 :    
63 : edgomez 1.7 /*****************************************************************************
64 :     * Structures
65 :     ****************************************************************************/
66 : Isibaar 1.1
67 :     typedef struct
68 :     {
69 : edgomez 1.12 /* bitstream */
70 : Isibaar 1.1
71 :     uint32_t shape;
72 :     uint32_t time_inc_bits;
73 :     uint32_t quant_bits;
74 :     uint32_t quant_type;
75 :     uint32_t quarterpel;
76 :    
77 : h 1.2 uint32_t interlacing;
78 :     uint32_t top_field_first;
79 :     uint32_t alternate_vertical_scan;
80 :    
81 : edgomez 1.12 /* image */
82 : Isibaar 1.1
83 :     uint32_t width;
84 :     uint32_t height;
85 :     uint32_t edged_width;
86 :     uint32_t edged_height;
87 : edgomez 1.6
88 : Isibaar 1.1 IMAGE cur;
89 : edgomez 1.12 IMAGE refn[3]; /* 0 -- last I or P VOP */
90 :     /* 1 -- first I or P */
91 :     /* 2 -- for interpolate mode B-frame */
92 : Isibaar 1.1 IMAGE refh;
93 :     IMAGE refv;
94 :     IMAGE refhv;
95 :    
96 : edgomez 1.12 /* macroblock */
97 : Isibaar 1.1
98 :     uint32_t mb_width;
99 :     uint32_t mb_height;
100 : edgomez 1.6 MACROBLOCK *mbs;
101 : Isibaar 1.1
102 : edgomez 1.12 /* for B-frame */
103 :     int32_t frames; /* total frame number */
104 : edgomez 1.6 int8_t scalability;
105 : edgomez 1.12 VECTOR p_fmv, p_bmv; /* pred forward & backward motion vector */
106 :     MACROBLOCK *last_mbs; /* last MB */
107 :     int64_t time; /* for record time */
108 : edgomez 1.6 int64_t time_base;
109 :     int64_t last_time_base;
110 :     int64_t last_non_b_time;
111 :     uint32_t time_pp;
112 :     uint32_t time_bp;
113 : edgomez 1.12 uint8_t low_delay; /* low_delay flage (1 means no B_VOP) */
114 : albeu 1.10
115 : edgomez 1.12 XVID_DEC_PICTURE* out_frm; /* This is used for slice rendering */
116 : edgomez 1.6 }
117 :     DECODER;
118 : Isibaar 1.1
119 : edgomez 1.7 /*****************************************************************************
120 :     * Decoder prototypes
121 :     ****************************************************************************/
122 :    
123 : Isibaar 1.1 void init_decoder(uint32_t cpu_flags);
124 :    
125 :     int decoder_create(XVID_DEC_PARAM * param);
126 :     int decoder_destroy(DECODER * dec);
127 : edgomez 1.6 int decoder_decode(DECODER * dec,
128 :     XVID_DEC_FRAME * frame);
129 : Isibaar 1.1
130 :    
131 : edgomez 1.7 #endif

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4