xoreos  0.0.5
wmv2data.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos 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
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 /* Based on the WMV2 implementation in FFmpeg (<https://ffmpeg.org/)>,
26  * which is released under the terms of version 2 or later of the GNU
27  * Lesser General Public License.
28  *
29  * The original copyright notes in the file libavcodec/wmv2dec.c reads as follows:
30  *
31  * Copyright (c) 2002 The FFmpeg Project
32  *
33  * This file is part of FFmpeg.
34  *
35  * FFmpeg is free software; you can redistribute it and/or
36  * modify it under the terms of the GNU Lesser General Public
37  * License as published by the Free Software Foundation; either
38  * version 2.1 of the License, or (at your option) any later version.
39  *
40  * FFmpeg is distributed in the hope that it will be useful,
41  * but WITHOUT ANY WARRANTY; without even the implied warranty of
42  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
43  * Lesser General Public License for more details.
44  *
45  * You should have received a copy of the GNU Lesser General Public
46  * License along with FFmpeg; if not, write to the Free Software
47  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
48  */
49 
50 #ifndef VIDEO_CODECS_WMV2DATA_H
51 #define VIDEO_CODECS_WMV2DATA_H
52 
53 #include "src/common/types.h"
54 #include "src/common/huffman.h"
55 
56 namespace Video {
57 
64 
67 
68  // Run tables
69  const uint8 *runTable;
72 
73  // Level tables
74  const uint8 *levelTable;
77 };
78 
80 struct WMV2MVTable {
82 
85 
86  const uint8 *diffX;
87  const uint8 *diffY;
88 };
89 
90 
93 
95 extern const Common::HuffmanTable wmv2HuffmanDC[2][2];
96 
98 extern const WMV2ACCoefficientTable wmv2AC[2][3];
99 
101 extern const Common::HuffmanTable wmv2HuffmanPMB[3];
102 
104 extern const WMV2MVTable wmv2MV[2];
105 
106 
108 extern const uint8 wmv2ZigZagHorizontal[64];
110 extern const uint8 wmv2ZigZagVertical[64];
112 extern const uint8 wmv2ZigZagNormal[64];
113 
115 extern const uint8 wmv2ZigZag8x8[64];
117 extern const uint8 wmv2ZigZag8x4[32];
119 extern const uint8 wmv2ZigZag4x8[32];
120 
121 } // End of namespace Video
122 
123 #endif // VIDEO_CODECS_WMV2DATA_H
const uint8 * runDeltaTableLast
Table for run delta values, last run.
Definition: wmv2data.h:71
const WMV2ACCoefficientTable wmv2AC[2][3]
DCT AC cofficients [luma/chroma][low motion/high motion/MPEG4].
Definition: wmv2data.cpp:2364
const WMV2MVTable wmv2MV[2]
Motion vectors [low/high motion].
Definition: wmv2data.cpp:2450
const Common::HuffmanTable & huffman
Huffman decoder for the motion vectors.
Definition: wmv2data.h:84
Parameters for decoding the motion vectors.
Definition: wmv2data.h:80
const uint8 wmv2ZigZag4x8[32]
P-Frame coefficient zig-zag scantable, 4x8.
Definition: wmv2data.cpp:2191
const Common::HuffmanTable wmv2HuffmanPMB[3]
P-Frame macroblock block pattern [high/mid/low rate].
Definition: wmv2data.cpp:2252
uint8_t uint8
Definition: types.h:200
Parameters for decoding the DCT AC coefficients.
Definition: wmv2data.h:59
const uint8 wmv2ZigZag8x4[32]
P-Frame coefficient zig-zag scantable, 8x4.
Definition: wmv2data.cpp:2183
const Common::HuffmanTable wmv2HuffmanDC[2][2]
DCT DC coefficients [luma/chroma][low/high motion].
Definition: wmv2data.cpp:2208
const uint8 wmv2ZigZag8x8[64]
P-Frame coefficient zig-zag scantable, 8x8.
Definition: wmv2data.cpp:2171
uint32 lastRunIndex
Index of the last run/level pair.
Definition: wmv2data.h:66
uint32 count
Number of motion vectors.
Definition: wmv2data.h:81
const uint8 wmv2ZigZagNormal[64]
I-Frame coefficient zig-zag scantable, normal.
Definition: wmv2data.cpp:2159
const uint8 * levelDeltaTableLast
Table for level delta values, last level.
Definition: wmv2data.h:76
const uint8 * runDeltaTable
Table for run delta values.
Definition: wmv2data.h:70
Low-level type definitions to handle fixed width types portably.
const uint8 * levelDeltaTable
Table for level delta values.
Definition: wmv2data.h:75
const Common::HuffmanTable wmv2HuffmanIMB
I-Frame macroblock block pattern.
Definition: wmv2data.cpp:2199
const Common::HuffmanTable & huffman
Huffman decoder for the AC coefficients.
Definition: wmv2data.h:61
const uint8 * diffY
Y difference.
Definition: wmv2data.h:87
Decompressing Huffman codes.
uint32_t uint32
Definition: types.h:204
const uint8 * levelTable
Table for level values.
Definition: wmv2data.h:74
const uint8 wmv2ZigZagVertical[64]
I-Frame coefficient zig-zag scantable, vertical.
Definition: wmv2data.cpp:2147
const uint8 * diffX
X difference.
Definition: wmv2data.h:86
uint32 escapeCode
Escape code that signifies a special run level encoding.
Definition: wmv2data.h:63
const uint8 * runTable
Table for run values.
Definition: wmv2data.h:69
const uint8 wmv2ZigZagHorizontal[64]
I-Frame coefficient zig-zag scantable, horizontal.
Definition: wmv2data.cpp:2135