changeset 28517:e9174807756c

Cosmetics: handle all special/compressed formats in a single if in mp_image_setfmt
author reimar
date Sat, 14 Feb 2009 08:37:29 +0000
parents 79b0bd20433e
children bc49856e5024
files libmpcodecs/mp_image.h
diffstat 1 files changed, 4 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/mp_image.h	Sat Feb 14 08:29:45 2009 +0000
+++ b/libmpcodecs/mp_image.h	Sat Feb 14 08:37:29 2009 +0000
@@ -108,21 +108,10 @@
 static inline void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){
     mpi->flags&=~(MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV|MP_IMGFLAG_SWAPPED);
     mpi->imgfmt=out_fmt;
-    if(out_fmt == IMGFMT_MPEGPES){
-	mpi->bpp=0;
-	return;
-    }
-    if(out_fmt == IMGFMT_ZRMJPEGNI ||
-	    out_fmt == IMGFMT_ZRMJPEGIT ||
-	    out_fmt == IMGFMT_ZRMJPEGIB){
-	mpi->bpp=0;
-	return;
-    }
-    if(IMGFMT_IS_VDPAU(out_fmt)){
-        mpi->bpp=0;
-        return;
-    }
-    if(IMGFMT_IS_XVMC(out_fmt)){
+    // compressed formats
+    if(out_fmt == IMGFMT_MPEGPES ||
+       out_fmt == IMGFMT_ZRMJPEGNI || out_fmt == IMGFMT_ZRMJPEGIT || out_fmt == IMGFMT_ZRMJPEGIB ||
+       IMGFMT_IS_VDPAU(out_fmt) || IMGFMT_IS_XVMC(out_fmt)){
 	mpi->bpp=0;
 	return;
     }