[FFmpeg-devel] [PATCH] adpcm: Clarify a comment

Martin Storsjö martin
Sun Nov 14 11:24:15 CET 2010


On Sun, 14 Nov 2010, Michael Niedermayer wrote:

> On Sun, Nov 14, 2010 at 02:17:17AM +0200, Martin Storsj? wrote:
> > On Thu, 4 Nov 2010, Martin Storsj? wrote:
> > 
> > > On Wed, 3 Nov 2010, Michael Niedermayer wrote:
> > > 
> > > > On Wed, Nov 03, 2010 at 09:07:26PM +0200, Martin Storsjo wrote:
> > > > > ---
> > > > >  libavcodec/adpcm.c |    2 +-
> > > > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > > > > 
> > > > > diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
> > > > > index 455b477..f298ef5 100644
> > > > > --- a/libavcodec/adpcm.c
> > > > > +++ b/libavcodec/adpcm.c
> > > > > @@ -354,7 +354,7 @@ static void adpcm_compress_trellis(AVCodecContext *avctx, const short *samples,
> > > > >          int sample = samples[i*stride];
> > > > >          memset(nodes_next, 0, frontier*sizeof(TrellisNode*));
> > > > >          for(j=0; j<frontier && nodes[j]; j++) {
> > > > > -            // higher j have higher ssd already, so they're unlikely to use a suboptimal next sample too
> > > > > +            // higher j have higher ssd already, so they're likely to yield a suboptimal next sample too
> > > > 
> > > > how much is gained without that assumtion?
> > > 
> > > Current code:
> > > stddev:   31.99 PSNR: 66.23 MAXDIFF: 2643 bytes:  2646016/  2649218
> > > Runtime 16.6 s
> > > 
> > > range = 1 for all nodes:
> > > stddev:   31.97 PSNR: 66.23 MAXDIFF: 2112 bytes:  2646016/  2649218
> > > Runtime 19.3 s
> > > 
> > > So I think the general idea of the assumption is quite good as such, since 
> > > it gives quite a big gain in performance compared to the. With this patch 
> > > in place, the comment says what the code actually does.
> > 
> > Ping
> 
> fixing typos is ok if you are sure its wrong before and correct afterwards, no
> need to ask (note i didnt check it now)

Applied

// Martin



More information about the ffmpeg-devel mailing list