FFmpeg
Data Fields
AVFrame Struct Reference

This structure describes decoded (raw) audio or video data. More...

#include <frame.h>

Data Fields

uint8_t * data [AV_NUM_DATA_POINTERS]
 pointer to the picture/channel planes. More...
 
int linesize [AV_NUM_DATA_POINTERS]
 For video, a positive or negative value, which is typically indicating the size in bytes of each picture line, but it can also be: More...
 
uint8_t ** extended_data
 pointers to the data planes/channels. More...
 
int nb_samples
 number of audio samples (per channel) described by this frame More...
 
int format
 format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames, enum AVSampleFormat for audio) More...
 
int key_frame
 1 -> keyframe, 0-> not More...
 
enum AVPictureType pict_type
 Picture type of the frame. More...
 
AVRational sample_aspect_ratio
 Sample aspect ratio for the video frame, 0/1 if unknown/unspecified. More...
 
int64_t pts
 Presentation timestamp in time_base units (time when frame should be shown to user). More...
 
int64_t pkt_dts
 DTS copied from the AVPacket that triggered returning this frame. More...
 
AVRational time_base
 Time base for the timestamps in this frame. More...
 
int coded_picture_number
 picture number in bitstream order More...
 
int display_picture_number
 picture number in display order More...
 
int quality
 quality (between 1 (good) and FF_LAMBDA_MAX (bad)) More...
 
void * opaque
 for some private data of the user More...
 
int repeat_pict
 When decoding, this signals how much the picture must be delayed. More...
 
int interlaced_frame
 The content of the picture is interlaced. More...
 
int top_field_first
 If the content is interlaced, is top field displayed first. More...
 
int palette_has_changed
 Tell user application that palette has changed from previous frame. More...
 
int64_t reordered_opaque
 reordered opaque 64 bits (generally an integer or a double precision float PTS but can be anything). More...
 
int sample_rate
 Sample rate of the audio data. More...
 
attribute_deprecated uint64_t channel_layout
 Channel layout of the audio data. More...
 
AVBufferRefbuf [AV_NUM_DATA_POINTERS]
 AVBuffer references backing the data for this frame. More...
 
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. More...
 
int nb_extended_buf
 Number of elements in extended_buf. More...
 
AVFrameSideData ** side_data
 
int nb_side_data
 
int flags
 Frame flags, a combination of AV_FRAME_FLAGS. More...
 
enum AVColorRange color_range
 MPEG vs JPEG YUV range. More...
 
enum AVColorPrimaries color_primaries
 
enum AVColorTransferCharacteristic color_trc
 
enum AVColorSpace colorspace
 YUV colorspace type. More...
 
enum AVChromaLocation chroma_location
 
int64_t best_effort_timestamp
 frame timestamp estimated using various heuristics, in stream time base More...
 
int64_t pkt_pos
 reordered pos from the last AVPacket that has been input into the decoder More...
 
int64_t pkt_duration
 duration of the corresponding packet, expressed in AVStream->time_base units, 0 if unknown. More...
 
AVDictionarymetadata
 metadata. More...
 
int decode_error_flags
 decode error flags of the frame, set to a combination of FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there were errors during the decoding. More...
 
attribute_deprecated int channels
 number of audio channels, only used for audio. More...
 
int pkt_size
 size of the corresponding packet containing the compressed frame. More...
 
AVBufferRefhw_frames_ctx
 For hwaccel-format frames, this should be a reference to the AVHWFramesContext describing the frame. More...
 
AVBufferRefopaque_ref
 AVBufferRef for free use by the API user. More...
 
AVBufferRefprivate_ref
 AVBufferRef for internal use by a single libav* library. More...
 
AVChannelLayout ch_layout
 Channel layout of the audio data. More...
 
Video dimensions

Video frames only.

The coded dimensions (in pixels) of the video frame, i.e. the size of the rectangle that contains some well-defined values.

Note
The part of the frame intended for display/presentation is further restricted by the Cropping rectangle.
int width
 
int height
 
Cropping

Video frames only. The number of pixels to discard from the the top/bottom/left/right border of the frame to obtain the sub-rectangle of the frame intended for presentation.

size_t crop_top
 
size_t crop_bottom
 
size_t crop_left
 
size_t crop_right
 

Detailed Description

This structure describes decoded (raw) audio or video data.

AVFrame must be allocated using av_frame_alloc(). Note that this only allocates the AVFrame itself, the buffers for the data must be managed through other means (see below). AVFrame must be freed with av_frame_free().

AVFrame is typically allocated once and then reused multiple times to hold different data (e.g. a single AVFrame to hold frames received from a decoder). In such a case, av_frame_unref() will free any references held by the frame and reset it to its original clean state before it is reused again.

The data described by an AVFrame is usually reference counted through the AVBuffer API. The underlying buffer references are stored in AVFrame.buf / AVFrame.extended_buf. An AVFrame is considered to be reference counted if at least one reference is set, i.e. if AVFrame.buf[0] != NULL. In such a case, every single data plane must be contained in one of the buffers in AVFrame.buf or AVFrame.extended_buf. There may be a single buffer for all the data, or one separate buffer for each plane, or anything in between.

sizeof(AVFrame) is not a part of the public ABI, so new fields may be added to the end with a minor bump.

Fields can be accessed through AVOptions, the name string used, matches the C structure field name for fields accessible through AVOptions. The AVClass for AVFrame can be obtained from avcodec_get_frame_class()

Examples
decode_audio.c, decode_video.c, demuxing_decoding.c, encode_audio.c, encode_video.c, filter_audio.c, filtering_audio.c, filtering_video.c, hw_decode.c, muxing.c, qsvdec.c, transcode_aac.c, transcoding.c, vaapi_encode.c, and vaapi_transcode.c.

Definition at line 325 of file frame.h.

Field Documentation

◆ data

uint8_t* AVFrame::data[AV_NUM_DATA_POINTERS]

pointer to the picture/channel planes.

This might be different from the first allocated byte. For video, it could even point to the end of the image data.

All pointers in data and extended_data must point into one of the AVBufferRef in buf or extended_buf.

Some decoders access areas outside 0,0 - width,height, please see avcodec_align_dimensions2(). Some filters and swscale can read up to 16 bytes beyond the planes, if these filters are to be used, then 16 extra bytes must be allocated.

NOTE: Pointers not needed by the format MUST be set to NULL.

Attention
In case of video, the data[] pointers can point to the end of image data in order to reverse line order, when used in combination with negative values in the linesize[] array.
Examples
hw_decode.c, muxing.c, qsvdec.c, and vaapi_encode.c.

Definition at line 346 of file frame.h.

