Hi,

see actual patch here, forgot to commit my changes.

On Sat, Dec 17, 2011 at 8:23 PM, Ronald S. Bultje <[email protected]>wrote:

> Hi,
>
> On Sat, Dec 17, 2011 at 7:05 PM, Luca Barbato <[email protected]> wrote:
>
>> On 18/12/11 02:57, Ronald S. Bultje wrote:
>>
>>> +            if (firstLumSrcY<  0 || firstLumSrcY + vLumFilterSize>
>>>  c->srcH) {
>>> +                const int16_t **tmpY = (const int16_t **) lumPixBuf + 2
>>> * vLumBufSize;
>>> +                int neg = -firstLumSrcY, i, end = FFMIN(c->srcH -
>>> firstLumSrcY, vLumFilterSize);
>>> +                for (i = 0; i<  neg;            i++)
>>> +                    tmpY[i] = lumSrcPtr[neg];
>>> +                for (     ; i<  end;            i++)
>>> +                    tmpY[i] = lumSrcPtr[i];
>>> +                for (     ; i<  vLumFilterSize; i++)
>>> +                    tmpY[i] = tmpY[i-1];
>>> +                lumSrcPtr = tmpY;
>>> +
>>> +                if (alpSrcPtr) {
>>> +                    const int16_t **tmpA = (const int16_t **) alpPixBuf
>>> + 2 * vLumBufSize;
>>> +                    for (i = 0; i<  neg;            i++)
>>> +                        tmpA[i] = alpSrcPtr[neg];
>>> +                    for (     ; i<  end;            i++)
>>> +                        tmpA[i] = alpSrcPtr[i];
>>> +                    for (     ; i<  vLumFilterSize; i++)
>>> +                        tmpA[i] = tmpA[i - 1];
>>> +                    alpSrcPtr = tmpA;
>>> +                }
>>>
>>
>> Since that function is already long, what about having those block as
>> inline functions? That would make it a little more easy to understand.
>
>
> See attached. I'm not a big fan of it since this code executes per-row and
> the generalization means combining U/V is lost.
>
> Ronald
>

Attachment: 0001-swscale-fix-overflows-in-vertical-scaling-at-top-bot.patch
Description: Binary data

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to