FFmpeg
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;
111  uint8_t refidx[3];
112  uint8_t signbias[3];
114  uint8_t varcompref[2];
115  struct {
117  int8_t sharpness;
118  } filter;
119  struct {
122  int8_t mode[2];
123  int8_t ref[4];
124  } lf_delta;
126  int8_t ydc_qdelta, uvdc_qdelta, uvac_qdelta;
128 #define MAX_SEGMENT 8
129  struct {
130  uint8_t enabled;
135  uint8_t pred_prob[3];
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;
148  enum TxfmMode txfmmode;
149  enum CompPredMode comppredmode;
150  struct {
151  unsigned log2_tile_cols, log2_tile_rows;
152  unsigned tile_cols, tile_rows;
153  } tiling;
154 
158 
159 typedef struct VP9SharedContext {
161 
162  ThreadFrame refs[8];
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 framectxid
Definition: vp9shared.h:109
InterPredMode
Definition: vp9shared.h:41
if it could not because there are no more frames
unsigned log2_tile_rows
Definition: vp9shared.h:151
int uncompressed_header_size
Definition: vp9shared.h:155
int tile_cols
Definition: h265_levels.c:218
#define MAX_SEGMENT
Definition: vp9shared.h:128
uint8_t
uint8_t absolute_vals
Definition: vp9shared.h:132
Multithreading support functions.
AVBufferRef * hwaccel_priv_buf
Definition: vp9shared.h:66
AVBufferRef * extradata
Definition: vp9shared.h:61
#define prob(name, subs,...)
Definition: cbs_vp9.c:374
CompPredMode
Definition: vp9shared.h:48
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
uint8_t refreshctx
Definition: vp9shared.h:107
TxfmMode
Definition: vp9.h:27
void * hwaccel_picture_private
Definition: vp9shared.h:67
int uses_2pass
Definition: vp9shared.h:64
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
FilterMode
Definition: vp9.h:64
BlockLevel
Definition: vp9shared.h:70
Definition: vp56.h:66
A reference to a data buffer.
Definition: buffer.h:81
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
VP56mv mv[2]
Definition: vp9shared.h:55
BlockPartition
Definition: vp9shared.h:34
uint8_t highprecisionmvs
Definition: vp9shared.h:104
mode
Use these values in ebur128_init (or&#39;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