Referenced by aac_decode_er_frame(), aac_decode_frame_int(), activate(), alloc_frame_buffer(), alloc_out_frame(), alloc_picture(), aom_decode(), apng_encode_frame(), apply_motion_generic(), audio_decode_frame(), av_frame_move_ref(), av_frame_ref(), averageiir2d(), avgblur_opencl_filter_frame(), avs_decode_frame(), avui_decode_frame(), avui_encode_frame(), bethsoftvid_decode_frame(), bilateralo_planes(), black_counter(), blend_slice_packed_rgb(), blockdetect_filter_frame(), blur(), blur_frame(), blur_planes(), blurdetect_filter_frame(), bmp_decode_frame(), bmp_encode_frame(), calc_avgy16(), calc_avgy8(), calc_diffs(), calculate_sums(), call_cuda_kernel(), call_resize_kernel(), cas_slice16(), cas_slice8(), cdg_border_preset(), cdg_decode_flush(), cdg_decode_frame(), cdg_load_palette(), cdg_scroll(), cdg_tile_block(), cfhd_decode(), channelmap_filter_frame(), chroma_mc_bi(), cinvideo_decode_frame(), color_balance16(), color_balance16_p(), color_balance8(), color_balance8_p(), colormap_slice(), comp_block(), compare(), compare_fields(), compute_crc_of_packets(), compute_sat_hue_metrics16(), compute_sat_hue_metrics8(), config_output(), config_video_output(), control_port_cb(), convert_frame(), convolve(), copy_block(), copy_chroma(), copy_double(), copy_fields(), copy_float(), copy_from(), copy_plane(), copy_uv_planes(), copyadd_block(), cover_rect(), cri_decode_frame(), cuda_transfer_data(), cudachromakey_process_internal(), cuvid_output_frame(), d3d11va_transfer_data(), deband_16_c(), deband_16_coupling_c(), deband_8_c(), deband_8_coupling_c(), debug_mean_error(), decimate_frame(), decode_argb(), decode_argb_frame(), decode_argbi(), decode_argx(), decode_argxi(), decode_aybr(), decode_aybri(), decode_block(), decode_blocks(), decode_byry(), decode_byryi(), decode_c82i(), decode_c82p(), decode_ca2i(), decode_ca2p(), decode_ca4i(), decode_ca4p(), decode_frame(), decode_frame_common(), decode_idat_chunk(), decode_inter(), decode_inter_plane(), decode_mb_row_no_filter(), decode_packet(), decode_rgb(), decode_rgb24_frame(), decode_rgbi(), decode_rgbx(), decode_rgbxi(), decode_rle(), decode_rle16(), decode_rle_bpp2(), decode_rle_bpp4(), decode_slice(), decode_slice_thread(), decode_write(), decode_ybr(), decode_ybr10(), decode_ybr10i(), decode_ybri(), decode_ybyr(), decode_yry10(), decode_yry10i(), decode_yuv_frame(), deint_vaapi_filter_frame(), deinterlace_plane_slice(), deinterlace_slice(), deshake_transform_c(), detect_scene_change(), diagonal_transformation(), disp_palette(), displace_packed(), displace_planar(), do_alphamerge(), do_denoise(), do_morpho(), do_vflip(), downscale(), draw_axis_rgb(), draw_axis_yuv(), draw_blank_frame(), draw_horiz_band(), draw_sono(), draw_spatial(), drawline(), drawtext(), dxtory_decode_v1_410(), dxtory_decode_v1_420(), dxtory_decode_v1_444(), dxtory_decode_v1_rgb(), dxva2_map_frame(), dxva2_transfer_data_from(), dxva2_unmap_frame(), encode_apng(), encode_bitstream(), encode_frame(), encode_gbrp10(), encode_gbrp12(), encode_headers(), encode_picture_ls(), encode_rgb48_10bit(), encode_slice(), epx2_slice(), epx3_slice(), escape130_decode_frame(), estimate_best_b_count(), eval_motion_dist(), extend_edges(), ff_alloc_picture(), ff_apply_vector_2x2(), ff_apply_vector_4x4(), ff_h263_decode_frame(), ff_h274_apply_film_grain(), ff_mpeg4_encode_mb(), ff_sws_slice_worker(), ff_vaapi_get_surface_id(), ff_vaapi_vpp_init_params(), ff_vc1_interp_mc(), ff_vc1_mc_1mv(), ff_vc1_mc_4mv_chroma(), ff_vc1_mc_4mv_luma(), ff_vdpau_get_surface_id(), ffmal_copy_frame(), ffmmal_add_packet(), ffmmal_fill_input_port(), fill_picture(), fill_picture_monoblack(), fill_picture_rgb(), fill_yuv_image(), filter(), filter16_brng(), filter16_tout(), filter16_vrep(), filter8_brng(), filter8_tout(), filter8_vrep(), filter_frame(), filter_frame16(), filter_frame8(), filter_mb_row(), filter_slice(), filter_slice_grey_edge(), filter_slice_packed(), filter_slice_planar(), filter_slice_rgba_packed(), filter_slice_rgba_planar(), find_min_max(), find_min_max_16(), find_min_max_planar(), find_min_max_planar_16(), fits_encode_frame(), fixstride(), flashsv2_encode_frame(), flashsv_encode_frame(), flip_bayer(), frame_copy_video(), g2m_decode_frame(), gather_data_for_cel(), gather_data_for_subcel(), gem_decode_frame(), get_input(), get_scene_score(), get_zeropadded_input(), decklink_frame::GetBytes(), getpix(), getpix_integrate(), gif_encode_frame(), gif_fill(), gif_fill_rect(), handle_p_frame_apng(), handle_p_frame_png(), handle_small_bpp(), headphone_convolute(), headphone_fast_convolute(), hls_prediction_unit(), hqx_filter(), image_copy_16_to_8(), import_map(), init(), inject_frame(), inter_pred(), interleave_cols_to_any(), interp_lowres(), interpolate(), ir2_decode_frame(), is_frozen(), jpeg2000_decode_frame(), lag_decode_frame(), libopenjpeg_copy_to_packed16(), libopenjpeg_copy_to_packed8(), libopenjpeg_copyto16(), libopenjpeg_copyto8(), libuavs3d_decode_frame(), libx265_encode_frame(), load_input_picture(), load_palette(), lowpass16(), luma_abs_diff(), luma_mc_bi(), magy_decode_frame(), magy_decode_slice(), magy_decode_slice10(), main(), match_video_size(), mc_dir_part(), mjpeg_decode_scan(), msp2_decode_frame(), msrle_decode_8_16_24_32(), msrle_decode_pal4(), mxpeg_check_dimensions(), mxpeg_decode_frame(), nppscale_deinterleave(), nppscale_interleave(), nppscale_resize(), nppsharpen_sharpen(), npptranspose_rotate(), npptranspose_transpose(), omx_encode_frame(), opencl_map_frame(), opencl_transfer_data_from(), opencl_transfer_data_to(), opencl_unmap_frame(), output_single_frame(), output_video_frame(), overlay_ass_image(), overlay_cuda_blend(), overlay_opencl_blend(), overlay_vaapi_blend(), pack_yuv(), pam_encode_frame(), pcx_decode_frame(), photocd_decode_frame(), pick_color16(), pick_color8(), pixelize_slice(), plot_spectrum_column(), pnm_decode_frame(), pnm_encode_frame(), pp_filter_frame(), prepare_impulse(), print_long_term(), print_short_term(), process(), process_16(), process_frame(), process_frames(), process_planar(), process_planar_16(), process_slice(), process_slice_uyvy422(), process_slice_yuv420p(), process_slice_yuv422p(), process_slice_yuv444p(), ptx_decode_frame(), put_blocks(), put_lines_bits(), put_lines_bytes(), qoi_decode_frame(), qoi_encode_frame(), qsv_fill_border(), qsv_frame_lock(), qsv_map_from(), qsv_map_to(), qsv_transfer_data_child(), qsv_transfer_data_to(), qsvscale_filter_frame(), qtrle_encode_line(), query_frame(), queue_frame(), rdft_horizontal16(), rdft_horizontal8(), remap_opencl_process_frame(), request_frame(), rpza_encode_stream(), run_test(), sbc_encode_frame(), scalecuda_resize(), scroll_slice(), seqvideo_decode(), set_frame_data(), set_processing_window(), skip_check(), slice_get_derivative(), submit_frame(), sunrast_decode_frame(), super2xsai(), svc_decode_frame(), svq1_decode_frame(), svq1_encode_frame(), svq3_mc_dir_part(), targa_encode_frame(), targa_encode_normal(), targa_encode_rle(), thumbnail(), tm2_decode_blocks(), to_meta_with_crop(), tonemap(), tonemap_vaapi_filter_frame(), truemotion2rt_decode_frame(), try_push_frame(), txd_decode_frame(), uavs3d_output_callback(), uninit(), unpack_gray(), unpack_yuv(), update_histogram_diff(), update_sono_rgb(), update_sono_yuv(), utvideo_encode_frame(), v308_decode_frame(), v308_encode_frame(), v408_decode_frame(), v408_encode_frame(), v410_decode_slice(), v410_encode_frame(), vaapi_encode_issue(), vaapi_map_frame(), vaapi_unmap_frame(), vble_restore_plane(), vc1_decode_skip_blocks(), vcr1_decode_frame(), vdpau_transfer_data_from(), vdpau_transfer_data_to(), vectorscope16(), vectorscope8(), video_decode(), video_decode_example(), video_get_buffer(), vp56_render_mb(), vp7_fade_frame(), vp8_lossy_decode_alpha(), vpx_decode(), vt_map_frame(), vt_transfer_data_to(), vt_unmap(), vulkan_map_frame_to_mem(), vulkan_transfer_data(), weave_slice(), xbm_decode_frame(), xbm_encode_frame(), xpm_decode_frame(), xvid_encode_frame(), xvid_encode_init(), xwd_decode_frame(), xwd_encode_frame(), y216_decode_frame(), y41p_decode_frame(), y41p_encode_frame(), yuv4_decode_frame(), yuv4_encode_frame(), zero12v_decode_frame(), and zerocodec_decode_frame().

