On 4/24/13, Brad O'Hearne <[email protected]> wrote: > On Apr 24, 2013, at 11:04 AM, Alex Cohn <[email protected]> wrote: > >> And to set >> >> data[1]=data[0] + plane_size; >> >> is most likely not enough because both data[0] and data[1] must be >> aligned. > > Hey Alex, thx for the reply. You hit one of the magic words ("aligned") that > I'm investigating further. I've seen "align" as a parameter in a number of > the avcodec function calls, and there doesn't appear to be much discussion > regarding the proper setting of this value (like for example "0 = default" > -- which doesn't explain what the "default" actually means). Also understand > that alignment even in audio samples has other interpretations, so I'm > trying to make sure I'm not reading something into what FFmpeg means by > this. > > So back to your statement that "both data[0] and data[1] must be aligned". > What specifically do you mean by this?
You call av_samples_alloc_array_and_samples() with align set to 0, which means channel data planes are aligned along 32 byte boundary. Is this really the case? Set align argument to 1 if to make them aligned along 1 byte boundary. > > Thanks, > > Brad > _______________________________________________ > Libav-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user > _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
