[FFmpeg-devel] [PATCH] swscale: add unscaled copy from yuv420p10 to p010
Timo Rothenpieler
timo at rothenpieler.org
Fri Sep 2 11:38:39 EEST 2016
>> + uint16_t *src[] = {
>> + (uint16_t*)(src8[0] + srcStride[0] * srcSliceY),
>> + (uint16_t*)(src8[1] + srcStride[1] * srcSliceY),
>> + (uint16_t*)(src8[2] + srcStride[2] * srcSliceY)
>
> this looks odd, why is this needed ?
>
Without it, every
dstY[x] = src[0][x] << 6;
would turn into
dstY[x] = ((uint16_t*)(src8[0] + srcStride[0] * srcSliceY))[x] << 6;
So it improves readability and possibly moves some repeated calculations
out of the loop.
Could also just be 3 independent variables srcY/srcU/srcV, if the array
is what looks odd.
More information about the ffmpeg-devel
mailing list