Mercurial > mplayer.hg
diff libmpcodecs/mp_image.c @ 32702:7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
| author | cehoyos |
|---|---|
| date | Fri, 14 Jan 2011 22:10:21 +0000 |
| parents | 8fa2f43cb760 |
| children | e1ee4895e500 |
line wrap: on
line diff
--- a/libmpcodecs/mp_image.c Fri Jan 14 13:36:48 2011 +0000 +++ b/libmpcodecs/mp_image.c Fri Jan 14 22:10:21 2011 +0000 @@ -83,15 +83,15 @@ void copy_mpi(mp_image_t *dmpi, mp_image_t *mpi) { if(mpi->flags&MP_IMGFLAG_PLANAR){ memcpy_pic(dmpi->planes[0],mpi->planes[0], mpi->w, mpi->h, - dmpi->stride[0],mpi->stride[0]); + dmpi->stride[0],mpi->stride[0]); memcpy_pic(dmpi->planes[1],mpi->planes[1], mpi->chroma_width, mpi->chroma_height, - dmpi->stride[1],mpi->stride[1]); + dmpi->stride[1],mpi->stride[1]); memcpy_pic(dmpi->planes[2], mpi->planes[2], mpi->chroma_width, mpi->chroma_height, - dmpi->stride[2],mpi->stride[2]); + dmpi->stride[2],mpi->stride[2]); } else { memcpy_pic(dmpi->planes[0],mpi->planes[0], - mpi->w*(dmpi->bpp/8), mpi->h, - dmpi->stride[0],mpi->stride[0]); + mpi->w*(dmpi->bpp/8), mpi->h, + dmpi->stride[0],mpi->stride[0]); } } @@ -102,24 +102,24 @@ if(out_fmt == IMGFMT_MPEGPES || out_fmt == IMGFMT_ZRMJPEGNI || out_fmt == IMGFMT_ZRMJPEGIT || out_fmt == IMGFMT_ZRMJPEGIB || IMGFMT_IS_HWACCEL(out_fmt)){ - mpi->bpp=0; - return; + mpi->bpp=0; + return; } mpi->num_planes=1; if (IMGFMT_IS_RGB(out_fmt)) { - if (IMGFMT_RGB_DEPTH(out_fmt) < 8 && !(out_fmt&128)) - mpi->bpp = IMGFMT_RGB_DEPTH(out_fmt); - else - mpi->bpp=(IMGFMT_RGB_DEPTH(out_fmt)+7)&(~7); - return; + if (IMGFMT_RGB_DEPTH(out_fmt) < 8 && !(out_fmt&128)) + mpi->bpp = IMGFMT_RGB_DEPTH(out_fmt); + else + mpi->bpp=(IMGFMT_RGB_DEPTH(out_fmt)+7)&(~7); + return; } if (IMGFMT_IS_BGR(out_fmt)) { - if (IMGFMT_BGR_DEPTH(out_fmt) < 8 && !(out_fmt&128)) - mpi->bpp = IMGFMT_BGR_DEPTH(out_fmt); - else - mpi->bpp=(IMGFMT_BGR_DEPTH(out_fmt)+7)&(~7); - mpi->flags|=MP_IMGFLAG_SWAPPED; - return; + if (IMGFMT_BGR_DEPTH(out_fmt) < 8 && !(out_fmt&128)) + mpi->bpp = IMGFMT_BGR_DEPTH(out_fmt); + else + mpi->bpp=(IMGFMT_BGR_DEPTH(out_fmt)+7)&(~7); + mpi->flags|=MP_IMGFLAG_SWAPPED; + return; } mpi->flags|=MP_IMGFLAG_YUV; mpi->num_planes=3; @@ -132,12 +132,12 @@ switch(out_fmt){ case IMGFMT_I420: case IMGFMT_IYUV: - mpi->flags|=MP_IMGFLAG_SWAPPED; + mpi->flags|=MP_IMGFLAG_SWAPPED; case IMGFMT_YV12: - return; + return; case IMGFMT_420A: case IMGFMT_IF09: - mpi->num_planes=4; + mpi->num_planes=4; case IMGFMT_YVU9: case IMGFMT_444P: case IMGFMT_422P: @@ -149,30 +149,30 @@ case IMGFMT_422P16_BE: case IMGFMT_420P16_LE: case IMGFMT_420P16_BE: - return; + return; case IMGFMT_Y800: case IMGFMT_Y8: - /* they're planar ones, but for easier handling use them as packed */ - mpi->flags&=~MP_IMGFLAG_PLANAR; - mpi->num_planes=1; - return; + /* they're planar ones, but for easier handling use them as packed */ + mpi->flags&=~MP_IMGFLAG_PLANAR; + mpi->num_planes=1; + return; case IMGFMT_UYVY: - mpi->flags|=MP_IMGFLAG_SWAPPED; + mpi->flags|=MP_IMGFLAG_SWAPPED; case IMGFMT_YUY2: - mpi->bpp=16; - mpi->num_planes=1; - return; + mpi->bpp=16; + mpi->num_planes=1; + return; case IMGFMT_NV12: - mpi->flags|=MP_IMGFLAG_SWAPPED; + mpi->flags|=MP_IMGFLAG_SWAPPED; case IMGFMT_NV21: - mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=12; - mpi->num_planes=2; - mpi->chroma_width=(mpi->width>>0); - mpi->chroma_height=(mpi->height>>1); - mpi->chroma_x_shift=0; - mpi->chroma_y_shift=1; - return; + mpi->flags|=MP_IMGFLAG_PLANAR; + mpi->bpp=12; + mpi->num_planes=2; + mpi->chroma_width=(mpi->width>>0); + mpi->chroma_height=(mpi->height>>1); + mpi->chroma_x_shift=0; + mpi->chroma_y_shift=1; + return; } mp_msg(MSGT_DECVIDEO,MSGL_WARN,"mp_image: unknown out_fmt: 0x%X\n",out_fmt); mpi->bpp=0; @@ -190,10 +190,10 @@ void free_mp_image(mp_image_t* mpi){ if(!mpi) return; if(mpi->flags&MP_IMGFLAG_ALLOCATED){ - /* becouse we allocate the whole image in once */ - av_free(mpi->planes[0]); - if (mpi->flags & MP_IMGFLAG_RGB_PALETTE) - av_free(mpi->planes[1]); + /* becouse we allocate the whole image in once */ + av_free(mpi->planes[0]); + if (mpi->flags & MP_IMGFLAG_RGB_PALETTE) + av_free(mpi->planes[1]); } free(mpi); }
