FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 {
37 };
38 
40  PARTITION_NONE, // [ ] <-.
41  PARTITION_H, // [-] |
42  PARTITION_V, // [|] |
43  PARTITION_SPLIT, // [+] --'
44 };
45 
46 enum BlockSize {
61 };
62 
63 enum TxfmMode {
71 };
72 
73 enum TxfmType {
79 };
80 
98 };
99 
101  NEARESTMV = 10,
102  NEARMV = 11,
103  ZEROMV = 12,
104  NEWMV = 13,
105 };
106 
113 };
114 
119 };
120 
121 struct VP9mvrefPair {
122  VP56mv mv[2];
123  int8_t ref[2];
124 };
125 
126 typedef struct VP9Frame {
130  struct VP9mvrefPair *mv;
132 
135 } VP9Frame;
136 
137 typedef struct VP9BitstreamHeader {
138  // bitstream header
157  struct {
159  int8_t sharpness;
160  } filter;
161  struct {
164  int8_t mode[2];
165  int8_t ref[4];
166  } lf_delta;
170 #define MAX_SEGMENT 8
171  struct {
178  struct {
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;
192  struct {
194  unsigned tile_cols, tile_rows;
195  } tiling;
196 
200 
201 typedef struct VP9SharedContext {
203 
205 #define CUR_FRAME 0
206 #define REF_FRAME_MVPAIR 1
207 #define REF_FRAME_SEGMAP 2
210 
211 #endif /* AVCODEC_VP9_H */
Definition: vp9.h:101
Definition: vp9.h:49
uint8_t lf_enabled
Definition: vp9.h:180
ThreadFrame tf
Definition: vp9.h:127
int8_t uvac_qdelta
Definition: vp9.h:168
Definition: vp9.h:83
uint8_t profile
Definition: vp9.h:139
Definition: vp9.h:51
Definition: vp9.h:35
uint8_t * segmentation_map
Definition: vp9.h:129
uint8_t parallelmode
Definition: vp9.h:150
uint8_t allowcompinter
Definition: vp9.h:148
VP5 and VP6 compatible video decoder (common features)
uint8_t update_map
Definition: vp9.h:175
uint8_t temporal
Definition: vp9.h:173
VP9BitstreamHeader h
Definition: vp9.h:202
BlockPartition
Definition: vp9.h:39
uint8_t prob[7]
Definition: vp9.h:176
struct VP9mvrefPair * mv
Definition: vp9.h:130
Definition: vp9.h:47
Definition: vp9.h:34
BlockLevel
Definition: vp9.h:32
Definition: vp9.h:104
uint8_t framectxid
Definition: vp9.h:151
struct VP9BitstreamHeader::@150::@152 feat[MAX_SEGMENT]
#define MAX_SEGMENT
Definition: vp9.h:170
Definition: vp9.h:65
unsigned log2_tile_rows
Definition: vp9.h:193
int uncompressed_header_size
Definition: vp9.h:197
enum FilterMode filtermode
Definition: vp9.h:147
uint8_t resetctx
Definition: vp9.h:144
uint8_t
uint8_t absolute_vals
Definition: vp9.h:174
uint8_t varcompref[2]
Definition: vp9.h:156
mode
Definition: f_perms.c:27
TxfmType
Definition: vp9.h:73
uint8_t updated
Definition: vp9.h:163
VP9Frame frames[3]
Definition: vp9.h:208
Multithreading support functions.
Definition: vp9.h:82
InterPredMode
Definition: vp9.h:100
uint8_t yac_qi
Definition: vp9.h:167
int8_t lf_val
Definition: vp9.h:185
uint8_t errorres
Definition: vp9.h:142
AVBufferRef * hwaccel_priv_buf
Definition: vp9.h:133
AVBufferRef * extradata
Definition: vp9.h:128
uint8_t enabled
Definition: vp9.h:162
enum CompPredMode comppredmode
Definition: vp9.h:191
Definition: vp9.h:74
unsigned log2_tile_cols
Definition: vp9.h:193
int16_t qmul[2][2]
Definition: vp9.h:186
uint8_t refidx[3]
Definition: vp9.h:153
Definition: vp9.h:66
uint8_t lflvl[4][2]
Definition: vp9.h:187
Definition: vp9.h:64
uint8_t ref_val
Definition: vp9.h:183
unsigned tile_cols
Definition: vp9.h:194
Definition: vp9.h:75
uint8_t signbias[3]
Definition: vp9.h:154
Definition: vp9.h:50
uint8_t intraonly
Definition: vp9.h:143
uint8_t refreshctx
Definition: vp9.h:149
struct VP9BitstreamHeader::@150 segmentation
Definition: vp9.h:77
Definition: vp9.h:58
TxfmMode
Definition: vp9.h:63
void * hwaccel_picture_private
Definition: vp9.h:134
Definition: vp9.h:33
Definition: vp9.h:53
int uses_2pass
Definition: vp9.h:131
int8_t uvdc_qdelta
Definition: vp9.h:168
enum TxfmMode txfmmode
Definition: vp9.h:190
Definition: vp9.h:36
int8_t ref[2]
Definition: vp9.h:123
uint8_t keyframe
Definition: vp9.h:140
unsigned tile_rows
Definition: vp9.h:194
int8_t ydc_qdelta
Definition: vp9.h:168
CompPredMode
Definition: vp9.h:115
uint8_t level
Definition: vp9.h:158
uint8_t fixcompref
Definition: vp9.h:155
Definition: vp9.h:103
Definition: vp9.h:57
struct VP9BitstreamHeader::@149 lf_delta
Definition: vp9.h:52
FilterMode
Definition: vp9.h:107
int8_t sharpness
Definition: vp9.h:159
BlockSize
Definition: vp9.h:46
Definition: vp9.h:54
struct VP9BitstreamHeader::@151 tiling
IntraPredMode
Definition: hevc.h:219
Definition: vp56.h:65
Definition: vp9.h:48
Definition: vp9.h:59
Definition: vp9.h:102
Definition: vp9.h:84
A reference to a data buffer.
Definition: buffer.h:81
Definition: vp9.h:55
Definition: vp9.h:60
uint8_t ref_enabled
Definition: vp9.h:181
Definition: vp9.h:67
uint8_t invisible
Definition: vp9.h:141
uint8_t use_last_frame_mvs
Definition: vp9.h:152
ThreadFrame refs[8]
Definition: vp9.h:204
uint8_t pred_prob[3]
Definition: vp9.h:177
Definition: vp9.h:126
VP56mv mv[2]
Definition: vp9.h:122
uint8_t q_enabled
Definition: vp9.h:179
Definition: vp9.h:56
int16_t q_val
Definition: vp9.h:184
Definition: vp9.h:76
int8_t ref[4]
Definition: vp9.h:165
struct VP9BitstreamHeader::@148 filter
uint8_t highprecisionmvs
Definition: vp9.h:146
uint8_t lossless
Definition: vp9.h:169
int compressed_header_size
Definition: vp9.h:198
uint8_t refreshrefmask
Definition: vp9.h:145
uint8_t skip_enabled
Definition: vp9.h:182