[XviD-devel] Alignement problem
Alexandre Ganea
alex_toresh at yahoo.fr
Mon Apr 11 15:14:20 CEST 2005
Hi all,
I don't know if this is already known, but I found a small problem in mem_transfer.cpp, in the function transfer8x8_copy_c(). The code assumes that the src and dst buffers are aligned on a 4-byte boundary and this is not the case for src. This code works well on Intel cpus, but might not produce the expected results on *any* RISC cpu imho. (tested only on ARM) As it is supposed to be generic version of this function, I would replace it by a simple loop working on bytes instead:
for ( y = 0; y < 8; ++y ){
uint8_t * d = dst + y * stride;
const uint8_t * s = src + y * stride;
for ( x = 0; x < 8; ++x )
{
*d++ = *s++;
}
}
Alex.
More information about the XviD-devel
mailing list