X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-core%2Fsrc%2Fscale%2Fcolorcvt.rs;h=4b076d65342e121071f36d956784cef9a14fd3a2;hb=HEAD;hp=00ae2a56203b38e2c9ac315be0e1696edd341226;hpb=25e0bf9a974b1bb5a8f8b38e23b4a7e91db3eab0;p=nihav.git diff --git a/nihav-core/src/scale/colorcvt.rs b/nihav-core/src/scale/colorcvt.rs index 00ae2a5..4b076d6 100644 --- a/nihav-core/src/scale/colorcvt.rs +++ b/nihav-core/src/scale/colorcvt.rs @@ -265,8 +265,8 @@ impl Kernel for RgbToYuv { let (y, u, v) = matrix_mul(&self.matrix, r, g, b); dst[yoff + x] = (y as i16).max(0).min(255) as u8; - dst[uoff + x] = ((u as i16).max(-128).min(128) + 128) as u8; - dst[voff + x] = ((v as i16).max(-128).min(128) + 128) as u8; + dst[uoff + x] = ((u as i16).max(-128).min(127) + 128) as u8; + dst[voff + x] = ((v as i16).max(-128).min(127) + 128) as u8; } roff += istrides[0]; goff += istrides[1];