[Ffmpeg-devel] [PATCH]: Too much alignment assumed by H264 decoder
David S. Miller
davem
Thu Dec 22 19:21:47 CET 2005
From: Mike Melanson <mike at multimedia.cx>
Date: Thu, 22 Dec 2005 08:44:58 -0800
> Wait... run that by me again: 8-byte alignment causes crashes but
> 4-byte alignment is okay? I hope I don't have to point out that this
> doesn't make much sense. Or are you saying that the compiler you are
> using on Sparc does not support 8-byte alignment and so the data
> structure is being aligned on a random boundary?
It's 4-byte aligned. The compiler emits ldd and std instructions for
the uint64_t loads and stores and this gets an unaligned trap which
kills the program.
Both mvd_table and motion_val are declared like this:
int16_t (*mvd_table[2])[2];
...
int16_t (*motion_val[2])[2];\
what is there to ensure the necessary 8-byte alignment?
I even see assignments of the form:
pic->motion_val[i]= pic->motion_val_base[i]+4
so how can it ever be assumed to be any more than 4-byte
aligned?
More information about the ffmpeg-devel
mailing list