3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* - Decoder header - |
* - Decoder header - |
5 |
* |
* |
6 |
* This program is an implementation of a part of one or more MPEG-4 |
* This file is part of XviD, a free MPEG-4 video encoder/decoder |
|
* Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
|
|
* to use this software module in hardware or software products are |
|
|
* advised that its use may infringe existing patents or copyrights, and |
|
|
* any such use would be at such party's own risk. The original |
|
|
* developer of this software module and his/her company, and subsequent |
|
|
* editors and their companies, will have no liability for use of this |
|
|
* software or modifications or derivatives thereof. |
|
7 |
* |
* |
8 |
* This program is free software ; you can redistribute it and/or modify |
* XviD is free software; you can redistribute it and/or modify it |
9 |
* it under the terms of the GNU General Public License as published by |
* under the terms of the GNU General Public License as published by |
10 |
* the Free Software Foundation ; either version 2 of the License, or |
* the Free Software Foundation ; either version 2 of the License, or |
11 |
* (at your option) any later version. |
* (at your option) any later version. |
12 |
* |
* |
19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
****************************************************************************/ |
* Under section 8 of the GNU General Public License, the copyright |
23 |
/***************************************************************************** |
* holders of XVID explicitly forbid distribution in the following |
24 |
* |
* countries: |
25 |
* History |
* |
26 |
* |
* - Japan |
27 |
* - 13.06.2002 Added legal header - Cosmetic |
* - 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 |
* |
* |
51 |
* $Id: decoder.h,v 1.10 2002-07-19 11:15:21 albeu Exp $ |
* $Id: decoder.h,v 1.12 2002-11-26 23:44:09 edgomez Exp $ |
52 |
* |
* |
53 |
****************************************************************************/ |
****************************************************************************/ |
54 |
|
|
66 |
|
|
67 |
typedef struct |
typedef struct |
68 |
{ |
{ |
69 |
// bitstream |
/* bitstream */ |
70 |
|
|
71 |
uint32_t shape; |
uint32_t shape; |
72 |
uint32_t time_inc_bits; |
uint32_t time_inc_bits; |
78 |
uint32_t top_field_first; |
uint32_t top_field_first; |
79 |
uint32_t alternate_vertical_scan; |
uint32_t alternate_vertical_scan; |
80 |
|
|
81 |
// image |
/* image */ |
82 |
|
|
83 |
uint32_t width; |
uint32_t width; |
84 |
uint32_t height; |
uint32_t height; |
86 |
uint32_t edged_height; |
uint32_t edged_height; |
87 |
|
|
88 |
IMAGE cur; |
IMAGE cur; |
89 |
IMAGE refn[3]; // 0 -- last I or P VOP |
IMAGE refn[3]; /* 0 -- last I or P VOP */ |
90 |
// 1 -- first I or P |
/* 1 -- first I or P */ |
91 |
// 2 -- for interpolate mode B-frame |
/* 2 -- for interpolate mode B-frame */ |
92 |
IMAGE refh; |
IMAGE refh; |
93 |
IMAGE refv; |
IMAGE refv; |
94 |
IMAGE refhv; |
IMAGE refhv; |
95 |
|
|
96 |
// macroblock |
/* macroblock */ |
97 |
|
|
98 |
uint32_t mb_width; |
uint32_t mb_width; |
99 |
uint32_t mb_height; |
uint32_t mb_height; |
100 |
MACROBLOCK *mbs; |
MACROBLOCK *mbs; |
101 |
|
|
102 |
// for B-frame |
/* for B-frame */ |
103 |
int32_t frames; // total frame number |
int32_t frames; /* total frame number */ |
104 |
int8_t scalability; |
int8_t scalability; |
105 |
VECTOR p_fmv, p_bmv; // pred forward & backward motion vector |
VECTOR p_fmv, p_bmv; /* pred forward & backward motion vector */ |
106 |
MACROBLOCK *last_mbs; // last MB |
MACROBLOCK *last_mbs; /* last MB */ |
107 |
int64_t time; // for record time |
int64_t time; /* for record time */ |
108 |
int64_t time_base; |
int64_t time_base; |
109 |
int64_t last_time_base; |
int64_t last_time_base; |
110 |
int64_t last_non_b_time; |
int64_t last_non_b_time; |
111 |
uint32_t time_pp; |
uint32_t time_pp; |
112 |
uint32_t time_bp; |
uint32_t time_bp; |
113 |
uint8_t low_delay; // low_delay flage (1 means no B_VOP) |
uint8_t low_delay; /* low_delay flage (1 means no B_VOP) */ |
114 |
|
|
115 |
XVID_DEC_PICTURE* out_frm; // This is used for slice rendering |
XVID_DEC_PICTURE* out_frm; /* This is used for slice rendering */ |
116 |
} |
} |
117 |
DECODER; |
DECODER; |
118 |
|
|