20 #ifndef AVUTIL_FRAME_H
21 #define AVUTIL_FRAME_H
25 #include "libavcodec/version.h"
44 #define AVCOL_SPC_YCGCO AVCOL_SPC_YCOCG
97 #define AV_NUM_DATA_POINTERS 8
169 #if FF_API_AVFRAME_LAVC
210 #if FF_API_AVFRAME_LAVC
279 #if FF_API_AVFRAME_LAVC
305 #if FF_API_AVFRAME_LAVC
327 #if FF_API_AVFRAME_LAVC
436 #define FF_DECODE_ERROR_INVALID_BITSTREAM 1
437 #define FF_DECODE_ERROR_MISSING_REFERENCE 2
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
const char const char void * val
This structure describes decoded (raw) audio or video data.
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
attribute_deprecated int qscale_type
the normal 2^n-1 "JPEG" YUV ranges
int64_t pkt_pos
reordered pos from the last AVPacket that has been input into the decoder Code outside libavcodec sho...
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)
uint8_t ** extended_data
pointers to the data planes/channels.
The data is the AVPanScan struct defined in libavcodec.
void av_frame_set_pkt_duration(AVFrame *frame, int64_t val)
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
void av_frame_set_channels(AVFrame *frame, int val)
AVBufferRef * av_frame_get_plane_buffer(AVFrame *frame, int plane)
Get the buffer reference a given data plane is stored in.
attribute_deprecated int qstride
QP store stride.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
int av_frame_ref(AVFrame *dst, AVFrame *src)
Setup a new reference to the data described by a given frame.
AVFrameSideData ** side_data
int interlaced_frame
The content of the picture is interlaced.
int64_t av_frame_get_pkt_duration(const AVFrame *frame)
int width
width and height of the video frame
void * opaque
for some private data of the user
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above ...
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
void av_frame_set_sample_rate(AVFrame *frame, int val)
enum AVColorSpace colorspace
YUV colorspace type.
int av_frame_get_channels(const AVFrame *frame)
enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame)
#define attribute_deprecated
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val)
void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val)
#define AV_NUM_DATA_POINTERS
uint64_t channel_layout
Channel layout of the audio data.
int av_frame_make_writable(AVFrame *frame)
Ensure that the frame data is writable, avoiding data copy if possible.
attribute_deprecated uint8_t * mbskip_table
mbskip_table[mb]>=1 if MB didn't change stride= mb_width = (width+15)>>4
int channels
number of audio channels, only used for audio.
enum AVPictureType pict_type
Picture type of the frame.
refcounted data buffer API
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
int display_picture_number
picture number in display order
attribute_deprecated int buffer_hints
void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val)
AVDictionary * av_frame_get_metadata(const AVFrame *frame)
attribute_deprecated int reference
attribute_deprecated void * hwaccel_picture_private
uint64_t error[AV_NUM_DATA_POINTERS]
error
attribute_deprecated int8_t * ref_index[2]
motion reference frame index the order in which these are stored can depend on the codec...
int quality
quality (between 1 (good) and FF_LAMBDA_MAX (bad))
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.
Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16.
attribute_deprecated struct AVPanScan * pan_scan
Pan scan.
attribute_deprecated short * dct_coeff
DCT coefficients.
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
AVBufferRef * qp_table_buf
Not to be accessed directly from outside libavutil.
int64_t pkt_duration
duration of the corresponding packet, expressed in AVStream->time_base units, 0 if unknown...
main external API structure.
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
Move everythnig contained in src to dst and reset src.
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
void av_frame_set_pkt_pos(AVFrame *frame, int64_t val)
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
AVBuffer references backing the data for this frame.
int64_t reordered_opaque
reordered opaque 64bit (generally an integer or a double precision float PTS but can be anything)...
int sample_rate
Sample rate of the audio data.
attribute_deprecated 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)
rational number numerator/denominator
attribute_deprecated uint8_t * base[AV_NUM_DATA_POINTERS]
void av_frame_set_decode_error_flags(AVFrame *frame, int val)
int palette_has_changed
Tell user application that palette has changed from previous frame.
int8_t * av_frame_get_qp_table(AVFrame *f, int *stride, int *type)
AVDictionary ** avpriv_frame_get_metadatap(AVFrame *frame)
attribute_deprecated int16_t(*[2] motion_val)[2]
motion vector table
const char * av_get_colorspace_name(enum AVColorSpace val)
Get the name of a colorspace.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
int64_t best_effort_timestamp
frame timestamp estimated using various heuristics, in stream time base Code outside libavcodec shoul...
int decode_error_flags
decode error flags of the frame, set to a combination of FF_DECODE_ERROR_xxx flags if the decoder pro...
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
int64_t pkt_pts
PTS copied from the AVPacket that was decoded to produce this frame.
enum AVFrameSideDataType type
enum AVColorRange av_frame_get_color_range(const AVFrame *frame)
int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame)
Accessors for some AVFrame fields.
AVFrame * av_frame_clone(AVFrame *src)
Create a new frame that references the same data as src.
int64_t pkt_dts
DTS copied from the AVPacket that triggered returning this frame.
A reference to a data buffer.
int av_frame_get_pkt_size(const AVFrame *frame)
AVDictionary * metadata
metadata.
int av_frame_get_sample_rate(const AVFrame *frame)
void av_frame_set_metadata(AVFrame *frame, AVDictionary *val)
void av_frame_set_channel_layout(AVFrame *frame, int64_t val)
attribute_deprecated int8_t * qscale_table
QP table.
int top_field_first
If the content is interlaced, is top field displayed first.
int av_frame_get_decode_error_flags(const AVFrame *frame)
int key_frame
1 -> keyframe, 0-> not
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
attribute_deprecated struct AVCodecContext * owner
the normal 219*2^(n-8) "MPEG" YUV ranges
attribute_deprecated void * thread_opaque
void av_frame_set_pkt_size(AVFrame *frame, int val)
int64_t av_frame_get_channel_layout(const AVFrame *frame)
attribute_deprecated uint32_t * mb_type
macroblock type table mb_type_base + mb_width + 2
attribute_deprecated int type
int pkt_size
size of the corresponding packet containing the compressed frame.
int nb_samples
number of audio samples (per channel) described by this frame
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int64_t av_frame_get_pkt_pos(const AVFrame *frame)
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, int size)
Add a new side data to a frame.