PDA

View Full Version : Alignment trap error on arm9


saimaf
22nd June 2009, 17:24
Hi,

I cross compiled x264 for arm9 with linux 2.6.25-rc9 running on it. When I run the executable with this command line:

./x264 --qp 32 --no-psnr --no-cabac ../FOOT.yuv -o test.264 176x144

It starts giving me Alignment trap errors. After some debugging I found that this code line in common/bs.h when commented out gives no error:

*(uint32_t*)s->p = endian_fix(s->cur_bits);

How can I replace this line or how to fix the alignment errors?

A prompt reply will be greatly appreciated.

Thanks,
SAima

Dark Shikari
22nd June 2009, 17:42
This is a known issue; patches to fix the bitstream writer to not require aligned access (it's not supposed to, by design, this is a bug) are welcome as long as they don't reduce performance.

Since ARM supports unaligned access, however, you're better off just enabling kernel support for it.

saimaf
22nd June 2009, 18:52
What option should I give in kernel for enabling support for memory unalignment issues?

Thanks alot!

yuvi
23rd June 2009, 01:31
Actually arm9 doesn't support unaligned accesses. (only arm11 and up)
Guess I'll finish my unaligned patch...

Are you targeting a SheevaPlug? arm9 doesn't have any simd whatsoever so even at 1.2 GHz it'll probably be a bit slow.