mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 16:47:28 +01:00
Add pixel_format, image_buffer, etc. definitions
This commit is contained in:
1 parent
e700bcd4f8
commit
82a48796c8
20 files changed
+4865
-446
No files matched your search
@@ -78,16 +78,16 @@ pub struct decoder?(
|
||||
// the table value's number of decoder.bits to consume. If it compares
|
||||
// less, then more source bytes are read and the table lookup re-tried.
|
||||
//
|
||||
// The table value is:
|
||||
// - bit 31 indicates the symbol is a literal.
|
||||
// - bit 30 indicates the symbol is a base number + extra bits.
|
||||
// - bit 29 indicates the symbol is the end-of-block.
|
||||
// - bit 28 indicates a redirect to another part of the table.
|
||||
// - bit 27 indicates an invalid value.
|
||||
// - bits 26-24 are zero.
|
||||
// - bits 23- 8 is the redirect offset, literal (in bits 15-8) or base number.
|
||||
// - bits 7- 4 is the redirected table's bits or number of extra bits.
|
||||
// - bits 3- 0 are the number of decoder.bits to consume.
|
||||
// The table value's bits:
|
||||
// - bit 31 indicates a literal.
|
||||
// - bit 30 indicates a base number + extra bits.
|
||||
// - bit 29 indicates end-of-block.
|
||||
// - bit 28 indicates a redirect to another part of the table.
|
||||
// - bit 27 indicates an invalid value.
|
||||
// - bits 26 .. 24 are zero.
|
||||
// - bits 23 .. 8 are the redirect offset, literal (in bits 15-8) or base number.
|
||||
// - bits 7 .. 4 are the redirected table's bits or number of extra bits.
|
||||
// - bits 3 .. 0 are the number of decoder.bits to consume.
|
||||
//
|
||||
// Exactly one of the eight bits 31-24 should be set.
|
||||
//
|
||||
|
||||
@@ -77,7 +77,11 @@ pub func decoder.decode_config?(dst ptr image_config, src reader1)() {
|
||||
}
|
||||
|
||||
// TODO: rename initialize to set?
|
||||
in.dst.initialize!(width:this.width, height:this.height, color_model:0)
|
||||
//
|
||||
// TODO: a Wuffs (not just C) name for the
|
||||
// WUFFS_BASE__PIXEL_FORMAT__BGRA_NONPREMUL_INDEXED magic pixfmt constant.
|
||||
in.dst.initialize!(pixfmt:0x22088888, pixsub:0,
|
||||
width:this.width, height:this.height, num_loops:this.num_loops)
|
||||
this.call_sequence = 1
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user