From 671c39555607989ea57f85bdf5a81e5c44236767 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Mon, 4 Feb 2013 18:06:04 +0200 Subject: [PATCH] video: remove lowres support, cut "too slow" message Remove support for libavcodec lowres feature. This has been removed in Libav (the field still exists but has no effect). Remove the "Possible reasons, problems, workarounds:" portion of "Your system is too SLOW to play this" message which mentioned lowres. Most of the other contents were also wrong, obsolete, or otherwise misleading. --- DOCS/man/en/options.rst | 13 ------------- libmpcodecs/vd_ffmpeg.c | 17 ++++------------- mplayer.c | 18 +----------------- options.h | 1 - 4 files changed, 5 insertions(+), 44 deletions(-) diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 59e9241b78..a6f5d0d4cd 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -1113,19 +1113,6 @@ For best decoding quality use the same IDCT algorithm for decoding and encoding. This may come at a price in accuracy, though. - lowres=[,] - Decode at lower resolutions. Low resolution decoding is not supported - by all codecs, and it will often result in ugly artifacts. This is not - a bug, but a side effect of not decoding at full resolution. - - :0: disabled - :1: 1/2 resolution - :2: 1/4 resolution - :3: 1/8 resolution - - If is specified lowres decoding will be used only if the width of - the video is major than or equal to . - o==[,=[,...]] Pass AVOptions to libavcodec decoder. Note, a patch to make the o= unneeded and pass all unknown options through the AVOption system is diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 0de4d416a9..2ba2b4e154 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -97,7 +97,6 @@ const m_option_t lavc_decode_opts_conf[] = { OPT_INTRANGE("st", lavc_param.skip_top, 0, 0, 999), OPT_INTRANGE("sb", lavc_param.skip_bottom, 0, 0, 999), OPT_FLAG_CONSTANTS("fast", lavc_param.fast, 0, 0, CODEC_FLAG2_FAST), - OPT_STRING("lowres", lavc_param.lowres_str, 0), OPT_STRING("skiploopfilter", lavc_param.skip_loop_filter_str, 0), OPT_STRING("skipidct", lavc_param.skip_idct_str, 0), OPT_STRING("skipframe", lavc_param.skip_frame_str, 0), @@ -237,14 +236,6 @@ static int init(sh_video_t *sh) avctx->debug_mv = lavc_param->vismv; avctx->skip_top = lavc_param->skip_top; avctx->skip_bottom = lavc_param->skip_bottom; - if (lavc_param->lowres_str != NULL) { - int lowres, lowres_w; - sscanf(lavc_param->lowres_str, "%d,%d", &lowres, &lowres_w); - if (lowres < 1 || lowres > 16 || - lowres_w > 0 && avctx->width < lowres_w) - lowres = 0; - avctx->lowres = lowres; - } avctx->skip_loop_filter = str2AVDiscard(lavc_param->skip_loop_filter_str); avctx->skip_idct = str2AVDiscard(lavc_param->skip_idct_str); avctx->skip_frame = str2AVDiscard(lavc_param->skip_frame_str); @@ -447,8 +438,8 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt) // if sh->ImageDesc is non-NULL, it means we decode QuickTime(tm) video. // use dimensions from BIH to avoid black borders at the right and bottom. if (sh->bih && sh->ImageDesc) { - width = sh->bih->biWidth >> avctx->lowres; - height = sh->bih->biHeight >> avctx->lowres; + width = sh->bih->biWidth; + height = sh->bih->biHeight; } /* Reconfiguring filter/VO chain may invalidate direct rendering buffers @@ -728,8 +719,8 @@ static struct mp_image *decode(struct sh_video *sh, struct demux_packet *packet, // average MB quantizer { int x, y; - int w = ((avctx->width << avctx->lowres) + 15) >> 4; - int h = ((avctx->height << avctx->lowres) + 15) >> 4; + int w = (avctx->width + 15) >> 4; + int h = (avctx->height + 15) >> 4; int8_t *q = pic->qscale_table; for (y = 0; y < h; y++) { for (x = 0; x < w; x++) diff --git a/mplayer.c b/mplayer.c index 9feca0a5eb..7504925f6d 100644 --- a/mplayer.c +++ b/mplayer.c @@ -251,23 +251,7 @@ static const char help_text[] = _( " ************************************************\n"\ " **** Your system is too SLOW to play this! ****\n"\ " ************************************************\n\n"\ -"Possible reasons, problems, workarounds:\n"\ -"- Most common: broken/buggy _audio_ driver\n"\ -" - Try -ao sdl or use the OSS emulation of ALSA.\n"\ -" - Experiment with different values for -autosync, 30 is a good start.\n"\ -"- Slow video output\n"\ -" - Try a different -vo driver (-vo help for a list) or try -framedrop!\n"\ -"- Slow CPU\n"\ -" - Don't try to play a big DVD/DivX on a slow CPU! Try some of the lavdopts,\n"\ -" e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all.\n"\ -"- Broken file\n"\ -" - Try various combinations of -nobps -ni -forceidx -mc 0.\n"\ -"- Slow media (NFS/SMB mounts, DVD, VCD etc)\n"\ -" - Try -cache 8192.\n"\ -"- Are you using -cache to play a non-interleaved AVI file?\n"\ -" - Try -nocache.\n"\ -"Read DOCS/HTML/en/video.html for tuning/speedup tips.\n"\ -"If none of this helps you, read DOCS/HTML/en/bugreports.html.\n\n") +) //**************************************************************************// diff --git a/options.h b/options.h index a0e9b39568..8ea635f154 100644 --- a/options.h +++ b/options.h @@ -129,7 +129,6 @@ typedef struct MPOpts { int skip_top; int skip_bottom; int fast; - char *lowres_str; char *skip_loop_filter_str; char *skip_idct_str; char *skip_frame_str; -- 2.11.4.GIT