Mercurial > mplayer.hg
comparison libmpcodecs/vd_ffmpeg.c @ 7722:a181875e0aa8
new error resilience support
option renamed for consitancy with ffmpeg (ver -> er)
bug numbers changed (1234->1248) as some files need multiple ones
author | michael |
---|---|
date | Sun, 13 Oct 2002 13:49:24 +0000 |
parents | c92b0b4d9e77 |
children | b81b0ab0aa40 |
comparison
equal
deleted
inserted
replaced
7721:765afc1fcd67 | 7722:a181875e0aa8 |
---|---|
54 | 54 |
55 #include "cfgparser.h" | 55 #include "cfgparser.h" |
56 | 56 |
57 static void get_buffer(struct AVCodecContext *avctx, int width, int height, int pict_type); | 57 static void get_buffer(struct AVCodecContext *avctx, int width, int height, int pict_type); |
58 | 58 |
59 static int lavc_param_workaround_bugs=0; | 59 #ifdef FF_BUG_AUTODETECT |
60 static int lavc_param_error_resilience=-1; | 60 static int lavc_param_workaround_bugs= FF_BUG_AUTODETECT; |
61 #else | |
62 static int lavc_param_workaround_bugs= 0; | |
63 #endif | |
64 static int lavc_param_error_resilience=2; | |
65 static int lavc_param_error_concealment=3; | |
61 static int lavc_param_gray=0; | 66 static int lavc_param_gray=0; |
62 static int lavc_param_vstats=0; | 67 static int lavc_param_vstats=0; |
63 static int lavc_param_idct_algo=0; | 68 static int lavc_param_idct_algo=0; |
64 | 69 |
65 struct config lavc_decode_opts_conf[]={ | 70 struct config lavc_decode_opts_conf[]={ |
66 #if LIBAVCODEC_BUILD >= 4611 | 71 #if LIBAVCODEC_BUILD >= 4611 |
67 {"bug", &lavc_param_workaround_bugs, CONF_TYPE_INT, CONF_RANGE, -1, 99, NULL}, | 72 {"bug", &lavc_param_workaround_bugs, CONF_TYPE_INT, CONF_RANGE, -1, 99, NULL}, |
68 {"ver", &lavc_param_error_resilience, CONF_TYPE_INT, CONF_RANGE, -1, 99, NULL}, | 73 {"er", &lavc_param_error_resilience, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL}, |
69 #endif | 74 #endif |
70 #if LIBAVCODEC_BUILD >= 4614 | 75 #if LIBAVCODEC_BUILD >= 4614 |
71 {"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL}, | 76 {"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL}, |
72 #endif | 77 #endif |
73 #if LIBAVCODEC_BUILD >= 4629 | 78 #if LIBAVCODEC_BUILD >= 4629 |
74 {"idct", &lavc_param_idct_algo, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL}, | 79 {"idct", &lavc_param_idct_algo, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL}, |
80 #endif | |
81 #if LIBAVCODEC_BUILD >= 4631 | |
82 {"ec", &lavc_param_error_concealment, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL}, | |
75 #endif | 83 #endif |
76 {"vstats", &lavc_param_vstats, CONF_TYPE_FLAG, 0, 0, 1, NULL}, | 84 {"vstats", &lavc_param_vstats, CONF_TYPE_FLAG, 0, 0, 1, NULL}, |
77 {NULL, NULL, 0, 0, 0, 0, NULL} | 85 {NULL, NULL, 0, 0, 0, 0, NULL} |
78 }; | 86 }; |
79 | 87 |
168 avctx->fourcc= sh->format; | 176 avctx->fourcc= sh->format; |
169 #endif | 177 #endif |
170 #if LIBAVCODEC_BUILD >= 4629 | 178 #if LIBAVCODEC_BUILD >= 4629 |
171 avctx->idct_algo= lavc_param_idct_algo; | 179 avctx->idct_algo= lavc_param_idct_algo; |
172 #endif | 180 #endif |
181 #if LIBAVCODEC_BUILD >= 4631 | |
182 avctx->error_concealment= lavc_param_error_concealment; | |
183 #endif | |
173 | 184 |
174 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"libavcodec.size: %d x %d\n",avctx->width,avctx->height); | 185 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"libavcodec.size: %d x %d\n",avctx->width,avctx->height); |
175 #if LIBAVCODEC_BUILD >= 4605 | 186 #if LIBAVCODEC_BUILD >= 4605 |
176 /* AVRn stores huffman table in AVI header */ | 187 /* AVRn stores huffman table in AVI header */ |
177 /* Pegasus MJPEG stores it also in AVI header, but it uses the common | 188 /* Pegasus MJPEG stores it also in AVI header, but it uses the common |