[FFmpeg-devel] [PATCH] MACE fixes

Vitor Sessak vitor1001
Sun Sep 7 11:48:10 CEST 2008


Michael Niedermayer wrote:
> On Sun, Sep 07, 2008 at 01:16:29AM +0200, Vitor Sessak wrote:
>> Hi,
>>
>> Next in my cleanup list is libavcodec/mace.c. As it is now, its output 
>> differs from the binary decoder. Two patches:
>>
>> mace1.diff: Do not share context variables between channels and don't zero 
>> them at decode_frame(). Before this patch, the decoded output could sound 
>> different of the binary decoder.
>>
>> mace2.diff: Use the same weird S8 -> S16 conversion as quicktime. This 
>> should not sound really different, but makes much easier to verify 
>> conformity.
>>
>> After these two patches, MACE3 files decode bit identical to the binary 
>> decoder and MACE6 files are pretty close.
>>
> 
>> BTW, is it ok if I clean it up without asking and be flamed in -cvslogs?
> 
> iam ok with it though i am not really maintainer of it, but then noone else
> is listed either in MAINTAINERS.
> 
> [...]
> 
>> Index: libavcodec/mace.c
>> ===================================================================
>> --- libavcodec/mace.c	(revision 15214)
>> +++ libavcodec/mace.c	(working copy)
>> @@ -235,72 +235,75 @@
>>  };
>>  
>>  typedef struct MACEContext {
>> -    short index, lev, factor, prev2, previous, level;
>> +    short index[2], lev[2], factor[2], prev2[2], previous[2], level[2];
>>      short *outPtr;
>>  } MACEContext;
> 
> it may be cleaner to have 2 MACEContext or to put the vars of the first line
> in their own struct and have 2 of it.

Applied with suggested changes.

-Vitor




More information about the ffmpeg-devel mailing list