summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/img_format.c
diff options
context:
space:
mode:
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 f0cb3db97e..bdf4d2f6f8 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;