comparison libmpcodecs/vd_ffmpeg.c @ 8341:fd670708f87f

specific debug output support
author michael
date Wed, 04 Dec 2002 12:41:57 +0000
parents a17ce1496ca6
children 03ee1d7deba5
comparison
equal deleted inserted replaced
8340:a17ce1496ca6 8341:fd670708f87f
68 static int lavc_param_error_resilience=2; 68 static int lavc_param_error_resilience=2;
69 static int lavc_param_error_concealment=3; 69 static int lavc_param_error_concealment=3;
70 static int lavc_param_gray=0; 70 static int lavc_param_gray=0;
71 static int lavc_param_vstats=0; 71 static int lavc_param_vstats=0;
72 static int lavc_param_idct_algo=0; 72 static int lavc_param_idct_algo=0;
73 static int lavc_param_debug=0;
73 74
74 struct config lavc_decode_opts_conf[]={ 75 struct config lavc_decode_opts_conf[]={
75 {"bug", &lavc_param_workaround_bugs, CONF_TYPE_INT, CONF_RANGE, -1, 99, NULL}, 76 {"bug", &lavc_param_workaround_bugs, CONF_TYPE_INT, CONF_RANGE, -1, 99, NULL},
76 {"er", &lavc_param_error_resilience, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL}, 77 {"er", &lavc_param_error_resilience, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL},
77 {"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL}, 78 {"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL},
78 {"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},
79 {"ec", &lavc_param_error_concealment, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL}, 80 {"ec", &lavc_param_error_concealment, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL},
80 {"vstats", &lavc_param_vstats, CONF_TYPE_FLAG, 0, 0, 1, NULL}, 81 {"vstats", &lavc_param_vstats, CONF_TYPE_FLAG, 0, 0, 1, NULL},
82 #if LIBAVCODEC_BUILD >= 4642
83 {"debug", &lavc_param_debug, CONF_TYPE_INT, CONF_RANGE, 0, 9999999, NULL},
84 #endif
81 {NULL, NULL, 0, 0, 0, 0, NULL} 85 {NULL, NULL, 0, 0, 0, 0, NULL}
82 }; 86 };
83 87
84 // to set/get/query special features/parameters 88 // to set/get/query special features/parameters
85 static int control(sh_video_t *sh,int cmd,void* arg,...){ 89 static int control(sh_video_t *sh,int cmd,void* arg,...){
162 avctx->error_resilience= lavc_param_error_resilience; 166 avctx->error_resilience= lavc_param_error_resilience;
163 if(lavc_param_gray) avctx->flags|= CODEC_FLAG_GRAY; 167 if(lavc_param_gray) avctx->flags|= CODEC_FLAG_GRAY;
164 avctx->fourcc= sh->format; 168 avctx->fourcc= sh->format;
165 avctx->idct_algo= lavc_param_idct_algo; 169 avctx->idct_algo= lavc_param_idct_algo;
166 avctx->error_concealment= lavc_param_error_concealment; 170 avctx->error_concealment= lavc_param_error_concealment;
167 171 #if LIBAVCODEC_BUILD >= 4642
172 avctx->debug= lavc_param_debug;
173 #endif
168 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"libavcodec.size: %d x %d\n",avctx->width,avctx->height); 174 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"libavcodec.size: %d x %d\n",avctx->width,avctx->height);
169 /* AVRn stores huffman table in AVI header */ 175 /* AVRn stores huffman table in AVI header */
170 /* Pegasus MJPEG stores it also in AVI header, but it uses the common 176 /* Pegasus MJPEG stores it also in AVI header, but it uses the common
171 MJPG fourcc :( */ 177 MJPG fourcc :( */
172 if (sh->bih && (sh->bih->biSize != sizeof(BITMAPINFOHEADER)) && 178 if (sh->bih && (sh->bih->biSize != sizeof(BITMAPINFOHEADER)) &&