4 * This file is part of FFmpeg.
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.
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.
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
21 #ifndef AVCODEC_AV1DEC_H
22 #define AVCODEC_AV1DEC_H
26 #include "libavutil/fifo.h"
27 #include "libavutil/frame.h"
28 #include "libavutil/pixfmt.h"
34 typedef struct AV1Frame {
37 void *hwaccel_picture_private; ///< RefStruct reference
39 AV1RawOBU *header_ref; ///< RefStruct reference backing raw_frame_header.
40 AV1RawFrameHeader *raw_frame_header;
45 uint8_t gm_invalid[AV1_NUM_REF_FRAMES];
46 uint8_t gm_type[AV1_NUM_REF_FRAMES];
47 int32_t gm_params[AV1_NUM_REF_FRAMES][6];
49 uint8_t skip_mode_frame_idx[2];
51 AV1RawFilmGrainParams film_grain;
53 uint8_t coded_lossless;
56 typedef struct TileGroupInfo {
63 typedef struct AV1DecContext {
65 AVCodecContext *avctx;
67 enum AVPixelFormat pix_fmt;
68 CodedBitstreamContext *cbc;
69 CodedBitstreamFragment current_obu;
72 AV1RawOBU *seq_ref; ///< RefStruct reference backing raw_seq
73 AV1RawSequenceHeader *raw_seq;
74 AV1RawOBU *header_ref; ///< RefStruct reference backing raw_frame_header
75 AV1RawFrameHeader *raw_frame_header;
76 TileGroupInfo *tile_group_info;
78 AV1RawOBU *cll_ref; ///< RefStruct reference backing cll
79 AV1RawMetadataHDRCLL *cll;
80 AV1RawOBU *mdcv_ref; ///< RefStruct reference backing mdcv
81 AV1RawMetadataHDRMDCV *mdcv;
82 AVFifo *itut_t35_fifo;
88 int operating_point_idc;
90 AV1Frame ref[AV1_NUM_REF_FRAMES];
99 #endif /* AVCODEC_AV1DEC_H */