[Ffmpeg-devel] [PATCH] cook compatible decoder

Benjamin Larsson banan
Fri Nov 4 11:29:25 CET 2005


Sascha Sommer wrote:

>On Friday 04 November 2005 07:26, Benjamin Larsson wrote:
>  
>
>>Hi,
>>
>>Diego Biurrun wrote:
>>    
>>
>>>On Thu, Nov 03, 2005 at 08:08:09PM +0100, Benjamin Larsson wrote:
>>>      
>>>
>>>>http://tranquillity.campus.luth.se/~banan/cook/
>>>>
>>>>I think the decoder wont work on BE systems.
>>>>        
>>>>
>>>I can confirm this.  On my PPC it just outputs noise.
>>>
>>>Diego
>>>      
>>>
>>Can you try to change the byteswap in decode_bytes ?
>>That should fix the decoder.
>>
>>    
>>
>
>Attached patch should make the sound at least recognisable.
>I also noticed that there are some memory corruptions that should get fixed 
>before the code enters cvs.
>
>Regards
>
>Sascha
>  
>
I think a swap is needed, I just don't know the order.

        obuf[i] = le2me_32(0x37c511f2^buf[i]);
or
        obuf[i] = le2me_32(le2me_32(0x37c511f2)^buf[i]);

should work.


/Benjamin





More information about the ffmpeg-devel mailing list