mirror of
https://github.com/mpv-player/mpv
synced 2025-02-06 15:11:58 +00:00
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.
This commit is contained in:
parent
aaa27ead86
commit
8e172afc8f
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user