25 #ifndef AVUTIL_FRAME_H 26 #define AVUTIL_FRAME_H 315 #define AV_NUM_DATA_POINTERS 8 444 #if FF_API_ERROR_FRAME 539 #define AV_FRAME_FLAG_CORRUPT (1 << 0) 543 #define AV_FRAME_FLAG_DISCARD (1 << 2) 610 #define FF_DECODE_ERROR_INVALID_BITSTREAM 1 611 #define FF_DECODE_ERROR_MISSING_REFERENCE 2 612 #define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4 613 #define FF_DECODE_ERROR_DECODE_SLICES 8 696 #if FF_API_FRAME_GET_SET attribute_deprecated int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type)
int top
Distance in pixels from the top edge of the frame to the top and bottom edges and from the left edge ...
#define AV_NUM_DATA_POINTERS
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
This side data must be associated with an audio frame and corresponds to enum AVAudioServiceType defi...
attribute_deprecated int qscale_type
int64_t pkt_pos
reordered pos from the last AVPacket that has been input into the decoder
attribute_deprecated void av_frame_set_pkt_pos(AVFrame *frame, int64_t val)
void * opaque
for some private data of the user
int nb_extended_buf
Number of elements in extended_buf.
Content light level (based on CTA-861.3).
Timecode which conforms to SMPTE ST 12-1.
int repeat_pict
When decoding, this signals how much the picture must be delayed.
Convenience header that includes libavutil's core.
Mastering display metadata associated with a video frame.
attribute_deprecated AVBufferRef * qp_table_buf
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
Move everything contained in src to dst and reset src.
attribute_deprecated enum AVColorRange av_frame_get_color_range(const AVFrame *frame)
static void error(const char *err)
attribute_deprecated int8_t * qscale_table
QP table.
AVColorTransferCharacteristic
Color Transfer Characteristic.
AVRational qoffset
Quantisation offset.
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
AVBufferRef * hw_frames_ctx
For hwaccel-format frames, this should be a reference to the AVHWFramesContext describing the frame...
attribute_deprecated void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val)
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
Film grain parameters for a frame, described by AVFilmGrainParams.
AVColorSpace
YUV colorspace type.
attribute_deprecated int qstride
QP store stride.
attribute_deprecated void av_frame_set_pkt_size(AVFrame *frame, int val)
AVBufferRef * private_ref
AVBufferRef for internal use by a single libav* library.
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
The data is the AVPanScan struct defined in libavcodec.
HDR dynamic metadata associated with a video frame.
attribute_deprecated void av_frame_set_pkt_duration(AVFrame *frame, int64_t val)
Structure to hold side data for an AVFrame.
AVDictionary * metadata
metadata.
int interlaced_frame
The content of the picture is interlaced.
AVColorRange
Visual content value range.
attribute_deprecated int64_t av_frame_get_channel_layout(const AVFrame *frame)
uint32_t self_size
Must be set to the size of this data structure (that is, sizeof(AVRegionOfInterest)).
attribute_deprecated int av_frame_get_sample_rate(const AVFrame *frame)
The data represents the AVSphericalMapping structure defined in libavutil/spherical.h.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
Metadata relevant to a downmix procedure.
AVFrameSideData ** side_data
attribute_deprecated int av_frame_get_pkt_size(const AVFrame *frame)
Implementation-specific description of the format of AV_FRAME_QP_TABLE_DATA.
attribute_deprecated void av_frame_set_decode_error_flags(AVFrame *frame, int val)
attribute_deprecated int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame)
Accessors for some AVFrame fields.
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...
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
attribute_deprecated void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val)
ATSC A53 Part 4 Closed Captions.
Libavutil version macros.
The GOP timecode in 25 bit timecode format.
attribute_deprecated void av_frame_set_channels(AVFrame *frame, int val)
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
attribute_deprecated AVDictionary * av_frame_get_metadata(const AVFrame *frame)
uint64_t channel_layout
Channel layout of the audio data.
int channels
number of audio channels, only used for audio.
int flags
Frame flags, a combination of AV_FRAME_FLAGS.
int display_picture_number
picture number in display order
AVBufferRef ** extended_buf
For planar audio which requires more than AV_NUM_DATA_POINTERS AVBufferRef pointers, this array will hold all the references which cannot fit into AVFrame.buf.
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.
static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB]
Motion vectors exported by some codecs (on demand through the export_mvs flag set in the libavcodec A...
AVBufferRef * av_frame_get_plane_buffer(AVFrame *frame, int plane)
Get the buffer reference a given data plane is stored in.
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 quality
quality (between 1 (good) and FF_LAMBDA_MAX (bad))
The data contains an ICC profile as an opaque octet buffer following the format described by ISO 1507...
Structure describing a single Region Of Interest.
const char * av_get_colorspace_name(enum AVColorSpace val)
Get the name of a colorspace.
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
attribute_deprecated int64_t av_frame_get_pkt_pos(const AVFrame *frame)
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
int coded_picture_number
picture number in bitstream order
int64_t pkt_duration
duration of the corresponding packet, expressed in AVStream->time_base units, 0 if unknown...
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
attribute_deprecated int64_t av_frame_get_pkt_duration(const AVFrame *frame)
User data unregistered metadata associated with a video frame.
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type)
Remove and free all side data instances of the given type.
attribute_deprecated void av_frame_set_channel_layout(AVFrame *frame, int64_t val)
int64_t reordered_opaque
reordered opaque 64 bits (generally an integer or a double precision float PTS but can be anything)...
attribute_deprecated enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame)
int sample_rate
Sample rate of the audio data.
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, int size)
Add a new side data to a frame.
Rational number (pair of numerator and denominator).
Regions Of Interest, the data is an array of AVRegionOfInterest type, the number of array element is ...
int palette_has_changed
Tell user application that palette has changed from previous frame.
attribute_deprecated void av_frame_set_metadata(AVFrame *frame, AVDictionary *val)
refcounted data buffer API
int64_t best_effort_timestamp
frame timestamp estimated using various heuristics, in stream time base
AVActiveFormatDescription
int decode_error_flags
decode error flags of the frame, set to a combination of FF_DECODE_ERROR_xxx flags if the decoder pro...
const char * av_frame_side_data_name(enum AVFrameSideDataType type)
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
enum AVFrameSideDataType type
int av_frame_make_writable(AVFrame *frame)
Ensure that the frame data is writable, avoiding data copy if possible.
#define flags(name, subs,...)
#define attribute_deprecated
attribute_deprecated int64_t pkt_pts
PTS copied from the AVPacket that was decoded to produce this frame.
int64_t pkt_dts
DTS copied from the AVPacket that triggered returning this frame.
A reference to a data buffer.
attribute_deprecated int av_frame_get_channels(const AVFrame *frame)
GLint GLenum GLboolean GLsizei stride
Utilties for rational number calculation.
Apply the maximum possible cropping, even if it requires setting the AVFrame.data[] entries to unalig...
attribute_deprecated void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val)
int top_field_first
If the content is interlaced, is top field displayed first.
AVBufferRef * opaque_ref
AVBufferRef for free use by the API user.
int key_frame
1 -> keyframe, 0-> not
attribute_deprecated void av_frame_set_sample_rate(AVFrame *frame, int val)
Encoding parameters for a video frame, as described by AVVideoEncParams.
AVChromaLocation
Location of chroma samples.
Recommmends skipping the specified number of samples.
ReplayGain information in the form of the AVReplayGain struct.
uint8_t ** extended_data
pointers to the data planes/channels.
attribute_deprecated int8_t * av_frame_get_qp_table(AVFrame *f, int *stride, int *type)
int pkt_size
size of the corresponding packet containing the compressed frame.
attribute_deprecated int av_frame_get_decode_error_flags(const AVFrame *frame)
Stereoscopic 3d metadata.
static double val(void *priv, double ch)
int nb_samples
number of audio samples (per channel) described by this frame
The data is the AVMatrixEncoding enum defined in libavutil/channel_layout.h.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.