1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-12 09:59:44 +00:00

new error resilience support

option renamed for consitancy with ffmpeg (ver -> er)
 bug numbers changed (1234->1248) as some files need multiple ones


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7723 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
michael 2002-10-13 13:49:24 +00:00
parent 199e0975c2
commit de10f446dd
2 changed files with 35 additions and 16 deletions

View File

@ -247,20 +247,28 @@ ildct use interlaced dct
lavdopts: (decoder options) lavdopts: (decoder options)
--------------------------- ---------------------------
ver error resilience ec error concealment
-1 needed for some very broken, encoders which completly ignore the 1 use strong deblock filter for damaged MBs
standards (one M4S2 asf sample know to need this) (default) 2 iterative MV search (slow)
0 3 all (default)
1 more aggressive error detection, lavc might think that some correct Note: just add the ones u want to enable
streams contain errors
bug manual workaround encoder bugs (cant be easily detected automatically) er error resilience
0 (default) 0 disabled
1 for msmpeg4v3 workaround for some old lavc generated msmpeg4v3 files 1 carefull (should work with broken encoders)
1 for mpeg4 workaround some opendivx? files (autodetected hopefully) 2 normal (default) (works with compliant encoders)
see http://heroinewarrior.com for some samples 3 agressive (more checks but might cause problems even for valid bitstreams)
2 for mpeg4 workaround xvid interlacing bug 4 very agressive
3 for mpeg4 workaround for UMP4 (autodetected hopefully)
bug manual workaround encoder bugs (autodetection isnt foolproof for these)
0 nothing
1 autodetect bugs (default)
2 for msmpeg4v3 some old lavc generated msmpeg4v3 files (no autodetect)
4 for mpeg4 xvid interlacing bug (autodetected if fourcc==XVIX)
8 for mpeg4 UMP4 (autodetected if fourcc==UMP4)
16for mpeg4 padding bug
32for mpeg4 illegal vlc bug (autodetected per fourcc)
Note: just add the ones u want to enable
gray grayscale only decoding (a bit faster than with color ...) gray grayscale only decoding (a bit faster than with color ...)

View File

@ -56,8 +56,13 @@ typedef struct {
static void get_buffer(struct AVCodecContext *avctx, int width, int height, int pict_type); static void get_buffer(struct AVCodecContext *avctx, int width, int height, int pict_type);
static int lavc_param_workaround_bugs=0; #ifdef FF_BUG_AUTODETECT
static int lavc_param_error_resilience=-1; static int lavc_param_workaround_bugs= FF_BUG_AUTODETECT;
#else
static int lavc_param_workaround_bugs= 0;
#endif
static int lavc_param_error_resilience=2;
static int lavc_param_error_concealment=3;
static int lavc_param_gray=0; static int lavc_param_gray=0;
static int lavc_param_vstats=0; static int lavc_param_vstats=0;
static int lavc_param_idct_algo=0; static int lavc_param_idct_algo=0;
@ -65,13 +70,16 @@ static int lavc_param_idct_algo=0;
struct config lavc_decode_opts_conf[]={ struct config lavc_decode_opts_conf[]={
#if LIBAVCODEC_BUILD >= 4611 #if LIBAVCODEC_BUILD >= 4611
{"bug", &lavc_param_workaround_bugs, CONF_TYPE_INT, CONF_RANGE, -1, 99, NULL}, {"bug", &lavc_param_workaround_bugs, CONF_TYPE_INT, CONF_RANGE, -1, 99, NULL},
{"ver", &lavc_param_error_resilience, CONF_TYPE_INT, CONF_RANGE, -1, 99, NULL}, {"er", &lavc_param_error_resilience, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL},
#endif #endif
#if LIBAVCODEC_BUILD >= 4614 #if LIBAVCODEC_BUILD >= 4614
{"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL}, {"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL},
#endif #endif
#if LIBAVCODEC_BUILD >= 4629 #if LIBAVCODEC_BUILD >= 4629
{"idct", &lavc_param_idct_algo, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL}, {"idct", &lavc_param_idct_algo, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL},
#endif
#if LIBAVCODEC_BUILD >= 4631
{"ec", &lavc_param_error_concealment, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL},
#endif #endif
{"vstats", &lavc_param_vstats, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"vstats", &lavc_param_vstats, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{NULL, NULL, 0, 0, 0, 0, NULL} {NULL, NULL, 0, 0, 0, 0, NULL}
@ -170,6 +178,9 @@ static int init(sh_video_t *sh){
#if LIBAVCODEC_BUILD >= 4629 #if LIBAVCODEC_BUILD >= 4629
avctx->idct_algo= lavc_param_idct_algo; avctx->idct_algo= lavc_param_idct_algo;
#endif #endif
#if LIBAVCODEC_BUILD >= 4631
avctx->error_concealment= lavc_param_error_concealment;
#endif
mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"libavcodec.size: %d x %d\n",avctx->width,avctx->height); mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"libavcodec.size: %d x %d\n",avctx->width,avctx->height);
#if LIBAVCODEC_BUILD >= 4605 #if LIBAVCODEC_BUILD >= 4605