[FFmpeg-devel] [PATCH 2/2] swscale: add P010 input support

Hendrik Leppkes h.leppkes at gmail.com
Thu Jan 7 13:38:13 CET 2016

On Thu, Jan 7, 2016 at 1:31 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Hendrik Leppkes <h.leppkes <at> gmail.com> writes:
>> Because that doesn't work. bits per raw sample is not
>> taken into account when pixel formats are negotiated
> But that is a missing feature that is needed independently
> of your patch so imo this patch shouldn't add more
> unneeded colour spaces (except if this is needed for
> encoding).

This pixel format directly corresponds to the pixel layout of hardware
surfaces from the GPU, heck the GPU even calls it P010 as well,
therefor it is needed to represent this exactly.
I have no intention of providing a half-broken format because of some
future feature that requires massive changes to all areas of FFmpeg,
and won't arrive in the next couple years.

>> why do you think we have yuv420p9,p10,p12,p14,p16?
> Because x264 encoding would have a worse performance
> without them.
>> Also, the conversion works fine, why would it be
>> missing anything? It just shifts away the 6 zero bits.
> I seem to have missed that you convert to an 8-bit
> colour space (which I don't completely understand).

Its not, its 10-bit and remains 10-bit, it just moves the 10-bit data
from the left to the right of the buffer (because the native yuv420p10
has it on the right, and p010 on the left)

- Hendrik

More information about the ffmpeg-devel mailing list