On Saturday 26 July 2008 06:37:50 pm Michael Conrad wrote: > On Fri, 25 Jul 2008 16:13:25 -0400, Pascal Patry <[EMAIL PROTECTED]> > wrote: > > The root cause of the problem is an invalid read out of the buffer in > > one of the dsp util mmx/sse3 function. > [...] > > When calling avcodec_decode_video(), the "put_h264_chroma_mc4_xxx" > > operation can do an invalid read on the buffer 'src'. In my example, > > 'src' was first initialized at "0x1bdf2bc" at the beginning of the > > function, then the last value that it tried to read was "0x1be007c" > > and the last valid memory location is at "0x1bdfffc". The loop was > > also on the last iteration when the crash occured. > > Not familiar with the code in question, but are you making sure to > allocate all of your buffers on multiples of 16 bytes? For example, > 0x1bdf2bc is not an address that could be operated on by SSE instructions, > but 0x1bdf2c0 is. > > I'm pretty sure that all the libav functions which allocate buffers will > give the appropriate alignment, but if you were allocating some yourself > with plain old "malloc" you will get crashes any time the buffer isn't on > a 16-byte boundary and an SSE-optimized routine hits it.
[...] Yeah, I already checked this out. The crashing opcode is movd which doesn't require any alignment. Also, trying to print the data contained in this address from a debugger shows that it was not allocated. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
