[FFmpeg-cvslog] r18681 - trunk/libavcodec/rv34.c

Michael Niedermayer michaelni
Mon Apr 27 01:04:24 CEST 2009


On Sun, Apr 26, 2009 at 06:43:51AM +0300, Kostya wrote:
> On Sun, Apr 26, 2009 at 02:45:41AM +0200, Michael Niedermayer wrote:
> > On Sat, Apr 25, 2009 at 07:47:38AM +0200, kostya wrote:
> > > Author: kostya
> > > Date: Sat Apr 25 07:47:38 2009
> > > New Revision: 18681
> > > 
> > > Log:
> > > Get rid of monstrous static table and initialize VLCs for RV3/4 dynamically.
> > > 
> > [...]
> > 
> > > +/**
> > > + * Initialize all tables.
> > > + */
> > > +static av_cold void rv34_free_tables(void)
> > 
> > seems the journey to chernobyl did more harm than good
> 
> It's not related but looks like current environment is not very good for work.

anything that can be done to improve it?


>  
> > > +{
> > > +    int i, j, k;
> > > +
> > > +    for(i = 0; i < NUM_INTRA_TABLES; i++){
> > > +        for(j = 0; j < 2; j++){
> > > +            free_vlc(&intra_vlcs[i].cbppattern[j]);
> > > +            free_vlc(&intra_vlcs[i].second_pattern[j]);
> > > +            free_vlc(&intra_vlcs[i].third_pattern[j]);
> > > +            for(k = 0; k < 4; k++){
> > > +                free_vlc(&intra_vlcs[i].cbp[j][k]);
> > > +            }
> > > +        }
> > 
> > anyway your code is totally utter broken now, thats besides the fact that
> > the very same monstrous tables are still there
> 
> Better 180 smaller ones than single with size around 800kB.
> 
> > before it all worked now 2 instances of rv will cause double
> > frees or at the least crash, you treat the static tables like they are
> > owned by a codec instance
> 
> Okay, what solution can you suggest? Moving VLCs to codec context?

id suggest a revert but thats because i didnt see a solveable problem
to begin with. I mean if the amount of bytes of tables could be reduced
without speedloss that would be great but the place where the tables
where didnt make them bigger or smaller, it just made it more clearly
vissible to the human reader how large they where. With the dynamic
alloc of "as much as needed" its just hidden from view but it will reach
the very same amount.
And the static tables wont take real memory until the codec is initialized
either on any modern os ...

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

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20090427/88d33fb9/attachment.pgp>



More information about the ffmpeg-cvslog mailing list