[Tremor] Byte order problem

Frederic Bastien nouiz at nouiz.org
Mon Sep 20 13:00:00 PDT 2004


Hi,

I had also problem with endienness. What I have find is that the
definition in misc.h is used only for the computation. It don't change the
endienness of the output. You can use ntohs (network to host short)or
ntohl (network to host long)to revert the output regerated end it will
give you the good result.

i.e. after your ov_read() make a loop that will change the endieness of
the buffer before continuing.

It is the way that I have solved my problem.


Frederic Bastien

> Hi,
> I am running the lowmem branch of Tremor on a Sun Solaris workstation.
> There were some problems compiling the misc.h file, both endian
> versions of the union magic was compiled and caused a conflict. So I
> just commented out the little endian version since I am running on a big
> endian machine.
>
> With this modification the code compiles but the output file just
> contains noise. I tried to run Tremor on another Linux computer and
> that gives a good output. I have decoded the same Vorbis file on both
> systems and compared them with a hex editor. The difference is that  the
> Sun decoded file has a somewhat different byte order than the Linux.
> When the Linux version has the order A B C D the Sun version has B A D
> C.
>
> I have tried to comment out the big endian code instead, but the
> generated file has no similarities, which I can spot, with the
> correct one if I do that.
>
> Does anyone know why this happens and how I can solve it?
>
> Best regards
> Niklas Barsk
> _______________________________________________
> Tremor mailing list
> Tremor at xiph.org
> http://lists.xiph.org/mailman/listinfo/tremor





More information about the Tremor mailing list