[FFmpeg-devel] [PATCH] move some bitstream related functions

Aurelien Jacobs aurel
Fri Jul 6 16:49:40 CEST 2007


On Fri, 6 Jul 2007 10:31:08 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:

> Hi
> 
> On Fri, Jul 06, 2007 at 01:44:01AM +0200, Aurelien Jacobs wrote:
> > On Thu, 5 Jul 2007 20:11:30 +0200
> > Michael Niedermayer <michaelni at gmx.at> wrote:
> > 
> > > Hi
> > > 
> > > On Thu, Jul 05, 2007 at 03:39:05PM +0200, Aurelien Jacobs wrote:
> > > [...]
> > > > > > +void ff_write_quant_matrix(PutBitContext *pb, uint16_t *matrix){
> > > > > > +    int i;
> > > > > > +
> > > > > > +    if(matrix){
> > > > > > +        put_bits(pb, 1, 1);
> > > > > > +        for(i=0;i<64;i++) {
> > > > > > +            put_bits(pb, 8, matrix[ ff_zigzag_direct[i] ]);
> > > > > > +        }
> > > > > > +    }else
> > > > > > +        put_bits(pb, 1, 0);
> > > > > > +}
> > > > > > +
> > > > > >  /* VLC decoding */
> > > > > 
> > > > > doesnt belong in bitstream.* at all
> > > > 
> > > > I have to agree with this. On the other hand, this function is used
> > > > in h263.c and create a dependency on mpegvideo_enc.c for just one
> > > > small function. Any idea where I could move this function ?
> > > 
> > > h263 encoding does depend on most of mpegvideo_enc.c
> > > h263 decoding does not need ff_write_quant_matrix()
> > 
> > Ok, well. I will try to untangle dependencies on h263.c at the same time.
> > This should do the trick.
> > 
> > Now what about the simplified patch I sent (which just move ff_copy_bits
> > to bitstream.c) ?
> 
> if you clean the code up / simplify it afterwards ...

Applied.

Aurel




More information about the ffmpeg-devel mailing list