mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 00:47:28 +01:00
std/brotli: support compound dictionaries at qualities 10 and 11
Mirror the Zopfli path's compound dictionary code in backward_references_hq.c and hash.h: LookupAllCompoundDictionaryMatches, FindAllCompoundDictionaryMatches, MergeMatches, the lz_matches_offset and shadow_matches scratch space, the gap in ComputeDistanceShortcut, UpdateNodes (including its compound dictionary last distance branch) and BrotliZopfliCreateCommands, and the dictionary distance passed to FindAllMatchesH10. Remove the quality 10 and 11 dictionary gate (and its now unused status), size the quality 11 variable region for the shadow matches and turn the gate's test into a byte-exact check. The mimic dictionary grid, big and rejections tests now also cover qualities 10 and 11.
This commit is contained in:
8 files changed
+854
-120
No files matched your search
@@ -954,9 +954,9 @@ pri func encoder.encode_data!(wb: slice base.u8, dwb: roslice base.u8, is_last:
|
||||
}
|
||||
|
||||
if this.quality == 10 {
|
||||
status = this.create_zopfli_backward_references!(wb: args.wb, num_bytes: bytes, position: wrapped_last_processed_pos)
|
||||
status = this.create_zopfli_backward_references!(wb: args.wb, dwb: args.dwb, num_bytes: bytes, position: wrapped_last_processed_pos)
|
||||
} else if this.quality == 11 {
|
||||
status = this.create_hq_zopfli_backward_references!(wb: args.wb, num_bytes: bytes, position: wrapped_last_processed_pos)
|
||||
status = this.create_hq_zopfli_backward_references!(wb: args.wb, dwb: args.dwb, num_bytes: bytes, position: wrapped_last_processed_pos)
|
||||
} else {
|
||||
status = this.create_backward_references!(wb: args.wb, dwb: args.dwb, num_bytes: bytes, position: wrapped_last_processed_pos)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user