[XviD-devel] [RFC] Core options
Edouard Gomez
ed.gomez at free.fr
Sat Mar 22 19:35:20 CET 2003
In dev-api-4, we have nice enums to separate flag types. However, the
flags have no real logic in their naming convention.
Why not adding the type directly in the name:
e.g.
typedef enum {
XVID_DEBUG = 0x00000001,
XVID_HALFPEL = 0x00000004,
XVID_INTER4V = 0x00000008,
XVID_CHROMAOPT = 0x00000020,
XVID_GREYSCALE = 0x00000040,
XVID_HQACPRED = 0x00000080,
XVID_MODEDECISION_BITS = 0x00000100,
XVID_DYNAMIC_BFRAMES = 0x00000200,
XVID_TOPFIELDFIRST = 0x00000400,
XVID_ALTERNATESCAN = 0x00000800,
XVID_REDUCED = 0x00001000,
} xvid_vop_t;
would become:
typedef enum {
XVID_VOP_DEBUG = 0x00000001,
XVID_VOP_HALFPEL = 0x00000004,
XVID_VOP_INTER4V = 0x00000008,
XVID_VOP_CHROMAOPT = 0x00000020,
XVID_VOP_GREYSCALE = 0x00000040,
XVID_VOP_HQACPRED = 0x00000080,
XVID_VOP_MODEDECISION_BITS = 0x00000100,
XVID_VOP_DYNAMIC_BFRAMES = 0x00000200,
XVID_VOP_TOPFIELDFIRST = 0x00000400,
XVID_VOP_ALTERNATESCAN = 0x00000800,
XVID_VOP_REDUCED = 0x00001000,
} xvid_vop_t;
I propose having these prefixes:
XVID_CPU (already like that)
XVID_VOP
XVID_VOL
XVID_ME
NB: this change would be very interesting for xvid.h parsing
reasons. I'm currently extending the transcode's configurator so it
could be directly be used in examples. For that i need to build arrays
like this one (in order to match strings to their values):
static config_flag_t xvid_cpufeatures[] = {
{"XVID_CPU_FORCE", XVID_CPU_FORCE},
{"XVID_CPU_ASM", XVID_CPU_ASM},
{"XVID_CPU_MMX", XVID_CPU_MMX},
[...]
So this simple change of flag names could help me build a awk script to
extract all flags from xvid.h automatically.
--
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/20030322/2e4cf523/attachment.bin
More information about the XviD-devel
mailing list