◆ linesize

int AVFrame::linesize[AV_NUM_DATA_POINTERS]

For video, a positive or negative value, which is typically indicating the size in bytes of each picture line, but it can also be:

  • the negative byte size of lines for vertical flipping (with data[n] pointing to the end of the data
  • a positive or negative multiple of the byte size as for accessing even and odd fields of a frame (possibly flipped)

For audio, only linesize[0] may be set. For planar audio, each channel plane must be the same size.

For video the linesizes should be multiples of the CPUs alignment preference, this is 16 or 32 for modern desktop CPUs. Some code requires such alignment other code can be slower without correct alignment, for yet other it makes no difference.

Note
The linesize may be larger than the size of usable data – there may be extra padding present for performance reasons.
Attention
In case of video, line size values can be negative to achieve a vertically inverted iteration over image lines.
Examples
hw_decode.c, muxing.c, and qsvdec.c.

Definition at line 370 of file frame.h.

Referenced by activate(), alloc_frame_buffer(), alloc_picture(), aom_decode(), apng_encode_frame(), apply_motion_generic(), av_frame_ref(), averageiir2d(), avs_decode_frame(), avui_decode_frame(), avui_encode_frame(), bethsoftvid_decode_frame(), bilateralo_planes(), black_counter(), blend_slice_packed_rgb(), blockdetect_filter_frame(), blur(), blur_frame(), blur_planes(), blurdetect_filter_frame(), bmp_decode_frame(), bmp_encode_frame(), calc_avgy16(), calc_avgy8(), calc_diffs(), calculate_sums(), cas_slice16(), cas_slice8(), cdg_border_preset(), cdg_decode_flush(), cdg_decode_frame(), cdg_scroll(), cdg_tile_block(), cfhd_decode(), chroma_mc_bi(), cinvideo_decode_frame(), color_balance16(), color_balance16_p(), color_balance8(), color_balance8_p(), colormap_slice(), comp_block(), compare(), compare_fields(), compute_crc_of_packets(), compute_sat_hue_metrics16(), compute_sat_hue_metrics8(), config_output(), config_video_output(), convert_frame(), copy_block(), copy_chroma(), copy_fields(), copy_from(), copy_plane(), copy_uv_planes(), copyadd_block(), cover_rect(), cri_decode_frame(), cuda_transfer_data(), cudachromakey_process_internal(), cuvid_output_frame(), d3d11va_transfer_data(), deband_16_c(), deband_16_coupling_c(), deband_8_c(), deband_8_coupling_c(), debug_mean_error(), decimate_frame(), decode_argb(), decode_argb_frame(), decode_argbi(), decode_argx(), decode_argxi(), decode_aybr(), decode_aybri(), decode_block(), decode_blocks(), decode_byry(), decode_byryi(), decode_c82i(), decode_c82p(), decode_ca2i(), decode_ca2p(), decode_ca4i(), decode_ca4p(), decode_frame(), decode_frame_common(), decode_idat_chunk(), decode_inter(), decode_inter_plane(), decode_packet(), decode_rgb(), decode_rgb24_frame(), decode_rgbi(), decode_rgbx(), decode_rgbxi(), decode_rle(), decode_rle16(), decode_rle_bpp2(), decode_rle_bpp4(), decode_slice(), decode_slice_thread(), decode_write(), decode_ybr(), decode_ybr10(), decode_ybr10i(), decode_ybri(), decode_ybyr(), decode_yry10(), decode_yry10i(), decode_yuv_frame(), deinterlace_plane_slice(), deinterlace_slice(), deshake_transform_c(), detect_scene_change(), dirac_decode_data_unit(), displace_packed(), displace_planar(), do_alphamerge(), do_denoise(), do_morpho(), do_vflip(), downscale(), draw_axis_rgb(), draw_axis_yuv(), draw_blank_frame(), draw_horiz_band(), draw_sono(), draw_spatial(), drawline(), drawtext(), dxtory_decode_v1_410(), dxtory_decode_v1_420(), dxtory_decode_v1_444(), dxtory_decode_v1_rgb(), dxva2_map_frame(), dxva2_transfer_data_from(), encode_bitstream(), encode_frame(), encode_gbrp10(), encode_gbrp12(), encode_picture_ls(), encode_rgb48_10bit(), encode_slice(), epx2_slice(), epx3_slice(), escape130_decode_frame(), estimate_best_b_count(), eval_motion_dist(), extend_edges(), ff_alloc_picture(), ff_apply_vector_2x2(), ff_apply_vector_4x4(), ff_h263_decode_frame(), ff_h274_apply_film_grain(), ff_init_block_index(), ff_sws_slice_worker(), ff_vp56_decode_mbs(), fill_picture(), fill_picture_monoblack(), fill_picture_rgb(), fill_yuv_image(), filter(), filter16_brng(), filter16_tout(), filter16_vrep(), filter8_brng(), filter8_tout(), filter8_vrep(), filter_frame(), filter_frame16(), filter_frame8(), filter_slice(), filter_slice_grey_edge(), filter_slice_packed(), filter_slice_planar(), filter_slice_rgba_packed(), filter_slice_rgba_planar(), find_min_max(), find_min_max_16(), find_min_max_planar(), find_min_max_planar_16(), fits_encode_frame(), fixstride(), flashsv2_encode_frame(), flashsv_encode_frame(), flip_bayer(), frame_copy_video(), g2m_decode_frame(), gather_data_for_cel(), gather_data_for_subcel(), gem_decode_frame(), get_buffer(), get_input(), get_scene_score(), get_zeropadded_input(), decklink_frame::GetBytes(), decklink_frame::GetFlags(), getpix(), decklink_frame::GetRowBytes(), gif_encode_frame(), gif_fill(), gif_fill_rect(), gray16(), gray8(), h264_frame_start(), handle_p_frame_apng(), handle_p_frame_png(), handle_small_bpp(), hls_prediction_unit(), hqx_filter(), image_copy_16_to_8(), import_map(), init(), inject_frame(), inter_pred(), interleave_cols_to_any(), interp_lowres(), interpolate(), ir2_decode_frame(), is_frozen(), lag_decode_frame(), libopenjpeg_copy_to_packed16(), libopenjpeg_copy_to_packed8(), libopenjpeg_copyto16(), libopenjpeg_copyto8(), libx265_encode_frame(), load_input_picture(), load_palette(), lowpass16(), luma_abs_diff(), luma_mc_bi(), magy_decode_frame(), magy_decode_slice(), magy_decode_slice10(), mpeg_motion_lowres(), mpv_reconstruct_mb_internal(), msp2_decode_frame(), msrle_decode_8_16_24_32(), msrle_decode_pal4(), mxpeg_check_dimensions(), nppscale_deinterleave(), nppscale_interleave(), nppscale_resize(), nppsharpen_sharpen(), npptranspose_rotate(), npptranspose_transpose(), opencl_transfer_data_from(), output_single_frame(), output_video_frame(), overlay_ass_image(), overlay_cuda_blend(), pack_yuv(), pam_encode_frame(), pcx_decode_frame(), photocd_decode_frame(), pick_color16(), pick_color8(), pixelize_slice(), plot_spectrum_column(), pnm_decode_frame(), pnm_encode_frame(), pp_filter_frame(), prepare_impulse(), process(), process_16(), process_frame(), process_planar(), process_planar_16(), process_slice(), process_slice_uyvy422(), process_slice_yuv420p(), process_slice_yuv422p(), process_slice_yuv444p(), ptx_decode_frame(), put_blocks(), put_lines_bits(), put_lines_bytes(), qoi_decode_frame(), qoi_encode_frame(), qsv_fill_border(), qsv_frame_lock(), qsv_transfer_data_from(), qtrle_encode_line(), rdft_horizontal16(), rdft_horizontal8(), request_frame(), rpza_encode_stream(), run_test(), scale_field(), scalecuda_resize(), scroll_slice(), seq_decode_op1(), seq_decode_op2(), seq_decode_op3(), seqvideo_decode(), set_frame(), set_frame_data(), set_processing_window(), skip_check(), slice_get_derivative(), submit_frame(), sunrast_decode_frame(), super2xsai(), svc_decode_frame(), svq1_decode_frame(), svq1_encode_frame(), targa_encode_normal(), targa_encode_rle(), thumbnail(), tm2_decode_blocks(), to_meta_with_crop(), tonemap(), truemotion2rt_decode_frame(), try_push_frame(), txd_decode_frame(), uavs3d_output_callback(), unpack_gray(), unpack_yuv(), update_histogram_diff(), update_sono_rgb(), update_sono_yuv(), utvideo_encode_frame(), v308_decode_frame(), v308_encode_frame(), v408_decode_frame(), v408_encode_frame(), v410_decode_slice(), v410_encode_frame(), vaapi_map_frame(), vble_restore_plane(), vcr1_decode_frame(), vdpau_transfer_data_from(), vectorscope16(), vectorscope8(), video_decode(), video_decode_example(), video_get_buffer(), video_image_display(), vp7_fade_frame(), vp8_lossy_decode_alpha(), vpx_decode(), vt_map_frame(), vulkan_map_frame_to_mem(), weave_slice(), xbm_decode_frame(), xbm_encode_frame(), xpm_decode_frame(), xvid_encode_frame(), xwd_decode_frame(), xwd_encode_frame(), y216_decode_frame(), y41p_decode_frame(), y41p_encode_frame(), yuv4_decode_frame(), yuv4_encode_frame(), zero12v_decode_frame(), and zerocodec_decode_frame().

◆ extended_data

uint8_t** AVFrame::extended_data

pointers to the data planes/channels.

For video, this should simply point to data[].

For planar audio, each channel has a separate data pointer, and linesize[0] contains the size of each channel buffer. For packed audio, there is just one data pointer, and linesize[0] contains the total size of the buffer for all channels.

Note: Both data and extended_data should always be set in a valid frame, but for planar audio with more channels that can fit in data, extended_data must be used in order to access all channels.

Examples
transcode_aac.c.

Definition at line 386 of file frame.h.

Referenced by activate(), amplify_frame(), audio_decode_frame(), av_frame_move_ref(), av_frame_ref(), celt_frame_setup_input(), channelmap_filter_frame(), compand_delay(), compand_drain(), compand_nodelay(), config_filter(), connect_ports(), convert_channels(), copy_doublep(), copy_floatp(), fft_channel(), filter_channel(), filter_channel_dbl(), filter_channels(), filter_frame(), fir_quantum(), flush(), flush_frame(), frame_configure_elements(), frame_copy_audio(), mcompand_channel(), move_audio(), on2avc_reconstruct_channel(), on2avc_reconstruct_channel_ext(), output_audio_frame(), output_frame(), plot_freqs(), psy_channel(), read_decode_convert_and_store(), request_frame(), reverse_samples(), rnnoise_channels(), run_channel_fft(), sample_noise_block(), sdr(), send_silence(), sofalizer_convolute(), sofalizer_fast_convolute(), spatial_activate(), step_collect_psy_metrics(), take_samples(), try_push_frame(), vb_stereo(), video_get_buffer(), and wavpack_decode_block().

◆ width

int AVFrame::width
Examples
hw_decode.c, muxing.c, qsvdec.c, and vaapi_encode.c.

Definition at line 397 of file frame.h.

Referenced by alloc_frame_buffer(), alloc_picture(), aom_decode(), apng_encode_frame(), apply_color_indexing_transform(), apply_palette(), av_frame_copy(), av_frame_move_ref(), av_frame_ref(), bidirectional_obmc(), bilateral_obmc(), black_counter(), blend_frame(), blend_slice_packed_rgb(), blur(), calc_diffs(), cfhd_decode(), compare(), config_input(), copy_from(), copy_uv_planes(), cover_rect(), cudachromakey_process_internal(), cudaupload_filter_frame(), cuvid_output_frame(), d3d11va_transfer_data(), debug_mean_error(), decklink_write_video_packet(), decode_frame_common(), decode_packet(), decode_video(), decode_write(), deint_vaapi_filter_frame(), do_alphamerge(), do_blend(), do_denoise(), downscale(), draw_axis_rgb(), draw_axis_yuv(), drawtext(), drm_transfer_data_from(), encode_apng(), encode_frame(), epx2_slice(), epx3_slice(), execute_model_native(), extend_edges(), ff_dnn_fill_gettingoutput_task(), ff_h274_apply_film_grain(), ff_libwebp_get_frame(), ff_mjpeg_decode_sos(), ff_vaapi_vpp_init_params(), fill_model_input_tf(), fill_picture_parameters(), filter(), filter16_brng(), filter16_tout(), filter16_vrep(), filter8_brng(), filter8_tout(), filter8_vrep(), filter_frame(), filter_frame_ref(), filter_slice_packed(), filter_slice_planar(), find_min_max(), find_min_max_16(), find_min_max_planar(), find_min_max_planar_16(), fixstride(), format_init(), frame_copy_props(), frame_copy_video(), get_output_native(), get_output_ov(), get_output_tf(), get_scene_score(), getpix(), getpix_integrate(), graphs_build(), h264_field_start(), handle_p_frame_apng(), hqx_filter(), import_map(), infer_completion_callback(), init(), init_filter(), init_stage(), inter_pred(), interpolate(), libopenjpeg_copy_to_packed16(), libopenjpeg_copy_to_packed8(), load_palette(), lowpass16(), luma_abs_diff(), main(), mc_chroma_scaled(), mc_luma_scaled(), misc_vaapi_filter_frame(), nppscale_filter_frame_ref(), nppscale_scale(), nppsharpen_sharpen(), nvdec_av1_start_frame(), nvdec_mjpeg_start_frame(), nvdec_mpeg12_start_frame(), nvdec_mpeg4_start_frame(), nvdec_vc1_start_frame(), nvdec_vp8_start_frame(), nvdec_vp9_start_frame(), opencl_map_frame(), output_single_frame(), output_video_frame(), overlay_ass_image(), overlay_cuda_blend(), overlay_vaapi_blend(), overlay_vulkan_blend(), pixscope_filter_frame(), pp_filter_frame(), procamp_vaapi_filter_frame(), process(), process_16(), process_frame(), process_planar(), process_planar_16(), qsv_fill_border(), qsv_frame_lock(), qsv_map_from(), qsv_map_to(), qsv_transfer_data_from(), query_frame(), queue_frame(), queue_picture(), rpza_encode_frame(), scale_frame(), scale_vaapi_filter_frame(), scalecuda_resize(), scroll(), sender_thread(), set_frame_data(), set_processing_window(), sub2video_get_blank_frame(), submit_frame(), super2xsai(), sws_frame_start(), thumbnail(), tonemap_vaapi_filter_frame(), transpose_vaapi_filter_frame(), update_histogram_diff(), update_sono_rgb(), update_sono_yuv(), vaapi_map_frame(), vaapi_transfer_data_from(), var_size_bmc(), vdpau_av1_start_frame(), vectorscope16(), vectorscope8(), vt_map_from(), vt_transfer_data_from(), and vulkan_map_frame_to_mem().

◆ height

int AVFrame::height
Examples
hw_decode.c, muxing.c, qsvdec.c, and vaapi_encode.c.

Definition at line 397 of file frame.h.

Referenced by alloc_frame_buffer(), alloc_picture(), aom_decode(), apng_encode_frame(), apply_palette(), av_frame_copy(), av_frame_move_ref(), av_frame_ref(), bidirectional_obmc(), bilateral_obmc(), black_counter(), blend_frame(), blend_slice_packed_rgb(), blur(), calc_diffs(), cfhd_decode(), compare(), config_input(), copy_uv_planes(), cover_rect(), cudachromakey_process_internal(), cudaupload_filter_frame(), cuvid_output_frame(), d3d11va_transfer_data(), debug_mean_error(), decklink_write_video_packet(), decode_frame_common(), decode_packet(), decode_video(), decode_write(), deint_vaapi_filter_frame(), do_alphamerge(), do_blend(), do_denoise(), downscale(), draw_axis_rgb(), draw_axis_yuv(), draw_sono(), drawtext(), drm_transfer_data_from(), encode_apng(), encode_frame(), epx2_slice(), epx3_slice(), execute_model_native(), extend_edges(), ff_dnn_fill_gettingoutput_task(), ff_h263_decode_frame(), ff_h274_apply_film_grain(), ff_libwebp_get_frame(), ff_mjpeg_decode_sos(), ff_vaapi_vpp_init_params(), fill_model_input_tf(), fill_picture_parameters(), filter(), filter16_brng(), filter16_tout(), filter16_vrep(), filter8_brng(), filter8_tout(), filter8_vrep(), filter_frame(), filter_frame_ref(), filter_slice(), filter_slice_packed(), filter_slice_planar(), find_min_max(), find_min_max_16(), find_min_max_planar(), find_min_max_planar_16(), fixstride(), format_init(), frame_copy_props(), frame_copy_video(), get_output_native(), get_output_ov(), get_output_tf(), get_scene_score(), decklink_frame::GetBytes(), getpix(), getpix_integrate(), gif_fill(), h264_field_start(), handle_p_frame_apng(), hqx_filter(), import_map(), infer_completion_callback(), init(), init_filter(), init_stage(), inter_pred(), interpolate(), libopenjpeg_copy_to_packed16(), libopenjpeg_copy_to_packed8(), load_palette(), lowpass16(), luma_abs_diff(), main(), mc_chroma_scaled(), mc_luma_scaled(), misc_vaapi_filter_frame(), nppscale_filter_frame_ref(), nppscale_scale(), nppsharpen_sharpen(), nvdec_av1_start_frame(), nvdec_mjpeg_start_frame(), nvdec_mpeg12_start_frame(), nvdec_mpeg4_start_frame(), nvdec_vc1_start_frame(), nvdec_vp8_start_frame(), nvdec_vp9_start_frame(), opencl_map_frame(), output_single_frame(), output_video_frame(), overlay_ass_image(), overlay_cuda_blend(), overlay_vaapi_blend(), overlay_vulkan_blend(), pixscope_filter_frame(), pp_filter_frame(), procamp_vaapi_filter_frame(), process(), process_16(), process_frame(), process_planar(), process_planar_16(), qsv_fill_border(), qsv_frame_lock(), qsv_map_from(), qsv_map_to(), qsv_transfer_data_from(), query_frame(), queue_frame(), queue_picture(), rpza_encode_frame(), scale_field(), scale_frame(), scale_vaapi_filter_frame(), scalecuda_resize(), scroll(), sender_thread(), set_frame_data(), set_processing_window(), sub2video_get_blank_frame(), submit_frame(), super2xsai(), sws_frame_start(), sws_scale_frame(), thumbnail(), tonemap_slice(), tonemap_vaapi_filter_frame(), transpose_vaapi_filter_frame(), update_histogram_diff(), vaapi_map_frame(), vaapi_transfer_data_from(), var_size_bmc(), vdpau_av1_start_frame(), vectorscope16(), vectorscope8(), vt_map_from(), vt_transfer_data_from(), and vulkan_map_frame_to_mem().

◆ nb_samples

int AVFrame::nb_samples

◆ format

int AVFrame::format

format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames, enum AVSampleFormat for audio)

