diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c index 822fa84f..6a73336c 100644 --- a/release/c/wuffs-unsupported-snapshot.c +++ b/release/c/wuffs-unsupported-snapshot.c @@ -82279,7 +82279,7 @@ wuffs_vp8__decoder__calculate_dequants( } else if (self->private_impl.f_seg_absolute) { v_q = wuffs_base__utility__sign_extend_convert_u8_u32(self->private_impl.f_seg_quants[v_seg]); } else { - v_q += wuffs_base__utility__sign_extend_convert_u8_u32(self->private_impl.f_seg_quants[v_seg]); + v_q = ((uint32_t)(((uint32_t)(v_q)) + wuffs_base__utility__sign_extend_convert_u8_u32(self->private_impl.f_seg_quants[v_seg]))); } self->private_impl.f_dequants[v_seg][0u][0u] = WUFFS_VP8__DEQUANTS[0u][wuffs_vp8__decoder__clip_127(self, ((uint32_t)(v_q + self->private_impl.f_quant_ydc_delta)))]; self->private_impl.f_dequants[v_seg][0u][1u] = WUFFS_VP8__DEQUANTS[1u][wuffs_vp8__decoder__clip_127(self, v_q)]; diff --git a/std/vp8/decode_first_partition.wuffs b/std/vp8/decode_first_partition.wuffs index 29417889..df806c80 100644 --- a/std/vp8/decode_first_partition.wuffs +++ b/std/vp8/decode_first_partition.wuffs @@ -216,7 +216,9 @@ pri func decoder.calculate_dequants!() { } else if this.seg_absolute { q = this.util.sign_extend_convert_u8_u32(a: this.seg_quants[seg]) } else { - q ~mod+= this.util.sign_extend_convert_u8_u32(a: this.seg_quants[seg]) + // The (q as base.u32) is redundant, equivalent to q, but avoids a + // -Werror=sign-conversion false positive with gcc 12.2.0. + q = (q as base.u32) ~mod+ this.util.sign_extend_convert_u8_u32(a: this.seg_quants[seg]) } this.dequants[seg][0][0] = DEQUANTS[0][this.clip_127(a: q ~mod+ this.quant_ydc_delta)]