[FFmpeg-devel] [PATCH] Use INIT_VLC_USE_NEW_STATIC in intrax8.c
Reimar Döffinger
Reimar.Doeffinger
Thu Sep 24 13:05:35 CEST 2009
On Thu, Sep 24, 2009 at 12:42:00PM +0200, Michael Niedermayer wrote:
> On Thu, Sep 24, 2009 at 10:56:16AM +0200, Reimar D?ffinger wrote:
> > Hello,
> > since there seems to be no end to the number of people who think it is a
> > memleak, I decided to finally try to change the vlc init code to use
> > INIT_VLC_USE_NEW_STATIC.
> > Personally I think it isn't even as ugly as I feared, any objections to
> > it?
>
> > intrax8.c | 31 ++++++++++++++++++++++++++++---
> > 1 file changed, 28 insertions(+), 3 deletions(-)
> > 9fc3dce48bef3503c80e7a70e30ebdbcb2e754f9 x8_new_static.diff
> > Index: libavcodec/intrax8.c
> > ===================================================================
> > --- libavcodec/intrax8.c (revision 20001)
> > +++ libavcodec/intrax8.c (working copy)
> > @@ -44,13 +44,30 @@
> >
> > static av_cold void x8_vlc_init(void){
> > int i;
> > + int offset = 0;
> > + int sizeidx = 0;
>
> > + static const int sizes[8*4 + 8*2 + 2 + 4] = {
> > + 576, 548, 582, 618, 546, 616, 560, 642,
> > + 584, 582, 704, 664, 512, 544, 656, 640,
> > + 512, 648, 582, 566, 532, 614, 596, 648,
> > + 586, 552, 584, 590, 544, 578, 584, 624,
> >
> > + 528, 528, 526, 528, 536, 528, 526, 544,
> > + 544, 512, 512, 528, 528, 544, 512, 544,
> > +
> > + 128, 128, 128, 128, 128, 128};
>
> does this fit in a uint8_t with *4 ?
No, 582 is not divisible by 4.
I made it uint16_t though, even though I don't consider those 108 bytes
that important.
Applied with that change.
More information about the ffmpeg-devel
mailing list