Go to the documentation of this file.
71 s->cbc->log_ctx = avctx;
74 s->parsed_extradata = 1;
98 for (
int i = 0;
i <
td->nb_units;
i++) {
114 if (
frame->show_existing_frame) {
122 ctx->width =
ref->frame_width;
123 ctx->height =
ref->frame_height;
127 }
else if (!
frame->show_frame) {
168 if (!
color->subsampling_x && !
color->subsampling_y &&
196 s->cbc->log_ctx =
NULL;
233 const uint8_t *buf,
int buf_size)
236 const uint8_t *ptr = buf, *
end = buf + buf_size;
#define AV_LOG_WARNING
Something somehow does not look correct.
AVPixelFormat
Pixel format.
static enum AVPixelFormat pix_fmts_rgb[3]
enum AVColorSpace colorspace
YUV colorspace type.
AVColorTransferCharacteristic
Color Transfer Characteristic.
@ AV_PICTURE_STRUCTURE_UNKNOWN
static enum AVPixelFormat pix_fmts_8bit[2][2]
void * content
Pointer to the decomposed form of this unit.
static av_cold int end(AVCodecContext *avctx)
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
@ AVCOL_RANGE_JPEG
the normal 2^n-1 "JPEG" YUV ranges
Context structure for coded bitstream operations.
void ff_cbs_close(CodedBitstreamContext **ctx_ptr)
Close a context and free all internal state.
#define AV_PIX_FMT_YUV420P10
void ff_cbs_fragment_free(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
Free the units array of a fragment in addition to what ff_cbs_fragment_reset does.
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
CodedBitstreamUnitType type
Codec-specific type of this unit.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
@ AV1_OBU_TEMPORAL_DELIMITER
static av_cold int av1_parser_init(AVCodecParserContext *ctx)
Coded bitstream unit structure.
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
#define AV_PIX_FMT_GBRP10
int ff_cbs_read(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, const uint8_t *data, size_t size)
Read a bitstream from a memory region into a fragment, then split into units and decompose.
static int av1_parser_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
AVCodecParser ff_av1_parser
int ff_av1_extract_obu(AV1OBU *obu, const uint8_t *buf, int length, void *logctx)
Extract an OBU from a raw bitstream.
#define AV_PIX_FMT_YUV444P10
@ AV_PICTURE_STRUCTURE_FRAME
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Coded bitstream fragment structure, combining one or more units.
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define AV_PIX_FMT_GRAY10
enum AVColorRange color_range
MPEG vs JPEG YUV range.
Rational number (pair of numerator and denominator).
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
static int av1_parser_parse(AVCodecParserContext *ctx, AVCodecContext *avctx, const uint8_t **out_data, int *out_size, const uint8_t *data, int size)
@ AV_PICTURE_TYPE_I
Intra.
#define AV_PIX_FMT_YUV422P10
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
@ AV_PICTURE_TYPE_SP
Switching Predicted.
static void av1_parser_close(AVCodecParserContext *ctx)
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
#define AV_PIX_FMT_YUV422P12
static const uint32_t color[16+AV_CLASS_CATEGORY_NB]
#define AV_PIX_FMT_YUV444P12
@ AV1_OBU_SEQUENCE_HEADER
@ AV_PICTURE_TYPE_NONE
Undefined.
static char * split(char *message, char delim)
AV1RawFrameHeader frame_header
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
static const CodedBitstreamUnitType decompose_unit_types[]
#define i(width, name, range_min, range_max)
static enum AVPixelFormat pix_fmts_12bit[2][2]
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
CodedBitstreamContext * cbc
#define AV_PIX_FMT_GBRP12
AVColorSpace
YUV colorspace type.
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
@ AVCOL_RANGE_MPEG
the normal 219*2^(n-8) "MPEG" YUV ranges
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
int ff_cbs_init(CodedBitstreamContext **ctx_ptr, enum AVCodecID codec_id, void *log_ctx)
Create and initialise a new context for the given codec.
#define AV_PIX_FMT_YUV420P12
#define FF_ARRAY_ELEMS(a)
main external API structure.
AV1ReferenceFrameState * ref
AV1RawSequenceHeader * sequence_header
uint32_t CodedBitstreamUnitType
The codec-specific type of a bitstream unit.
static int ref[MAX_W *MAX_W]
void ff_cbs_fragment_reset(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
Free the units contained in a fragment as well as the fragment's own data buffer, but not the units a...
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
@ 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
@ AV_PICTURE_TYPE_P
Predicted.
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
static enum AVPixelFormat pix_fmts_10bit[2][2]
int width
picture width / height.
#define AV_PIX_FMT_GRAY12
CodedBitstreamFragment temporal_unit
void * priv_data
Format private data.