[XviD-devel] Endian Problem found
Christoph Nägeli
chn at kbw.ch
Tue Dec 23 15:48:02 CET 2003
On Dec 23, 2003, at 13:33, Edouard Gomez wrote:
> Christoph Nägeli (chn at kbw.ch) wrote:
>> With this code, the test runcs successfully. Has anyone an idea how to
>> change it that it works if the 'len' isn't a multiple of 2? And what
>> if the mem is really a uint8_t* or uint32_t* (the code above wouldn't
>> work for that)?
>
> I think the easiest solution is simply to have a big endian and
> little
> endian reference values. Otherwise we'll have to swap data according
> to
> its type (using hton like functions) as some tests do use uint8_t
> data,
> others int16_t and so on, sometimes it's even a mix of both (uint8_t
> for
> ref1/2 and int16_t for current)
>
> As the Makefile uses the configure values, you can define Big
> endian
> crc32 references enclosing them with:
> #ifdef ARCH_IS_BIG_ENDIAN
> ...
> #else
> ...
> #endif
I'm not sure what exactly you mean.
Do you mean the crc32tab?
This change only affects xvid_bench.c, right?
Christoph
More information about the XviD-devel
mailing list