さきゅばす/いんきゅばす用libav(実験的)
Revision | d242d80e36eca6d6f123832ed280d39acb59e680 (tree) |
---|---|
Zeit | 2011-09-12 00:30:04 |
Autor | Anton Khirnov <anton@khir...> |
Commiter | Anton Khirnov |
avconv: remove me_threshold option.
It's only shadowing the AVOption with the same name.
@@ -107,7 +107,6 @@ static int video_discard = 0; | ||
107 | 107 | static int same_quant = 0; |
108 | 108 | static int do_deinterlace = 0; |
109 | 109 | static int top_field_first = -1; |
110 | -static int me_threshold = 0; | |
111 | 110 | static int intra_dc_precision = 8; |
112 | 111 | static int qp_hist = 0; |
113 | 112 | #if CONFIG_AVFILTER |
@@ -1217,7 +1216,7 @@ static void do_video_out(AVFormatContext *s, | ||
1217 | 1216 | /* handles same_quant here. This is not correct because it may |
1218 | 1217 | not be a global option */ |
1219 | 1218 | big_picture.quality = quality; |
1220 | - if(!me_threshold) | |
1219 | + if (!enc->me_threshold) | |
1221 | 1220 | big_picture.pict_type = 0; |
1222 | 1221 | // big_picture.pts = AV_NOPTS_VALUE; |
1223 | 1222 | big_picture.pts= ost->sync_opts; |
@@ -2187,6 +2186,9 @@ static int transcode_init(OutputFile *output_files, | ||
2187 | 2186 | av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low." |
2188 | 2187 | "It takes bits/s as argument, not kbits/s\n"); |
2189 | 2188 | 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; | |
2190 | 2192 | } |
2191 | 2193 | } |
2192 | 2194 |
@@ -2502,12 +2504,6 @@ static int transcode(OutputFile *output_files, | ||
2502 | 2504 | return ret; |
2503 | 2505 | } |
2504 | 2506 | |
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 | - | |
2511 | 2507 | static int opt_verbose(const char *opt, const char *arg) |
2512 | 2508 | { |
2513 | 2509 | verbose = parse_number_or_die(opt, arg, OPT_INT64, -10, 10); |
@@ -2779,8 +2775,6 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) | ||
2779 | 2775 | dec->height >>= dec->lowres; |
2780 | 2776 | dec->width >>= dec->lowres; |
2781 | 2777 | } |
2782 | - if(me_threshold) | |
2783 | - dec->debug |= FF_DEBUG_MV; | |
2784 | 2778 | |
2785 | 2779 | if (dec->time_base.den != rfps*dec->ticks_per_frame || dec->time_base.num != rfps_base) { |
2786 | 2780 |
@@ -3092,7 +3086,6 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc) | ||
3092 | 3086 | video_enc->rc_override_count=i; |
3093 | 3087 | if (!video_enc->rc_initial_buffer_occupancy) |
3094 | 3088 | video_enc->rc_initial_buffer_occupancy = video_enc->rc_buffer_size*3/4; |
3095 | - video_enc->me_threshold= me_threshold; | |
3096 | 3089 | video_enc->intra_dc_precision= intra_dc_precision - 8; |
3097 | 3090 | |
3098 | 3091 | if (do_psnr) |
@@ -3968,7 +3961,6 @@ static const OptionDef options[] = { | ||
3968 | 3961 | { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" }, |
3969 | 3962 | { "rc_override", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_STRING | OPT_SPEC, {.off = OFFSET(rc_overrides)}, "rate control override for specific intervals", "override" }, |
3970 | 3963 | { "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" }, | |
3972 | 3964 | { "same_quant", OPT_BOOL | OPT_VIDEO, {(void*)&same_quant}, |
3973 | 3965 | "use same quantizer as source (implies VBR)" }, |
3974 | 3966 | { "pass", HAS_ARG | OPT_VIDEO, {(void*)opt_pass}, "select the pass number (1 or 2)", "n" }, |
@@ -352,7 +352,7 @@ static const AVOption options[]={ | ||
352 | 352 | #endif |
353 | 353 | {"qns", "quantizer noise shaping", OFFSET(quantizer_noise_shaping), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, |
354 | 354 | {"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}, | |
356 | 356 | {"mb_threshold", "macroblock threshold", OFFSET(mb_threshold), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, |
357 | 357 | {"dc", "intra_dc_precision", OFFSET(intra_dc_precision), FF_OPT_TYPE_INT, {.dbl = 0 }, INT_MIN, INT_MAX, V|E}, |
358 | 358 | {"nssew", "nsse weight", OFFSET(nsse_weight), FF_OPT_TYPE_INT, {.dbl = 8 }, INT_MIN, INT_MAX, V|E}, |