99#if CONFIG_LIBLCEVC_DEC
131 "changes, but PARAM_CHANGE side data was sent to it.\n");
145 val = bytestream_get_le32(&
data);
157 avctx->
width = bytestream_get_le32(&
data);
225#define ff_thread_get_packet(avctx, pkt) (AVERROR_BUG)
226#define ff_thread_receive_frame(avctx, frame, flags) (AVERROR_BUG)
326 uint32_t discard_padding = 0;
327 uint8_t skip_reason = 0;
328 uint8_t discard_reason = 0;
331 if (side && side->
size >= 10) {
359 *discarded_samples +=
frame->nb_samples;
365 *discarded_samples +=
frame->nb_samples;
382 if (
frame->duration >= diff_ts)
400 if (discard_padding > 0 && discard_padding <= frame->nb_samples) {
401 if (discard_padding ==
frame->nb_samples) {
402 *discarded_samples +=
frame->nb_samples;
414 (
int)discard_padding,
frame->nb_samples);
415 frame->nb_samples -= discard_padding;
434 int got_frame, consumed;
468 ret = !got_frame ?
AVERROR(EAGAIN)
482 consumed =
pkt->size;
497 if (
decode_ctx(avci)->nb_draining_errors++ >= nb_errors_max) {
499 "Stop draining and force EOF.\n");
508 if (consumed >=
pkt->size || ret < 0) {
511 pkt->data += consumed;
512 pkt->size -= consumed;
538 if (!sd || !sd->
size)
541 if (!avci->icc.avctx) {
562 frame->color_primaries = prim;
564 frame->color_trc = trc;
597 if (!
frame->ch_layout.nb_channels) {
602 if (!
frame->sample_rate)
614 while (!
frame->buf[0]) {
703 if (
frame->private_ref) {
742 if (avpkt && !avpkt->
size && avpkt->
data)
766 if (
frame->crop_left >= INT_MAX -
frame->crop_right ||
767 frame->crop_top >= INT_MAX -
frame->crop_bottom ||
771 "Invalid cropping information set by a decoder: "
772 "%zu/%zu/%zu/%zu (frame size %dx%d). "
773 "This is a bug, please report it\n",
776 frame->crop_left = 0;
777 frame->crop_right = 0;
779 frame->crop_bottom = 0;
803 frame->sample_rate <= 0)
813 "This is a bug, please report it.\n");
850 memset(sub, 0,
sizeof(*sub));
854#define UTF8_MAX_BYTES 4
859 iconv_t cd = (iconv_t)-1;
888 outb = buf_pkt->
data;
889 outl = buf_pkt->
size;
891 if (iconv(cd, &inb, &inl, &outb, &outl) == (
size_t)-1 ||
892 iconv(cd,
NULL,
NULL, &outb, &outl) == (
size_t)-1 ||
893 outl >= buf_pkt->
size || inl != 0) {
899 buf_pkt->
size -= outl;
900 memset(buf_pkt->
data + buf_pkt->
size, 0, outl);
907 if (cd != (iconv_t)-1)
919 uint32_t codepoint,
min;
923 GET_UTF8(codepoint, *(
byte++),
return 0;);
924 min =
byte - str == 1 ? 0 :
byte - str == 2 ? 0x80 :
925 1 << (5 * (
byte - str) - 4);
926 if (codepoint < min || codepoint >= 0x110000 ||
927 codepoint == 0xFFFE ||
928 codepoint >= 0xD800 && codepoint <= 0xDFFF )
936 int *got_sub_ptr,
const AVPacket *avpkt)
991 "Invalid UTF-8 in decoded subtitles text; "
992 "maybe missing -sub_charenc option\n");
1021 if (!(config->methods &
1024 if (device_ctx->
type != config->device_type)
1027 if (config->pix_fmt == fmt[n])
1051 if (config->pix_fmt == fmt[n])
1083 "required for hardware accelerated decoding.\n");
1088 if (device_ctx->
type != dev_type) {
1129 bool clean_priv_data =
false;
1154 clean_priv_data =
true;
1173 *out_frames_ref = frames_ref;
1175 if (clean_priv_data)
1206 "hwaccel initialisation returned error.\n",
1250 choices =
av_memdup(fmt, (n + 1) *
sizeof(*choices));
1258 user_choice = avctx->
get_format(avctx, choices);
1268 "get_format() callback.\n");
1275 for (
i = 0;
i < n;
i++) {
1276 if (choices[
i] == user_choice)
1281 "%s not in possible list.\n",
desc->name);
1303 config = &hw_config->
public;
1305 if (config->methods &
1310 if (frames_ctx->
format != user_choice) {
1312 "does not match the format of the provided frames "
1313 "context.\n",
desc->name);
1316 }
else if (config->methods &
1321 if (device_ctx->
type != config->device_type) {
1323 "does not match the type of the provided device "
1324 "context.\n",
desc->name);
1327 }
else if (config->methods &
1330 }
else if (config->methods &
1335 "missing configuration.\n",
desc->name);
1350 "get_format() without it.\n",
desc->name);
1351 for (
i = 0;
i < n;
i++) {
1352 if (choices[
i] == user_choice)
1355 for (;
i + 1 < n;
i++)
1356 choices[
i] = choices[
i + 1];
1371 for (
int i = 0;
i < nb_sd;
i++)
1406 dst->primary_eye =
src->primary_eye;
1409 dst->baseline =
src->baseline;
1411 if (!
dst->horizontal_disparity_adjustment.num)
1412 dst->horizontal_disparity_adjustment =
src->horizontal_disparity_adjustment;
1414 if (!
dst->horizontal_field_of_view.num)
1415 dst->horizontal_field_of_view =
src->horizontal_field_of_view;
1446 ret = sd_frame ? 0 :
AVERROR(ENOMEM);
1541 const uint8_t *side_metadata;
1572 if (
pkt->side_data_elems) {
1632 frame->sample_aspect_ratio) < 0) {
1634 frame->sample_aspect_ratio.num,
1635 frame->sample_aspect_ratio.den);
1641#if CONFIG_LIBLCEVC_DEC
1645 dc->lcevc.
frame = dc->lcevc.ctx &&
1648 if (dc->lcevc.
frame) {
1650 &dc->lcevc.width, &dc->lcevc.height);
1657 if (!ret && dc->lcevc.width && dc->lcevc.height) {
1658 dc->lcevc.base_width =
frame->width;
1659 dc->lcevc.base_height =
frame->height;
1660 frame->width = dc->lcevc.width;
1661 frame->height = dc->lcevc.height;
1663 dc->lcevc.
frame = 0;
1679 for (
i = 0;
i < num_planes;
i++) {
1685 av_log(avctx,
AV_LOG_ERROR,
"Buffer returned by get_buffer2() did not zero unused plane pointers\n");
1695 if (CONFIG_LIBLCEVC_DEC)
1715 frame->private_ref = fdd;
1717#if CONFIG_LIBLCEVC_DEC
1721 if (!dc->lcevc.
frame) {
1722 dc->lcevc.
frame = dc->lcevc.ctx &&
1725 if (dc->lcevc.
frame) {
1727 &dc->lcevc.width, &dc->lcevc.height);
1731 if (!ret && dc->lcevc.width && dc->lcevc.height) {
1732 dc->lcevc.base_width =
frame->width;
1733 dc->lcevc.base_height =
frame->height;
1735 dc->lcevc.
frame = 0;
1738 if (dc->lcevc.
frame) {
1742 if (fdd->
post_process || !dc->lcevc.width || !dc->lcevc.height) {
1743 dc->lcevc.
frame = 0;
1757 frame->width = dc->lcevc.base_width;
1758 frame->height = dc->lcevc.base_height;
1771 dc->lcevc.
frame = 0;
1780 int override_dimensions = 1;
1793 if (
frame->width <= 0 ||
frame->height <= 0) {
1796 override_dimensions = 0;
1860 av_log(avctx,
AV_LOG_WARNING,
"Picture changed from size:%dx%d fmt:%s to size:%dx%d fmt:%s in reget buffer()\n",
1865 if (!
frame->data[0])
1880 "Copying code needs to be adjusted");
1881 static_assert(
sizeof(
frame->linesize[0]) ==
sizeof(linesize[0]),
1882 "linesize needs to be switched to ptrdiff_t");
1886 linesize[
i] =
frame->linesize[
i];
1935 f->f =
f->progress->f;
2054 "supported with subtitles codecs\n");
2058 "subtitles character encoding will be ignored\n",
2069 iconv_t cd = iconv_open(
"UTF-8", avctx->
sub_charenc);
2070 if (cd == (iconv_t)-1) {
2073 "with input character encoding \"%s\"\n", avctx->
sub_charenc);
2079 "conversion needs a libavcodec built with iconv support "
2080 "for this codec\n");
2095 "gray decoding requested but not enabled at configuration time\n");
2150#if CONFIG_LIBLCEVC_DEC
2200 return sd ? 0 :
AVERROR(ENOMEM);
2273 return *mdm ? 0 :
AVERROR(ENOMEM);
2318 return *clm ? 0 :
AVERROR(ENOMEM);
2331 "Palette size %zu is wrong\n",
size);
2345 if (
hwaccel->free_frame_priv) {
2359 if (!*hwaccel_picture_private)
2398#if CONFIG_LIBLCEVC_DEC
2400 dst_dc->lcevc.width = src_dc->lcevc.width;
2401 dst_dc->lcevc.height = src_dc->lcevc.height;
2402 dst_dc->lcevc.format = src_dc->lcevc.format;
2408#if CONFIG_LIBLCEVC_DEC
2422 if (orientation < 1 || orientation > 8)
2443 for (
size_t i = 0;
i < ifd->
count;
i++) {
2472 if (cloned || !*pbuf) {
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static double val(void *priv, double ch)
static const char *const format[]
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
const SideDataMap ff_sd_global_map[]
A map between packet and frame side data types.
Libavcodec external API header.
#define FF_THREAD_FRAME
Decode more than one frame at once.
#define FF_SUB_CHARENC_MODE_DO_NOTHING
do nothing (demuxer outputs a stream supposed to be already in UTF-8, or the codec is bitmap for inst...
#define FF_SUB_CHARENC_MODE_IGNORE
neither convert the subtitles, nor check them for valid UTF-8
#define FF_SUB_CHARENC_MODE_AUTOMATIC
libavcodec will select the mode itself
#define FF_SUB_CHARENC_MODE_PRE_DECODER
the AVPacket data needs to be recoded to UTF-8 before being fed to the decoder, requires iconv
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_WB16 unsigned int_TMPL byte
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
Public libavutil channel layout APIs header.
#define FF_CODEC_CAP_SETS_PKT_DTS
Decoders marked with FF_CODEC_CAP_SETS_PKT_DTS want to set AVFrame.pkt_dts manually.
#define FF_CODEC_CAP_EXPORTS_CROPPING
The decoder sets the cropping fields in the output frames manually.
#define FF_CODEC_CAP_USES_PROGRESSFRAMES
The decoder might make use of the ProgressFrame API.
@ FF_CODEC_CB_TYPE_DECODE_SUB
@ FF_CODEC_CB_TYPE_RECEIVE_FRAME
static av_always_inline const FFCodec * ffcodec(const AVCodec *codec)
#define FF_CODEC_CAP_SETS_FRAME_PROPS
Codec handles output frame properties internally instead of letting the internal logic derive them fr...
static int ff_codec_is_decoder(const AVCodec *avcodec)
Internal version of av_codec_is_decoder().
int avcodec_parameters_from_context(AVCodecParameters *par, const AVCodecContext *codec)
common internal and external API header
#define GET_UTF8(val, GET_BYTE, ERROR)
Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.
#define AV_CEIL_RSHIFT(a, b)
void ff_progress_frame_ref(ProgressFrame *dst, const ProgressFrame *src)
Set dst->f to src->f and make dst a co-owner of src->f.
void ff_progress_frame_replace(ProgressFrame *dst, const ProgressFrame *src)
Do nothing if dst and src already refer to the same AVFrame; otherwise unreference dst and if src is ...
static int64_t guess_correct_pts(DecodeContext *dc, int64_t reordered_pts, int64_t dts)
Attempt to guess proper monotonic timestamps for decoded video frames which might have incorrect time...
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static int side_data_pref(const AVCodecContext *avctx, AVFrameSideData ***sd, int *nb_sd, enum AVFrameSideDataType type)
Check side data preference and clear existing side data from frame if needed.
int ff_frame_new_side_data_from_buf(const AVCodecContext *avctx, AVFrame *frame, enum AVFrameSideDataType type, AVBufferRef **buf)
Similar to ff_frame_new_side_data, but using an existing buffer ref.
void ff_progress_frame_await(const ProgressFrame *f, int n)
Wait for earlier decoding threads to finish reference frames.
void ff_progress_frame_report(ProgressFrame *f, int n)
Notify later decoding threads when part of their reference frame is ready.
static int detect_colorspace(av_unused AVCodecContext *c, av_unused AVFrame *f)
static int recode_subtitle(AVCodecContext *avctx, const AVPacket **outpkt, const AVPacket *inpkt, AVPacket *buf_pkt)
int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
Set various frame properties from the codec context / packet data.
static int attach_displaymatrix(AVCodecContext *avctx, AVFrame *frame, int orientation)
int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Identical in function to ff_get_buffer(), except it reuses the existing buffer if available.
enum ThreadingStatus ff_thread_sync_ref(AVCodecContext *avctx, size_t offset)
Allows to synchronize objects whose lifetime is the whole decoding process among all frame threads.
static int add_metadata_from_side_data(const AVPacket *avpkt, AVFrame *frame)
int ff_attach_decode_data(AVCodecContext *avctx, AVFrame *frame)
static int fill_frame_props(const AVCodecContext *avctx, AVFrame *frame)
int ff_frame_new_side_data_from_buf_ext(const AVCodecContext *avctx, AVFrameSideData ***sd, int *nb_sd, enum AVFrameSideDataType type, AVBufferRef **buf)
Same as ff_frame_new_side_data_from_buf, but taking a AVFrameSideData array directly instead of an AV...
int ff_decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)
Do the actual decoding and obtain a decoded frame from the decoder, if available.
int ff_decode_content_light_new(const AVCodecContext *avctx, AVFrame *frame, AVContentLightMetadata **clm)
Wrapper around av_content_light_metadata_create_side_data(), which rejects side data overridden by th...
const AVPacketSideData * ff_get_coded_side_data(const AVCodecContext *avctx, enum AVPacketSideDataType type)
Get side data of the given type from a decoding context.
static int side_data_stereo3d_merge(AVFrameSideData *sd_frame, const AVPacketSideData *sd_pkt)
static const AVPacketSideData * packet_side_data_get(const AVPacketSideData *sd, int nb_sd, enum AVPacketSideDataType type)
static av_cold void progress_frame_pool_free_entry_cb(AVRefStructOpaque opaque, void *obj)
static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame, unsigned flags)
int ff_decode_mastering_display_new(const AVCodecContext *avctx, AVFrame *frame, AVMasteringDisplayMetadata **mdm)
Wrapper around av_mastering_display_metadata_create_side_data(), which rejects side data overridden b...
static int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame, int64_t *discarded_samples)
int ff_decode_exif_attach_buffer(AVCodecContext *avctx, AVFrame *frame, AVBufferRef **pbuf, enum AVExifHeaderMode header_mode)
Attach the data buffer to the frame.
int ff_decode_exif_attach_ifd(AVCodecContext *avctx, AVFrame *frame, const AVExifMetadata *ifd)
static int side_data_exif_parse(AVFrame *dst, const AVPacketSideData *sd_pkt)
static void decode_data_free(AVRefStructOpaque unused, void *obj)
static int decode_simple_receive_frame(AVCodecContext *avctx, AVFrame *frame)
static int decode_get_packet(AVCodecContext *avctx, AVPacket *pkt)
int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt)
Called by decoders to get the next packet for decoding.
int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
Select the (possibly hardware accelerated) pixel format.
static void check_progress_consistency(const ProgressFrame *f)
int ff_decode_mastering_display_new_ext(const AVCodecContext *avctx, AVFrameSideData ***sd, int *nb_sd, struct AVMasteringDisplayMetadata **mdm)
Same as ff_decode_mastering_display_new, but taking a AVFrameSideData array directly instead of an AV...
int ff_copy_palette(void *dst, const AVPacket *src, void *logctx)
Check whether the side-data of src contains a palette of size AVPALETTE_SIZE; if so,...
static void get_subtitle_defaults(AVSubtitle *sub)
static int side_data_map(AVFrame *dst, const AVPacketSideData *sd_src, int nb_sd_src, const SideDataMap *map)
int ff_decode_frame_props_from_pkt(const AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt)
Set various frame properties from the provided packet.
av_cold void ff_decode_flush_buffers(AVCodecContext *avctx)
int ff_hwaccel_frame_priv_alloc(AVCodecContext *avctx, void **hwaccel_picture_private)
Allocate a hwaccel frame private data if the provided avctx uses a hwaccel method that needs it.
static int decode_bsfs_init(AVCodecContext *avctx)
int ff_decode_receive_frame(AVCodecContext *avctx, AVFrame *frame, unsigned flags)
avcodec_receive_frame() implementation for decoders.
static int discard_samples(AVCodecContext *avctx, AVFrame *frame, int64_t *discarded_samples)
static void progress_frame_pool_reset_cb(AVRefStructOpaque unused, void *obj)
static int hwaccel_init(AVCodecContext *avctx, const FFHWAccel *hwaccel)
av_cold void ff_decode_internal_uninit(AVCodecContext *avctx)
av_cold int ff_decode_preinit(AVCodecContext *avctx)
Perform decoder initialization and validation.
static DecodeContext * decode_ctx(AVCodecInternal *avci)
static int apply_param_change(AVCodecContext *avctx, const AVPacket *avpkt)
static int frame_validate(AVCodecContext *avctx, AVFrame *frame)
static int exif_attach_ifd(AVCodecContext *avctx, AVFrame *frame, const AVExifMetadata *ifd, AVBufferRef **pbuf)
static int reget_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags)
static int apply_cropping(AVCodecContext *avctx, AVFrame *frame)
av_cold AVCodecInternal * ff_decode_internal_alloc(void)
int ff_progress_frame_alloc(AVCodecContext *avctx, ProgressFrame *f)
This function sets up the ProgressFrame, i.e.
void ff_hwaccel_uninit(AVCodecContext *avctx)
static void validate_avframe_allocation(AVCodecContext *avctx, AVFrame *frame)
static av_cold int progress_frame_pool_init_cb(AVRefStructOpaque opaque, void *obj)
av_cold void ff_decode_internal_sync(AVCodecContext *dst, const AVCodecContext *src)
int ff_progress_frame_get_buffer(AVCodecContext *avctx, ProgressFrame *f, int flags)
Wrapper around ff_progress_frame_alloc() and ff_thread_get_buffer().
int ff_frame_new_side_data(const AVCodecContext *avctx, AVFrame *frame, enum AVFrameSideDataType type, size_t size, AVFrameSideData **psd)
Wrapper around av_frame_new_side_data, which rejects side data overridden by the demuxer.
int ff_decode_get_hw_frames_ctx(AVCodecContext *avctx, enum AVHWDeviceType dev_type)
Make sure avctx.hw_frames_ctx is set.
static int utf8_check(const uint8_t *str)
#define ff_thread_get_packet(avctx, pkt)
static int extract_packet_props(AVCodecInternal *avci, const AVPacket *pkt)
void ff_progress_frame_unref(ProgressFrame *f)
Give up a reference to the underlying frame contained in a ProgressFrame and reset the ProgressFrame,...
#define ff_thread_receive_frame(avctx, frame, flags)
int ff_decode_content_light_new_ext(const AVCodecContext *avctx, AVFrameSideData ***sd, int *nb_sd, AVContentLightMetadata **clm)
Same as ff_decode_content_light_new, but taking a AVFrameSideData array directly instead of an AVFram...
#define FF_REGET_BUFFER_FLAG_READONLY
the returned buffer does not need to be writable
int ff_set_dimensions(AVCodecContext *s, int width, int height)
#define FF_COMPLIANCE_EXPERIMENTAL
Allow nonstandardized experimental things.
#define AV_EF_EXPLODE
abort decoding on minor error detection
int av_exif_get_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags, AVExifEntry **value)
Get an entry with the tagged ID from the EXIF metadata struct.
int av_exif_parse_buffer(void *logctx, const uint8_t *buf, size_t size, AVExifMetadata *ifd, enum AVExifHeaderMode header_mode)
Decodes the EXIF data provided in the buffer and writes it into the struct *ifd.
int av_exif_ifd_to_dict(void *logctx, const AVExifMetadata *ifd, AVDictionary **metadata)
Recursively reads all tags from the IFD and stores them in the provided metadata dictionary.
void av_exif_free(AVExifMetadata *ifd)
Frees all resources associated with the given EXIF metadata struct.
int av_exif_orientation_to_matrix(int32_t *matrix, int orientation)
Convert an orientation constant used by EXIF's orientation tag into a display matrix used by AV_FRAME...
AVExifMetadata * av_exif_clone_ifd(const AVExifMetadata *ifd)
Allocates a duplicate of the provided EXIF metadata struct.
int av_exif_write(void *logctx, const AVExifMetadata *ifd, AVBufferRef **buffer, enum AVExifHeaderMode header_mode)
Allocates a buffer using av_malloc of an appropriate size and writes the EXIF data represented by ifd...
int32_t av_exif_get_tag_id(const char *name)
Retrieves the tag ID associated with the provided tag string name.
int av_exif_remove_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags)
Remove an entry from the provided EXIF metadata struct.
@ AV_EXIF_TIFF_HEADER
The TIFF header starts with 0x49492a00, or 0x4d4d002a.
EXIF metadata parser - internal functions.
static const char * hwaccel
reference-counted frame API
void av_bsf_free(AVBSFContext **pctx)
Free a bitstream filter context and everything associated with it; write NULL into the supplied point...
int av_bsf_init(AVBSFContext *ctx)
Prepare the filter for use, after all the parameters and options have been set.
void av_bsf_flush(AVBSFContext *ctx)
Reset the internal bitstream filter state.
int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt)
Retrieve a filtered packet.
int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
Submit a packet for filtering.
int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf_lst)
Parse string describing list of bitstream filters and create single AVBSFContext describing the whole...
#define AV_CODEC_FLAG2_ICC_PROFILES
Generate/parse ICC profiles on encode/decode, as appropriate for the type of file.
#define AV_CODEC_FLAG2_EXPORT_MVS
Export motion vectors through frame side data.
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
#define AV_CODEC_EXPORT_DATA_ENHANCEMENTS
Decoding only.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AV_GET_BUFFER_FLAG_REF
The decoder will keep a reference to the frame and may reuse it later.
int av_codec_is_decoder(const AVCodec *codec)
#define AV_CODEC_PROP_INTRA_ONLY
Codec uses only intra compression.
#define AV_CODEC_FLAG_GRAY
Only decode/encode grayscale.
void avsubtitle_free(AVSubtitle *sub)
Free all allocated data in the given subtitle struct.
#define AV_CODEC_FLAG_UNALIGNED
Allow decoders to produce frames with data planes that are not aligned to CPU requirements (e....
const AVCodecHWConfig * avcodec_get_hw_config(const AVCodec *codec, int index)
Retrieve supported hardware configurations for a codec.
#define AV_CODEC_PROP_BITMAP_SUB
Subtitle codec is bitmap based Decoded AVSubtitle data can be read from the AVSubtitleRect->pict fiel...
#define AV_CODEC_EXPORT_DATA_MVS
Export motion vectors through frame side data.
#define AV_CODEC_CAP_PARAM_CHANGE
Codec supports changed parameters at any point.
#define AV_CODEC_PROP_TEXT_SUB
Subtitle codec is text based.
#define AV_CODEC_FLAG2_SKIP_MANUAL
Do not skip samples and export skip information as frame side data.
#define AV_CODEC_FLAG_COPY_OPAQUE
@ AV_CODEC_HW_CONFIG_METHOD_AD_HOC
The codec supports this format by some ad-hoc method.
@ AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX
The codec supports this format via the hw_frames_ctx interface.
@ AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX
The codec supports this format via the hw_device_ctx interface.
@ AV_CODEC_HW_CONFIG_METHOD_INTERNAL
The codec supports this format by some internal method.
int attribute_align_arg avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
Supply raw packet data as input to a decoder.
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
Decode a subtitle message.
int avcodec_get_hw_frames_parameters(AVCodecContext *avctx, AVBufferRef *device_ref, enum AVPixelFormat hw_pix_fmt, AVBufferRef **out_frames_ref)
Create and return a AVHWFramesContext with values adequate for hardware decoding.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
#define AV_HWACCEL_CODEC_CAP_EXPERIMENTAL
HWAccel is experimental and is thus avoided in favor of non experimental codecs.
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *avctx, const enum AVPixelFormat *fmt)
int avcodec_is_open(AVCodecContext *s)
@ AV_PKT_DATA_STRINGS_METADATA
A list of zero terminated key/value strings.
@ AV_PKT_DATA_S12M_TIMECODE
Timecode which conforms to SMPTE ST 12-1:2014.
@ AV_PKT_DATA_SKIP_SAMPLES
Recommends skipping the specified number of samples.
@ AV_PKT_DATA_IAMF_RECON_GAIN_INFO_PARAM
IAMF Recon Gain Info Parameter Data associated with the audio frame.
@ AV_PKT_DATA_DYNAMIC_HDR10_PLUS
HDR10+ dynamic metadata associated with a video frame.
@ AV_PKT_DATA_IAMF_DEMIXING_INFO_PARAM
IAMF Demixing Info Parameter Data associated with the audio frame.
@ AV_PKT_DATA_A53_CC
ATSC A53 Part 4 Closed Captions.
@ AV_PKT_DATA_PALETTE
An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE bytes worth of palette.
@ AV_PKT_DATA_DYNAMIC_HDR_SMPTE_2094_APP5
HDR dynamic metadata associated with a video frame.
@ AV_PKT_DATA_AFD
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
@ AV_PKT_DATA_EXIF
Extensible image file format metadata.
@ AV_PKT_DATA_NB
The number of side data types.
@ AV_PKT_DATA_PARAM_CHANGE
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
@ AV_PKT_DATA_LCEVC
Raw LCEVC payload data, as a uint8_t array, with NAL emulation bytes intact.
@ AV_PKT_DATA_IAMF_MIX_GAIN_PARAM
IAMF Mix Gain Parameter Data associated with the audio frame.
#define AV_PKT_FLAG_DISCARD
Flag is used to discard packets which are required to maintain valid decoder state but are not requir...
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
int av_packet_unpack_dictionary(const uint8_t *data, size_t size, AVDictionary **dict)
Unpack a dictionary from side_data.
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, size_t *size)
Get side information from packet.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
int av_packet_ref(AVPacket *dst, const AVPacket *src)
Setup a new reference to the data described by a given packet.
int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
Copy only "properties" fields from src to dst.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
@ AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE
@ AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS
int av_channel_layout_check(const AVChannelLayout *channel_layout)
Check whether a channel layout is valid, i.e.
int av_channel_layout_copy(AVChannelLayout *dst, const AVChannelLayout *src)
Make a copy of a channel layout.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
int av_buffer_replace(AVBufferRef **pdst, const AVBufferRef *src)
Ensure dst refers to the same data as src.
int av_buffer_make_writable(AVBufferRef **pbuf)
Create a writable reference from a given buffer reference, avoiding data copy if possible.
AVBufferRef * av_buffer_create(uint8_t *data, size_t size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
Create an AVBuffer from an existing array.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define AV_FRAME_FLAG_DISCARD
A flag to mark the frames which need to be decoded, but shouldn't be output.
#define AV_FRAME_FLAG_KEY
A flag to mark frames that are keyframes.
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
AVFrameSideData * av_frame_side_data_new(AVFrameSideData ***sd, int *nb_sd, enum AVFrameSideDataType type, size_t size, unsigned int flags)
Add new side data entry to an array.
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type)
Remove and free all side data instances of the given type.
void av_frame_side_data_free(AVFrameSideData ***sd, int *nb_sd)
Free all side data entries and their contents, then zeroes out the values which the pointers are poin...
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
AVFrameSideData * av_frame_side_data_add(AVFrameSideData ***sd, int *nb_sd, enum AVFrameSideDataType type, AVBufferRef **buf, unsigned int flags)
Add a new side data entry to an array from an existing AVBufferRef.
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
Move everything contained in src to dst and reset src.
void av_frame_side_data_remove(AVFrameSideData ***sd, int *nb_sd, enum AVFrameSideDataType type)
Remove and free all side data instances of the given type from an array.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, size_t size)
Add a new side data to a frame.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
int av_frame_side_data_clone(AVFrameSideData ***sd, int *nb_sd, const AVFrameSideData *src, unsigned int flags)
Add a new side data entry to an array based on existing side data, taking a reference towards the con...
int av_frame_apply_cropping(AVFrame *frame, int flags)
Crop the given video AVFrame according to its crop_left/crop_top/crop_right/ crop_bottom fields.
static const AVFrameSideData * av_frame_side_data_get(AVFrameSideData *const *sd, const int nb_sd, enum AVFrameSideDataType type)
Wrapper around av_frame_side_data_get_c() to workaround the limitation that for any type T the conver...
@ AV_FRAME_CROP_UNALIGNED
Apply the maximum possible cropping, even if it requires setting the AVFrame.data[] entries to unalig...
@ AV_FRAME_DATA_EXIF
Exchangeable image file format metadata.
@ AV_FRAME_DATA_LCEVC
Raw LCEVC payload data, as a uint8_t array, with NAL emulation bytes intact.
@ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
Content light level (based on CTA-861.3).
@ AV_FRAME_DATA_DISPLAYMATRIX
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
@ AV_FRAME_DATA_A53_CC
ATSC A53 Part 4 Closed Captions.
@ AV_FRAME_DATA_DYNAMIC_HDR_PLUS
HDR dynamic metadata associated with a video frame.
@ AV_FRAME_DATA_IAMF_RECON_GAIN_INFO_PARAM
IAMF Recon Gain Info Parameter Data associated with the audio frame.
@ AV_FRAME_DATA_IAMF_MIX_GAIN_PARAM
IAMF Mix Gain Parameter Data associated with the audio frame.
@ AV_FRAME_DATA_SKIP_SAMPLES
Recommends skipping the specified number of samples.
@ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA
Mastering display metadata associated with a video frame.
@ AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5
HDR dynamic metadata associated with a video frame.
@ AV_FRAME_DATA_ICC_PROFILE
The data contains an ICC profile as an opaque octet buffer following the format described by ISO 1507...
@ AV_FRAME_DATA_AFD
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
@ AV_FRAME_DATA_S12M_TIMECODE
Timecode which conforms to SMPTE ST 12-1.
@ AV_FRAME_DATA_IAMF_DEMIXING_INFO_PARAM
IAMF Demixing Info Parameter Data associated with the audio frame.
@ AV_FRAME_DATA_STEREO3D
Stereoscopic 3d metadata.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_log_get_level(void)
Get the current log level.
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm)
Detects which enum AVColorPrimaries constant corresponds to the given complete gamut description.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
void * av_memdup(const void *p, size_t size)
Duplicate a buffer with av_malloc().
static void av_image_copy2(uint8_t *const dst_data[4], const int dst_linesizes[4], uint8_t *const src_data[4], const int src_linesizes[4], enum AVPixelFormat pix_fmt, int width, int height)
Wrapper around av_image_copy() to workaround the limitation that the conversion from uint8_t * const ...
int av_image_check_size2(unsigned int w, unsigned int h, int64_t max_pixels, enum AVPixelFormat pix_fmt, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of a plane of an image with...
int av_image_check_sar(unsigned int w, unsigned int h, AVRational sar)
Check if the given sample aspect ratio of an image is valid.
@ AV_PICTURE_TYPE_I
Intra.
@ AV_PICTURE_TYPE_NONE
Undefined.
int av_samples_copy(uint8_t *const *dst, uint8_t *const *src, int dst_offset, int src_offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
Copy samples from src to dst.
#define AV_NOPTS_VALUE
Undefined timestamp value.
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
@ AV_STEREO3D_UNSPEC
Video is stereoscopic but the packing is unspecified.
@ AV_PRIMARY_EYE_NONE
Neither eye.
@ AV_STEREO3D_VIEW_UNSPEC
Content is unspecified.
static enum AVPixelFormat hw_pix_fmt
#define FF_HW_HAS_CB(avctx, function)
#define FF_HW_SIMPLE_CALL(avctx, function)
static const FFHWAccel * ffhwaccel(const AVHWAccel *codec)
const char * av_hwdevice_get_type_name(enum AVHWDeviceType type)
Get the string name of an AVHWDeviceType.
int av_hwframe_ctx_init(AVBufferRef *ref)
Finalize the context before use.
AVBufferRef * av_hwframe_ctx_alloc(AVBufferRef *device_ref_in)
Allocate an AVHWFramesContext tied to a given device context.
const VDPAUPixFmtMap * map
static av_cold void uninit(AVBitStreamFilterContext *ctx)
int ff_lcevc_parse_frame(FFLCEVCContext *lcevc, const AVFrame *frame, enum AVPixelFormat *format, int *width, int *height)
int ff_lcevc_process(void *logctx, AVFrame *frame)
int ff_lcevc_alloc(FFLCEVCContext **plcevc, int loglevel)
int ff_icc_profile_sanitize(FFIccContext *s, cmsHPROFILE profile)
Sanitize an ICC profile to try and fix badly broken values.
int ff_icc_profile_read_primaries(FFIccContext *s, cmsHPROFILE profile, AVColorPrimariesDesc *out_primaries)
Read the color primaries and white point coefficients encoded by an ICC profile, and return the raw v...
int ff_icc_context_init(FFIccContext *s, void *avctx)
Initializes an FFIccContext.
int ff_icc_profile_detect_transfer(FFIccContext *s, cmsHPROFILE profile, enum AVColorTransferCharacteristic *out_trc)
Attempt detecting the transfer characteristic that best approximates the transfer function encoded by...
common internal api header.
#define AVPACKET_IS_EMPTY(pkt)
Multithreading API for decoders.
@ FF_THREAD_NO_FRAME_THREADING
common internal API header
#define attribute_align_arg
Memory handling functions.
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
@ AVCHROMA_LOC_UNSPECIFIED
@ AVCOL_RANGE_UNSPECIFIED
@ AVALPHA_MODE_UNSPECIFIED
Unknown alpha handling, or no alpha channel.
#define AV_VIDEO_MAX_PLANES
Maximum number of planes in any pixel format.
AVPixelFormat
Pixel format.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
AVColorTransferCharacteristic
Color Transfer Characteristic.
int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f, int flags)
Wrapper around get_buffer() for frame-multithreaded codecs.
void av_refstruct_unref(void *objp)
Decrement the reference count of the underlying object and automatically free the object if there are...
void av_refstruct_replace(void *dstp, const void *src)
Ensure *dstp refers to the same object as src.
void * av_refstruct_pool_get(AVRefStructPool *pool)
Get an object from the pool, reusing an old one from the pool when available.
void * av_refstruct_ref(void *obj)
Create a new reference to an object managed via this API, i.e.
#define AV_REFSTRUCT_POOL_FLAG_FREE_ON_INIT_ERROR
If this flag is set and both init_cb and free_entry_cb callbacks are provided, then free_cb will be c...
static void * av_refstruct_allocz(size_t size)
Equivalent to av_refstruct_alloc_ext(size, 0, NULL, NULL)
static void * av_refstruct_alloc_ext(size_t size, unsigned flags, void *opaque, void(*free_cb)(AVRefStructOpaque opaque, void *obj))
A wrapper around av_refstruct_alloc_ext_c() for the common case of a non-const qualified opaque.
static AVRefStructPool * av_refstruct_pool_alloc_ext(size_t size, unsigned flags, void *opaque, int(*init_cb)(AVRefStructOpaque opaque, void *obj), void(*reset_cb)(AVRefStructOpaque opaque, void *obj), void(*free_entry_cb)(AVRefStructOpaque opaque, void *obj), void(*free_cb)(AVRefStructOpaque opaque))
A wrapper around av_refstruct_pool_alloc_ext_c() for the common case of a non-const qualified opaque.
#define FF_ARRAY_ELEMS(a)
AVCodecParameters * par_in
Parameters of the input stream.
AVRational time_base_in
The timebase used for the timestamps of the input packets.
A reference to a data buffer.
uint8_t * data
The data buffer.
int nb_channels
Number of channels in this layout.
main external API structure.
int * side_data_prefer_packet
Decoding only.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int width
picture width / height.
AVPacketSideData * coded_side_data
Additional data associated with the entire coded stream.
const struct AVCodecDescriptor * codec_descriptor
AVCodecDescriptor.
AVChannelLayout ch_layout
Audio channel layout.
int flags2
AV_CODEC_FLAG2_*.
enum AVSampleFormat sample_fmt
audio sample format
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
int64_t max_pixels
The number of pixels per image to maximally accept.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
char * sub_charenc
Character encoding of the input subtitles file.
int strict_std_compliance
strictly follow the standard (MPEG-4, ...).
AVRational pkt_timebase
Timebase in which pkt_dts/pts and AVPacket.dts/pts are expressed.
enum AVPixelFormat(* get_format)(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
Callback to negotiate the pixel format.
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
AVBufferRef * hw_frames_ctx
A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames.
enum AVMediaType codec_type
int64_t frame_num
Frame counter, set by libavcodec.
int apply_cropping
Video decoding only.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel.
const struct AVHWAccel * hwaccel
Hardware accelerator in use.
int active_thread_type
Which multithreading methods are in use by the codec.
int sub_charenc_mode
Subtitles character encoding mode.
const struct AVCodec * codec
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
int export_side_data
Bit set of AV_CODEC_EXPORT_DATA_* flags, which affects the kind of metadata exported in frame,...
enum AVColorSpace colorspace
YUV colorspace type.
int sample_rate
samples per second
int thread_count
thread count is used to decide how many independent tasks should be passed to execute()
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
uint8_t * subtitle_header
int flags
AV_CODEC_FLAG_*.
AVFrameSideData ** decoded_side_data
Array containing static side data, such as HDR10 CLL / MDCV structures.
enum AVChromaLocation chroma_sample_location
This defines the location of chroma samples.
enum AVAlphaMode alpha_mode
Indicates how the alpha channel of the video is represented.
AVBufferRef * hw_device_ctx
A reference to the AVHWDeviceContext describing the device which will be used by a hardware encoder/d...
int extra_hw_frames
Video decoding only.
unsigned nb_side_data_prefer_packet
Number of entries in side_data_prefer_packet.
int64_t max_samples
The number of samples per frame to maximally accept.
int coded_width
Bitstream width / height, may be different from width/height e.g.
int(* get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags)
This callback is called at the beginning of each frame to get data buffer(s) for it.
struct AVCodecInternal * internal
Private context used for internal data.
int lowres
low resolution decoding, 1-> 1/2 size, 2->1/4 size
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
const char * name
Name of the codec described by this descriptor.
int props
Codec properties, a combination of AV_CODEC_PROP_* flags.
const struct FFHWAccel * hwaccel
If this configuration uses a hwaccel, a pointer to it.
AVCodecHWConfig public
This is the structure which will be returned to the user by avcodec_get_hw_config().
enum AVPixelFormat pix_fmt
For decoders, a hardware pixel format which that decoder may be able to decode to if suitable hardwar...
AVPacket * in_pkt
This packet is used to hold the packet given to decoders implementing the .decode API; it is unused b...
AVPacket * last_pkt_props
Properties (timestamps+side data) extracted from the last packet passed for decoding.
int is_frame_mt
This field is set to 1 when frame threading is being used and the parent AVCodecContext of this AVCod...
void * hwaccel_priv_data
hwaccel-specific private data
AVPacket * buffer_pkt
Temporary buffers for newly received or not yet output packets/frames.
int draining
decoding: AVERROR_EOF has been returned from ff_decode_get_packet(); must not be used by decoders tha...
struct AVRefStructPool * progress_frame_pool
int skip_samples
Number of audio samples to skip at the start of the next decoded frame.
struct AVBSFContext * bsf
int capabilities
Codec capabilities.
uint8_t max_lowres
maximum value for lowres supported by the decoder
Struct that contains both white point location and primaries location, providing the complete descrip...
int depth
Number of bits in the component.
Content light level needed by to transmit HDR over HDMI (CTA-861.3).
union AVExifEntry::@325220332140161067313112036135003363017341144014 value
Structure to hold side data for an AVFrame.
This structure describes decoded (raw) audio or video data.
void * opaque
Frame owner's private data.
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
AVBuffer references backing the data for this frame.
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
const char * name
Name of the hardware accelerated codec.
enum AVPixelFormat pix_fmt
Supported pixel format.
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
enum AVHWDeviceType type
This field identifies the underlying API used for hardware access.
This struct describes a set or pool of "hardware" frames (i.e.
enum AVPixelFormat format
The pixel format identifying the underlying HW surface type.
int initial_pool_size
Initial size of the frame pool.
AVHWDeviceContext * device_ctx
The parent AVHWDeviceContext.
This structure stores auxiliary information for decoding, presenting, or otherwise processing the cod...
This structure stores compressed data.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
Rational number (pair of numerator and denominator).
AVRefStructPool is an API for a thread-safe pool of objects managed via the RefStruct API.
Stereo 3D type: this structure describes how two videos are packed within a single video surface,...
char * ass
0 terminated ASS/SSA compatible event line.
uint32_t end_display_time
int64_t pts
Same as packet pts, in AV_TIME_BASE.
enum AVPictureType initial_pict_type
This is set to AV_PICTURE_TYPE_I for intra only video decoders and to AV_PICTURE_TYPE_NONE for other ...
uint64_t side_data_pref_mask
DTS of the last frame.
int64_t pts_correction_last_dts
PTS of the last frame.
int64_t pts_correction_num_faulty_dts
Number of incorrect PTS values so far.
int64_t pts_correction_last_pts
Number of incorrect DTS values so far.
int draining_started
The caller has submitted a NULL packet on input.
int intra_only_flag
This is set to AV_FRAME_FLAG_KEY for decoders of intra-only formats (those whose codec descriptor has...
int64_t pts_correction_num_faulty_pts
int(* receive_frame)(struct AVCodecContext *avctx, struct AVFrame *frame)
Decode API with decoupled packet/frame dataflow.
const struct AVCodecHWConfigInternal *const * hw_configs
Array of pointers to hardware configurations supported by the codec, or NULL if no hardware supported...
unsigned cb_type
This field determines the type of the codec (decoder/encoder) and also the exact callback cb implemen...
const char * bsfs
Decoding only, a comma-separated list of bitstream filters to apply to packets before decoding.
int(* decode_sub)(struct AVCodecContext *avctx, struct AVSubtitle *sub, int *got_frame_ptr, const struct AVPacket *avpkt)
Decode subtitle data to an AVSubtitle.
int(* decode)(struct AVCodecContext *avctx, struct AVFrame *frame, int *got_frame_ptr, struct AVPacket *avpkt)
Decode to an AVFrame.
unsigned caps_internal
Internal codec capabilities FF_CODEC_CAP_*.
union FFCodec::@344166142000117327246261075357045351044045072174 cb
int priv_data_size
Size of the private data to allocate in AVCodecInternal.hwaccel_priv_data.
AVHWAccel p
The public AVHWAccel.
int(* frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
Fill the given hw_frames context with current codec parameters.
This struct stores per-frame lavc-internal data and is attached to it via private_ref.
void(* hwaccel_priv_free)(void *priv)
int(* hwaccel_priv_post_process)(void *logctx, AVFrame *frame)
Per-frame private data for hwaccels.
void * post_process_opaque
RefStruct reference.
int(* post_process)(void *logctx, AVFrame *frame)
The callback to perform some delayed processing on the frame right before it is returned to the calle...
The ProgressFrame structure.
ThreadProgress is an API to easily notify other threads about progress of any kind as long as it can ...
static AVFormatContext * ctx
av_cold void ff_thread_progress_destroy(ThreadProgress *pro)
Destroy a ThreadProgress.
av_cold int ff_thread_progress_init(ThreadProgress *pro, int init_mode)
Initialize a ThreadProgress.
void ff_thread_progress_report(ThreadProgress *pro, int n)
This function is a no-op in no-op mode; otherwise it notifies other threads that a certain level of p...
void ff_thread_progress_await(const ThreadProgress *pro_c, int n)
This function is a no-op in no-op mode; otherwise it waits until other threads have reached a certain...
static void ff_thread_progress_reset(ThreadProgress *pro)
Reset the ThreadProgress.progress counter; must only be called if the ThreadProgress is not in use in...
RefStruct is an API for creating reference-counted objects with minimal overhead.