On Fri, Jun 10, 2011 at 3:02 PM, Kostya <[email protected]> wrote:
> On Fri, Jun 10, 2011 at 02:46:27PM +0200, Andreas Öman wrote:
>> ---
>>  libavcodec/pngdec.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
>> index 7477f67..d4ec38e 100644
>> --- a/libavcodec/pngdec.c
>> +++ b/libavcodec/pngdec.c
>> @@ -232,7 +232,7 @@ static void png_filter_row(DSPContext *dsp, uint8_t 
>> *dst, int filter_type,
>>              p = last[i];
>>              dst[i] = p + src[i];
>>          }
>> -        if(bpp > 1 && size > 4) {
>> +        if(bpp > 1 && bpp <=4 && size > 4) {
>>              // would write off the end of the array if we let it process 
>> the last pixel with bpp=3
>>              int w = bpp==4 ? size : size-3;
>>              dsp->add_png_paeth_prediction(dst+i, src+i, last+i, w-i, bpp);
>> --
>
> IIRC Michael committed a "fix" for SIMD part which somehow splits this
> function execution into two parts, maybe it's worth doing that in pngdec.c
> (or properly fix SIMD counterpart instead).

Yeah, you're correct I tried it:

256e5f0a2f9bc6112ea5bff0acd9fbd4e999aa66
and
838e2a03c1f73bea71f4c2cf49f6a6b54f25ff78

and it seems to fix the problem.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to