summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-01-13 22:52:20 +0100
committerwm4 <wm4@nowhere>2013-01-13 23:29:30 +0100
commit8e172afc8f11e16673154e8c6bf013046c3bd043 (patch)
tree33ccd9c4da43d56aea29937ceef185e196ab12f1
parentaaa27ead86b907a52e5e1e2856f61d18d16f077c (diff)
downloadmpv-8e172afc8f11e16673154e8c6bf013046c3bd043.tar.bz2
mpv-8e172afc8f11e16673154e8c6bf013046c3bd043.tar.xz
vd_lavc: remove lowres decoding
This was a "broken misfeature" according to Libav developers. It wasn't implemented for modern codecs (like h264), and has been removed from Libav a while ago (the AVCodecContext field has been marked as deprecated and its value is ignored). FFmpeg still supports it, but isn't much useful due to aforementioned reasons. Remove the code to enable it.
-rw-r--r--DOCS/man/en/options.rst13
-rw-r--r--core/options.h1
-rw-r--r--video/decode/vd_lavc.c13
3 files changed, 2 insertions, 25 deletions
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index 162c8a560e..b8fb051495 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -989,19 +989,6 @@
For best decoding quality use the same IDCT algorithm for decoding and
encoding. This may come at a price in accuracy, though.
- lowres=<number>[,<w>]
- 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 <w> is specified lowres decoding will be used only if the width of
- the video is major than or equal to <w>.
-
o=<key>=<value>[,<key>=<value>[,...]]
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/core/options.h b/core/options.h
index 5e9fff1c27..047c027a41 100644
--- a/core/options.h
+++ b/core/options.h
@@ -142,7 +142,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;
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index a55e17083d..ace24c4da4 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -90,7 +90,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),
@@ -184,8 +183,8 @@ static void print_vstats(sh_video_t *sh, int len)
// 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++)
@@ -365,14 +364,6 @@ static int init_avctx(sh_video_t *sh, AVCodec *lavc_codec, struct hwdec *hwdec)
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);