Commit 39056b52 authored by Mark Thompson's avatar Mark Thompson

lavc: Use hardware config information in ff_get_format()

This removes the dependency that hardware pixel formats previously had on
AVHWAccel instances, meaning only those which actually do something need
exist after this patch.

Also updates avcodec_default_get_format() to be able to choose hardware
formats if either a matching device has been supplied or no additional
external configuration is required, and avcodec_get_hw_frames_parameters()
to use the hardware config rather than searching the old hwaccel list.
parent 57623cba
This diff is collapsed.
......@@ -272,6 +272,12 @@ int ff_side_data_update_matrix_encoding(AVFrame *frame,
* Select the (possibly hardware accelerated) pixel format.
* This is a wrapper around AVCodecContext.get_format() and should be used
* instead of calling get_format() directly.
*
* The list of pixel formats must contain at least one valid entry, and is
* terminated with AV_PIX_FMT_NONE. If it is possible to decode to software,
* the last entry in the list must be the most accurate software format.
* If it is not possible to decode to software, AVCodecContext.sw_pix_fmt
* must be set before calling this function.
*/
int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment