[FFmpeg-devel] [PATCH 2/2] swscale: add unscaled conversion from yuv420p to p010
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sat Sep 3 16:22:25 EEST 2016
2016-09-03 15:18 GMT+02:00 Timo Rothenpieler <timo at rothenpieler.org>:
> On 9/3/2016 3:15 PM, Carl Eugen Hoyos wrote:
>> 2016-09-03 14:54 GMT+02:00 Timo Rothenpieler <timo at rothenpieler.org>:
>>
>>>>> + AV_WL16(&dstUV[2*x ], (t | (t << 8)) & 0xFFC0);
>>>>
>>>> Why is "& 0xFFC0" necessary?
>>>> (Same below.)
>>>
>>> Because P010 expects the 10 bits in the 10 most significant bit.
>>> I'm not 100% sure if the other 6 bits are undefined or 0, but all the
>>> other implementations treat them as zeroes.
>>
>> I suggest to remove this.
>
> At least https://technet.microsoft.com/pt-br/library/bb970578.aspx
> describes the lower 6 bits as set to 0
And the very next sentence explicitely contradicts.
> so leaving them in an undefined
> state might have unintended sideeffects.
That is more than unlikely.
Carl Eugen
More information about the ffmpeg-devel
mailing list