[XviD-devel] xvid (cvs-head) problem (ffmpeg+mplayer)
Edouard Gomez
ed.gomez at free.fr
Mon Feb 24 20:53:07 CET 2003
Christoph Lampert (chl at math.uni-bonn.de) wrote:
> My suggestion is to either split up vlc_codes.h or move BITS-related
> functions from motion_est.c to bitstream.c, etc...
> What cannot be handled this way should get a unique header, e.g. xvid_XXX
> like ffmpeg (often) using ff_XXX for global symbols.
I have a third way :)
Let's group all tables in a common structure and then we export only the
structured element. Then in code we can do a bunch of defines to access
tables directly without the need for -> or . operators.
Example:
/* table.h */
typedef struct
{
int *firsttable;
int *secondtable;
}xvid_tables_t;
/* table.c */
static int local_firsttable[64];
static int local_secondtable[64];
xvid_tables_t xvid_tables = {
local_firsttable,
local_secondtable,
};
/* Then e.g. in motion_est.c */
#define cbpy_tab xvid_tables.cbpy_tab
This way we export only one symbol: xvid_tables, but we still have
access to all tables. This is a trick i use to build RC modules that
export only one structure that gives access to local functions.
What do you think about that ?
--
Edouard Gomez-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://edu.bnhof.de/pipermail/xvid-devel/attachments/20030224/96c33e57/attachment.bin
More information about the XviD-devel
mailing list