[FFmpeg-cvslog] r9994 - trunk/libavcodec/bitstream.h

Diego Biurrun diego
Thu Aug 9 01:03:03 CEST 2007


On Thu, Aug 09, 2007 at 12:57:31AM +0200, Alex Beregszaszi wrote:
> 
> On Thu, 2007-08-09 at 00:47 +0200, Diego Biurrun wrote:
> > On Wed, Aug 08, 2007 at 10:38:30PM +0200, alex wrote:
> > > 
> > > Log:
> > > copy get_unary from vc1
> > 
> > Why the code duplication?
> 
> Because this is a common function used in multiple places.  Submitting
> now the patches for the non-trivial ones.

I see you have removed it from vc1.c now.  The commit message was
confusing, it sounded as if you planned to copy and not move the
function.

> > > --- trunk/libavcodec/bitstream.h	(original)
> > > +++ trunk/libavcodec/bitstream.h	Wed Aug  8 22:38:30 2007
> > > @@ -969,4 +969,50 @@ static inline int decode012(GetBitContex
> > >  
> > > +static int get_unary(GetBitContext *gb, int stop, int len)
> > > +{
> > > +#if 1
> > 
> > ugly
> > 
> > > +  while (i != len && tmp != stop)
> > > +  {
> > > +    tmp = get_bits(gb, 1);
> > > +    i++;
> > > +  }
> > > +  if (i == len && tmp != stop) return len+1;
> > > +  return i;*/
> > 
> > ugly indentation
> 
> Well that is commented out code.
> 
> Should we remove the whole cruft?

IMO yes.

Diego




More information about the ffmpeg-cvslog mailing list