mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Add colons to const syntax
This commit is contained in:
1 parent
80071730a3
commit
532e18c4a5
16 files changed
+119
-99
No files matched your search
@@ -24,7 +24,7 @@ pub status "#bad palette"
|
||||
|
||||
pri status "#internal error: inconsistent ri/wi"
|
||||
|
||||
pub const DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE base.u64 = 0
|
||||
pub const DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE : base.u64 = 0
|
||||
|
||||
// See the spec appendix E "Interlaced Images" on page 29. The first element
|
||||
// represents either that the frame was non-interlaced, or that all interlace
|
||||
@@ -39,26 +39,26 @@ pub const DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE base.u64 = 0
|
||||
// accessed after all interlace stages are complete. Being the maximum base.u32
|
||||
// value means that, after all interlace stages are complete, dst_y will be set
|
||||
// to that maximum value (and therefore outside the frame rect).
|
||||
pri const INTERLACE_START array[5] base.u32 = [0xFFFF_FFFF, 1, 2, 4, 0]
|
||||
pri const INTERLACE_DELTA array[5] base.u8 = [1, 2, 4, 8, 8]
|
||||
pri const INTERLACE_COUNT array[5] base.u8 = [0, 1, 2, 4, 8]
|
||||
pri const INTERLACE_START : array[5] base.u32 = [0xFFFF_FFFF, 1, 2, 4, 0]
|
||||
pri const INTERLACE_DELTA : array[5] base.u8 = [1, 2, 4, 8, 8]
|
||||
pri const INTERLACE_COUNT : array[5] base.u8 = [0, 1, 2, 4, 8]
|
||||
|
||||
// ANIMEXTS1DOT0 is "ANIMEXTS1.0" as bytes.
|
||||
pri const ANIMEXTS1DOT0 array[11] base.u8 = [
|
||||
pri const ANIMEXTS1DOT0 : array[11] base.u8 = [
|
||||
0x41, 0x4E, 0x49, 0x4D, 0x45, 0x58, 0x54, 0x53, 0x31, 0x2E, 0x30,
|
||||
]
|
||||
|
||||
// NETSCAPE2DOT0 is "NETSCAPE2.0" as bytes.
|
||||
pri const NETSCAPE2DOT0 array[11] base.u8 = [
|
||||
pri const NETSCAPE2DOT0 : array[11] base.u8 = [
|
||||
0x4E, 0x45, 0x54, 0x53, 0x43, 0x41, 0x50, 0x45, 0x32, 0x2E, 0x30,
|
||||
]
|
||||
|
||||
// ICCRGBG1012 Is "ICCRGBG1012" as bytes.
|
||||
pri const ICCRGBG1012 array[11] base.u8 = [
|
||||
pri const ICCRGBG1012 : array[11] base.u8 = [
|
||||
0x49, 0x43, 0x43, 0x52, 0x47, 0x42, 0x47, 0x31, 0x30, 0x31, 0x32,
|
||||
]
|
||||
|
||||
// XMPDATAXMP IS "XMP DataXMP" as bytes.
|
||||
pri const XMPDATAXMP array[11] base.u8 = [
|
||||
pri const XMPDATAXMP : array[11] base.u8 = [
|
||||
0x58, 0x4D, 0x50, 0x20, 0x44, 0x61, 0x74, 0x61, 0x58, 0x4D, 0x50,
|
||||
]
|
||||
@@ -35,7 +35,7 @@
|
||||
// see the N+1'th frame's header (or the end-of-animation terminator), so that
|
||||
// e.g. the API for visiting the N'th frame can also return whether it's the
|
||||
// final frame. Enabling this quirk allows for matching that behavior.
|
||||
pub const QUIRK_DELAY_NUM_DECODED_FRAMES base.u32 = 0x3E16_1800 | 0x00
|
||||
pub const QUIRK_DELAY_NUM_DECODED_FRAMES : base.u32 = 0x3E16_1800 | 0x00
|
||||
|
||||
// When this quirk is enabled, the background color of the first frame is set
|
||||
// to black whenever that first frame has a local (frame-specific) palette.
|
||||
@@ -47,7 +47,7 @@ pub const QUIRK_DELAY_NUM_DECODED_FRAMES base.u32 = 0x3E16_1800 | 0x00
|
||||
//
|
||||
// There isn't really much of a rationale for this, other than it matches the
|
||||
// behavior of another GIF implementation.
|
||||
pub const QUIRK_FIRST_FRAME_LOCAL_PALETTE_MEANS_BLACK_BACKGROUND base.u32 = 0x3E16_1800 | 0x01
|
||||
pub const QUIRK_FIRST_FRAME_LOCAL_PALETTE_MEANS_BLACK_BACKGROUND : base.u32 = 0x3E16_1800 | 0x01
|
||||
|
||||
// When this quirk is enabled, the background color is taken from the GIF
|
||||
// instead of always being transparent black. If the background color index in
|
||||
@@ -63,12 +63,12 @@ pub const QUIRK_FIRST_FRAME_LOCAL_PALETTE_MEANS_BLACK_BACKGROUND base.u32 = 0x3E
|
||||
// processing WUFFS_BASE__ANIMATION_DISPOSAL__RESTORE_BACKGROUND. In both
|
||||
// cases, the caller of Wuffs, not Wuffs itself, is responsible for filling the
|
||||
// pixel buffer with that color.
|
||||
pub const QUIRK_HONOR_BACKGROUND_COLOR base.u32 = 0x3E16_1800 | 0x02
|
||||
pub const QUIRK_HONOR_BACKGROUND_COLOR : base.u32 = 0x3E16_1800 | 0x02
|
||||
|
||||
// When this quirk is enabled, silently ignore e.g. a frame that reports a
|
||||
// width and height of 6 pixels each, followed by 50 pixel values. In that
|
||||
// case, we process the first 36 pixel values and discard the excess 14.
|
||||
pub const QUIRK_IGNORE_TOO_MUCH_PIXEL_DATA base.u32 = 0x3E16_1800 | 0x03
|
||||
pub const QUIRK_IGNORE_TOO_MUCH_PIXEL_DATA : base.u32 = 0x3E16_1800 | 0x03
|
||||
|
||||
// When this quirk is enabled, if the initial frame bounds extends beyond the
|
||||
// image bounds, then the image bounds stay unchanged. By default (with this
|
||||
@@ -77,12 +77,12 @@ pub const QUIRK_IGNORE_TOO_MUCH_PIXEL_DATA base.u32 = 0x3E16_1800 | 0x03
|
||||
//
|
||||
// For more discussion, see
|
||||
// https://github.com/google/wuffs/blob/master/test/data/artificial/gif-frame-out-of-bounds.gif.make-artificial.txt
|
||||
pub const QUIRK_IMAGE_BOUNDS_ARE_STRICT base.u32 = 0x3E16_1800 | 0x04
|
||||
pub const QUIRK_IMAGE_BOUNDS_ARE_STRICT : base.u32 = 0x3E16_1800 | 0x04
|
||||
|
||||
// When this quirk is enabled, a frame with zero width or height is rejected
|
||||
// during decode_frame (but accepted during decode_frame_config).
|
||||
pub const QUIRK_REJECT_EMPTY_FRAME base.u32 = 0x3E16_1800 | 0x05
|
||||
pub const QUIRK_REJECT_EMPTY_FRAME : base.u32 = 0x3E16_1800 | 0x05
|
||||
|
||||
// When this quirk is enabled, a frame with no explicit palette is rejected,
|
||||
// instead of implicitly having a palette with every entry being opaque black.
|
||||
pub const QUIRK_REJECT_EMPTY_PALETTE base.u32 = 0x3E16_1800 | 0x06
|
||||
pub const QUIRK_REJECT_EMPTY_PALETTE : base.u32 = 0x3E16_1800 | 0x06
|
||||
Reference in new issue
Block a user