FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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
115  struct {
117  int8_t sharpness;
118  } filter;
119  struct {
122  int8_t mode[2];
123  int8_t ref[4];
124  } lf_delta;
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];
146  } feat[MAX_SEGMENT];
147  } segmentation;
150  struct {
152  unsigned tile_cols, tile_rows;
153  } tiling;
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 lf_enabled
Definition: vp9shared.h:138
ThreadFrame tf
Definition: vp9shared.h:60
uint8_t * segmentation_map
Definition: vp9shared.h:62
uint8_t parallelmode
Definition: vp9shared.h:108
uint8_t allowcompinter
Definition: vp9shared.h:106
VP5 and VP6 compatible video decoder (common features)
uint8_t update_map
Definition: vp9shared.h:133
VP9BitstreamHeader h
Definition: vp9shared.h:160
uint8_t prob[7]
Definition: vp9shared.h:134
uint8_t framectxid
Definition: vp9shared.h:109
InterPredMode
Definition: vp9shared.h:41
unsigned log2_tile_rows
Definition: vp9shared.h:151
int uncompressed_header_size
Definition: vp9shared.h:155
enum FilterMode filtermode
Definition: vp9shared.h:105
#define MAX_SEGMENT
Definition: vp9shared.h:128
uint8_t
uint8_t absolute_vals
Definition: vp9shared.h:132
uint8_t varcompref[2]
Definition: vp9shared.h:114
VP9Frame frames[3]
Definition: vp9shared.h:166
Multithreading support functions.
AVBufferRef * hwaccel_priv_buf
Definition: vp9shared.h:66
AVBufferRef * extradata
Definition: vp9shared.h:61
enum CompPredMode comppredmode
Definition: vp9shared.h:149
unsigned log2_tile_cols
Definition: vp9shared.h:151
int16_t qmul[2][2]
Definition: vp9shared.h:144
uint8_t refidx[3]
Definition: vp9shared.h:111
struct VP9BitstreamHeader::@154::@156 feat[MAX_SEGMENT]
uint8_t lflvl[4][2]
Definition: vp9shared.h:145
CompPredMode
Definition: vp9shared.h:48
unsigned tile_cols
Definition: vp9shared.h:152
uint8_t signbias[3]
Definition: vp9shared.h:112
uint8_t refreshctx
Definition: vp9shared.h:107
TxfmMode
Definition: vp9.h:27
void * hwaccel_picture_private
Definition: vp9shared.h:67
struct VP9BitstreamHeader::@152 filter
int uses_2pass
Definition: vp9shared.h:64
enum TxfmMode txfmmode
Definition: vp9shared.h:148
BlockSize
Definition: vp9shared.h:77
int8_t ref[2]
Definition: vp9shared.h:56
uint8_t keyframe
Definition: vp9shared.h:98
unsigned tile_rows
Definition: vp9shared.h:152
uint8_t fixcompref
Definition: vp9shared.h:113
struct VP9BitstreamHeader::@155 tiling
FilterMode
Definition: vp9.h:64
BlockLevel
Definition: vp9shared.h:70
Definition: vp56.h:66
A reference to a data buffer.
Definition: buffer.h:81
struct VP9BitstreamHeader::@153 lf_delta
uint8_t ref_enabled
Definition: vp9shared.h:139
VP9mvrefPair * mv
Definition: vp9shared.h:63
uint8_t invisible
Definition: vp9shared.h:99
uint8_t use_last_frame_mvs
Definition: vp9shared.h:110
ThreadFrame refs[8]
Definition: vp9shared.h:162
uint8_t pred_prob[3]
Definition: vp9shared.h:135
VP56mv mv[2]
Definition: vp9shared.h:55
struct VP9BitstreamHeader::@154 segmentation
BlockPartition
Definition: vp9shared.h:34
uint8_t highprecisionmvs
Definition: vp9shared.h:104
mode
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83
int compressed_header_size
Definition: vp9shared.h:156
uint8_t refreshrefmask
Definition: vp9shared.h:103
uint8_t skip_enabled
Definition: vp9shared.h:140