TMI-TIFF: Better tests & validation for the YCbCr upsampler.

This commit is contained in:
Harald Kuhr
2013-11-20 21:39:10 +01:00
parent 9a02e90ab9
commit d261105c6b
2 changed files with 80 additions and 9 deletions
@@ -69,6 +69,9 @@ final class YCbCrUpsamplerStream extends FilterInputStream {
public YCbCrUpsamplerStream(final InputStream stream, final int[] chromaSub, final int yCbCrPos, final int columns, final double[] coefficients) {
super(Validate.notNull(stream, "stream"));
Validate.notNull(chromaSub, "chromaSub");
Validate.isTrue(chromaSub.length == 2, "chromaSub.length != 2");
this.horizChromaSub = chromaSub[0];
this.vertChromaSub = chromaSub[1];
this.yCbCrPos = yCbCrPos;