Examples
hw_decode.c, muxing.c, and vaapi_encode.c.

Definition at line 412 of file frame.h.

Referenced by activate(), alloc_frame_buffer(), alloc_picture(), apng_encode_frame(), audio_decode_frame(), av_frame_copy(), av_frame_ref(), av_hwframe_map(), avfilter_link(), bmp_decode_frame(), celt_frame_setup_input(), clear_unused_frames(), config_filter(), config_input(), config_output(), config_props(), copy_uv_planes(), create_filtergraph(), cuvid_output_frame(), d3d11va_transfer_data(), decode_frame_common(), decode_video(), decode_write(), deint_vaapi_filter_frame(), do_vflip(), downscale(), drm_map_from(), drm_transfer_data_from(), dxva2_map_frame(), dxva2_map_from(), dxva2_transfer_data_from(), dxva2_transfer_data_to(), encode_apng(), encode_frame(), ff_default_get_audio_buffer(), ff_default_get_video_buffer2(), ff_filter_frame(), ff_h263_decode_frame(), ff_h274_apply_film_grain(), ff_libwebp_get_frame(), ff_mjpeg_decode_sos(), ff_tlog_link(), fill_frameinfo_by_link(), filter(), filter_frame(), filter_frame_ref(), fixstride(), flip_bayer(), flush_frame(), frame_copy_audio(), frame_copy_video(), h264_field_start(), handle_p_frame_png(), have_alpha_planar(), image_copy_16_to_8(), init(), jpeg2000_decode_tile(), libopenjpeg_copy_to_packed16(), libopenjpeg_copyto16(), main(), misc_vaapi_filter_frame(), nppscale_filter_frame_ref(), nppscale_scale(), opencl_map_frame(), opencl_map_from(), opencl_map_to(), opencl_transfer_data_from(), output_audio_frame(), output_frame(), output_single_frame(), output_video_frame(), overlay_vaapi_blend(), pick_format(), print_digraph(), print_link_prop(), procamp_vaapi_filter_frame(), process_frame(), qsv_fill_border(), qsv_frame_lock(), qsv_map_from(), qsv_transfer_data_from(), queue_picture(), request_frame(), rpza_encode_frame(), run_test(), scale_frame(), scale_vaapi_filter_frame(), sender_thread(), sofalizer_convolute(), sofalizer_fast_convolute(), sub2video_get_blank_frame(), submit_frame(), sws_frame_start(), take_samples(), tiff_unpack_strip(), tonemap_vaapi_filter_frame(), transfer_data_alloc(), transpose_vaapi_filter_frame(), update_sono_yuv(), vaapi_map_frame(), vaapi_map_from(), vaapi_map_to_memory(), vaapi_transfer_data_from(), vdpau_transfer_data_from(), video_get_buffer(), vt_map_frame(), vt_map_from(), vt_transfer_data_from(), vulkan_map_from(), and vulkan_transfer_data_from().

