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

Annotation of /trunk/xvidcore/src/decoder.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 677 - (view) (download)

1 : edgomez 203 /*****************************************************************************
2 :     *
3 :     * XVID MPEG-4 VIDEO CODEC
4 :     * - Decoder header -
5 :     *
6 : edgomez 648 * This file is part of XviD, a free MPEG-4 video encoder/decoder
7 : edgomez 203 *
8 : edgomez 648 * 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 203 * (at your option) any later version.
12 :     *
13 :     * This program is distributed in the hope that it will be useful,
14 : edgomez 648 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 : edgomez 203 * 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 648 * along with this program; if not, write to the Free Software
20 : edgomez 203 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 :     *
22 : edgomez 648 * Under section 8 of the GNU General Public License, the copyright
23 :     * holders of XVID explicitly forbid distribution in the following
24 :     * countries:
25 : edgomez 203 *
26 : edgomez 648 * - Japan
27 :     * - United States of America
28 : edgomez 203 *
29 : edgomez 648 * 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 : edgomez 203 *
33 : edgomez 648 * 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 : edgomez 203 *
44 : edgomez 648 * 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 :     *
51 : edgomez 677 * $Id: decoder.h,v 1.12 2002-11-26 23:44:09 edgomez Exp $
52 : edgomez 648 *
53 : edgomez 203 ****************************************************************************/
54 :    
55 : Isibaar 3 #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 203 /*****************************************************************************
64 :     * Structures
65 :     ****************************************************************************/
66 : Isibaar 3
67 :     typedef struct
68 :     {
69 : edgomez 677 /* bitstream */
70 : Isibaar 3
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 69 uint32_t interlacing;
78 :     uint32_t top_field_first;
79 :     uint32_t alternate_vertical_scan;
80 :    
81 : edgomez 677 /* image */
82 : Isibaar 3
83 :     uint32_t width;
84 :     uint32_t height;
85 :     uint32_t edged_width;
86 :     uint32_t edged_height;
87 : edgomez 195
88 : Isibaar 3 IMAGE cur;
89 : edgomez 677 IMAGE refn[3]; /* 0 -- last I or P VOP */
90 :     /* 1 -- first I or P */
91 :     /* 2 -- for interpolate mode B-frame */
92 : Isibaar 3 IMAGE refh;
93 :     IMAGE refv;
94 :     IMAGE refhv;
95 :    
96 : edgomez 677 /* macroblock */
97 : Isibaar 3
98 :     uint32_t mb_width;
99 :     uint32_t mb_height;
100 : edgomez 195 MACROBLOCK *mbs;
101 : Isibaar 3
102 : edgomez 677 /* for B-frame */
103 :     int32_t frames; /* total frame number */
104 : edgomez 195 int8_t scalability;
105 : edgomez 677 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 195 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 677 uint8_t low_delay; /* low_delay flage (1 means no B_VOP) */
114 : albeu 315
115 : edgomez 677 XVID_DEC_PICTURE* out_frm; /* This is used for slice rendering */
116 : edgomez 195 }
117 :     DECODER;
118 : Isibaar 3
119 : edgomez 203 /*****************************************************************************
120 :     * Decoder prototypes
121 :     ****************************************************************************/
122 :    
123 : Isibaar 3 void init_decoder(uint32_t cpu_flags);
124 :    
125 :     int decoder_create(XVID_DEC_PARAM * param);
126 :     int decoder_destroy(DECODER * dec);
127 : edgomez 195 int decoder_decode(DECODER * dec,
128 :     XVID_DEC_FRAME * frame);
129 : Isibaar 3
130 :    
131 : edgomez 203 #endif

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