changeset 36343:57a21cd090a1

ve_lavc: simplify and support more colorspace formats.
author reimar
date Tue, 03 Sep 2013 20:05:28 +0000
parents bae5b9f9f3a6
children 1251f8aa5785
files libmpcodecs/ve_lavc.c
diffstat 1 files changed, 3 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ve_lavc.c	Tue Sep 03 13:03:35 2013 +0000
+++ b/libmpcodecs/ve_lavc.c	Tue Sep 03 20:05:28 2013 +0000
@@ -703,33 +703,13 @@
 
 static int query_format(struct vf_instance *vf, unsigned int fmt){
     switch(fmt){
-    case IMGFMT_YV12:
     case IMGFMT_IYUV:
     case IMGFMT_I420:
-        if(lavc_param_format == IMGFMT_YV12)
-            return VFCAP_CSP_SUPPORTED | VFCAP_ACCEPT_STRIDE;
-        break;
-    case IMGFMT_411P:
-        if(lavc_param_format == IMGFMT_411P)
-            return VFCAP_CSP_SUPPORTED | VFCAP_ACCEPT_STRIDE;
-        break;
-    case IMGFMT_422P:
-        if(lavc_param_format == IMGFMT_422P)
-            return VFCAP_CSP_SUPPORTED | VFCAP_ACCEPT_STRIDE;
-        break;
-    case IMGFMT_444P:
-        if(lavc_param_format == IMGFMT_444P)
-            return VFCAP_CSP_SUPPORTED | VFCAP_ACCEPT_STRIDE;
-        break;
-    case IMGFMT_YVU9:
-        if(lavc_param_format == IMGFMT_YVU9)
-            return VFCAP_CSP_SUPPORTED | VFCAP_ACCEPT_STRIDE;
-        break;
-    case IMGFMT_BGR32:
-        if(lavc_param_format == IMGFMT_BGR32)
-            return VFCAP_CSP_SUPPORTED | VFCAP_ACCEPT_STRIDE;
+        fmt = IMGFMT_YV12;
         break;
     }
+    if(lavc_param_format == fmt)
+        return VFCAP_CSP_SUPPORTED | VFCAP_ACCEPT_STRIDE;
     return 0;
 }