From 481575d255195c6c2f32e04686b94de984ae78d4 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 4 May 2013 14:15:06 +0200 Subject: avconv: remove -deinterlace It is incompatible with refcounted frames and since it's been deprecated for a long time now, fixing it is not worth the effort. --- Changelog | 1 + avconv.c | 44 -------------------------------------------- avconv_opt.c | 14 -------------- doc/avconv.texi | 4 ---- 4 files changed, 1 insertion(+), 62 deletions(-) diff --git a/Changelog b/Changelog index e605345e21..97e7a3234a 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,7 @@ version 10: - avconv -t and -ss (output-only) options are now sample-accurate when transcoding audio - Matroska muxer can now put the index at the beginning of the file. +- avconv -deinterlace option removed, the yadif filter should be used instead version 9: diff --git a/avconv.c b/avconv.c index cb36e5c378..7f8c6a619e 100644 --- a/avconv.c +++ b/avconv.c @@ -422,47 +422,6 @@ static void do_audio_out(AVFormatContext *s, OutputStream *ost, } } -#if FF_API_DEINTERLACE -static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void **bufp) -{ - AVCodecContext *dec; - AVPicture *picture2; - AVPicture picture_tmp; - uint8_t *buf = 0; - - dec = ist->st->codec; - - /* deinterlace : must be done before any resize */ - if (do_deinterlace) { - int size; - - /* create temporary picture */ - size = avpicture_get_size(dec->pix_fmt, dec->width, dec->height); - buf = av_malloc(size); - if (!buf) - return; - - picture2 = &picture_tmp; - avpicture_fill(picture2, buf, dec->pix_fmt, dec->width, dec->height); - - if (avpicture_deinterlace(picture2, picture, - dec->pix_fmt, dec->width, dec->height) < 0) { - /* if error, do not deinterlace */ - av_log(NULL, AV_LOG_WARNING, "Deinterlacing failed\n"); - av_free(buf); - buf = NULL; - picture2 = picture; - } - } else { - picture2 = picture; - } - - if (picture != picture2) - *picture = *picture2; - *bufp = buf; -} -#endif - static void do_subtitle_out(AVFormatContext *s, OutputStream *ost, InputStream *ist, @@ -1193,9 +1152,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) decoded_frame->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts, decoded_frame->pkt_dts); pkt->size = 0; -#if FF_API_DEINTERLACE - pre_process_video_frame(ist, (AVPicture *)decoded_frame, &buffer_to_free); -#endif if (ist->st->sample_aspect_ratio.num) decoded_frame->sample_aspect_ratio = ist->st->sample_aspect_ratio; diff --git a/avconv_opt.c b/avconv_opt.c index 6645196fd9..ae9b72ee9d 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -61,7 +61,6 @@ float dts_delta_threshold = 10; int audio_volume = 256; int audio_sync_method = 0; int video_sync_method = VSYNC_AUTO; -int do_deinterlace = 0; int do_benchmark = 0; int do_hex_dump = 0; int do_pkt_dump = 0; @@ -1864,15 +1863,6 @@ static int opt_vsync(void *optctx, const char *opt, const char *arg) return 0; } -#if FF_API_DEINTERLACE -static int opt_deinterlace(void *optctx, const char *opt, const char *arg) -{ - av_log(NULL, AV_LOG_WARNING, "-%s is deprecated, use -filter:v yadif instead\n", opt); - do_deinterlace = 1; - return 0; -} -#endif - int opt_cpuflags(void *optctx, const char *opt, const char *arg) { int flags = av_parse_cpu_flags(arg); @@ -2255,10 +2245,6 @@ const OptionDef options[] = { { "passlogfile", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(passlogfiles) }, "select two pass log file name prefix", "prefix" }, -#if FF_API_DEINTERLACE - { "deinterlace", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_deinterlace }, - "this option is deprecated, use the yadif filter instead" }, -#endif { "vstats", OPT_VIDEO | OPT_EXPERT , { &opt_vstats }, "dump video coding statistics to file" }, { "vstats_file", OPT_VIDEO | HAS_ARG | OPT_EXPERT , { opt_vstats_file }, diff --git a/doc/avconv.texi b/doc/avconv.texi index 3e1dc4cf34..1842422610 100644 --- a/doc/avconv.texi +++ b/doc/avconv.texi @@ -521,10 +521,6 @@ Discard threshold. @item -rc_override[:@var{stream_specifier}] @var{override} (@emph{output,per-stream}) rate control override for specific intervals -@item -deinterlace -Deinterlace pictures. -This option is deprecated since the deinterlacing is very low quality. -Use the yadif filter with @code{-filter:v yadif}. @item -vstats Dump video coding statistics to @file{vstats_HHMMSS.log}. @item -vstats_file @var{file} -- cgit v1.2.3