From 86f1430a590e1f017556a94281a9f81aef4413cf Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 23 Jan 2010 18:37:47 +0000 Subject: [PATCH] Remove the query_format_cache, it is extra complexity that makes improvements difficult while the speed advantage in normal use cases is not measurable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30408 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_scale.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c index 81fad3d33c..4bc32fc442 100644 --- a/libmpcodecs/vf_scale.c +++ b/libmpcodecs/vf_scale.c @@ -30,7 +30,6 @@ static struct vf_priv_s { int interlaced; int noup; int accurate_rnd; - int query_format_cache[64]; } const vf_priv_dflt = { -1,-1, 0, @@ -102,11 +101,7 @@ static unsigned int find_best_out(vf_instance_t *vf){ // find the best outfmt: for(i=0; outfmt_list[i]; i++){ const int format= outfmt_list[i]; - int ret= vf->priv->query_format_cache[i]-1; - if(ret == -1){ - ret= vf_next_query_format(vf, outfmt_list[i]); - vf->priv->query_format_cache[i]= ret+1; - } + int ret = vf_next_query_format(vf, format); mp_msg(MSGT_VFILTER,MSGL_DBG2,"scale: query(%s) -> %d\n",vo_format_name(format),ret&3); if(ret&VFCAP_CSP_SUPPORTED_BY_HW){