FFmpeg
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
c
d
g
h
i
o
q
r
s
v
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
a
d
e
f
h
i
j
l
m
n
p
r
s
v
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
libavcodec
vp9shared.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_VP9SHARED_H
25
#define AVCODEC_VP9SHARED_H
26
27
#include <stddef.h>
28
#include <stdint.h>
29
30
#include "
libavutil/mem_internal.h
"
31
32
#include "
progressframe.h
"
33
#include "
cbs_vp9.h
"
34
#include "
vp9.h
"
35
36
enum
BlockPartition
{
37
PARTITION_NONE
,
// [ ] <-.
38
PARTITION_H
,
// [-] |
39
PARTITION_V
,
// [|] |
40
PARTITION_SPLIT
,
// [+] --'
41
};
42
43
enum
InterPredMode
{
44
NEARESTMV
= 10,
45
NEARMV
= 11,
46
ZEROMV
= 12,
47
NEWMV
= 13,
48
};
49
50
enum
CompPredMode
{
51
PRED_SINGLEREF
,
52
PRED_COMPREF
,
53
PRED_SWITCHABLE
,
54
};
55
56
typedef
struct
VP9mv
{
57
DECLARE_ALIGNED
(4, int16_t,
x
);
58
int16_t
y
;
59
}
VP9mv
;
60
61
typedef
struct
VP9mvrefPair
{
62
VP9mv
mv
[2];
63
int8_t
ref
[2];
64
}
VP9mvrefPair
;
65
66
typedef
struct
VP9Frame
{
67
VP9RawFrame
*
header_ref
;
///< RefStruct reference backing frame_header
68
VP9RawFrameHeader
*
frame_header
;
69
70
ProgressFrame
tf
;
71
void
*
extradata
;
///< RefStruct reference
72
uint8_t *
segmentation_map
;
73
VP9mvrefPair
*
mv
;
74
int
uses_2pass
;
75
76
void
*
hwaccel_picture_private
;
///< RefStruct reference
77
}
VP9Frame
;
78
79
enum
BlockLevel
{
80
BL_64X64
,
81
BL_32X32
,
82
BL_16X16
,
83
BL_8X8
,
84
};
85
86
enum
BlockSize
{
87
BS_64x64
,
88
BS_64x32
,
89
BS_32x64
,
90
BS_32x32
,
91
BS_32x16
,
92
BS_16x32
,
93
BS_16x16
,
94
BS_16x8
,
95
BS_8x16
,
96
BS_8x8
,
97
BS_8x4
,
98
BS_4x8
,
99
BS_4x4
,
100
N_BS_SIZES
,
101
};
102
103
typedef
struct
VP9BitstreamHeader
{
104
// bitstream header
105
uint8_t
profile
;
106
uint8_t
bpp
;
107
uint8_t
keyframe
;
108
uint8_t
invisible
;
109
uint8_t
errorres
;
110
uint8_t
intraonly
;
111
uint8_t
resetctx
;
112
uint8_t
refreshrefmask
;
113
uint8_t
highprecisionmvs
;
114
enum
FilterMode
filtermode
;
115
uint8_t
allowcompinter
;
116
uint8_t
refreshctx
;
117
uint8_t
parallelmode
;
118
uint8_t
framectxid
;
119
uint8_t
use_last_frame_mvs
;
120
uint8_t
refidx
[3];
121
uint8_t
signbias
[3];
122
uint8_t
fixcompref
;
123
uint8_t
varcompref
[2];
124
struct
{
125
uint8_t
level
;
126
int8_t
sharpness
;
127
}
filter
;
128
struct
{
129
uint8_t
enabled
;
130
uint8_t
updated
;
131
int8_t
mode
[2];
132
int8_t
ref
[4];
133
}
lf_delta
;
134
uint8_t
yac_qi
;
135
int8_t
ydc_qdelta
,
uvdc_qdelta
,
uvac_qdelta
;
136
uint8_t
lossless
;
137
#define MAX_SEGMENT 8
138
struct
{
139
uint8_t
enabled
;
140
uint8_t
temporal
;
141
uint8_t
absolute_vals
;
142
uint8_t
update_map
;
143
uint8_t
prob
[7];
144
uint8_t
pred_prob
[3];
145
struct
{
146
uint8_t
q_enabled
;
147
uint8_t
lf_enabled
;
148
uint8_t
ref_enabled
;
149
uint8_t
skip_enabled
;
150
uint8_t
ref_val
;
151
int16_t
q_val
;
152
int8_t
lf_val
;
153
int16_t
qmul
[2][2];
154
uint8_t
lflvl
[4][2];
155
}
feat
[
MAX_SEGMENT
];
156
}
segmentation
;
157
enum
TxfmMode
txfmmode
;
158
enum
CompPredMode
comppredmode
;
159
struct
{
160
unsigned
log2_tile_cols
,
log2_tile_rows
;
161
unsigned
tile_cols
,
tile_rows
;
162
}
tiling
;
163
164
int
uncompressed_header_size
;
165
int
compressed_header_size
;
166
}
VP9BitstreamHeader
;
167
168
typedef
struct
VP9SharedContext
{
169
VP9BitstreamHeader
h
;
170
171
ProgressFrame
refs
[8];
172
#define CUR_FRAME 0
173
#define REF_FRAME_MVPAIR 1
174
#define REF_FRAME_SEGMAP 2
175
#define BLANK_FRAME 3
176
VP9Frame
frames
[4];
177
VP9Frame
ref_frames
[8];
178
}
VP9SharedContext
;
179
180
#endif
/* AVCODEC_VP9SHARED_H */
PRED_SWITCHABLE
@ PRED_SWITCHABLE
Definition:
vp9shared.h:53
PRED_SINGLEREF
@ PRED_SINGLEREF
Definition:
vp9shared.h:51
mem_internal.h
BS_64x64
@ BS_64x64
Definition:
vp9shared.h:87
VP9BitstreamHeader::parallelmode
uint8_t parallelmode
Definition:
vp9shared.h:117
BS_64x32
@ BS_64x32
Definition:
vp9shared.h:88
VP9Frame::segmentation_map
uint8_t * segmentation_map
Definition:
vp9shared.h:72
VP9Frame
Definition:
vp9shared.h:66
VP9Frame::header_ref
VP9RawFrame * header_ref
RefStruct reference backing frame_header.
Definition:
vp9shared.h:67
BL_16X16
@ BL_16X16
Definition:
vp9shared.h:82
PRED_COMPREF
@ PRED_COMPREF
Definition:
vp9shared.h:52
mode
Definition:
swscale.c:56
BlockPartition
BlockPartition
Definition:
vp9shared.h:36
VP9BitstreamHeader
Definition:
vp9shared.h:103
VP9BitstreamHeader::refreshrefmask
uint8_t refreshrefmask
Definition:
vp9shared.h:112
VP9Frame::tf
ProgressFrame tf
Definition:
vp9shared.h:70
BL_32X32
@ BL_32X32
Definition:
vp9shared.h:81
MAX_SEGMENT
#define MAX_SEGMENT
Definition:
vp9shared.h:137
VP9BitstreamHeader::q_enabled
uint8_t q_enabled
Definition:
vp9shared.h:146
VP9BitstreamHeader::qmul
int16_t qmul[2][2]
Definition:
vp9shared.h:153
BS_4x8
@ BS_4x8
Definition:
vp9shared.h:98
VP9BitstreamHeader::framectxid
uint8_t framectxid
Definition:
vp9shared.h:118
NEARMV
@ NEARMV
Definition:
vp9shared.h:45
VP9BitstreamHeader::lf_delta
struct VP9BitstreamHeader::@315 lf_delta
VP9BitstreamHeader::allowcompinter
uint8_t allowcompinter
Definition:
vp9shared.h:115
VP9BitstreamHeader::compressed_header_size
int compressed_header_size
Definition:
vp9shared.h:165
VP9BitstreamHeader::absolute_vals
uint8_t absolute_vals
Definition:
vp9shared.h:141
VP9BitstreamHeader::uncompressed_header_size
int uncompressed_header_size
Definition:
vp9shared.h:164
VP9BitstreamHeader::tile_cols
unsigned tile_cols
Definition:
vp9shared.h:161
FilterMode
FilterMode
Definition:
vp9.h:64
BS_8x16
@ BS_8x16
Definition:
vp9shared.h:95
PARTITION_NONE
@ PARTITION_NONE
Definition:
vp9shared.h:37
VP9Frame::hwaccel_picture_private
void * hwaccel_picture_private
RefStruct reference.
Definition:
vp9shared.h:76
progressframe.h
ZEROMV
@ ZEROMV
Definition:
vp9shared.h:46
VP9BitstreamHeader::ydc_qdelta
int8_t ydc_qdelta
Definition:
vp9shared.h:135
BL_8X8
@ BL_8X8
Definition:
vp9shared.h:83
VP9mv::y
int16_t y
Definition:
vp9shared.h:58
VP9BitstreamHeader::q_val
int16_t q_val
Definition:
vp9shared.h:151
BS_32x32
@ BS_32x32
Definition:
vp9shared.h:90
PARTITION_V
@ PARTITION_V
Definition:
vp9shared.h:39
VP9BitstreamHeader::prob
uint8_t prob[7]
Definition:
vp9shared.h:143
VP9BitstreamHeader::fixcompref
uint8_t fixcompref
Definition:
vp9shared.h:122
VP9BitstreamHeader::uvdc_qdelta
int8_t uvdc_qdelta
Definition:
vp9shared.h:135
VP9SharedContext
Definition:
vp9shared.h:168
VP9BitstreamHeader::txfmmode
enum TxfmMode txfmmode
Definition:
vp9shared.h:157
VP9mvrefPair::mv
VP9mv mv[2]
Definition:
vp9shared.h:62
VP9BitstreamHeader::keyframe
uint8_t keyframe
Definition:
vp9shared.h:107
VP9BitstreamHeader::comppredmode
enum CompPredMode comppredmode
Definition:
vp9shared.h:158
VP9BitstreamHeader::ref
int8_t ref[4]
Definition:
vp9shared.h:132
VP9BitstreamHeader::tiling
struct VP9BitstreamHeader::@317 tiling
cbs_vp9.h
VP9BitstreamHeader::filter
struct VP9BitstreamHeader::@314 filter
VP9RawFrameHeader
Definition:
cbs_vp9.h:83
VP9BitstreamHeader::sharpness
int8_t sharpness
Definition:
vp9shared.h:126
BS_8x4
@ BS_8x4
Definition:
vp9shared.h:97
VP9BitstreamHeader::segmentation
struct VP9BitstreamHeader::@316 segmentation
VP9BitstreamHeader::ref_val
uint8_t ref_val
Definition:
vp9shared.h:150
VP9BitstreamHeader::log2_tile_rows
unsigned log2_tile_rows
Definition:
vp9shared.h:160
VP9BitstreamHeader::skip_enabled
uint8_t skip_enabled
Definition:
vp9shared.h:149
VP9BitstreamHeader::refreshctx
uint8_t refreshctx
Definition:
vp9shared.h:116
VP9BitstreamHeader::resetctx
uint8_t resetctx
Definition:
vp9shared.h:111
VP9Frame::frame_header
VP9RawFrameHeader * frame_header
Definition:
vp9shared.h:68
VP9BitstreamHeader::enabled
uint8_t enabled
Definition:
vp9shared.h:129
VP9BitstreamHeader::update_map
uint8_t update_map
Definition:
vp9shared.h:142
VP9BitstreamHeader::temporal
uint8_t temporal
Definition:
vp9shared.h:140
VP9BitstreamHeader::lf_val
int8_t lf_val
Definition:
vp9shared.h:152
BS_32x64
@ BS_32x64
Definition:
vp9shared.h:89
VP9mv
Definition:
vp9shared.h:56
VP9BitstreamHeader::yac_qi
uint8_t yac_qi
Definition:
vp9shared.h:134
PARTITION_SPLIT
@ PARTITION_SPLIT
Definition:
vp9shared.h:40
VP9RawFrame
Definition:
cbs_vp9.h:164
VP9BitstreamHeader::lflvl
uint8_t lflvl[4][2]
Definition:
vp9shared.h:154
VP9BitstreamHeader::highprecisionmvs
uint8_t highprecisionmvs
Definition:
vp9shared.h:113
TxfmMode
TxfmMode
Definition:
vp9.h:27
vp9.h
VP9SharedContext::frames
VP9Frame frames[4]
Definition:
vp9shared.h:176
VP9Frame::uses_2pass
int uses_2pass
Definition:
vp9shared.h:74
VP9BitstreamHeader::signbias
uint8_t signbias[3]
Definition:
vp9shared.h:121
DECLARE_ALIGNED
#define DECLARE_ALIGNED(n, t, v)
Definition:
mem_internal.h:104
VP9BitstreamHeader::lf_enabled
uint8_t lf_enabled
Definition:
vp9shared.h:147
VP9BitstreamHeader::lossless
uint8_t lossless
Definition:
vp9shared.h:136
VP9BitstreamHeader::level
uint8_t level
Definition:
vp9shared.h:125
BS_8x8
@ BS_8x8
Definition:
vp9shared.h:96
VP9BitstreamHeader::filtermode
enum FilterMode filtermode
Definition:
vp9shared.h:114
N_BS_SIZES
@ N_BS_SIZES
Definition:
vp9shared.h:100
VP9BitstreamHeader::ref_enabled
uint8_t ref_enabled
Definition:
vp9shared.h:148
BS_4x4
@ BS_4x4
Definition:
vp9shared.h:99
VP9Frame::extradata
void * extradata
RefStruct reference.
Definition:
vp9shared.h:71
VP9BitstreamHeader::varcompref
uint8_t varcompref[2]
Definition:
vp9shared.h:123
VP9BitstreamHeader::feat
struct VP9BitstreamHeader::@316::@318 feat[MAX_SEGMENT]
BS_16x32
@ BS_16x32
Definition:
vp9shared.h:92
BlockSize
BlockSize
Definition:
vp9shared.h:86
VP9BitstreamHeader::tile_rows
unsigned tile_rows
Definition:
vp9shared.h:161
BL_64X64
@ BL_64X64
Definition:
vp9shared.h:80
VP9BitstreamHeader::uvac_qdelta
int8_t uvac_qdelta
Definition:
vp9shared.h:135
VP9mvrefPair
Definition:
vp9shared.h:61
NEWMV
@ NEWMV
Definition:
vp9shared.h:47
BS_16x16
@ BS_16x16
Definition:
vp9shared.h:93
VP9BitstreamHeader::profile
uint8_t profile
Definition:
vp9shared.h:105
BS_16x8
@ BS_16x8
Definition:
vp9shared.h:94
CompPredMode
CompPredMode
Definition:
vp9shared.h:50
VP9SharedContext::h
VP9BitstreamHeader h
Definition:
vp9shared.h:169
VP9Frame::mv
VP9mvrefPair * mv
Definition:
vp9shared.h:73
VP9BitstreamHeader::updated
uint8_t updated
Definition:
vp9shared.h:130
NEARESTMV
@ NEARESTMV
Definition:
vp9shared.h:44
BlockLevel
BlockLevel
Definition:
vp9shared.h:79
VP9BitstreamHeader::errorres
uint8_t errorres
Definition:
vp9shared.h:109
InterPredMode
InterPredMode
Definition:
vp9shared.h:43
VP9BitstreamHeader::invisible
uint8_t invisible
Definition:
vp9shared.h:108
ProgressFrame
The ProgressFrame structure.
Definition:
progressframe.h:73
BS_32x16
@ BS_32x16
Definition:
vp9shared.h:91
PARTITION_H
@ PARTITION_H
Definition:
vp9shared.h:38
VP9BitstreamHeader::refidx
uint8_t refidx[3]
Definition:
vp9shared.h:120
VP9BitstreamHeader::log2_tile_cols
unsigned log2_tile_cols
Definition:
vp9shared.h:160
VP9BitstreamHeader::bpp
uint8_t bpp
Definition:
vp9shared.h:106
VP9mvrefPair::ref
int8_t ref[2]
Definition:
vp9shared.h:63
VP9BitstreamHeader::use_last_frame_mvs
uint8_t use_last_frame_mvs
Definition:
vp9shared.h:119
VP9SharedContext::ref_frames
VP9Frame ref_frames[8]
Definition:
vp9shared.h:177
VP9BitstreamHeader::pred_prob
uint8_t pred_prob[3]
Definition:
vp9shared.h:144
VP9mv::x
int16_t x
Definition:
vp9shared.h:57
VP9SharedContext::refs
ProgressFrame refs[8]
Definition:
vp9shared.h:171
VP9BitstreamHeader::intraonly
uint8_t intraonly
Definition:
vp9shared.h:110
Generated on Sun Aug 24 2025 19:22:24 for FFmpeg by
1.8.17