summaryrefslogtreecommitdiff
path: root/libavcodec/opts.c
diff options
context:
space:
mode:
authorZdenek Kabelac <kabi@informatics.muni.cz>2003-03-10 11:48:33 +0000
committerZdenek Kabelac <kabi@informatics.muni.cz>2003-03-10 11:48:33 +0000
commita77146abfe33ab22a2b69721c9f74fa693f1ceed (patch)
tree2930164ab6fe1c3d014ccf400db1d5ac5d6e0e8e /libavcodec/opts.c
parent161fe66e365af1aeedb2a88d18d46fa91c5e606d (diff)
* 'externaly' visible option list begins avoptions_ prefix
* fixed FLAG AVOption Originally committed as revision 1661 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/opts.c')
-rw-r--r--libavcodec/opts.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/libavcodec/opts.c b/libavcodec/opts.c
index fc00d76393..40a058de1a 100644
--- a/libavcodec/opts.c
+++ b/libavcodec/opts.c
@@ -12,13 +12,7 @@
#include "avcodec.h"
-#ifdef HAVE_MMX
-extern const AVOption common_options[3 + 5];
-#else
-extern const AVOption common_options[3];
-#endif
-
-const AVOption common_options[] = {
+const AVOption avoptions_common[] = {
AVOPTION_CODEC_FLAG("bit_exact", "use only bit-exact stuff", flags, CODEC_FLAG_BITEXACT, 0),
AVOPTION_CODEC_FLAG("mm_force", "force mm flags", dsp_mask, FF_MM_FORCE, 0),
#ifdef HAVE_MMX
@@ -31,6 +25,21 @@ const AVOption common_options[] = {
AVOPTION_END()
};
+const AVOption avoptions_workaround_bug[] = {
+ AVOPTION_CODEC_FLAG("bug_autodetect", "workaround bug autodetection", workaround_bugs, FF_BUG_AUTODETECT, 1),
+ AVOPTION_CODEC_FLAG("bug_old_msmpeg4", "workaround old msmpeg4 bug", workaround_bugs, FF_BUG_OLD_MSMPEG4, 0),
+ AVOPTION_CODEC_FLAG("bug_xvid_ilace", "workaround XviD interlace bug", workaround_bugs, FF_BUG_XVID_ILACE, 0),
+ AVOPTION_CODEC_FLAG("bug_ump4", "workaround ump4 bug", workaround_bugs, FF_BUG_UMP4, 0),
+ AVOPTION_CODEC_FLAG("bug_no_padding", "workaround padding bug", workaround_bugs, FF_BUG_NO_PADDING, 0),
+ AVOPTION_CODEC_FLAG("bug_ac_vlc", "workaround ac VLC bug", workaround_bugs, FF_BUG_AC_VLC, 0),
+ AVOPTION_CODEC_FLAG("bug_qpel_chroma", "workaround qpel chroma bug", workaround_bugs, FF_BUG_QPEL_CHROMA, 0),
+ AVOPTION_CODEC_FLAG("bug_std_qpel", "workaround std qpel bug", workaround_bugs, FF_BUG_STD_QPEL, 0),
+ AVOPTION_CODEC_FLAG("bug_qpel_chroma2", "workaround qpel chroma2 bug", workaround_bugs, FF_BUG_QPEL_CHROMA2, 0),
+ AVOPTION_CODEC_FLAG("bug_direct_blocksize", "workaround direct blocksize bug", workaround_bugs, FF_BUG_DIRECT_BLOCKSIZE, 0),
+ AVOPTION_END()
+};
+
+
static int parse_bool(const AVOption *c, char *s, int *var)
{
int b = 1; /* by default -on- when present */
@@ -45,7 +54,13 @@ static int parse_bool(const AVOption *c, char *s, int *var)
return -1;
}
- *var = b;
+ if (c->type == FF_OPT_TYPE_FLAG) {
+ if (b)
+ *var |= (int)c->min;
+ else
+ *var &= ~(int)c->min;
+ } else
+ *var = b;
return 0;
}