aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2007-07-06 11:47:02 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2007-07-06 11:47:02 +0000
commitc0de00dac5d872c5a528093258cd618ca69b888f (patch)
tree90e38fcc0fdb830465064bf9e28ab5e905c3974b /ffmpeg.c
parent3b7660b002b11de0aa41c17c167ca0051ae8f9e5 (diff)
downloadffmpeg-c0de00dac5d872c5a528093258cd618ca69b888f.tar.gz
me option implemented as an AVOption
patch by Stefano Sabatini: [stefano sabatini-lala poste it] original thread: [FFmpeg-devel] [PATCH] ffmpeg.c -me option implemented as an AVOption date: 07/05/2007 03:12 PM Originally committed as revision 9501 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c50
1 files changed, 2 insertions, 48 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 35d7b9df9b..528e2890ea 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -127,7 +127,6 @@ static int video_rc_qmod_freq=0;
#endif
static char *video_rc_override_string=NULL;
static char *video_rc_eq="tex^qComp";
-static int me_method = ME_EPZS;
static int video_disable = 0;
static int video_discard = 0;
static int video_codec_id = CODEC_ID_NONE;
@@ -2417,35 +2416,6 @@ static void add_frame_hooker(const char *arg)
}
}
-const char *motion_str[] = {
- "zero",
- "full",
- "log",
- "phods",
- "epzs",
- "x1",
- "hex",
- "umh",
- "iter",
- NULL,
-};
-
-static void opt_motion_estimation(const char *arg)
-{
- const char **p;
- p = motion_str;
- for(;;) {
- if (!*p) {
- fprintf(stderr, "Unknown motion estimation method '%s'\n", arg);
- exit(1);
- }
- if (!strcmp(*p, arg))
- break;
- p++;
- }
- me_method = (p - motion_str) + 1;
-}
-
static void opt_video_codec(const char *arg)
{
opt_codec(&video_stream_copy, &video_codec_id, CODEC_TYPE_VIDEO, arg);
@@ -2839,8 +2809,6 @@ static void new_video_stream(AVFormatContext *oc)
if (do_psnr)
video_enc->flags|= CODEC_FLAG_PSNR;
- video_enc->me_method = me_method;
-
/* two pass mode */
if (do_pass) {
if (do_pass == 1) {
@@ -3167,7 +3135,7 @@ static void show_formats(void)
AVOutputFormat *ofmt;
URLProtocol *up;
AVCodec *p, *p2;
- const char **pp, *last_name;
+ const char *last_name;
printf("File formats:\n");
last_name= "000";
@@ -3268,19 +3236,7 @@ static void show_formats(void)
printf("\n");
printf("Frame size, frame rate abbreviations:\n ntsc pal qntsc qpal sntsc spal film ntsc-film sqcif qcif cif 4cif\n");
- printf("Motion estimation methods:\n");
- pp = motion_str;
- while (*pp) {
- printf(" %s", *pp);
- if ((pp - motion_str + 1) == ME_ZERO)
- printf("(fastest)");
- else if ((pp - motion_str + 1) == ME_FULL)
- printf("(slowest)");
- else if ((pp - motion_str + 1) == ME_EPZS)
- printf("(default)");
- pp++;
- }
- printf("\n\n");
+ printf("\n");
printf(
"Note, the names of encoders and decoders do not always match, so there are\n"
"several cases where the above table shows encoder only or decoder only entries\n"
@@ -3633,8 +3589,6 @@ const OptionDef options[] = {
{ "rc_eq", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_eq}, "set rate control equation", "equation" },
{ "rc_override", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_override_string}, "rate control override for specific intervals", "override" },
{ "vcodec", HAS_ARG | OPT_VIDEO, {(void*)opt_video_codec}, "force video codec ('copy' to copy stream)", "codec" },
- { "me", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_motion_estimation}, "set motion estimation method",
- "method" },
{ "me_threshold", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_me_threshold}, "motion estimaton threshold", "" },
{ "strict", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_strict}, "how strictly to follow the standards", "strictness" },
{ "sameq", OPT_BOOL | OPT_VIDEO, {(void*)&same_quality},