◆ key_frame

int AVFrame::key_frame

◆ pict_type

enum AVPictureType AVFrame::pict_type

Picture type of the frame.

Definition at line 422 of file frame.h.

Referenced by aom_decode(), avs_decode_frame(), avui_decode_frame(), bmp_decode_frame(), cdxl_decode_frame(), cllc_decode_frame(), cri_decode_frame(), decode_frame(), decode_idat_chunk(), decode_video(), dirac_decode_data_unit(), dnxhd_decode_frame(), do_video_out(), encode_frame(), ff_draw_horiz_band(), ff_mpeg4_encode_mb(), ff_print_debug_info2(), ff_vc1_parse_frame_header_adv(), ff_vp56_decode_mbs(), filter_frame(), fits_decode_frame(), frame_copy_props(), g2m_decode_frame(), gem_decode_frame(), h264_frame_start(), h264_select_output_frame(), hq_hqa_decode_frame(), jpeg2000_decode_frame(), lag_decode_frame(), libopenjpeg_decode_frame(), libuavs3d_decode_frame(), libx265_encode_frame(), magy_decode_frame(), msp2_decode_frame(), mxpeg_decode_frame(), pcx_decode_frame(), photocd_decode_frame(), pixlet_decode_frame(), pnm_decode_frame(), pp_filter_frame(), ptx_decode_frame(), qoi_decode_frame(), queue_picture(), ratecontrol_1pass(), set_direct_mv(), sunrast_decode_frame(), svq1_decode_frame(), truemotion2rt_decode_frame(), txd_decode_frame(), uavs3d_output_callback(), v308_decode_frame(), v408_decode_frame(), v410_decode_frame(), vble_decode_frame(), vc1_decode_frame(), vcr1_decode_frame(), vp8_lossless_decode_frame(), xbm_decode_frame(), xpm_decode_frame(), xvid_encode_frame(), xwd_decode_frame(), xwd_encode_frame(), y216_decode_frame(), y41p_decode_frame(), yuv4_decode_frame(), zero12v_decode_frame(), and zerocodec_decode_frame().

