390#define AV_NUM_DATA_POINTERS 8
559#if FF_API_INTERLACED_FRAME
566 int interlaced_frame;
577#if FF_API_PALETTE_HAS_CHANGED
582 int palette_has_changed;
636#define AV_FRAME_FLAG_CORRUPT (1 << 0)
640#define AV_FRAME_FLAG_KEY (1 << 1)
644#define AV_FRAME_FLAG_DISCARD (1 << 2)
648#define AV_FRAME_FLAG_INTERLACED (1 << 3)
653#define AV_FRAME_FLAG_TOP_FIELD_FIRST (1 << 4)
717#define FF_DECODE_ERROR_INVALID_BITSTREAM 1
718#define FF_DECODE_ERROR_MISSING_REFERENCE 2
719#define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4
720#define FF_DECODE_ERROR_DECODE_SLICES 8
1060#define AV_FRAME_SIDE_DATA_FLAG_UNIQUE (1 << 0)
1065#define AV_FRAME_SIDE_DATA_FLAG_REPLACE (1 << 1)
1087 size_t size,
unsigned int flags);
#define attribute_deprecated
Convenience header that includes libavutil's core.
refcounted data buffer API
Public libavutil channel layout APIs header.
#define AV_NUM_DATA_POINTERS
struct AVDictionary AVDictionary
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_replace(AVFrame *dst, const AVFrame *src)
Ensure the destination frame refers to the same data described by the source frame,...
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
AVActiveFormatDescription
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.
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
Move everything contained in src to dst and reset src.
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
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.
const AVFrameSideData * av_frame_side_data_get_c(const AVFrameSideData *const *sd, const int nb_sd, enum AVFrameSideDataType type)
Get a side data entry of a specific type from an array.
AVFrameSideData * av_frame_new_side_data_from_buf(AVFrame *frame, enum AVFrameSideDataType type, AVBufferRef *buf)
Add a new side data to a frame from an existing AVBufferRef.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
const AVSideDataDescriptor * av_frame_side_data_desc(enum AVFrameSideDataType type)
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...
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
int av_frame_make_writable(AVFrame *frame)
Ensure that the frame data is writable, avoiding data copy if possible.
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.
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
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...
const char * av_frame_side_data_name(enum AVFrameSideDataType type)
AVBufferRef * av_frame_get_plane_buffer(const AVFrame *frame, int plane)
Get the buffer reference a given data plane is stored in.
@ AV_SIDE_DATA_PROP_GLOBAL
The side data type can be used in stream-global structures.
@ AV_SIDE_DATA_PROP_MULTI
Multiple instances of this side data type can be meaningfully present in a single side data array.
@ AV_FRAME_CROP_UNALIGNED
Apply the maximum possible cropping, even if it requires setting the AVFrame.data[] entries to unalig...
@ AV_FRAME_DATA_GOP_TIMECODE
The GOP timecode in 25 bit timecode format.
@ AV_FRAME_DATA_DOVI_METADATA
Parsed Dolby Vision metadata, suitable for passing to a software implementation.
@ AV_FRAME_DATA_VIEW_ID
This side data must be associated with a video frame.
@ AV_FRAME_DATA_SPHERICAL
The data represents the AVSphericalMapping structure defined in libavutil/spherical....
@ AV_FRAME_DATA_LCEVC
Raw LCEVC payload data, as a uint8_t array, with NAL emulation bytes intact.
@ AV_FRAME_DATA_DYNAMIC_HDR_VIVID
HDR Vivid dynamic metadata associated with a video frame.
@ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
Content light level (based on CTA-861.3).
@ AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT
Ambient viewing environment metadata, as defined by H.274.
@ AV_FRAME_DATA_PANSCAN
The data is the AVPanScan struct defined in libavcodec.
@ 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_SEI_UNREGISTERED
User data unregistered metadata associated with a video frame.
@ AV_FRAME_DATA_AUDIO_SERVICE_TYPE
This side data must be associated with an audio frame and corresponds to enum AVAudioServiceType defi...
@ AV_FRAME_DATA_DYNAMIC_HDR_PLUS
HDR dynamic metadata associated with a video frame.
@ AV_FRAME_DATA_REPLAYGAIN
ReplayGain information in the form of the AVReplayGain struct.
@ AV_FRAME_DATA_SKIP_SAMPLES
Recommmends skipping the specified number of samples.
@ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA
Mastering display metadata associated with a video frame.
@ AV_FRAME_DATA_DOWNMIX_INFO
Metadata relevant to a downmix procedure.
@ AV_FRAME_DATA_FILM_GRAIN_PARAMS
Film grain parameters for a frame, described by AVFilmGrainParams.
@ AV_FRAME_DATA_VIDEO_ENC_PARAMS
Encoding parameters for a video frame, as described by AVVideoEncParams.
@ AV_FRAME_DATA_DETECTION_BBOXES
Bounding boxes for object detection and classification, as described by AVDetectionBBoxHeader.
@ 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_MATRIXENCODING
The data is the AVMatrixEncoding enum defined in libavutil/channel_layout.h.
@ AV_FRAME_DATA_DOVI_RPU_BUFFER
Dolby Vision RPU raw data, suitable for passing to x265 or other libraries.
@ AV_FRAME_DATA_STEREO3D
Stereoscopic 3d metadata.
@ AV_FRAME_DATA_VIDEO_HINT
Provide encoder-specific hinting information about changed/unchanged portions of a frame.
@ AV_FRAME_DATA_MOTION_VECTORS
Motion vectors exported by some codecs (on demand through the export_mvs flag set in the libavcodec A...
@ AV_FRAME_DATA_REGIONS_OF_INTEREST
Regions Of Interest, the data is an array of AVRegionOfInterest type, the number of array element is ...
AVChromaLocation
Location of chroma samples.
AVColorRange
Visual content value range.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
AVColorTransferCharacteristic
Color Transfer Characteristic.
AVColorSpace
YUV colorspace type.
Utilties for rational number calculation.
A reference to a data buffer.
An AVChannelLayout holds information about the channel layout of audio data.
Structure to hold side data for an AVFrame.
enum AVFrameSideDataType type
This structure describes decoded (raw) audio or video data.
int nb_samples
number of audio samples (per channel) described by this frame
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
int64_t best_effort_timestamp
frame timestamp estimated using various heuristics, in stream time base
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
enum AVChromaLocation chroma_location
AVBufferRef ** extended_buf
For planar audio which requires more than AV_NUM_DATA_POINTERS AVBufferRef pointers,...
AVBufferRef * hw_frames_ctx
For hwaccel-format frames, this should be a reference to the AVHWFramesContext describing the frame.
AVRational time_base
Time base for the timestamps in this frame.
void * opaque
Frame owner's private data.
int decode_error_flags
decode error flags of the frame, set to a combination of FF_DECODE_ERROR_xxx flags if the decoder pro...
AVFrameSideData ** side_data
int flags
Frame flags, a combination of AV_FRAME_FLAGS.
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
AVBuffer references backing the data for this frame.
enum AVColorPrimaries color_primaries
AVDictionary * metadata
metadata.
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
AVBufferRef * private_ref
AVBufferRef for internal use by a single libav* library.
int quality
quality (between 1 (good) and FF_LAMBDA_MAX (bad))
AVBufferRef * opaque_ref
Frame owner's private data.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
enum AVColorSpace colorspace
YUV colorspace type.
int nb_extended_buf
Number of elements in extended_buf.
int64_t pkt_dts
DTS copied from the AVPacket that triggered returning this frame.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
enum AVColorTransferCharacteristic color_trc
int64_t duration
Duration of the frame, in the same units as pts.
int sample_rate
Sample rate of the audio data.
AVChannelLayout ch_layout
Channel layout of the audio data.
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
int repeat_pict
Number of fields in this frame which should be repeated, i.e.
enum AVPictureType pict_type
Picture type of the frame.
uint8_t ** extended_data
pointers to the data planes/channels.
Rational number (pair of numerator and denominator).
Structure describing a single Region Of Interest.
uint32_t self_size
Must be set to the size of this data structure (that is, sizeof(AVRegionOfInterest)).
AVRational qoffset
Quantisation offset.
int top
Distance in pixels from the top edge of the frame to the top and bottom edges and from the left edge ...
This struct describes the properties of a side data type.
unsigned props
Side data property flags, a combination of AVSideDataProps values.
const char * name
Human-readable side data description.