1 /*
2 * Chinese AVS video (AVS1-P2, JiZhun profile) decoder.
3 * Copyright (c) 2006 Stefan Gehrer <stefan.gehrer@gmx.de>
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #ifndef AVCODEC_CAVS_H
23 #define AVCODEC_CAVS_H
24
30
31 #define SLICE_MAX_START_CODE 0x000001af
32 #define EXT_START_CODE 0x000001b5
33 #define USER_START_CODE 0x000001b2
34 #define CAVS_START_CODE 0x000001b0
35 #define PIC_I_START_CODE 0x000001b3
36 #define PIC_PB_START_CODE 0x000001b6
37
45
46 #define ESCAPE_CODE 59
47
56
57 #define MV_BWD_OFFS 12
59
73 };
74
80 };
81
91 };
92
101 };
102
110 };
111
117 };
118
140 };
141
148
155 };
156
161
171 int dist[2];
///< temporal distances from current frame to ref frames
185 int flags;
///< availability flags of neighbouring macroblocks
186 int stc;
///< last start code
190
191 /** mv motion vector cache
192 0: D3 B2 B3 C2
193 4: A1 X0 X1 -
194 8: A3 X2 X3 -
195
196 X are the vectors in the current macroblock (5,6,9,10)
197 A is the macroblock to the left (4,8)
198 B is the macroblock to the top (1,2)
199 C is the macroblock to the top-right (3)
200 D is the macroblock to the top-left (0)
201
202 the same is repeated for backward motion vectors */
206
207 /** luma pred mode cache
208 0: -- B2 B3
209 3: A1 X0 X1
210 6: A3 X2 X3 */
219
220 /** intra prediction is done with un-deblocked samples
221 they are saved here before deblocking the MB */
226
230
231 /* scaling factors for MV prediction */
235
237
241
245
247 switch(size) {
252 mv[1] = mv[0];
253 break;
256 break;
257 }
258 }
259
274
275 #endif /* AVCODEC_CAVS_H */