[FFmpeg-devel] [PATCH] Add a G.722 encoder

Martin Storsjö martin
Sat Sep 11 21:18:38 CEST 2010


On Fri, 10 Sep 2010, Martin Storsj? wrote:

> On Fri, 10 Sep 2010, Martin Storsj? wrote:
> 
> > On Fri, 10 Sep 2010, Michael Niedermayer wrote:
> > 
> > > On Fri, Sep 10, 2010 at 04:24:00PM +0300, Martin Storsj? wrote:
> > > > Hi,
> > > > 
> > > > As in $subj, the first patch adds a straightforward encoder that produces 
> > > > bitexact output matching the reference test vectors. The second patch adds 
> > > > trellis support to the encoder, closely modelled after the code in 
> > > > libavcodec/adpcm.c.
> > > > 
> > > > I'm only doing trellis on the lower sub-band, since the higher only is 
> > > > encoded with 2 bits. And if I'd want to do trellis for both of them at the 
> > > > same time, I'd have to run the QMF on the output from both subbands in 
> > > > order to get one decoded sample values, in order to have one difference 
> > > > instead of two to compare.
> > > 
> > > why not comapare 2 ?
> > > 
> > > diff= (a0-a1)^2 + C*(b0-b1)^2
> > 
> > I guess that's doable, too, I'll try that.
> 
> This actually turned out to work quite well, thanks! New version attached 
> that does trellis for both of them at the same time.

Updated patches attached - I tuned the testing range for the lower subband 
a bit to achieve even better results.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-a-G.722-encoder.patch
Type: text/x-diff
Size: 6293 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100911/776927b3/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-initial-trellis-support-in-the-G.722-encoder.patch
Type: text/x-diff
Size: 8275 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100911/776927b3/attachment-0001.patch>



More information about the ffmpeg-devel mailing list