changeset 6211:a59795bd14d0

revised query_format
author alex
date Mon, 27 May 2002 17:44:32 +0000
parents 548129e201a2
children 2001affedb75
files libvo/vo_directfb.c libvo/vo_ggi.c libvo/vo_gif89a.c
diffstat 3 files changed, 17 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_directfb.c	Mon May 27 17:35:57 2002 +0000
+++ b/libvo/vo_directfb.c	Mon May 27 17:44:32 2002 +0000
@@ -799,7 +799,7 @@
 
 static uint32_t query_format(uint32_t format)
 {
-	int ret = 0x4; /* osd/sub is supported on every bpp */
+	int ret = VFCAP_CSP_SUPPORTED|VFCAP_OSD; /* osd/sub is supported on every bpp */
 
 //        preinit(NULL);
 
@@ -811,27 +811,28 @@
 
 // Just support those detected by preinit
                 case IMGFMT_RGB32:
-                case IMGFMT_BGR32: if (modes[3].valid) return ret|0x2;
+                case IMGFMT_BGR32: if (modes[3].valid) return ret;
                                    break;
                 case IMGFMT_RGB24:
-                case IMGFMT_BGR24: if (modes[2].valid) return ret|0x2;
+                case IMGFMT_BGR24: if (modes[2].valid) return ret;
                                    break;
                 case IMGFMT_RGB16:
                 case IMGFMT_BGR16:
                 case IMGFMT_RGB15:
-                case IMGFMT_BGR15: if (modes[1].valid) return ret|0x2;
+                case IMGFMT_BGR15: if (modes[1].valid) return ret;
                                    break;
                 case IMGFMT_YUY2: if (videolayerpresent) {
 				    if (videolayercaps.yuy2) {
-					return ret|0x2|0x1;
+					return ret|VFCAP_CSP_SUPPORTED_BY_HW;
 				    } else {
-				    	return ret|0x1;
+				    	return ret;
 				    };
 				   };				    
                                    break;
         	case IMGFMT_YV12:  if ((videolayerpresent) &&
 				       (videolayercaps.i420 || videolayercaps.iv12))
-				    return ret|0x2|0x1; else return ret|0x1;
+				    return ret|VFCAP_CSP_SUPPORTED_BY_HW;
+				    else return ret;
                                    break;
   // YV12 should work in all cases
  	}
--- a/libvo/vo_ggi.c	Mon May 27 17:35:57 2002 +0000
+++ b/libvo/vo_ggi.c	Mon May 27 17:44:32 2002 +0000
@@ -467,24 +467,25 @@
     {
 	if (ggi_conf.directbuffer)
 #ifdef GGI_FLIP
-	    return(3|VFCAP_OSD|VFCAP_FLIP);
+	    return(VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|
+		VFCAP_OSD|VFCAP_FLIP);
 #else
-	    return(3|VFCAP_OSD);
+	    return(VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_OSD);
 #endif
 	else
-	    return(3);
+	    return(VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW);
     }
     
     if (IMGFMT_IS_BGR(format) || IMGFMT_IS_RGB(format))
     {
 	if (ggi_conf.directbuffer)
 #ifdef GGI_FLIP
-	    return(1|VFCAP_OSD|VFCAP_FLIP);
+	    return(VFCAP_CSP_SUPPORTED|VFCAP_OSD|VFCAP_FLIP);
 #else
-	    return(1|VFCAP_OSD);
+	    return(VFCAP_CSP_SUPPORTED|VFCAP_OSD);
 #endif
 	else
-	    return(1);
+	    return(VFCAP_CSP_SUPPORTED);
     }
 
     return(0);
--- a/libvo/vo_gif89a.c	Mon May 27 17:35:57 2002 +0000
+++ b/libvo/vo_gif89a.c	Mon May 27 17:44:32 2002 +0000
@@ -226,9 +226,10 @@
 {
     switch(format){
     case IMGFMT_YV12:
+	return VFCAP_CSP_SUPPORTED | VFCAP_TIMER | VFCAP_ACCEPT_STRIDE;
     case IMGFMT_RGB|24:
     case IMGFMT_BGR|24:
-        return 1 | VFCAP_TIMER | VFCAP_ACCEPT_STRIDE;
+        return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_OSD | VFCAP_TIMER;
     }
     return 0;
 }