[][src]Function ffav_sys::avcodec_find_best_pix_fmt_of_list

pub unsafe extern "C" fn avcodec_find_best_pix_fmt_of_list(
    pix_fmt_list: *const AVPixelFormat,
    src_pix_fmt: AVPixelFormat,
    has_alpha: c_int,
    loss_ptr: *mut c_int
) -> AVPixelFormat

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.

@param[in] pix_fmt_list AV_PIX_FMT_NONE terminated array of pixel formats to choose from @param[in] src_pix_fmt source pixel format @param[in] has_alpha Whether the source pixel format alpha channel is used. @param[out] loss_ptr Combination of flags informing you what kind of losses will occur. @return The best pixel format to convert to or -1 if none was found.