FFmpeg
Loading...
Searching...
No Matches
av1dec.h
Go to the documentation of this file.
1/*
2 * AV1 video decoder
3 * *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef AVCODEC_AV1DEC_H
22#define AVCODEC_AV1DEC_H
23
24#include <stdint.h>
25
26#include "libavutil/buffer.h"
27#include "libavutil/fifo.h"
28#include "libavutil/frame.h"
29#include "libavutil/pixfmt.h"
30#include "avcodec.h"
31#include "packet.h"
32#include "cbs.h"
33#include "cbs_av1.h"
34#include "dovi_rpu.h"
35#include "progressframe.h"
36
37typedef struct AV1Frame {
38 union {
39 struct {
40 struct AVFrame *f;
41 };
43 };
44
45 void *hwaccel_picture_private; ///< RefStruct reference
46
47 AV1RawOBU *header_ref; ///< RefStruct reference backing raw_frame_header.
49
52
56
58
60
62
63 // OrderHint for this frame.
64 uint8_t order_hint;
65 // RefFrameSignBias[] used when decoding this frame.
67 // OrderHints[] when this is the current frame, otherwise
68 // SavedOrderHints[s][] when is the reference frame in slot s.
70
71 // force_integer_mv value at the end of the frame header parsing.
72 // This is not the same as the syntax element value in
73 // raw_frame_header because the specification parsing tables
74 // override the value on intra frames.
76} AV1Frame;
77
78typedef struct TileGroupInfo {
79 uint32_t tile_offset;
80 uint32_t tile_size;
81 uint16_t tile_row;
82 uint16_t tile_column;
84
85typedef struct AV1DecContext {
86 const AVClass *class;
88
93
95 AV1RawOBU *seq_ref; ///< RefStruct reference backing raw_seq
97 AV1RawOBU *header_ref; ///< RefStruct reference backing raw_frame_header
100
101 AV1RawOBU *cll_ref; ///< RefStruct reference backing cll
103 AV1RawOBU *mdcv_ref; ///< RefStruct reference backing mdcv
107
108 uint16_t tile_num;
109 uint16_t tg_start;
110 uint16_t tg_end;
111
113
116
117 int nb_unit; ///< The index of the next OBU to be processed.
118 int start_unit; ///< The index of the first OBU of the current frame.
119
120 // AVOptions
123
124#endif /* AVCODEC_AV1DEC_H */
int32_t
Libavcodec external API header.
refcounted data buffer API
A generic FIFO API.
reference-counted frame API
@ AV1_NUM_REF_FRAMES
Definition av1.h:84
@ AV1_TOTAL_REFS_PER_FRAME
Definition av1.h:86
pixel format definitions
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
CodedBitstreamFragment current_obu
Definition av1dec.h:91
uint16_t tile_num
Definition av1dec.h:108
TileGroupInfo * tile_group_info
Definition av1dec.h:99
AV1RawOBU * seq_ref
RefStruct reference backing raw_seq.
Definition av1dec.h:95
int operating_point
Definition av1dec.h:121
AV1RawFrameHeader * raw_frame_header
Definition av1dec.h:98
uint16_t tg_end
Definition av1dec.h:110
AVPacket * pkt
Definition av1dec.h:92
AV1RawMetadataHDRCLL * cll
Definition av1dec.h:102
int start_unit
The index of the first OBU of the current frame.
Definition av1dec.h:118
DOVIContext dovi
Definition av1dec.h:105
enum AVPixelFormat pix_fmt
Definition av1dec.h:89
AV1RawMetadataHDRMDCV * mdcv
Definition av1dec.h:104
int nb_unit
The index of the next OBU to be processed.
Definition av1dec.h:117
AVCodecContext * avctx
Definition av1dec.h:87
AV1RawSequenceHeader * raw_seq
Definition av1dec.h:96
CodedBitstreamContext * cbc
Definition av1dec.h:90
AV1Frame ref[AV1_NUM_REF_FRAMES]
Definition av1dec.h:114
AV1RawOBU * cll_ref
RefStruct reference backing cll.
Definition av1dec.h:101
AVFifo * itut_t35_fifo
Definition av1dec.h:106
AV1Frame cur_frame
Definition av1dec.h:115
AVBufferRef * seq_data_ref
Definition av1dec.h:94
uint16_t tg_start
Definition av1dec.h:109
AV1RawOBU * mdcv_ref
RefStruct reference backing mdcv.
Definition av1dec.h:103
int operating_point_idc
Definition av1dec.h:112
AV1RawOBU * header_ref
RefStruct reference backing raw_frame_header.
Definition av1dec.h:97
uint8_t gm_invalid[AV1_NUM_REF_FRAMES]
Definition av1dec.h:53
uint8_t ref_frame_sign_bias[AV1_TOTAL_REFS_PER_FRAME]
Definition av1dec.h:66
AV1RawFrameHeader * raw_frame_header
Definition av1dec.h:48
uint8_t coded_lossless
Definition av1dec.h:61
int spatial_id
Definition av1dec.h:51
ProgressFrame pf
Definition av1dec.h:42
uint8_t force_integer_mv
Definition av1dec.h:75
uint8_t skip_mode_frame_idx[2]
Definition av1dec.h:57
int32_t gm_params[AV1_NUM_REF_FRAMES][6]
Definition av1dec.h:55
void * hwaccel_picture_private
RefStruct reference.
Definition av1dec.h:45
AV1RawFilmGrainParams film_grain
Definition av1dec.h:59
int temporal_id
Definition av1dec.h:50
struct AVFrame * f
Definition av1dec.h:40
AV1RawOBU * header_ref
RefStruct reference backing raw_frame_header.
Definition av1dec.h:47
uint8_t order_hints[AV1_TOTAL_REFS_PER_FRAME]
Definition av1dec.h:69
uint8_t order_hint
Definition av1dec.h:64
uint8_t gm_type[AV1_NUM_REF_FRAMES]
Definition av1dec.h:54
A reference to a data buffer.
Definition buffer.h:82
Describe the class of an AVClass context structure.
Definition log.h:76
main external API structure.
Definition avcodec.h:443
Definition fifo.c:35
This structure describes decoded (raw) audio or video data.
Definition frame.h:472
This structure stores compressed data.
Definition packet.h:580
Context structure for coded bitstream operations.
Definition cbs.h:226
Coded bitstream fragment structure, combining one or more units.
Definition cbs.h:129
The ProgressFrame structure.
uint16_t tile_column
Definition av1dec.h:82
uint32_t tile_offset
Definition av1dec.h:79
uint32_t tile_size
Definition av1dec.h:80
uint16_t tile_row
Definition av1dec.h:81