◆ sample_aspect_ratio

AVRational AVFrame::sample_aspect_ratio

◆ pts

int64_t AVFrame::pts

Presentation timestamp in time_base units (time when frame should be shown to user).

Examples
transcoding.c.

Definition at line 432 of file frame.h.

Referenced by a64multi_encode_frame(), activate(), alloc_out_frame(), compand_delay(), compute_crc_of_packets(), decode_audio(), decode_video(), deint_vaapi_filter_frame(), dnn_classify_flush_frame(), dnn_detect_flush_frame(), do_blend(), do_video_out(), draw_spatial(), encode_frame(), ff_framesync_dualinput_get(), ff_qsvvpp_filter_frame(), ff_rate_estimate_qscale(), ff_yadif_filter_frame(), ff_yadif_request_frame(), ffmal_copy_frame(), ffmmal_add_packet(), ffmmal_fill_input_port(), filter_frame(), filter_frame_ref(), fir_frame(), flush_frame(), frame_copy_props(), geq_filter_frame(), get_best_frame(), get_frame(), headphone_frame(), interpolate(), libuavs3d_decode_frame(), libx265_encode_frame(), load_input_picture(), main(), mediacodec_buffer_release(), mediacodec_wrap_hw_buffer(), misc_vaapi_filter_frame(), nppscale_filter_frame_ref(), nppscale_scale(), output_audio_frame(), output_frame(), output_single_frame(), overlay_cuda_blend(), overlay_vaapi_blend(), plot_spectrum_column(), procamp_vaapi_filter_frame(), process_frame(), push_frame(), push_samples(), request_frame(), return_frame(), scale_frame(), scale_vaapi_filter_frame(), send_silence(), spatial_activate(), submit_frame(), svc_decode_frame(), tonemap_vaapi_filter_frame(), transpose_vaapi_filter_frame(), try_push_frame(), uavs3d_output_callback(), update(), update_mono_detection(), update_out_phase_detection(), video_decode_example(), xfade_activate(), and xfade_opencl_activate().

