Mercurial > mplayer.hg
changeset 31087:9acad2e25ea1
Handle Y8/Y800 formats more similar to other YUV formats.
author | reimar |
---|---|
date | Sun, 09 May 2010 00:18:26 +0000 |
parents | cca95ca6f52b |
children | fb0f2042a60b |
files | libmpcodecs/img_format.c libmpcodecs/mp_image.c |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/img_format.c Sun May 09 00:16:46 2010 +0000 +++ b/libmpcodecs/img_format.c Sun May 09 00:18:26 2010 +0000 @@ -151,13 +151,18 @@ xs = 0; ys = 1; break; + case IMGFMT_Y8: + case IMGFMT_Y800: + xs = 31; + ys = 31; + break; default: err = 1; break; } if (x_shift) *x_shift = xs; if (y_shift) *y_shift = ys; - bpp = 8 + (16 >> (xs + ys)); + bpp = 8 + ((16 >> xs) >> ys); if (format == IMGFMT_420A) bpp += 8; bpp *= bpp_factor;
--- a/libmpcodecs/mp_image.c Sun May 09 00:16:46 2010 +0000 +++ b/libmpcodecs/mp_image.c Sun May 09 00:18:26 2010 +0000 @@ -153,8 +153,7 @@ case IMGFMT_Y800: case IMGFMT_Y8: /* they're planar ones, but for easier handling use them as packed */ -// mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp=8; + mpi->flags&=~MP_IMGFLAG_PLANAR; mpi->num_planes=1; return; case IMGFMT_UYVY: