[FFmpeg-devel] [PATCH] ALAC Encoder

Jai Menon realityman
Mon Aug 18 20:58:52 CEST 2008


Hi,

On Monday 18 Aug 2008 11:49:53 pm Michael Niedermayer wrote:
> On Mon, Aug 18, 2008 at 07:54:58PM +0200, matthieu castet wrote:
> > Michael Niedermayer wrote:
> > > On Mon, Aug 18, 2008 at 07:24:23PM +0200, Michael Niedermayer wrote:
> > >> On Mon, Aug 18, 2008 at 09:55:10PM +0530, Jai Menon wrote:
> > >> The decoder does:
> > >>             cl -= (cr * W) >> S;
> > >>             cr += cl;
> > >>
> > >>             l = cr;
> > >>             r = cl;
> > >> the encoder does:
> > >>             l -= r;
> > >>             r += (l * W) >> S;
> > >>
> > >>             cr = l;
> > >>             cl = r;
> > >>
> > >> These hold true for all values of W and S
> > >>
> > >> with W=0,S=1  you get l-r, r
> > >> with W=1,S=1  you get l-r, (r+l)>>1
> > >> with W=2,S=1  you get l-r, l
> > >
> > > i just realized my suggestion has a little bug, the silly thing only
> > > applies decorrelation when W!=0 ...
> >
> > Note that could be a bug in our decoder.
>
> then there has to be another way the decorrelation is signaled which means
> either R,L or all of the R-L based ones would likely fail to decode
> correctly with the binary decoder. Has anyone tested that?
>

I did a quick test with itunes and it seems that the weight value can't be 
zero. In any case, I have adopted your suggestion of using 31 for the shift 
and it seems to work well. 


Regards,

Jai Menon




More information about the ffmpeg-devel mailing list