summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-14 08:37:29 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-14 08:37:29 +0000
commit5da2252a2c58c829284839925e357828f80f6762 (patch)
tree25b64eb92a449700074bc24c08a38cfe0c4f1ba6 /libmpcodecs
parent8c1978cc265ececda2a30ea40bea0de52f4fc1d1 (diff)
downloadmpv-5da2252a2c58c829284839925e357828f80f6762.tar.bz2
mpv-5da2252a2c58c829284839925e357828f80f6762.tar.xz
Cosmetics: handle all special/compressed formats in a single if in mp_image_setfmt
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28552 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/mp_image.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/libmpcodecs/mp_image.h b/libmpcodecs/mp_image.h
index 94fd0d4758..41e1b8fa8c 100644
--- a/libmpcodecs/mp_image.h
+++ b/libmpcodecs/mp_image.h
@@ -108,21 +108,10 @@ typedef struct mp_image_s {
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;
}