[MPlayer-cvslog] r30408 - trunk/libmpcodecs/vf_scale.c

reimar subversion at mplayerhq.hu
Sat Jan 23 19:37:47 CET 2010


Author: reimar
Date: Sat Jan 23 19:37:47 2010
New Revision: 30408

Log:
Remove the query_format_cache, it is extra complexity that makes improvements
difficult while the speed advantage in normal use cases is not measurable.

Modified:
   trunk/libmpcodecs/vf_scale.c

Modified: trunk/libmpcodecs/vf_scale.c
==============================================================================
--- trunk/libmpcodecs/vf_scale.c	Sat Jan 23 19:28:47 2010	(r30407)
+++ trunk/libmpcodecs/vf_scale.c	Sat Jan 23 19:37:47 2010	(r30408)
@@ -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_ins
     // 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){


More information about the MPlayer-cvslog mailing list