# HG changeset patch # User reimar # Date 1378238728 0 # Node ID 57a21cd090a1d3b93601cbb34ce96581fabacbd9 # Parent bae5b9f9f3a6563b6f46039b62c084f18c0b5bf7 ve_lavc: simplify and support more colorspace formats. diff -r bae5b9f9f3a6 -r 57a21cd090a1 libmpcodecs/ve_lavc.c --- 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; }