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

Michael Niedermayer michaelni
Fri Jul 6 10:31:08 CEST 2007


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 ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I count him braver who overcomes his desires than him who conquers his
enemies for the hardest victory is over self. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070706/0698c715/attachment.pgp>



More information about the ffmpeg-devel mailing list