57 const uint8_t **out_data,
int *
out_size,
74 s->cbc->log_ctx = avctx;
77 s->parsed_extradata = 1;
79 ret = ff_cbs_read_extradata_from_codec(
s->cbc, td, avctx);
84 ff_cbs_fragment_reset(td);
116 if (!
frame->show_frame && !
frame->show_existing_frame)
119 ctx->width =
frame->frame_width_minus_1 + 1;
120 ctx->height =
frame->frame_height_minus_1 + 1;
124 switch (
frame->frame_type) {
162 if (!
color->subsampling_x && !
color->subsampling_y &&
182 ff_cbs_fragment_reset(td);
184 s->cbc->log_ctx =
NULL;
217 ff_cbs_fragment_free(&
s->temporal_unit);
218 ff_cbs_close(&
s->cbc);
static AVFormatContext * ctx
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static const CodedBitstreamUnitType decompose_unit_types[]
static av_cold void close(AVCodecParserContext *s)
AVRational ff_av1_framerate(int64_t ticks_per_frame, int64_t units_per_tick, int64_t time_scale)
static enum AVPixelFormat pix_fmts_rgb[3]
static enum AVPixelFormat pix_fmts_12bit[2][2]
static enum AVPixelFormat pix_fmts_8bit[2][2]
static enum AVPixelFormat pix_fmts_10bit[2][2]
static av_cold void av1_parser_close(AVCodecParserContext *ctx)
static int av1_parser_parse(AVCodecParserContext *ctx, AVCodecContext *avctx, const uint8_t **out_data, int *out_size, const uint8_t *data, int size)
static av_cold int av1_parser_init(AVCodecParserContext *ctx)
const FFCodecParser ff_av1_parser
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
Libavcodec external API header.
#define i(width, name, range_min, range_max)
int(* init)(AVBSFContext *ctx)
@ AV_PICTURE_STRUCTURE_FRAME
coded as frame
@ AV_PICTURE_STRUCTURE_UNKNOWN
unknown
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
@ AV_PICTURE_TYPE_I
Intra.
@ AV_PICTURE_TYPE_NONE
Undefined.
@ AV_PICTURE_TYPE_SP
Switching Predicted.
@ AV_PICTURE_TYPE_P
Predicted.
@ AV1_OBU_TEMPORAL_DELIMITER
@ AV1_OBU_REDUNDANT_FRAME_HEADER
@ AV1_OBU_SEQUENCE_HEADER
uint32_t CodedBitstreamUnitType
The codec-specific type of a bitstream unit.
Macro definitions for various function/variable attributes.
#define PARSER_CODEC_LIST(...)
#define AV_PIX_FMT_YUV444P12
#define AV_PIX_FMT_YUV420P10
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
@ AVCOL_RANGE_JPEG
Full range content.
#define AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_GBRP12
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
#define AV_PIX_FMT_GRAY10
AVColorPrimaries
Chromaticity coordinates of the source primaries.
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
AVColorTransferCharacteristic
Color Transfer Characteristic.
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
#define AV_PIX_FMT_YUV444P10
AVColorSpace
YUV colorspace type.
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB), YZX and ST 428-1
#define FF_ARRAY_ELEMS(a)
CodedBitstreamFragment temporal_unit
CodedBitstreamContext * cbc
AV1RawFrameHeader frame_header
union AV1RawOBU::@016362317061177152367125047142162076164261250366 obu
uint32_t num_units_in_display_tick
uint32_t num_ticks_per_picture_minus_1
main external API structure.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel.
int level
Encoding level descriptor.
enum AVColorSpace colorspace
YUV colorspace type.
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
AV1RawSequenceHeader * sequence_header
Context structure for coded bitstream operations.
Coded bitstream fragment structure, combining one or more units.
CodedBitstreamUnit * units
Pointer to an array of units of length nb_units_allocated.
int nb_units
Number of units in this fragment.
Coded bitstream unit structure.
void * content
Pointer to the decomposed form of this unit.
CodedBitstreamUnitType type
Codec-specific type of this unit.