FFmpeg
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
libavcodec
vp9.h
Go to the documentation of this file.
1
/*
2
* VP9 compatible video decoder
3
*
4
* Copyright (C) 2013 Ronald S. Bultje <rsbultje gmail com>
5
* Copyright (C) 2013 Clément Bœsch <u pkh me>
6
*
7
* This file is part of FFmpeg.
8
*
9
* FFmpeg is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public
11
* License as published by the Free Software Foundation; either
12
* version 2.1 of the License, or (at your option) any later version.
13
*
14
* FFmpeg is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Lesser General Public License for more details.
18
*
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with FFmpeg; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
*/
23
24
#ifndef AVCODEC_VP9_H
25
#define AVCODEC_VP9_H
26
27
#include <stdint.h>
28
29
#include "
thread.h
"
30
#include "
vp56.h
"
31
32
enum
BlockLevel
{
33
BL_64X64
,
34
BL_32X32
,
35
BL_16X16
,
36
BL_8X8
,
37
};
38
39
enum
BlockPartition
{
40
PARTITION_NONE
,
// [ ] <-.
41
PARTITION_H
,
// [-] |
42
PARTITION_V
,
// [|] |
43
PARTITION_SPLIT
,
// [+] --'
44
};
45
46
enum
BlockSize
{
47
BS_64x64
,
48
BS_64x32
,
49
BS_32x64
,
50
BS_32x32
,
51
BS_32x16
,
52
BS_16x32
,
53
BS_16x16
,
54
BS_16x8
,
55
BS_8x16
,
56
BS_8x8
,
57
BS_8x4
,
58
BS_4x8
,
59
BS_4x4
,
60
N_BS_SIZES
,
61
};
62
63
enum
TxfmMode
{
64
TX_4X4
,
65
TX_8X8
,
66
TX_16X16
,
67
TX_32X32
,
68
N_TXFM_SIZES
,
69
TX_SWITCHABLE
=
N_TXFM_SIZES
,
70
N_TXFM_MODES
71
};
72
73
enum
TxfmType
{
74
DCT_DCT
,
75
DCT_ADST
,
76
ADST_DCT
,
77
ADST_ADST
,
78
N_TXFM_TYPES
79
};
80
81
enum
IntraPredMode
{
82
VERT_PRED
,
83
HOR_PRED
,
84
DC_PRED
,
85
DIAG_DOWN_LEFT_PRED
,
86
DIAG_DOWN_RIGHT_PRED
,
87
VERT_RIGHT_PRED
,
88
HOR_DOWN_PRED
,
89
VERT_LEFT_PRED
,
90
HOR_UP_PRED
,
91
TM_VP8_PRED
,
92
LEFT_DC_PRED
,
93
TOP_DC_PRED
,
94
DC_128_PRED
,
95
DC_127_PRED
,
96
DC_129_PRED
,
97
N_INTRA_PRED_MODES
98
};
99
100
enum
InterPredMode
{
101
NEARESTMV
= 10,
102
NEARMV
= 11,
103
ZEROMV
= 12,
104
NEWMV
= 13,
105
};
106
107
enum
FilterMode
{
108
FILTER_8TAP_SMOOTH
,
109
FILTER_8TAP_REGULAR
,
110
FILTER_8TAP_SHARP
,
111
FILTER_BILINEAR
,
112
FILTER_SWITCHABLE
,
113
};
114
115
enum
CompPredMode
{
116
PRED_SINGLEREF
,
117
PRED_COMPREF
,
118
PRED_SWITCHABLE
,
119
};
120
121
struct
VP9mvrefPair
{
122
VP56mv
mv
[2];
123
int8_t
ref
[2];
124
};
125
126
typedef
struct
VP9Frame
{
127
ThreadFrame
tf
;
128
AVBufferRef
*
extradata
;
129
uint8_t
*
segmentation_map
;
130
struct
VP9mvrefPair
*
mv
;
131
int
uses_2pass
;
132
133
AVBufferRef
*
hwaccel_priv_buf
;
134
void
*
hwaccel_picture_private
;
135
}
VP9Frame
;
136
137
typedef
struct
VP9BitstreamHeader
{
138
// bitstream header
139
uint8_t
profile
;
140
uint8_t
keyframe
;
141
uint8_t
invisible
;
142
uint8_t
errorres
;
143
uint8_t
intraonly
;
144
uint8_t
resetctx
;
145
uint8_t
refreshrefmask
;
146
uint8_t
highprecisionmvs
;
147
enum
FilterMode
filtermode
;
148
uint8_t
allowcompinter
;
149
uint8_t
refreshctx
;
150
uint8_t
parallelmode
;
151
uint8_t
framectxid
;
152
uint8_t
use_last_frame_mvs
;
153
uint8_t
refidx
[3];
154
uint8_t
signbias
[3];
155
uint8_t
fixcompref
;
156
uint8_t
varcompref
[2];
157
struct
{
158
uint8_t
level
;
159
int8_t
sharpness
;
160
}
filter
;
161
struct
{
162
uint8_t
enabled
;
163
uint8_t
updated
;
164
int8_t
mode
[2];
165
int8_t
ref
[4];
166
}
lf_delta
;
167
uint8_t
yac_qi
;
168
int8_t
ydc_qdelta
,
uvdc_qdelta
,
uvac_qdelta
;
169
uint8_t
lossless
;
170
#define MAX_SEGMENT 8
171
struct
{
172
uint8_t
enabled
;
173
uint8_t
temporal
;
174
uint8_t
absolute_vals
;
175
uint8_t
update_map
;
176
uint8_t
prob
[7];
177
uint8_t
pred_prob
[3];
178
struct
{
179
uint8_t
q_enabled
;
180
uint8_t
lf_enabled
;
181
uint8_t
ref_enabled
;
182
uint8_t
skip_enabled
;
183
uint8_t
ref_val
;
184
int16_t
q_val
;
185
int8_t
lf_val
;
186
int16_t
qmul
[2][2];
187
uint8_t
lflvl
[4][2];
188
}
feat
[
MAX_SEGMENT
];
189
}
segmentation
;
190
enum
TxfmMode
txfmmode
;
191
enum
CompPredMode
comppredmode
;
192
struct
{
193
unsigned
log2_tile_cols
,
log2_tile_rows
;
194
unsigned
tile_cols
,
tile_rows
;
195
}
tiling
;
196
197
int
uncompressed_header_size
;
198
int
compressed_header_size
;
199
}
VP9BitstreamHeader
;
200
201
typedef
struct
VP9SharedContext
{
202
VP9BitstreamHeader
h
;
203
204
ThreadFrame
refs
[8];
205
#define CUR_FRAME 0
206
#define REF_FRAME_MVPAIR 1
207
#define REF_FRAME_SEGMAP 2
208
VP9Frame
frames
[3];
209
}
VP9SharedContext
;
210
211
#endif
/* AVCODEC_VP9_H */
NEARESTMV
Definition:
vp9.h:101
BS_32x64
Definition:
vp9.h:49
VP9BitstreamHeader::lf_enabled
uint8_t lf_enabled
Definition:
vp9.h:180
VP9Frame::tf
ThreadFrame tf
Definition:
vp9.h:127
VP9BitstreamHeader::uvac_qdelta
int8_t uvac_qdelta
Definition:
vp9.h:168
HOR_PRED
Definition:
vp9.h:83
TOP_DC_PRED
Definition:
vp9.h:93
VP9BitstreamHeader::profile
uint8_t profile
Definition:
vp9.h:139
BS_32x16
Definition:
vp9.h:51
BL_16X16
Definition:
vp9.h:35
VP9Frame::segmentation_map
uint8_t * segmentation_map
Definition:
vp9.h:129
VP9BitstreamHeader::parallelmode
uint8_t parallelmode
Definition:
vp9.h:150
PARTITION_V
Definition:
vp9.h:42
VP9BitstreamHeader::allowcompinter
uint8_t allowcompinter
Definition:
vp9.h:148
vp56.h
VP5 and VP6 compatible video decoder (common features)
VP9BitstreamHeader::update_map
uint8_t update_map
Definition:
vp9.h:175
VP9BitstreamHeader::temporal
uint8_t temporal
Definition:
vp9.h:173
N_TXFM_TYPES
Definition:
vp9.h:78
VP9SharedContext::h
VP9BitstreamHeader h
Definition:
vp9.h:202
BlockPartition
BlockPartition
Definition:
vp9.h:39
VP9BitstreamHeader::prob
uint8_t prob[7]
Definition:
vp9.h:176
PARTITION_SPLIT
Definition:
vp9.h:43
VP9Frame::mv
struct VP9mvrefPair * mv
Definition:
vp9.h:130
PRED_SWITCHABLE
Definition:
vp9.h:118
HOR_DOWN_PRED
Definition:
vp9.h:88
BS_64x64
Definition:
vp9.h:47
BL_32X32
Definition:
vp9.h:34
BlockLevel
BlockLevel
Definition:
vp9.h:32
NEWMV
Definition:
vp9.h:104
VP9BitstreamHeader::framectxid
uint8_t framectxid
Definition:
vp9.h:151
VERT_LEFT_PRED
Definition:
vp9.h:89
VP9BitstreamHeader
Definition:
vp9.h:137
MAX_SEGMENT
#define MAX_SEGMENT
Definition:
vp9.h:170
TX_SWITCHABLE
Definition:
vp9.h:69
FILTER_SWITCHABLE
Definition:
vp9.h:112
TX_8X8
Definition:
vp9.h:65
VP9BitstreamHeader::log2_tile_rows
unsigned log2_tile_rows
Definition:
vp9.h:193
VP9BitstreamHeader::uncompressed_header_size
int uncompressed_header_size
Definition:
vp9.h:197
VP9BitstreamHeader::filtermode
enum FilterMode filtermode
Definition:
vp9.h:147
VP9BitstreamHeader::resetctx
uint8_t resetctx
Definition:
vp9.h:144
DC_127_PRED
Definition:
vp9.h:95
uint8_t
uint8_t
Definition:
audio_convert.c:194
VP9BitstreamHeader::absolute_vals
uint8_t absolute_vals
Definition:
vp9.h:174
VP9BitstreamHeader::varcompref
uint8_t varcompref[2]
Definition:
vp9.h:156
mode
mode
Definition:
f_perms.c:27
TxfmType
TxfmType
Definition:
vp9.h:73
VP9BitstreamHeader::updated
uint8_t updated
Definition:
vp9.h:163
VP9SharedContext::frames
VP9Frame frames[3]
Definition:
vp9.h:208
thread.h
Multithreading support functions.
VERT_PRED
Definition:
vp9.h:82
InterPredMode
InterPredMode
Definition:
vp9.h:100
VP9BitstreamHeader::yac_qi
uint8_t yac_qi
Definition:
vp9.h:167
FILTER_8TAP_SHARP
Definition:
vp9.h:110
VP9BitstreamHeader::lf_val
int8_t lf_val
Definition:
vp9.h:185
N_TXFM_SIZES
Definition:
vp9.h:68
VP9BitstreamHeader::errorres
uint8_t errorres
Definition:
vp9.h:142
VP9Frame::hwaccel_priv_buf
AVBufferRef * hwaccel_priv_buf
Definition:
vp9.h:133
VP9Frame::extradata
AVBufferRef * extradata
Definition:
vp9.h:128
VP9BitstreamHeader::enabled
uint8_t enabled
Definition:
vp9.h:162
VP9BitstreamHeader::comppredmode
enum CompPredMode comppredmode
Definition:
vp9.h:191
DCT_DCT
Definition:
vp9.h:74
FILTER_8TAP_SMOOTH
Definition:
vp9.h:108
VP9BitstreamHeader::log2_tile_cols
unsigned log2_tile_cols
Definition:
vp9.h:193
VP9BitstreamHeader::qmul
int16_t qmul[2][2]
Definition:
vp9.h:186
VP9BitstreamHeader::refidx
uint8_t refidx[3]
Definition:
vp9.h:153
TX_16X16
Definition:
vp9.h:66
VP9BitstreamHeader::lflvl
uint8_t lflvl[4][2]
Definition:
vp9.h:187
TX_4X4
Definition:
vp9.h:64
DC_129_PRED
Definition:
vp9.h:96
VP9BitstreamHeader::tiling
struct VP9BitstreamHeader::@135 tiling
VP9BitstreamHeader::ref_val
uint8_t ref_val
Definition:
vp9.h:183
VP9BitstreamHeader::tile_cols
unsigned tile_cols
Definition:
vp9.h:194
DCT_ADST
Definition:
vp9.h:75
VP9BitstreamHeader::signbias
uint8_t signbias[3]
Definition:
vp9.h:154
DC_128_PRED
Definition:
vp9.h:94
BS_32x32
Definition:
vp9.h:50
VP9BitstreamHeader::intraonly
uint8_t intraonly
Definition:
vp9.h:143
VP9BitstreamHeader::refreshctx
uint8_t refreshctx
Definition:
vp9.h:149
ADST_ADST
Definition:
vp9.h:77
BS_4x8
Definition:
vp9.h:58
VERT_RIGHT_PRED
Definition:
vp9.h:87
TxfmMode
TxfmMode
Definition:
vp9.h:63
VP9Frame::hwaccel_picture_private
void * hwaccel_picture_private
Definition:
vp9.h:134
TM_VP8_PRED
Definition:
vp9.h:91
BL_64X64
Definition:
vp9.h:33
BS_16x16
Definition:
vp9.h:53
VP9Frame::uses_2pass
int uses_2pass
Definition:
vp9.h:131
PRED_SINGLEREF
Definition:
vp9.h:116
VP9BitstreamHeader::uvdc_qdelta
int8_t uvdc_qdelta
Definition:
vp9.h:168
VP9BitstreamHeader::txfmmode
enum TxfmMode txfmmode
Definition:
vp9.h:190
BL_8X8
Definition:
vp9.h:36
VP9mvrefPair::ref
int8_t ref[2]
Definition:
vp9.h:123
HOR_UP_PRED
Definition:
vp9.h:90
VP9BitstreamHeader::keyframe
uint8_t keyframe
Definition:
vp9.h:140
VP9BitstreamHeader::tile_rows
unsigned tile_rows
Definition:
vp9.h:194
VP9BitstreamHeader::ydc_qdelta
int8_t ydc_qdelta
Definition:
vp9.h:168
CompPredMode
CompPredMode
Definition:
vp9.h:115
VP9BitstreamHeader::level
uint8_t level
Definition:
vp9.h:158
ThreadFrame
Definition:
thread.h:35
VP9BitstreamHeader::fixcompref
uint8_t fixcompref
Definition:
vp9.h:155
PRED_COMPREF
Definition:
vp9.h:117
N_INTRA_PRED_MODES
Definition:
vp9.h:97
ZEROMV
Definition:
vp9.h:103
BS_8x4
Definition:
vp9.h:57
FILTER_BILINEAR
Definition:
vp9.h:111
BS_16x32
Definition:
vp9.h:52
FilterMode
FilterMode
Definition:
vp9.h:107
VP9BitstreamHeader::sharpness
int8_t sharpness
Definition:
vp9.h:159
VP9BitstreamHeader::lf_delta
struct VP9BitstreamHeader::@133 lf_delta
DIAG_DOWN_RIGHT_PRED
Definition:
vp9.h:86
BlockSize
BlockSize
Definition:
vp9.h:46
N_TXFM_MODES
Definition:
vp9.h:70
BS_16x8
Definition:
vp9.h:54
FILTER_8TAP_REGULAR
Definition:
vp9.h:109
VP9BitstreamHeader::feat
struct VP9BitstreamHeader::@134::@136 feat[MAX_SEGMENT]
IntraPredMode
IntraPredMode
Definition:
hevc.h:219
VP9SharedContext
Definition:
vp9.h:201
VP56mv
Definition:
vp56.h:65
BS_64x32
Definition:
vp9.h:48
BS_4x4
Definition:
vp9.h:59
NEARMV
Definition:
vp9.h:102
DC_PRED
Definition:
vp9.h:84
AVBufferRef
A reference to a data buffer.
Definition:
buffer.h:81
BS_8x16
Definition:
vp9.h:55
N_BS_SIZES
Definition:
vp9.h:60
PARTITION_H
Definition:
vp9.h:41
VP9BitstreamHeader::ref_enabled
uint8_t ref_enabled
Definition:
vp9.h:181
VP9mvrefPair
Definition:
vp9.h:121
VP9BitstreamHeader::segmentation
struct VP9BitstreamHeader::@134 segmentation
DIAG_DOWN_LEFT_PRED
Definition:
vp9.h:85
TX_32X32
Definition:
vp9.h:67
VP9BitstreamHeader::invisible
uint8_t invisible
Definition:
vp9.h:141
VP9BitstreamHeader::use_last_frame_mvs
uint8_t use_last_frame_mvs
Definition:
vp9.h:152
VP9SharedContext::refs
ThreadFrame refs[8]
Definition:
vp9.h:204
VP9BitstreamHeader::pred_prob
uint8_t pred_prob[3]
Definition:
vp9.h:177
VP9Frame
Definition:
vp9.h:126
VP9mvrefPair::mv
VP56mv mv[2]
Definition:
vp9.h:122
VP9BitstreamHeader::q_enabled
uint8_t q_enabled
Definition:
vp9.h:179
BS_8x8
Definition:
vp9.h:56
PARTITION_NONE
Definition:
vp9.h:40
VP9BitstreamHeader::q_val
int16_t q_val
Definition:
vp9.h:184
ADST_DCT
Definition:
vp9.h:76
VP9BitstreamHeader::ref
int8_t ref[4]
Definition:
vp9.h:165
VP9BitstreamHeader::highprecisionmvs
uint8_t highprecisionmvs
Definition:
vp9.h:146
VP9BitstreamHeader::lossless
uint8_t lossless
Definition:
vp9.h:169
LEFT_DC_PRED
Definition:
vp9.h:92
VP9BitstreamHeader::filter
struct VP9BitstreamHeader::@132 filter
VP9BitstreamHeader::compressed_header_size
int compressed_header_size
Definition:
vp9.h:198
VP9BitstreamHeader::refreshrefmask
uint8_t refreshrefmask
Definition:
vp9.h:145
VP9BitstreamHeader::skip_enabled
uint8_t skip_enabled
Definition:
vp9.h:182
Generated on Mon Jun 27 2016 02:34:41 for FFmpeg by
1.8.6