ref: a32c50862831c9f74ad38acf5764dac30a15a718
parent: da97ba3fb1aba089f814918691296b08a7e7a663
author: David Michael Barr <[email protected]>
date: Thu Oct 4 17:59:07 EDT 2018
Lossless segments: allow CfL in 4x4 chroma blocks This resolves a mismatch for libaom test vectors: * av1-1-b8-00-quantizer-00.ivf * av1-1-b10-00-quantizer-00.ivf Helped-by: Ronald S. Bultje <[email protected]>
--- a/src/decode.c
+++ b/src/decode.c
@@ -954,7 +954,8 @@
}
if (has_chroma) {
- const int cfl_allowed = !!(cfl_allowed_mask & (1 << bs));
+ const int cfl_allowed = f->frame_hdr.segmentation.lossless[b->seg_id] ?
+ cbw4 == 1 && cbh4 == 1 : !!(cfl_allowed_mask & (1 << bs));
uint16_t *const uvmode_cdf = ts->cdf.m.uv_mode[cfl_allowed][b->y_mode];
b->uv_mode = msac_decode_symbol_adapt(&ts->msac, uvmode_cdf,
N_UV_INTRA_PRED_MODES - !cfl_allowed);