summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/img_format.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-30 15:21:18 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-30 15:21:18 +0300
commit18657beb190b3e4acc6404c3b87e6eafbd22de3c (patch)
tree727383b945b8d0239b180200e3f6e2dfe1f10766 /libmpcodecs/img_format.c
parent1888e57af7e1ce51517ad9bdc2d201eaf84a98d2 (diff)
parent8d0afdaa88f855deafe97bd94656b300e31ada35 (diff)
downloadmpv-18657beb190b3e4acc6404c3b87e6eafbd22de3c.tar.bz2
mpv-18657beb190b3e4acc6404c3b87e6eafbd22de3c.tar.xz
Merge svn changes up to r31145
Diffstat (limited to 'libmpcodecs/img_format.c')
-rw-r--r--libmpcodecs/img_format.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c
index 9becd772da..df47ce043b 100644
--- a/libmpcodecs/img_format.c
+++ b/libmpcodecs/img_format.c
@@ -151,13 +151,18 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift)
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;