# HG changeset patch # User reimar # Date 1234600649 0 # Node ID e9174807756c761707b667bc0c6e814a53a9c520 # Parent 79b0bd20433e26650ef1737c8eeff325e59a77da Cosmetics: handle all special/compressed formats in a single if in mp_image_setfmt diff -r 79b0bd20433e -r e9174807756c libmpcodecs/mp_image.h --- 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; }