26 #ifndef AVUTIL_FRAME_H
27 #define AVUTIL_FRAME_H
172 #define AV_NUM_DATA_POINTERS 8
244 #if FF_API_AVFRAME_LAVC
285 #if FF_API_AVFRAME_LAVC
353 #if FF_API_AVFRAME_LAVC
379 #if FF_API_AVFRAME_LAVC
401 #if FF_API_AVFRAME_LAVC
474 #define AV_FRAME_FLAG_CORRUPT (1 << 0)
555 #define FF_DECODE_ERROR_INVALID_BITSTREAM 1
556 #define FF_DECODE_ERROR_MISSING_REFERENCE 2
void av_frame_set_channels(AVFrame *frame, int val)
const char const char void * val
int av_frame_get_sample_rate(const AVFrame *frame)
#define AV_NUM_DATA_POINTERS
int64_t av_frame_get_pkt_duration(const AVFrame *frame)
int av_frame_get_pkt_size(const AVFrame *frame)
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 Code outside libavutil shou...
enum AVColorRange av_frame_get_color_range(const AVFrame *frame)
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
AVBuffer references backing the data for this frame.
void * opaque
for some private data of the user
int nb_extended_buf
Number of elements in extended_buf.
int repeat_pict
When decoding, this signals how much the picture must be delayed.
int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type)
void av_frame_set_pkt_duration(AVFrame *frame, int64_t val)
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
Move everything contained in src to dst and reset src.
void av_frame_set_pkt_size(AVFrame *frame, int val)
int8_t * av_frame_get_qp_table(AVFrame *f, int *stride, int *type)
attribute_deprecated int8_t * qscale_table
QP table.
AVColorTransferCharacteristic
Color Transfer Characteristic.
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
attribute_deprecated void * hwaccel_picture_private
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
AVColorSpace
YUV colorspace type.
attribute_deprecated int qstride
QP store stride.
attribute_deprecated void * thread_opaque
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).
uint8_t motion_subsample_log2
log2 of the size of the block which a single vector in motion_val represents: (4->16x16, 3->8x8, 2-> 4x4, 1-> 2x2)
The data is the AVPanScan struct defined in libavcodec.
Structure to hold side data for an AVFrame.
void av_frame_set_metadata(AVFrame *frame, AVDictionary *val)
AVDictionary * metadata
metadata.
int interlaced_frame
The content of the picture is interlaced.
void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val)
AVColorRange
MPEG vs JPEG YUV range.
int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame)
Accessors for some AVFrame fields.
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
void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val)
void av_frame_set_channel_layout(AVFrame *frame, int64_t val)
int width
width and height of the video frame
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val)
enum AVColorRange color_range
MPEG vs JPEG YUV range.
ATSC A53 Part 4 Closed Captions.
int av_frame_get_decode_error_flags(const AVFrame *frame)
enum AVColorSpace colorspace
YUV colorspace type.
Libavutil version macros.
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
uint64_t channel_layout
Channel layout of the audio data.
int channels
number of audio channels, only used for audio.
enum AVPictureType pict_type
Picture type of the frame.
int flags
Frame flags, a combination of AV_FRAME_FLAGS.
int display_picture_number
picture number in display order
attribute_deprecated int buffer_hints
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.
attribute_deprecated int reference
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.
void av_frame_set_pkt_pos(AVFrame *frame, int64_t val)
AVBufferRef * qp_table_buf
Not to be accessed directly from outside libavutil.
int quality
quality (between 1 (good) and FF_LAMBDA_MAX (bad))
attribute_deprecated uint8_t * base[AV_NUM_DATA_POINTERS]
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.
const AVS_VideoInfo int align
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
uint64_t error[AV_NUM_DATA_POINTERS]
error
int64_t pkt_duration
duration of the corresponding packet, expressed in AVStream->time_base units, 0 if unknown...
attribute_deprecated short * dct_coeff
DCT coefficients.
AVDictionary ** avpriv_frame_get_metadatap(AVFrame *frame)
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.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
int16_t(*[2] motion_val)[2]
motion vector table
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...
AVDictionary * av_frame_get_metadata(const AVFrame *frame)
int64_t reordered_opaque
reordered opaque 64bit (generally an integer or a double precision float PTS but can be anything)...
enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame)
int sample_rate
Sample rate of the audio data.
int av_frame_get_channels(const AVFrame *frame)
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, int size)
Add a new side data to a frame.
rational number numerator/denominator
int palette_has_changed
Tell user application that palette has changed from previous frame.
refcounted data buffer API
void av_frame_set_decode_error_flags(AVFrame *frame, int val)
enum AVChromaLocation chroma_location
int64_t best_effort_timestamp
frame timestamp estimated using various heuristics, in stream time base Code outside libavutil should...
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...
int64_t av_frame_get_channel_layout(const AVFrame *frame)
const char * av_frame_side_data_name(enum AVFrameSideDataType type)
int64_t pkt_pts
PTS copied from the AVPacket that was decoded to produce this frame.
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 attribute_deprecated
int64_t pkt_dts
DTS copied from the AVPacket that triggered returning this frame.
A reference to a data buffer.
GLint GLenum GLboolean GLsizei stride
attribute_deprecated uint32_t * mb_type
macroblock type table mb_type_base + mb_width + 2
attribute_deprecated struct AVCodecContext * owner
int top_field_first
If the content is interlaced, is top field displayed first.
int64_t av_frame_get_pkt_pos(const AVFrame *frame)
int key_frame
1 -> keyframe, 0-> not
void av_frame_set_sample_rate(AVFrame *frame, int val)
attribute_deprecated uint8_t * mbskip_table
mbskip_table[mb]>=1 if MB didn't change stride= mb_width = (width+15)>>4
enum AVColorPrimaries color_primaries
AVChromaLocation
Location of chroma samples.
enum AVColorTransferCharacteristic color_trc
Recommmends skipping the specified number of samples.
attribute_deprecated struct AVPanScan * pan_scan
Pan scan.
ReplayGain information in the form of the AVReplayGain struct.
uint8_t ** extended_data
pointers to the data planes/channels.
attribute_deprecated int type
int pkt_size
size of the corresponding packet containing the compressed frame.
Stereoscopic 3d metadata.
attribute_deprecated int8_t * ref_index[2]
motion reference frame index the order in which these are stored can depend on the codec...
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.