diff --git a/src/asm/x86/quantize.rs b/src/asm/x86/quantize.rs index 0c4f84d58b..0331685635 100644 --- a/src/asm/x86/quantize.rs +++ b/src/asm/x86/quantize.rs @@ -185,9 +185,9 @@ mod test { let mut out = [0u16; 16]; let area: usize = av1_get_coded_tx_size(tx_size).area(); out[0] = 0; - out[1] = area; + out[1] = area as u16; for eob in out.iter_mut().skip(2) { - *eob = rng.gen_range(0..area); + *eob = rng.gen_range(0..area as u16); } out }; @@ -198,7 +198,9 @@ mod test { // Generate quantized coefficients up to the eob let between = Uniform::from(-i16::MAX..=i16::MAX); - for (i, qcoeff) in qcoeffs.data.iter_mut().enumerate().take(eob) { + for (i, qcoeff) in + qcoeffs.data.iter_mut().enumerate().take(eob as usize) + { *qcoeff = between.sample(&mut rng) / if i == 0 { dc_quant } else { ac_quant }; } diff --git a/src/quantize/mod.rs b/src/quantize/mod.rs index b317a1e81e..d2d3533c0d 100644 --- a/src/quantize/mod.rs +++ b/src/quantize/mod.rs @@ -299,7 +299,7 @@ impl QuantizationContext { .unwrap_or(0); // We skip the DC coefficient since it has its own quantizer index. if eob_minus_one > 0 { - eob_minus_one as u16 + 1 + eob_minus_one + 1 } else { u16::from(qcoeffs[0] != T::cast_from(0)) } diff --git a/src/rdo.rs b/src/rdo.rs index fd71cf503c..42146d5136 100644 --- a/src/rdo.rs +++ b/src/rdo.rs @@ -1641,7 +1641,7 @@ pub fn rdo_cfl_alpha( &mut rec_region, uv_tx_size, fi.sequence.bit_depth, - &ac, + ac, IntraParam::Alpha(alpha), None, &edge_buf,