mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
std/vp8: tweak decoder.clip_127
This commit is contained in:
1 parent
0ce35fefde
commit
1ac167fc3d
2 files changed
+8
-8
No files matched your search
@@ -82305,12 +82305,12 @@ static uint32_t
|
||||
wuffs_vp8__decoder__clip_127(
|
||||
const wuffs_vp8__decoder* self,
|
||||
uint32_t a_a) {
|
||||
if (a_a >= 2147483648u) {
|
||||
return 0u;
|
||||
} else if (a_a >= 127u) {
|
||||
if (a_a <= 127u) {
|
||||
return a_a;
|
||||
} else if (a_a < 2147483648u) {
|
||||
return 127u;
|
||||
}
|
||||
return a_a;
|
||||
return 0u;
|
||||
}
|
||||
|
||||
// -------- func vp8.decoder.decode_other_partition_lengths
|
||||
|
||||
@@ -239,12 +239,12 @@ pri func decoder.calculate_dequants!() {
|
||||
}
|
||||
|
||||
pri func decoder.clip_127(a: base.u32) base.u32[..= 127] {
|
||||
if args.a >= 0x8000_0000 {
|
||||
return 0
|
||||
} else if args.a >= 127 {
|
||||
if args.a <= 127 {
|
||||
return args.a
|
||||
} else if args.a < 0x8000_0000 {
|
||||
return 127
|
||||
}
|
||||
return args.a
|
||||
return 0
|
||||
}
|
||||
|
||||
pri func decoder.decode_other_partition_lengths!(workbuf: roslice base.u8) base.status {
|
||||
|
||||
Reference in new issue
Block a user