[FFmpeg-devel] [PATCH] Fix non-rounding up to next 16-bit aligned bug in IFF decoder

Sebastian Vater cdgs.basty
Thu Apr 29 17:11:15 CEST 2010


M?ns Rullg?rd a ?crit :
> Sebastian Vater <cdgs.basty at googlemail.com> writes:
>
>   
>> M?ns Rullg?rd a ?crit :
>>     
>>> Is the length always a multiple of 8 now?  Earlier you said 4...
>>> What's the deal?
>>>       
>> Seems you're mixing this with sth. up...
>>     
>
> Never mind, I'm stupid.  The input is read a byte at a time, so
> there's got to be something there.  Writing something random in the
> padding area of the decoded image should be harmless.
>   

No, you're not stupid, better to ask one question "too much" as one "too
less" ;-)

Just call it a L1 (short-term memory) or L2 (long-term memory) cache
stall in your brain. ;-)

Happens with all of us, so this is nothing to worry about!

>> But I assume that AVPacket->data and AVFrame->linesize[0] are aligned to
>> 16 bytes for allowing e.g. MMX processing the image data. ;-)
>>     
>
> AVPacket.data has no alignment constraints.  Each line in the decoded
> image is aligned to 8 or 16 bytes depending on things.
>   

When each line in the decoded image is aligned to at least 8 bytes, it
should be ok...

What's important is the last line, is there a padding at the end, too?

-- 

Best regards,
                   :-) Basty/CDGS (-:




More information about the ffmpeg-devel mailing list