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/buffer.h"
27 #include "libavutil/pixfmt.h"
33 typedef struct AV1Frame {
36 AVBufferRef *hwaccel_priv_buf;
37 void *hwaccel_picture_private;
39 AVBufferRef *header_ref;
40 AV1RawFrameHeader *raw_frame_header;
45 uint8_t gm_type[AV1_NUM_REF_FRAMES];
46 int32_t gm_params[AV1_NUM_REF_FRAMES][6];
48 uint8_t skip_mode_frame_idx[2];
50 AV1RawFilmGrainParams film_grain;
52 uint8_t coded_lossless;
55 typedef struct TileGroupInfo {
62 typedef struct AV1DecContext {
64 AVCodecContext *avctx;
66 enum AVPixelFormat pix_fmt;
67 CodedBitstreamContext *cbc;
68 CodedBitstreamFragment current_obu;
71 AV1RawSequenceHeader *raw_seq;
72 AVBufferRef *header_ref;
73 AV1RawFrameHeader *raw_frame_header;
74 TileGroupInfo *tile_group_info;
79 int operating_point_idc;
81 AV1Frame ref[AV1_NUM_REF_FRAMES];
88 #endif /* AVCODEC_AV1DEC_H */