FFmpeg  4.0
Data Fields
AVPixFmtDescriptor Struct Reference

Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes of an image. More...

#include <libavutil/pixdesc.h>

Data Fields

const char * name
 
uint8_t nb_components
 The number of components each pixel has, (1-4) More...
 
uint8_t log2_chroma_w
 Amount to shift the luma width right to find the chroma width. More...
 
uint8_t log2_chroma_h
 Amount to shift the luma height right to find the chroma height. More...
 
uint64_t flags
 Combination of AV_PIX_FMT_FLAG_... More...
 
AVComponentDescriptor comp [4]
 Parameters that describe how pixels are packed. More...
 
const char * alias
 Alternative comma-separated names. More...
 

Detailed Description

Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes of an image.

It also stores the subsampling factors and number of components.

Note
This is separate of the colorspace (RGB, YCbCr, YPbPr, JPEG-style YUV and all the YUV variants) AVPixFmtDescriptor just stores how values are stored not what these values represent.

Definition at line 81 of file pixdesc.h.

Field Documentation

◆ name

const char* AVPixFmtDescriptor::name

◆ nb_components

uint8_t AVPixFmtDescriptor::nb_components

◆ log2_chroma_w

uint8_t AVPixFmtDescriptor::log2_chroma_w

Amount to shift the luma width right to find the chroma width.

For YV12 this is 1 for example. chroma_width = AV_CEIL_RSHIFT(luma_width, log2_chroma_w) The note above is needed to ensure rounding up. This value only refers to the chroma components.

Definition at line 92 of file pixdesc.h.

Referenced by activate(), av_get_bits_per_pixel(), av_get_padded_bits_per_pixel(), av_picture_crop(), av_picture_pad(), av_pix_fmt_get_chroma_sub_sample(), avcodec_align_dimensions(), avcodec_align_dimensions2(), avcodec_get_chroma_sub_sample(), calc_cropping_offsets(), config_input(), config_input0(), config_input1(), config_input_main(), config_input_overlay(), config_input_ref(), config_inputx(), config_output(), config_props(), config_props_output(), copy_picture_field(), create_filtergraph(), draw_horiz_band(), encode_init(), ff_check_pixfmt_descriptors(), ff_choose_chroma_location(), ff_color_frame(), ff_draw_init(), ff_fill_line_with_color(), ff_scale_eval_dimensions(), ff_sws_alphablendaway(), ffprobe_show_pixel_formats(), fill_frameinfo_by_link(), fill_picture_parameters(), filter(), filter_frame(), format_init(), frame_end(), geq_config_props(), get_aspect_ratio(), get_pix_fmt_score(), horizontal_frame_pack(), image_get_linesize(), libopenjpeg_matches_pix_fmt(), map_pixel_format(), mj2_create_image(), mxf_write_header(), nvdec_vp9_start_frame(), opencl_get_plane_format(), opengl_get_plane_pointer(), opengl_init_context(), output_single_frame(), overlay_opencl_load(), pix_fmt_match(), qsv_init_surface(), query_formats(), request_frame(), shuffleplanes_config_input(), vaapi_vp9_start_frame(), verify_md5(), and write_packet().

◆ log2_chroma_h

uint8_t AVPixFmtDescriptor::log2_chroma_h

Amount to shift the luma height right to find the chroma height.

For YV12 this is 1 for example. chroma_height= AV_CEIL_RSHIFT(luma_height, log2_chroma_h) The note above is needed to ensure rounding up. This value only refers to the chroma components.

Definition at line 101 of file pixdesc.h.

Referenced by activate(), av_get_bits_per_pixel(), av_get_padded_bits_per_pixel(), av_image_copy_to_buffer(), av_image_fill_black(), av_image_fill_pointers(), av_picture_crop(), av_picture_pad(), av_pix_fmt_get_chroma_sub_sample(), avcodec_align_dimensions2(), avcodec_get_chroma_sub_sample(), calc_cropping_offsets(), config_input(), config_input0(), config_input1(), config_input_main(), config_input_overlay(), config_input_ref(), config_inputx(), config_out_props(), config_output(), config_props(), config_props_output(), copy_picture_field(), create_filtergraph(), draw_horiz_band(), encode_init(), ff_check_pixfmt_descriptors(), ff_choose_chroma_location(), ff_color_frame(), ff_draw_horiz_band(), ff_draw_init(), ff_frame_pool_video_init(), ff_h264_draw_horiz_band(), ff_scale_eval_dimensions(), ff_sws_alphablendaway(), ffprobe_show_pixel_formats(), fill_frameinfo_by_link(), fill_picture_parameters(), filter(), filter_frame(), format_init(), frame_end(), geq_config_props(), get_aspect_ratio(), get_pix_fmt_score(), get_video_buffer(), horizontal_frame_pack(), image_copy(), libopenjpeg_matches_pix_fmt(), map_pixel_format(), mj2_create_image(), nvdec_vp9_start_frame(), opencl_get_plane_format(), opengl_get_plane_pointer(), opengl_init_context(), output_single_frame(), overlay_opencl_load(), pix_fmt_match(), process_frame(), qsv_init_surface(), query_formats(), request_frame(), shuffleplanes_config_input(), smv_img_pnt(), smvjpeg_decode_frame(), utvideo_encode_init(), vaapi_vp9_start_frame(), verify_md5(), vertical_frame_pack(), video_frame_cksum(), and write_packet().

◆ flags

uint64_t AVPixFmtDescriptor::flags

Combination of AV_PIX_FMT_FLAG_...

flags.

Definition at line 106 of file pixdesc.h.

