Functions for working with pixel formats.
◆ avcodec_pix_fmt_to_codec_tag()
unsigned int avcodec_pix_fmt_to_codec_tag |
( |
enum AVPixelFormat | pix_fmt | ) |
|
Return a value representing the fourCC code associated to the pixel format pix_fmt, or 0 if no associated fourCC code can be found.
◆ avcodec_find_best_pix_fmt_of_list()
Find the best pixel format to convert to given a certain source pixel format.
When converting from one pixel format to another, information loss may occur. For example, when converting from RGB24 to GRAY, the color information will be lost. Similarly, other losses occur when converting from some formats to other formats. avcodec_find_best_pix_fmt_of_2() searches which of the given pixel formats should be used to suffer the least amount of loss. The pixel formats from which it chooses one, are determined by the pix_fmt_list parameter.
- Parameters
-
[in] | pix_fmt_list | AV_PIX_FMT_NONE terminated array of pixel formats to choose from |
[in] | src_pix_fmt | source pixel format |
[in] | has_alpha | Whether the source pixel format alpha channel is used. |
[out] | loss_ptr | Combination of flags informing you what kind of losses will occur. |
- Returns
- The best pixel format to convert to or -1 if none was found.
◆ avcodec_default_get_format()