FFmpeg
Loading...
Searching...
No Matches
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
31
32#include "progressframe.h"
33#include "cbs_vp9.h"
34#include "vp9.h"
35
37 PARTITION_NONE, // [ ] <-.
38 PARTITION_H, // [-] |
39 PARTITION_V, // [|] |
40 PARTITION_SPLIT, // [+] --'
41};
42
45 NEARMV = 11,
46 ZEROMV = 12,
47 NEWMV = 13,
48};
49
55
56typedef struct VP9mv {
57 DECLARE_ALIGNED(4, int16_t, x);
58 int16_t y;
59} VP9mv;
60
61typedef struct VP9mvrefPair {
63 int8_t ref[2];
65
66typedef struct VP9Frame {
67 VP9RawFrame *header_ref; ///< RefStruct reference backing frame_header
69
71 void *extradata; ///< RefStruct reference
75
76 void *hwaccel_picture_private; ///< RefStruct reference
77} VP9Frame;
78
85
102
103typedef 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;
116 uint8_t refreshctx;
118 uint8_t framectxid;
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;
128 struct {
129 uint8_t enabled;
130 uint8_t updated;
131 int8_t mode[2];
132 int8_t ref[4];
134 uint8_t yac_qi;
136 uint8_t lossless;
137#define MAX_SEGMENT 8
138 struct {
139 uint8_t enabled;
140 uint8_t temporal;
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;
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];
159 struct {
163
167
168typedef struct VP9SharedContext {
170
172#define CUR_FRAME 0
173#define REF_FRAME_MVPAIR 1
174#define REF_FRAME_SEGMAP 2
175#define BLANK_FRAME 3
179
180#endif /* AVCODEC_VP9SHARED_H */
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
The ProgressFrame structure.
struct VP9BitstreamHeader::@107240365025344140370173142351315210224324026371 segmentation
uint8_t lflvl[4][2]
Definition vp9shared.h:154
struct VP9BitstreamHeader::@061346100110325216152125016164312176251233366054 tiling
uint8_t varcompref[2]
Definition vp9shared.h:123
uint8_t highprecisionmvs
Definition vp9shared.h:113
uint8_t refidx[3]
Definition vp9shared.h:120
uint8_t allowcompinter
Definition vp9shared.h:115
enum FilterMode filtermode
Definition vp9shared.h:114
unsigned log2_tile_rows
Definition vp9shared.h:160
struct VP9BitstreamHeader::@107240365025344140370173142351315210224324026371::@042003123321143120075254170371335162367210234023 feat[MAX_SEGMENT]
uint8_t prob[7]
Definition vp9shared.h:143
struct VP9BitstreamHeader::@224127324015310157335300043300171100312112065123 lf_delta
int16_t qmul[2][2]
Definition vp9shared.h:153
enum TxfmMode txfmmode
Definition vp9shared.h:157
uint8_t use_last_frame_mvs
Definition vp9shared.h:119
uint8_t pred_prob[3]
Definition vp9shared.h:144
uint8_t absolute_vals
Definition vp9shared.h:141
uint8_t refreshrefmask
Definition vp9shared.h:112
uint8_t signbias[3]
Definition vp9shared.h:121
unsigned log2_tile_cols
Definition vp9shared.h:160
enum CompPredMode comppredmode
Definition vp9shared.h:158
int uses_2pass
Definition vp9shared.h:74
void * hwaccel_picture_private
RefStruct reference.
Definition vp9shared.h:76
ProgressFrame tf
Definition vp9shared.h:70
void * extradata
RefStruct reference.
Definition vp9shared.h:71
VP9RawFrame * header_ref
RefStruct reference backing frame_header.
Definition vp9shared.h:67
uint8_t * segmentation_map
Definition vp9shared.h:72
VP9RawFrameHeader * frame_header
Definition vp9shared.h:68
VP9mvrefPair * mv
Definition vp9shared.h:73
VP9Frame frames[4]
Definition vp9shared.h:176
VP9Frame ref_frames[8]
Definition vp9shared.h:177
VP9BitstreamHeader h
Definition vp9shared.h:169
ProgressFrame refs[8]
Definition vp9shared.h:171
int16_t y
Definition vp9shared.h:58
int16_t x
Definition vp9shared.h:57
int8_t ref[2]
Definition vp9shared.h:63
VP9mv mv[2]
Definition vp9shared.h:62
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)
Definition h263dsp.c:29
FilterMode
Definition vp9.h:64
TxfmMode
Definition vp9.h:27
#define MAX_SEGMENT
Definition vp9shared.h:137
CompPredMode
Definition vp9shared.h:50
@ PRED_SWITCHABLE
Definition vp9shared.h:53
@ PRED_SINGLEREF
Definition vp9shared.h:51
@ PRED_COMPREF
Definition vp9shared.h:52
BlockLevel
Definition vp9shared.h:79
@ BL_16X16
Definition vp9shared.h:82
@ BL_64X64
Definition vp9shared.h:80
@ BL_8X8
Definition vp9shared.h:83
@ BL_32X32
Definition vp9shared.h:81
InterPredMode
Definition vp9shared.h:43
@ NEARESTMV
Definition vp9shared.h:44
@ ZEROMV
Definition vp9shared.h:46
@ NEWMV
Definition vp9shared.h:47
@ NEARMV
Definition vp9shared.h:45
BlockSize
Definition vp9shared.h:86
@ BS_4x4
Definition vp9shared.h:99
@ BS_8x16
Definition vp9shared.h:95
@ BS_16x32
Definition vp9shared.h:92
@ BS_64x64
Definition vp9shared.h:87
@ BS_32x16
Definition vp9shared.h:91
@ BS_8x8
Definition vp9shared.h:96
@ BS_32x64
Definition vp9shared.h:89
@ BS_32x32
Definition vp9shared.h:90
@ BS_8x4
Definition vp9shared.h:97
@ BS_16x16
Definition vp9shared.h:93
@ BS_16x8
Definition vp9shared.h:94
@ BS_4x8
Definition vp9shared.h:98
@ N_BS_SIZES
Definition vp9shared.h:100
@ BS_64x32
Definition vp9shared.h:88
BlockPartition
Definition vp9shared.h:36
@ PARTITION_SPLIT
Definition vp9shared.h:40
@ PARTITION_H
Definition vp9shared.h:38
@ PARTITION_NONE
Definition vp9shared.h:37
@ PARTITION_V
Definition vp9shared.h:39