Referenced by av_frame_apply_cropping(), av_get_padded_bits_per_pixel(), av_image_alloc(), av_image_copy_to_buffer(), av_image_fill_black(), av_image_fill_linesizes(), av_image_fill_pointers(), av_image_get_buffer_size(), av_image_get_linesize(), av_read_image_line(), av_write_image_line(), avcodec_default_get_format(), calc_cropping_offsets(), config_input(), config_props(), create_all_formats(), decode_frame(), encode_init(), ff_blend_mask(), ff_blend_rectangle(), ff_check_pixfmt_descriptors(), ff_color_frame(), ff_draw_color(), ff_draw_init(), ff_frame_pool_get(), ff_frame_pool_video_init(), ff_get_format(), ff_merge_formats(), ff_pnm_decode_header(), ff_sws_alphablendaway(), ffprobe_show_pixel_formats(), filter_frame(), format_init(), get_color_type(), get_format(), get_pix_fmt_score(), get_video_buffer(), have_alpha_planar(), hwdownload_query_formats(), hwmap_config_output(), image_copy(), image_get_linesize(), init(), init_image(), is_planar_yuv(), is_yuv_planar(), isALPHA(), isAnyRGB(), isBayer(), isBE(), isGray(), isPacked(), isPackedRGB(), isPlanar(), isPlanarRGB(), isPlanarYUV(), isRGB(), isYUV(), main(), opencl_get_plane_format(), opengl_draw(), opengl_fill_color_map(), opengl_init_context(), oscilloscope_config_input(), pix_fmt_match(), pixscope_config_input(), planarRgb16ToRgb16Wrapper(), query_formats(), raw_decode(), raw_init_decoder(), Rgb16ToPlanarRgb16Wrapper(), rgb48Toxyz12(), show_pix_fmts(), shuffleplanes_config_input(), smv_img_pnt(), tiff_unpack_strip(), unsharp_opencl_make_filter_params(), validate_avframe_allocation(), video_get_buffer(), write_header(), xwd_encode_frame(), xyz12Torgb48(), yuv2gbrp16_full_X_c(), and yuv2gbrp_full_X_c().

◆ comp

AVComponentDescriptor AVPixFmtDescriptor::comp[4]

Parameters that describe how pixels are packed.

If the format has 1 or 2 components, then luma is 0. If the format has 3 or 4 components: if the RGB flag is set then 0 is red, 1 is green and 2 is blue; otherwise 0 is luma, 1 is chroma-U and 2 is chroma-V.

If present, the Alpha channel is always the last component.

Definition at line 117 of file pixdesc.h.

Referenced by acolor(), acolor16(), av_get_bits_per_pixel(), av_get_padded_bits_per_pixel(), av_image_copy_to_buffer(), av_image_fill_black(), av_image_fill_max_pixsteps(), av_image_fill_pointers(), av_pix_fmt_count_planes(), av_read_image_line(), av_write_image_line(), avcodec_open2(), avcodec_string(), blend_image_planar_rgb(), blend_image_yuv(), calc_cropping_offsets(), check_image_pointers(), chroma(), color(), color16(), compute_vmaf_score(), config_input(), config_input0(), config_input_main(), config_input_ref(), config_inputx(), config_inputy(), config_out_props(), config_output(), config_props(), copy_picture_field(), create_filtergraph(), cuvid_decode_init(), decode_frame(), decode_slice(), draw_line(), draw_scope(), encode_frame(), encode_init(), encode_slice(), ff_blend_mask(), ff_blend_rectangle(), ff_bwdif_init_x86(), ff_check_pixfmt_descriptors(), ff_color_frame(), ff_draw_color(), ff_draw_init(), ff_fill_rectangle(), ff_huffyuvdsp_init_x86(), ff_huffyuvencdsp_init_x86(), ff_mjpeg_decode_frame(), ff_nvdec_decode_init(), ff_qsv_process_data(), ff_sws_alphablendaway(), ff_sws_init_output_funcs(), ff_tinterlace_init_x86(), ff_vmafmotion_init(), ff_yadif_init_x86(), ffprobe_show_pixel_formats(), fill_frameinfo_by_link(), fill_picture_parameters(), filter_frame(), filter_slice(), flat(), format_init(), geq_config_props(), get_bit_depth(), get_pix_fmt_depth(), get_pix_fmt_score(), hScale16To15_c(), hScale16To19_c(), image_copy(), init_output_stream_encode(), init_video_param(), init_video_param_jpeg(), is16BPS(), is_planar_yuv(), is_yuv_planar(), isNBPS(), isSemiPlanarYUV(), libopenjpeg_copy_to_packed16(), libopenjpeg_copyto16(), libopenjpeg_decode_frame(), libopenjpeg_ispacked(), libopenjpeg_matches_pix_fmt(), libx265_encode_frame(), libx265_encode_init(), lowpass16(), mj2_create_image(), mxf_write_header(), nvdec_vp9_start_frame(), opencl_get_plane_format(), opengl_get_plane_pointer(), oscilloscope_config_input(), overlay_opencl_load(), pix_fmt_match(), pixscope_config_input(), planarCopyWrapper(), planarRgb16ToRgb16Wrapper(), planarToP01xWrapper(), pnm_encode_frame(), qsv_decode_init(), qsv_init_surface(), query_formats(), request_frame(), reverse_color16(), Rgb16ToPlanarRgb16Wrapper(), smv_img_pnt(), sws_init_context(), swscale(), tonemap(), unsharp_opencl_make_filter_params(), vc2_encode_init(), verify_md5(), write_packet(), X264_init(), and yuv2gbrp_full_X_c().

◆ alias

const char* AVPixFmtDescriptor::alias

Alternative comma-separated names.

Definition at line 122 of file pixdesc.h.


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