[Ffmpeg-devel] [PATCH] cook compatible decoder

Michael Niedermayer michaelni
Fri Nov 4 13:43:36 CET 2005


Hi

On Fri, Nov 04, 2005 at 11:29:25AM +0100, Benjamin Larsson wrote:
> 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]);

another issue here is that at least buf might not be 32bit aligned (if
sub_packet_size %4 != 0 if i understand it correctly)
i guess a simple if(sub_packet_size %4) return -1 would be the correct
solution? or does such a size make sense?

[...]
-- 
Michael





More information about the ffmpeg-devel mailing list