comparison libmpcodecs/vd_ffmpeg.c @ 13230:a83623b3b86a

non spec compliant optizations support
author michael
date Thu, 02 Sep 2004 16:52:13 +0000
parents 8be7dbcea0be
children 75b2ff55c972
comparison
equal deleted inserted replaced
13229:b1e482fcd919 13230:a83623b3b86a
106 static int lavc_param_idct_algo=0; 106 static int lavc_param_idct_algo=0;
107 static int lavc_param_debug=0; 107 static int lavc_param_debug=0;
108 static int lavc_param_vismv=0; 108 static int lavc_param_vismv=0;
109 static int lavc_param_skip_top=0; 109 static int lavc_param_skip_top=0;
110 static int lavc_param_skip_bottom=0; 110 static int lavc_param_skip_bottom=0;
111 static int lavc_param_fast=0;
111 112
112 m_option_t lavc_decode_opts_conf[]={ 113 m_option_t lavc_decode_opts_conf[]={
113 {"bug", &lavc_param_workaround_bugs, CONF_TYPE_INT, CONF_RANGE, -1, 999999, NULL}, 114 {"bug", &lavc_param_workaround_bugs, CONF_TYPE_INT, CONF_RANGE, -1, 999999, NULL},
114 {"er", &lavc_param_error_resilience, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL}, 115 {"er", &lavc_param_error_resilience, CONF_TYPE_INT, CONF_RANGE, 0, 99, NULL},
115 {"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL}, 116 {"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PART, NULL},
118 {"vstats", &lavc_param_vstats, CONF_TYPE_FLAG, 0, 0, 1, NULL}, 119 {"vstats", &lavc_param_vstats, CONF_TYPE_FLAG, 0, 0, 1, NULL},
119 {"debug", &lavc_param_debug, CONF_TYPE_INT, CONF_RANGE, 0, 9999999, NULL}, 120 {"debug", &lavc_param_debug, CONF_TYPE_INT, CONF_RANGE, 0, 9999999, NULL},
120 {"vismv", &lavc_param_vismv, CONF_TYPE_INT, CONF_RANGE, 0, 9999999, NULL}, 121 {"vismv", &lavc_param_vismv, CONF_TYPE_INT, CONF_RANGE, 0, 9999999, NULL},
121 {"st", &lavc_param_skip_top, CONF_TYPE_INT, CONF_RANGE, 0, 999, NULL}, 122 {"st", &lavc_param_skip_top, CONF_TYPE_INT, CONF_RANGE, 0, 999, NULL},
122 {"sb", &lavc_param_skip_bottom, CONF_TYPE_INT, CONF_RANGE, 0, 999, NULL}, 123 {"sb", &lavc_param_skip_bottom, CONF_TYPE_INT, CONF_RANGE, 0, 999, NULL},
124 #ifdef CODEC_FLAG2_FAST
125 {"fast", &lavc_param_fast, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG2_FAST, NULL},
126 #endif
123 {NULL, NULL, 0, 0, 0, 0, NULL} 127 {NULL, NULL, 0, 0, 0, 0, NULL}
124 }; 128 };
125 129
126 // to set/get/query special features/parameters 130 // to set/get/query special features/parameters
127 static int control(sh_video_t *sh,int cmd,void* arg,...){ 131 static int control(sh_video_t *sh,int cmd,void* arg,...){
236 avctx->width = sh->disp_w; 240 avctx->width = sh->disp_w;
237 avctx->height= sh->disp_h; 241 avctx->height= sh->disp_h;
238 avctx->workaround_bugs= lavc_param_workaround_bugs; 242 avctx->workaround_bugs= lavc_param_workaround_bugs;
239 avctx->error_resilience= lavc_param_error_resilience; 243 avctx->error_resilience= lavc_param_error_resilience;
240 if(lavc_param_gray) avctx->flags|= CODEC_FLAG_GRAY; 244 if(lavc_param_gray) avctx->flags|= CODEC_FLAG_GRAY;
245 #ifdef CODEC_FLAG2_FAST
246 avctx->flags2|= lavc_param_fast;
247 #endif
241 avctx->codec_tag= sh->format; 248 avctx->codec_tag= sh->format;
242 #if LIBAVCODEC_BUILD >= 4679 249 #if LIBAVCODEC_BUILD >= 4679
243 avctx->stream_codec_tag= sh->video.fccHandler; 250 avctx->stream_codec_tag= sh->video.fccHandler;
244 #endif 251 #endif
245 avctx->idct_algo= lavc_param_idct_algo; 252 avctx->idct_algo= lavc_param_idct_algo;