std/vp8: fix skip for all-zero DCT coefficients

"wuffs test -mimic std/webp" now passes.

This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications.

Updates PR #168
This commit is contained in:
Nigel Tao committed 2026-06-22 15:23:11 +10:00
1 parent b4c8b9c238
commit e9ebad85a7
7 files changed
+22 -14

No files matched your search

+6 -1
View File
@@ -13,7 +13,7 @@ pri func decoder.decode_coefficients!(
mbx: base.u32[..= 0x3FF],
mby: base.u32[..= 0x3FF],
seg: base.u32[..= 3],
luma_mode: base.u32[..= 4]) {
luma_mode: base.u32[..= 4]) base.u32[..= 1] {
var bc : base.u32
var by : base.u32
var bx : base.u32
@@ -134,6 +134,11 @@ pri func decoder.decode_coefficients!(
}
bc += 2
}
if (this.mb_dc_nz == 0) and (this.mb_ac_nz == 0) {
return 1
}
return 0
}
pri func decoder.initialize_mb_coeffs!() {
+1 -1
View File
@@ -119,7 +119,7 @@ pri func decoder.decode_one_macroblock!(workbuf: slice base.u8, mbx: base.u32[..
this.mb_ac_nz = 0
} else {
this.decode_coefficients!(
skip = this.decode_coefficients!(
workbuf: args.workbuf, mbx: args.mbx, mby: args.mby,
seg: seg, luma_mode: luma_mode)
}