[FFmpeg-devel] [PATCH v2] swscale: add unscaled conversion from yuv420p to p010

Carl Eugen Hoyos ceffmpeg at gmail.com
Sun Sep 4 16:52:08 EEST 2016


2016-09-04 15:42 GMT+02:00 Hendrik Leppkes <h.leppkes at gmail.com>:
> On Sun, Sep 4, 2016 at 1:18 PM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>> 2016-09-04 13:10 GMT+02:00 Paul B Mahol <onemda at gmail.com>:
>>> On 9/4/16, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>>>> 2016-09-03 15:25 GMT+02:00 Timo Rothenpieler <timo at rothenpieler.org>:
>>>>
>>>>> +            output_pixel(tdstY++, (t | (t << 8)) & 0xFFC0);
>>>>
>>>> Please remove the "& 0xFFC0" here and below.
>>>
>>> Please explain your reasoning here.
>>
>> The linked specification clearly explains that the content
>> of P016 and P010 is identical and that it is not necessary
>> to set the lsb's to 0.
>
> While the specification does say that P010's memory layout
> was particularly chosen to be able to simply alias to P016 if
> needed, having random garbage in there is not good, so
> the zeroing of those bits should remain.

Since it is not garbage (and not random), your argumentation
makes no sense.

Is the operation really free as you all seem to insinuate?

Carl Eugen


More information about the ffmpeg-devel mailing list