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. see posix_memalign for unix, and __mingw_aligned_malloc for windows, if you're using mingw. It also isn't hard to "roll your own", but then you have to keep track of the original pointer. -- Michael Conrad IntelliTree Solutions llc. 513-552-6362 [EMAIL PROTECTED] _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
