FFmpeg  4.4.5
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 "vp9.h"
31 #include "thread.h"
32 #include "vp56.h"
33 
35  PARTITION_NONE, // [ ] <-.
36  PARTITION_H, // [-] |
37  PARTITION_V, // [|] |
38  PARTITION_SPLIT, // [+] --'
39 };
40 
42  NEARESTMV = 10,
43  NEARMV = 11,
44  ZEROMV = 12,
45  NEWMV = 13,
46 };
47 
52 };
53 
54 typedef struct VP9mvrefPair {
55  VP56mv mv[2];
56  int8_t ref[2];
57 } VP9mvrefPair;
58 
59 typedef struct VP9Frame {
65 
68 } VP9Frame;
69 
70 enum BlockLevel {
75 };
76 
77 enum BlockSize {
92 };
93 
94 typedef struct VP9BitstreamHeader {
95  // bitstream header
105  enum FilterMode filtermode;
115  struct {
117  int8_t sharpness;
119  struct {
122  int8_t mode[2];
123  int8_t ref[4];
128 #define MAX_SEGMENT 8
129  struct {
136  struct {
142  int16_t q_val;
143  int8_t lf_val;
144  int16_t qmul[2][2];
145  uint8_t lflvl[4][2];
148  enum TxfmMode txfmmode;
150  struct {
152  unsigned tile_cols, tile_rows;
154 
158 
159 typedef struct VP9SharedContext {
161 
163 #define CUR_FRAME 0
164 #define REF_FRAME_MVPAIR 1
165 #define REF_FRAME_SEGMAP 2
168 
169 #endif /* AVCODEC_VP9SHARED_H */
uint8_t
mode
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83
A reference to a data buffer.
Definition: buffer.h:84
Definition: vp56.h:68
struct VP9BitstreamHeader::@184 lf_delta
uint8_t invisible
Definition: vp9shared.h:99
uint8_t lflvl[4][2]
Definition: vp9shared.h:145
uint8_t varcompref[2]
Definition: vp9shared.h:114
uint8_t highprecisionmvs
Definition: vp9shared.h:104
uint8_t refidx[3]
Definition: vp9shared.h:111
uint8_t allowcompinter
Definition: vp9shared.h:106
enum FilterMode filtermode
Definition: vp9shared.h:105
uint8_t update_map
Definition: vp9shared.h:133
unsigned log2_tile_rows
Definition: vp9shared.h:151
uint8_t prob[7]
Definition: vp9shared.h:134
struct VP9BitstreamHeader::@185 segmentation
uint8_t parallelmode
Definition: vp9shared.h:108
unsigned tile_rows
Definition: vp9shared.h:152
uint8_t refreshctx
Definition: vp9shared.h:107
int16_t qmul[2][2]
Definition: vp9shared.h:144
enum TxfmMode txfmmode
Definition: vp9shared.h:148
struct VP9BitstreamHeader::@186 tiling
uint8_t use_last_frame_mvs
Definition: vp9shared.h:110
uint8_t pred_prob[3]
Definition: vp9shared.h:135
uint8_t absolute_vals
Definition: vp9shared.h:132
uint8_t fixcompref
Definition: vp9shared.h:113
uint8_t refreshrefmask
Definition: vp9shared.h:103
uint8_t signbias[3]
Definition: vp9shared.h:112
uint8_t framectxid
Definition: vp9shared.h:109
struct VP9BitstreamHeader::@185::@187 feat[MAX_SEGMENT]
unsigned log2_tile_cols
Definition: vp9shared.h:151
struct VP9BitstreamHeader::@183 filter
unsigned tile_cols
Definition: vp9shared.h:152
uint8_t skip_enabled
Definition: vp9shared.h:140
enum CompPredMode comppredmode
Definition: vp9shared.h:149
int uncompressed_header_size
Definition: vp9shared.h:155
uint8_t keyframe
Definition: vp9shared.h:98
int compressed_header_size
Definition: vp9shared.h:156
uint8_t ref_enabled
Definition: vp9shared.h:139
uint8_t lf_enabled
Definition: vp9shared.h:138
AVBufferRef * extradata
Definition: vp9shared.h:61
AVBufferRef * hwaccel_priv_buf
Definition: vp9shared.h:66
int uses_2pass
Definition: vp9shared.h:64
void * hwaccel_picture_private
Definition: vp9shared.h:67
uint8_t * segmentation_map
Definition: vp9shared.h:62
ThreadFrame tf
Definition: vp9shared.h:60
VP9mvrefPair * mv
Definition: vp9shared.h:63
ThreadFrame refs[8]
Definition: vp9shared.h:162
VP9Frame frames[3]
Definition: vp9shared.h:166
VP9BitstreamHeader h
Definition: vp9shared.h:160
VP56mv mv[2]
Definition: vp9shared.h:55
int8_t ref[2]
Definition: vp9shared.h:56
VP5 and VP6 compatible video decoder (common features)
FilterMode
Definition: vp9.h:64
TxfmMode
Definition: vp9.h:27
#define MAX_SEGMENT
Definition: vp9shared.h:128
CompPredMode
Definition: vp9shared.h:48
@ PRED_SWITCHABLE
Definition: vp9shared.h:51
@ PRED_SINGLEREF
Definition: vp9shared.h:49
@ PRED_COMPREF
Definition: vp9shared.h:50
BlockLevel
Definition: vp9shared.h:70
@ BL_16X16
Definition: vp9shared.h:73
@ BL_64X64
Definition: vp9shared.h:71
@ BL_8X8
Definition: vp9shared.h:74
@ BL_32X32
Definition: vp9shared.h:72
InterPredMode
Definition: vp9shared.h:41
@ NEARESTMV
Definition: vp9shared.h:42
@ ZEROMV
Definition: vp9shared.h:44
@ NEWMV
Definition: vp9shared.h:45
@ NEARMV
Definition: vp9shared.h:43
BlockSize
Definition: vp9shared.h:77
@ BS_4x4
Definition: vp9shared.h:90
@ BS_8x16
Definition: vp9shared.h:86
@ BS_16x32
Definition: vp9shared.h:83
@ BS_64x64
Definition: vp9shared.h:78
@ BS_32x16
Definition: vp9shared.h:82
@ BS_8x8
Definition: vp9shared.h:87
@ BS_32x64
Definition: vp9shared.h:80
@ BS_32x32
Definition: vp9shared.h:81
@ BS_8x4
Definition: vp9shared.h:88
@ BS_16x16
Definition: vp9shared.h:84
@ BS_16x8
Definition: vp9shared.h:85
@ BS_4x8
Definition: vp9shared.h:89
@ N_BS_SIZES
Definition: vp9shared.h:91
@ BS_64x32
Definition: vp9shared.h:79
BlockPartition
Definition: vp9shared.h:34
@ PARTITION_SPLIT
Definition: vp9shared.h:38
@ PARTITION_H
Definition: vp9shared.h:36
@ PARTITION_NONE
Definition: vp9shared.h:35
@ PARTITION_V
Definition: vp9shared.h:37