[FFmpeg-devel] [PATCH 2/2] swscale: add P010 input support
Hendrik Leppkes
h.leppkes at gmail.com
Thu Jan 7 13:20:06 CET 2016
On Thu, Jan 7, 2016 at 1:11 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Hendrik Leppkes <h.leppkes <at> gmail.com> writes:
>
>> Microsoft specifically described the format to alias
>> to P016 with less precision for simplicity, however I
>> opted to convert to "true" 10-bit in sws by shifting
>> so format selection algorithms don't get confused
>> later, and actually treat it like 10-bit and not
>> 16-bit.
>
> Why don't you add P016 now and set bits_per_sample
> in the decoder?
> Especially since your conversion routine is missing
> | AV_RL16(src + i * 2) >> 10
>
Because that doesn't work. bits per raw sample is not taken into
account when pixel formats are negotiated, why do you think we have
yuv420p9,p10,p12,p14,p16?
Also, the conversion works fine, why would it be missing anything? It
just shifts away the 6 zero bits.
- Hendrik
More information about the ffmpeg-devel
mailing list