The reconstructed picture should always be clipped (see section 8.6.5),
previously we did not clip coding units where
cu_transquant_bypass_flag == 1.
Sample-Id:
00001325-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
for (y = 0; y < 4; y++) {
for (x = 0; x < 4; x++) {
- dst[x] += *coeffs;
+ dst[x] = av_clip_pixel(dst[x] + *coeffs);
coeffs++;
}
dst += stride;
for (y = 0; y < 8; y++) {
for (x = 0; x < 8; x++) {
- dst[x] += *coeffs;
+ dst[x] = av_clip_pixel(dst[x] + *coeffs);
coeffs++;
}
dst += stride;
for (y = 0; y < 16; y++) {
for (x = 0; x < 16; x++) {
- dst[x] += *coeffs;
+ dst[x] = av_clip_pixel(dst[x] + *coeffs);
coeffs++;
}
dst += stride;
for (y = 0; y < 32; y++) {
for (x = 0; x < 32; x++) {
- dst[x] += *coeffs;
+ dst[x] = av_clip_pixel(dst[x] + *coeffs);
coeffs++;
}
dst += stride;