59 |
|
|
60 |
// comment any #defs we dont use |
// comment any #defs we dont use |
61 |
|
|
62 |
|
/* start codes */ |
63 |
|
|
64 |
#define VIDOBJ_START_CODE 0x00000100 /* ..0x0000011f */ |
#define VIDOBJ_START_CODE 0x00000100 /* ..0x0000011f */ |
65 |
#define VIDOBJLAY_START_CODE 0x00000120 /* ..0x0000012f */ |
#define VIDOBJLAY_START_CODE 0x00000120 /* ..0x0000012f */ |
66 |
#define VISOBJSEQ_START_CODE 0x000001b0 |
#define VISOBJSEQ_START_CODE 0x000001b0 |
69 |
#define GRPOFVOP_START_CODE 0x000001b3 |
#define GRPOFVOP_START_CODE 0x000001b3 |
70 |
//#define VIDSESERR_ERROR_CODE 0x000001b4 |
//#define VIDSESERR_ERROR_CODE 0x000001b4 |
71 |
#define VISOBJ_START_CODE 0x000001b5 |
#define VISOBJ_START_CODE 0x000001b5 |
72 |
//#define SLICE_START_CODE 0x000001b7 |
#define VOP_START_CODE 0x000001b6 |
73 |
//#define EXT_START_CODE 0x000001b8 |
//#define STUFFING_START_CODE 0x000001c3 |
74 |
|
|
75 |
|
|
76 |
#define VISOBJ_TYPE_VIDEO 1 |
#define VISOBJ_TYPE_VIDEO 1 |
84 |
//#define VIDOBJLAY_TYPE_SIMPLE_SCALABLE 2 |
//#define VIDOBJLAY_TYPE_SIMPLE_SCALABLE 2 |
85 |
#define VIDOBJLAY_TYPE_CORE 3 |
#define VIDOBJLAY_TYPE_CORE 3 |
86 |
#define VIDOBJLAY_TYPE_MAIN 4 |
#define VIDOBJLAY_TYPE_MAIN 4 |
87 |
|
//#define VIDOBJLAY_TYPE_NBIT 5 |
88 |
|
//#define VIDOBJLAY_TYPE_ANIM_TEXT 6 |
89 |
|
//#define VIDOBJLAY_TYPE_ANIM_MESH 7 |
90 |
|
//#define VIDOBJLAY_TYPE_SIMPLE_FACE 8 |
91 |
|
//#define VIDOBJLAY_TYPE_STILL_SCALABLE 9 |
92 |
|
#define VIDOBJLAY_TYPE_ART_SIMPLE 10 |
93 |
|
//#define VIDOBJLAY_TYPE_CORE_SCALABLE 11 |
94 |
|
#define VIDOBJLAY_TYPE_ACE 12 |
95 |
|
//#define VIDOBJLAY_TYPE_SIMPLE_FBA 13 |
96 |
|
|
97 |
|
|
98 |
//#define VIDOBJLAY_AR_SQUARE 1 |
//#define VIDOBJLAY_AR_SQUARE 1 |
108 |
#define VIDOBJLAY_SHAPE_BINARY_ONLY 2 |
#define VIDOBJLAY_SHAPE_BINARY_ONLY 2 |
109 |
#define VIDOBJLAY_SHAPE_GRAYSCALE 3 |
#define VIDOBJLAY_SHAPE_GRAYSCALE 3 |
110 |
|
|
111 |
#define VO_START_CODE 0x8 |
|
112 |
#define VOL_START_CODE 0x12 |
#define SPRITE_NONE 0 |
113 |
#define VOP_START_CODE 0x1b6 |
#define SPRITE_STATIC 1 |
114 |
|
#define SPRITE_GMC 2 |
115 |
|
|
116 |
|
|
117 |
|
|
118 |
#define READ_MARKER() BitstreamSkip(bs, 1) |
#define READ_MARKER() BitstreamSkip(bs, 1) |
119 |
#define WRITE_MARKER() BitstreamPutBit(bs, 1) |
#define WRITE_MARKER() BitstreamPutBit(bs, 1) |
131 |
#define RESYNC_MARKER 1 |
#define RESYNC_MARKER 1 |
132 |
|
|
133 |
|
|
134 |
int |
int read_video_packet_header(Bitstream *bs, |
135 |
read_video_packet_header(Bitstream *bs, const int addbits, int * quant); |
DECODER * dec, |
136 |
|
const int addbits, |
137 |
|
int * quant, |
138 |
|
int * fcode_forward, |
139 |
|
int * fcode_backward, |
140 |
|
int * intra_dc_threshold); |
141 |
|
|
142 |
|
|
143 |
// header stuff |
// header stuff |
144 |
int BitstreamReadHeaders(Bitstream * bs, |
int BitstreamReadHeaders(Bitstream * bs, |
145 |
DECODER * dec, |
DECODER * dec, |
146 |
uint32_t * rounding, |
uint32_t * rounding, |
147 |
|
uint32_t * reduced_resolution, |
148 |
uint32_t * quant, |
uint32_t * quant, |
149 |
uint32_t * fcode_forward, |
uint32_t * fcode_forward, |
150 |
uint32_t * fcode_backward, |
uint32_t * fcode_backward, |
151 |
uint32_t * intra_dc_threshold); |
uint32_t * intra_dc_threshold, |
152 |
|
VECTOR * gmc_mv); |
153 |
|
|
154 |
|
|
155 |
void BitstreamWriteVolHeader(Bitstream * const bs, |
void BitstreamWriteVolHeader(Bitstream * const bs, |
156 |
const MBParam * pParam, |
const MBParam * pParam, |
157 |
const FRAMEINFO * frame); |
const FRAMEINFO * const frame); |
158 |
|
|
159 |
void BitstreamWriteVopHeader(Bitstream * const bs, |
void BitstreamWriteVopHeader(Bitstream * const bs, |
160 |
const MBParam * pParam, |
const MBParam * pParam, |
161 |
const FRAMEINFO * frame, |
const FRAMEINFO * const frame, |
162 |
int vop_coded); |
int vop_coded); |
163 |
|
|
164 |
void BitstreamWriteUserData(Bitstream * const bs, |
void BitstreamWriteUserData(Bitstream * const bs, |