25 #ifndef AVUTIL_FRAME_H 26 #define AVUTIL_FRAME_H 35 #include "samplefmt.h" 163 enum AVActiveFormatDescription {
168 AV_AFD_4_3_SP_14_9 = 13,
169 AV_AFD_16_9_SP_14_9 = 14,
219 #define AV_NUM_DATA_POINTERS 8 232 uint8_t *data[AV_NUM_DATA_POINTERS];
249 int linesize[AV_NUM_DATA_POINTERS];
348 #if FF_API_ERROR_FRAME 353 uint64_t error[AV_NUM_DATA_POINTERS];
444 #define AV_FRAME_FLAG_CORRUPT (1 << 0) 448 #define AV_FRAME_FLAG_DISCARD (1 << 2) 515 #define FF_DECODE_ERROR_INVALID_BITSTREAM 1 516 #define FF_DECODE_ERROR_MISSING_REFERENCE 2 599 #if FF_API_FRAME_GET_SET 607 void av_frame_set_best_effort_timestamp(
AVFrame *frame, int64_t val);
609 int64_t av_frame_get_pkt_duration (
const AVFrame *frame);
611 void av_frame_set_pkt_duration (
AVFrame *frame, int64_t val);
613 int64_t av_frame_get_pkt_pos (
const AVFrame *frame);
615 void av_frame_set_pkt_pos (
AVFrame *frame, int64_t val);
617 int64_t av_frame_get_channel_layout (
const AVFrame *frame);
619 void av_frame_set_channel_layout (
AVFrame *frame, int64_t val);
621 int av_frame_get_channels (
const AVFrame *frame);
623 void av_frame_set_channels (
AVFrame *frame,
int val);
625 int av_frame_get_sample_rate (
const AVFrame *frame);
627 void av_frame_set_sample_rate (
AVFrame *frame,
int val);
633 int av_frame_get_decode_error_flags (
const AVFrame *frame);
635 void av_frame_set_decode_error_flags (
AVFrame *frame,
int val);
637 int av_frame_get_pkt_size(
const AVFrame *frame);
639 void av_frame_set_pkt_size(
AVFrame *frame,
int val);
642 int8_t *av_frame_get_qp_table(
AVFrame *f,
int *stride,
int *type);
This structure describes decoded (raw) audio or video data.
Definition: frame.h:218
This side data must be associated with an audio frame and corresponds to enum AVAudioServiceType defi...
Definition: frame.h:113
int64_t pkt_pos
reordered pos from the last AVPacket that has been input into the decoder
Definition: frame.h:490
void * opaque
for some private data of the user
Definition: frame.h:346
int nb_extended_buf
Number of elements in extended_buf.
Definition: frame.h:428
Content light level (based on CTA-861.3).
Definition: frame.h:136
int repeat_pict
When decoding, this signals how much the picture must be delayed.
Definition: frame.h:360
Convenience header that includes libavutil's core.
Mastering display metadata associated with a video frame.
Definition: frame.h:119
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
Move everything contained in src to dst and reset src.
Definition: frame.c:580
attribute_deprecated int8_t * qscale_table
QP table.
Definition: frame.h:539
AVColorTransferCharacteristic
Color Transfer Characteristic.
Definition: pixfmt.h:444
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
Definition: frame.c:732
Apply the maximum possible cropping, even if it requires setting the AVFrame.data[] entries to unalig...
Definition: frame.h:863
AVBufferRef * hw_frames_ctx
For hwaccel-format frames, this should be a reference to the AVHWFramesContext describing the frame...
Definition: frame.h:556
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
Definition: frame.c:189
AVColorSpace
YUV colorspace type.
Definition: pixfmt.h:473
attribute_deprecated int qstride
QP store stride.
Definition: frame.h:544
AVBufferRef * private_ref
AVBufferRef for internal use by a single libav* library.
Definition: frame.h:596
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
Definition: frame.c:441
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
Definition: frame.h:311
The data is the AVPanScan struct defined in libavcodec.
Definition: frame.h:52
Structure to hold side data for an AVFrame.
Definition: frame.h:180
AVDictionary * metadata
metadata.
Definition: frame.h:505
int interlaced_frame
The content of the picture is interlaced.
Definition: frame.h:365
AVColorRange
MPEG vs JPEG YUV range.
Definition: pixfmt.h:496
The data represents the AVSphericalMapping structure defined in libavutil/spherical.h.
Definition: frame.h:130
AVColorPrimaries
Chromaticity coordinates of the source primaries.
Definition: pixfmt.h:420
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
Definition: frame.h:89
Metadata relevant to a downmix procedure.
Definition: frame.h:72
Implementation-specific description of the format of AV_FRAME_QP_TABLE_DATA.
Definition: frame.h:152
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...
Definition: frame.c:873
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:202
struct AVFrameSideData AVFrameSideData
Structure to hold side data for an AVFrame.
ATSC A53 Part 4 Closed Captions.
Definition: frame.h:58
struct AVFrame AVFrame
This structure describes decoded (raw) audio or video data.
Libavutil version macros.
The GOP timecode in 25 bit timecode format.
Definition: frame.h:124
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
Definition: frame.c:790
uint64_t channel_layout
Channel layout of the audio data.
Definition: frame.h:396
int channels
number of audio channels, only used for audio.
Definition: frame.h:523
int flags
Frame flags, a combination of AV_FRAME_FLAGS.
Definition: frame.h:456
int display_picture_number
picture number in display order
Definition: frame.h:336
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.
Definition: frame.h:424
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.
Definition: frame.c:688
Motion vectors exported by some codecs (on demand through the export_mvs flag set in the libavcodec A...
Definition: frame.h:96
AVBufferRef * av_frame_get_plane_buffer(AVFrame *frame, int plane)
Get the buffer reference a given data plane is stored in.
Definition: frame.c:657
AVFrameSideDataType
Definition: frame.h:48
int quality
quality (between 1 (good) and FF_LAMBDA_MAX (bad))
Definition: frame.h:341
The data contains an ICC profile as an opaque octet buffer following the format described by ISO 1507...
Definition: frame.h:143
const char * av_get_colorspace_name(enum AVColorSpace val)
Get the name of a colorspace.
Definition: frame.c:122
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
Definition: frame.c:538
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
Definition: frame.h:291
int coded_picture_number
picture number in bitstream order
Definition: frame.h:332
int64_t pkt_duration
duration of the corresponding packet, expressed in AVStream->time_base units, 0 if unknown...
Definition: frame.h:498
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
Definition: frame.h:84
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
Definition: frame.c:592
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
Definition: frame.h:306
void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type)
If side data of the supplied type exists in the frame, free it and remove it from the frame...
Definition: frame.c:803
int64_t reordered_opaque
reordered opaque 64 bits (generally an integer or a double precision float PTS but can be anything)...
Definition: frame.h:386
int sample_rate
Sample rate of the audio data.
Definition: frame.h:391
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, int size)
Add a new side data to a frame.
Definition: frame.c:720
Rational number (pair of numerator and denominator).
Definition: rational.h:58
int palette_has_changed
Tell user application that palette has changed from previous frame.
Definition: frame.h:375
refcounted data buffer API
AVPictureType
Definition: avutil.h:272
int64_t best_effort_timestamp
frame timestamp estimated using various heuristics, in stream time base
Definition: frame.h:483
int decode_error_flags
decode error flags of the frame, set to a combination of FF_DECODE_ERROR_xxx flags if the decoder pro...
Definition: frame.h:514
const char * av_frame_side_data_name(enum AVFrameSideDataType type)
Definition: frame.c:817
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
Definition: frame.c:322
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
Definition: frame.c:551
int av_frame_make_writable(AVFrame *frame)
Ensure that the frame data is writable, avoiding data copy if possible.
Definition: frame.c:609
attribute_deprecated int64_t pkt_pts
PTS copied from the AVPacket that was decoded to produce this frame.
Definition: frame.h:319
int64_t pkt_dts
DTS copied from the AVPacket that triggered returning this frame.
Definition: frame.h:327
A reference to a data buffer.
Definition: buffer.h:81
Utilties for rational number calculation.
int top_field_first
If the content is interlaced, is top field displayed first.
Definition: frame.h:370
AVBufferRef * opaque_ref
AVBufferRef for free use by the API user.
Definition: frame.h:567
int key_frame
1 -> keyframe, 0-> not
Definition: frame.h:296
AVChromaLocation
Location of chroma samples.
Definition: pixfmt.h:518
Recommmends skipping the specified number of samples.
Definition: frame.h:108
ReplayGain information in the form of the AVReplayGain struct.
Definition: frame.h:76
uint8_t ** extended_data
pointers to the data planes/channels.
Definition: frame.h:265
int pkt_size
size of the corresponding packet containing the compressed frame.
Definition: frame.h:532
Stereoscopic 3d metadata.
Definition: frame.h:63
int nb_samples
number of audio samples (per channel) described by this frame
Definition: frame.h:284
The data is the AVMatrixEncoding enum defined in libavutil/channel_layout.h.
Definition: frame.h:67
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition: frame.c:652
Raw QP table data.
Definition: frame.h:159