[FFmpeg-devel] Headers moving?

Michael Niedermayer michaelni
Thu Jan 3 01:16:35 CET 2008


On Thu, Jan 03, 2008 at 12:36:15AM +0100, Aurelien Jacobs wrote:
> On Wed, 2 Jan 2008 23:44:31 +0100
> Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > Hi
> > 
> > On Wed, Jan 02, 2008 at 08:25:08PM +0100, Diego 'Flameeyes' Petten? wrote:
> > > 
> > > May I try to poke again about moving headers around so that crc.h can be
> > > installed? I'd very much like to start using libavutil for xine-lib-1.2
> > > (and replacing sha1, base64 and crc16/32 implementations from xine-lib).
> > 
> > yes you may, what was the result of the last discussion?
> > IIRC we were at
> > * crc.h should be installed
> > * we need to get rid of the non const static (=API change) before that or
> >   there will be problems with at least x86_64 lavu-PIC + app-NOPIC on some
> >   systems
> > 
> > -> we either need to hardcode all CRC tables or use functions to return a
> > pointer to them
> > ideal would be if both were possible selectable with a ./configure switch
> 
> Hum... So you mean you want to have one function per CRC table
> (similar to the patch I posted some times ago) ?
> And also the hardcoded tables, if enabled in ./configure.
> The functions returning tables pointer would always be
> enabled, since they would be part of the API. And they
> would obviously return either a generated or a harcoded
> table depending on what was configured.
> 
> If that's what you want, I guess I will implement it.

no i dont want 1 function per crc, rather:

AVCRC *av_get_crc_table(unsigned int crc){
    int tab_id;

    switch(crc){
    case 0x1234567: tab_id=0; break;
    case 0x2222222: tab_id=1; break;
    default: return NULL;
    }
#ifndef HARDCODED_TABLES
    if(!table[tab_id][last_entry])
        av_crc_init(table[tab_id], crc);
#endif
    return table[tab_id];
}

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

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- 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-devel/attachments/20080103/05f0e6ff/attachment.pgp>



More information about the ffmpeg-devel mailing list