• R/O
  • HTTP
  • SSH
  • HTTPS

libav_saccubus: Commit

さきゅばす/いんきゅばす用libav(実験的)


Commit MetaInfo

Revisiond242d80e36eca6d6f123832ed280d39acb59e680 (tree)
Zeit2011-09-12 00:30:04
AutorAnton Khirnov <anton@khir...>
CommiterAnton Khirnov

Log Message

avconv: remove me_threshold option.

It's only shadowing the AVOption with the same name.

Ändern Zusammenfassung

Diff

--- a/avconv.c
+++ b/avconv.c
@@ -107,7 +107,6 @@ static int video_discard = 0;
107107 static int same_quant = 0;
108108 static int do_deinterlace = 0;
109109 static int top_field_first = -1;
110-static int me_threshold = 0;
111110 static int intra_dc_precision = 8;
112111 static int qp_hist = 0;
113112 #if CONFIG_AVFILTER
@@ -1217,7 +1216,7 @@ static void do_video_out(AVFormatContext *s,
12171216 /* handles same_quant here. This is not correct because it may
12181217 not be a global option */
12191218 big_picture.quality = quality;
1220- if(!me_threshold)
1219+ if (!enc->me_threshold)
12211220 big_picture.pict_type = 0;
12221221 // big_picture.pts = AV_NOPTS_VALUE;
12231222 big_picture.pts= ost->sync_opts;
@@ -2187,6 +2186,9 @@ static int transcode_init(OutputFile *output_files,
21872186 av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low."
21882187 "It takes bits/s as argument, not kbits/s\n");
21892188 extra_size += ost->st->codec->extradata_size;
2189+
2190+ if (ost->st->codec->me_threshold)
2191+ input_streams[ost->source_index].st->codec->debug |= FF_DEBUG_MV;
21902192 }
21912193 }
21922194
@@ -2502,12 +2504,6 @@ static int transcode(OutputFile *output_files,
25022504 return ret;
25032505 }
25042506
2505-static int opt_me_threshold(const char *opt, const char *arg)
2506-{
2507- me_threshold = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);
2508- return 0;
2509-}
2510-
25112507 static int opt_verbose(const char *opt, const char *arg)
25122508 {
25132509 verbose = parse_number_or_die(opt, arg, OPT_INT64, -10, 10);
@@ -2779,8 +2775,6 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
27792775 dec->height >>= dec->lowres;
27802776 dec->width >>= dec->lowres;
27812777 }
2782- if(me_threshold)
2783- dec->debug |= FF_DEBUG_MV;
27842778
27852779 if (dec->time_base.den != rfps*dec->ticks_per_frame || dec->time_base.num != rfps_base) {
27862780
@@ -3092,7 +3086,6 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
30923086 video_enc->rc_override_count=i;
30933087 if (!video_enc->rc_initial_buffer_occupancy)
30943088 video_enc->rc_initial_buffer_occupancy = video_enc->rc_buffer_size*3/4;
3095- video_enc->me_threshold= me_threshold;
30963089 video_enc->intra_dc_precision= intra_dc_precision - 8;
30973090
30983091 if (do_psnr)
@@ -3968,7 +3961,6 @@ static const OptionDef options[] = {
39683961 { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" },
39693962 { "rc_override", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_STRING | OPT_SPEC, {.off = OFFSET(rc_overrides)}, "rate control override for specific intervals", "override" },
39703963 { "vcodec", HAS_ARG | OPT_VIDEO | OPT_FUNC2, {(void*)opt_video_codec}, "force video codec ('copy' to copy stream)", "codec" },
3971- { "me_threshold", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_me_threshold}, "motion estimation threshold", "threshold" },
39723964 { "same_quant", OPT_BOOL | OPT_VIDEO, {(void*)&same_quant},
39733965 "use same quantizer as source (implies VBR)" },
39743966 { "pass", HAS_ARG | OPT_VIDEO, {(void*)opt_pass}, "select the pass number (1 or 2)", "n" },
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -352,7 +352,7 @@ static const AVOption options[]={
352352 #endif
353353 {"qns", "quantizer noise shaping", OFFSET(quantizer_noise_shaping), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
354354 {"threads", NULL, OFFSET(thread_count), FF_OPT_TYPE_INT, {.dbl = 1 }, INT_MIN, INT_MAX, V|E|D},
355-{"me_threshold", "motion estimaton threshold", OFFSET(me_threshold), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX},
355+{"me_threshold", "motion estimaton threshold", OFFSET(me_threshold), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
356356 {"mb_threshold", "macroblock threshold", OFFSET(mb_threshold), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
357357 {"dc", "intra_dc_precision", OFFSET(intra_dc_precision), FF_OPT_TYPE_INT, {.dbl = 0 }, INT_MIN, INT_MAX, V|E},
358358 {"nssew", "nsse weight", OFFSET(nsse_weight), FF_OPT_TYPE_INT, {.dbl = 8 }, INT_MIN, INT_MAX, V|E},
Show on old repository browser