◆ pkt_dts

int64_t AVFrame::pkt_dts

DTS copied from the AVPacket that triggered returning this frame.

(if frame threading isn't used) This is also the Presentation time of this AVFrame calculated from only AVPacket.dts values without pts values.

Definition at line 439 of file frame.h.

Referenced by ff_thread_decode_frame(), frame_copy_props(), svc_decode_frame(), uavs3d_output_callback(), and video_decode_example().

◆ time_base

AVRational AVFrame::time_base

Time base for the timestamps in this frame.

In the future, this field may be set on frames output by decoders or filters, but its value will be by default ignored on input to encoders or filters.

Definition at line 447 of file frame.h.

Referenced by avfilter_config_links(), config_output(), config_props(), describe_frame_to_str(), ff_inlink_evaluate_timeline_at_frame(), ff_inlink_process_commands(), ff_request_frame_to_filter(), ff_update_link_current_pts(), filter_frame(), filter_frame_ref(), frame_copy_props(), nppscale_filter_frame_ref(), nppscale_scale(), print_digraph(), scale_frame(), take_samples(), and update_pts().

◆ coded_picture_number

int AVFrame::coded_picture_number

picture number in bitstream order

Definition at line 452 of file frame.h.

Referenced by ff_mpv_frame_start(), frame_copy_props(), h264_frame_start(), output_video_frame(), and uavs3d_output_callback().

◆ display_picture_number

int AVFrame::display_picture_number

picture number in display order

Definition at line 456 of file frame.h.

Referenced by dirac_decode_frame(), frame_copy_props(), load_input_picture(), and uavs3d_output_callback().

◆ quality

int AVFrame::quality

quality (between 1 (good) and FF_LAMBDA_MAX (bad))

Definition at line 461 of file frame.h.

Referenced by do_video_out(), encode_frame(), filter(), frame_copy_props(), ratecontrol_1pass(), svq1_encode_frame(), and xvid_encode_frame().

◆ opaque

void* AVFrame::opaque

for some private data of the user

Definition at line 466 of file frame.h.

Referenced by frame_copy_props().

◆ repeat_pict

int AVFrame::repeat_pict

When decoding, this signals how much the picture must be delayed.

extra_delay = repeat_pict / (2*fps)

Definition at line 472 of file frame.h.

Referenced by ff_yadif_filter_frame(), filter_frame(), frame_copy_props(), and submit_frame().

◆ interlaced_frame

int AVFrame::interlaced_frame

◆ top_field_first

int AVFrame::top_field_first

◆ palette_has_changed

int AVFrame::palette_has_changed

Tell user application that palette has changed from previous frame.

Definition at line 487 of file frame.h.

Referenced by cdg_load_palette(), cinvideo_decode_frame(), decode_frame(), frame_copy_props(), gem_decode_frame(), and seqvideo_decode().

◆ reordered_opaque

int64_t AVFrame::reordered_opaque

reordered opaque 64 bits (generally an integer or a double precision float PTS but can be anything).

The user sets AVCodecContext.reordered_opaque to represent the input at that time, the decoder reorders values as needed and sets AVFrame.reordered_opaque to exactly one of the values provided by the user through AVCodecContext.reordered_opaque

Definition at line 497 of file frame.h.

Referenced by frame_copy_props(), and libx265_encode_frame().

◆ sample_rate

int AVFrame::sample_rate

◆ channel_layout

attribute_deprecated uint64_t AVFrame::channel_layout

Channel layout of the audio data.

Deprecated:
use ch_layout instead

Definition at line 510 of file frame.h.

Referenced by av_frame_ref(), channelmap_filter_frame(), ff_default_get_audio_buffer(), filter_frame(), frame_copy_audio(), pick_format(), and try_push_frame().

◆ buf

AVBuffer references backing the data for this frame.

All the pointers in data and extended_data must point inside one of the buffers in buf or extended_buf. This array must be filled contiguously – if buf[i] is non-NULL then buf[j] must also be non-NULL for all j < i.

There may be at most one AVBuffer per data plane, so for video this array always contains all the references. For planar audio with more than AV_NUM_DATA_POINTERS channels, there may be more buffers than can fit in this array. Then the extra AVBufferRef pointers are stored in the extended_buf array.

Definition at line 525 of file frame.h.

Referenced by av_frame_ref(), av_hwframe_transfer_data(), avcodec_receive_frame(), avcodec_send_frame(), avcodec_send_packet(), ff_alloc_picture(), ff_encode_get_frame(), ff_h264_build_ref_list(), ff_h264_ref_picture(), ff_h264_unref_picture(), ff_hwframe_map_create(), ff_hwframe_map_replace(), ff_mpeg_ref_picture(), fill_picture_parameters(), frame_worker_thread(), h264_decode_frame(), h264_initialise_ref_list(), h264_slice_init(), load_input_picture(), pic_is_unused(), qsv_frame_lock(), qsv_transfer_data_child(), sws_frame_start(), video_get_buffer(), and vpx_decode().

◆ extended_buf

AVBufferRef** AVFrame::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.

Note that this is different from AVFrame.extended_data, which always contains all the pointers. This array only contains the extra pointers, which cannot fit into AVFrame.buf.

This array is always allocated using av_malloc() by whoever constructs the frame. It is freed in av_frame_unref().

Definition at line 539 of file frame.h.

Referenced by av_frame_ref().

◆ nb_extended_buf

int AVFrame::nb_extended_buf

Number of elements in extended_buf.

Definition at line 543 of file frame.h.

Referenced by av_frame_ref().

◆ side_data

AVFrameSideData** AVFrame::side_data

Definition at line 545 of file frame.h.

Referenced by filter_frame(), and libx265_encode_frame().

◆ nb_side_data

int AVFrame::nb_side_data

Definition at line 546 of file frame.h.

Referenced by filter_frame(), and libx265_encode_frame().

◆ flags

int AVFrame::flags

◆ color_range

enum AVColorRange AVFrame::color_range

MPEG vs JPEG YUV range.

  • encoding: Set by user
  • decoding: Set by libavcodec

Definition at line 578 of file frame.h.

Referenced by config_output(), create_filtergraph(), filter_frame(), frame_copy_props(), magy_decode_frame(), pixlet_decode_frame(), scale_frame(), and vaapi_vpp_colour_properties().

◆ color_primaries

enum AVColorPrimaries AVFrame::color_primaries

◆ color_trc

enum AVColorTransferCharacteristic AVFrame::color_trc

◆ colorspace

enum AVColorSpace AVFrame::colorspace

YUV colorspace type.

  • encoding: Set by user
  • decoding: Set by libavcodec

Definition at line 589 of file frame.h.

Referenced by create_filtergraph(), encode_frame(), filter_frame(), frame_copy_props(), init_filter(), magy_decode_frame(), prores_encode_frame(), scale_frame(), and vaapi_vpp_colour_properties().

◆ chroma_location

enum AVChromaLocation AVFrame::chroma_location

Definition at line 591 of file frame.h.

Referenced by format_init(), frame_copy_props(), and vaapi_vpp_colour_properties().

◆ best_effort_timestamp

int64_t AVFrame::best_effort_timestamp

frame timestamp estimated using various heuristics, in stream time base

  • encoding: unused
  • decoding: set by libavcodec, read by user.
Examples
transcoding.c.

Definition at line 598 of file frame.h.

Referenced by decode_video(), frame_copy_props(), and main().

◆ pkt_pos

int64_t AVFrame::pkt_pos

reordered pos from the last AVPacket that has been input into the decoder

  • encoding: unused
  • decoding: Read by user.

Definition at line 605 of file frame.h.

Referenced by do_blend(), filter_frame(), filter_frame_ref(), frame_copy_props(), nppscale_filter_frame_ref(), nppscale_scale(), overlay_cuda_blend(), request_frame(), scale_frame(), and uavs3d_output_callback().

◆ pkt_duration

int64_t AVFrame::pkt_duration

duration of the corresponding packet, expressed in AVStream->time_base units, 0 if unknown.

  • encoding: unused
  • decoding: Read by user.

Definition at line 613 of file frame.h.

Referenced by compute_crc_of_packets(), decode_video(), do_video_out(), filter_frame(), frame_copy_props(), and video_decode_example().

◆ metadata

AVDictionary* AVFrame::metadata

◆ decode_error_flags

int AVFrame::decode_error_flags

decode error flags of the frame, set to a combination of FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there were errors during the decoding.

  • encoding: unused
  • decoding: set by libavcodec, read by user.

Definition at line 629 of file frame.h.

Referenced by check_decode_result(), and frame_copy_props().

◆ channels

attribute_deprecated int AVFrame::channels

number of audio channels, only used for audio.

  • encoding: unused
  • decoding: Read by user.
    Deprecated:
    use ch_layout instead

Definition at line 643 of file frame.h.

Referenced by av_frame_copy(), av_frame_move_ref(), av_frame_ref(), channelmap_filter_frame(), filter_frame(), frame_copy_audio(), and try_push_frame().

◆ pkt_size

int AVFrame::pkt_size

size of the corresponding packet containing the compressed frame.

It is set to a negative value if unknown.

  • encoding: unused
  • decoding: set by libavcodec, read by user.

Definition at line 653 of file frame.h.

Referenced by frame_copy_props(), and uavs3d_output_callback().

◆ hw_frames_ctx

AVBufferRef* AVFrame::hw_frames_ctx

◆ opaque_ref

AVBufferRef* AVFrame::opaque_ref

AVBufferRef for free use by the API user.

FFmpeg will never check the contents of the buffer ref. FFmpeg calls av_buffer_unref() on it when the frame is unreferenced. av_frame_copy_props() calls create a new reference with av_buffer_ref() for the target frame's opaque_ref field.

This is unrelated to the opaque field, although it serves a similar purpose.

Definition at line 670 of file frame.h.

Referenced by frame_copy_props().

◆ crop_top

size_t AVFrame::crop_top

Definition at line 680 of file frame.h.

Referenced by ff_vaapi_vpp_init_params(), frame_copy_props(), h264_frame_start(), and init_filter().

◆ crop_bottom

size_t AVFrame::crop_bottom

Definition at line 681 of file frame.h.

Referenced by ff_vaapi_vpp_init_params(), frame_copy_props(), h264_frame_start(), and init_filter().

◆ crop_left

size_t AVFrame::crop_left

Definition at line 682 of file frame.h.

Referenced by ff_vaapi_vpp_init_params(), frame_copy_props(), h264_frame_start(), and init_filter().

◆ crop_right

size_t AVFrame::crop_right

Definition at line 683 of file frame.h.

Referenced by ff_vaapi_vpp_init_params(), frame_copy_props(), h264_frame_start(), and init_filter().

◆ private_ref

AVBufferRef* AVFrame::private_ref

AVBufferRef for internal use by a single libav* library.

Must not be used to transfer data between libraries. Has to be NULL when ownership of the frame leaves the respective library.

Code outside the FFmpeg libs should never check or change the contents of the buffer ref.

FFmpeg calls av_buffer_unref() on it when the frame is unreferenced. av_frame_copy_props() calls create a new reference with av_buffer_ref() for the target frame's private_ref field.

Definition at line 699 of file frame.h.

Referenced by frame_copy_props(), nvdec_av1_start_frame(), nvdec_mjpeg_start_frame(), nvdec_mpeg12_start_frame(), nvdec_mpeg4_start_frame(), nvdec_vc1_start_frame(), nvdec_vp8_start_frame(), and nvdec_vp9_start_frame().

◆ ch_layout

AVChannelLayout AVFrame::ch_layout

The documentation for this struct was generated from the following file: