mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
Re-assign GIF quirk numbers
This commit is contained in:
1 parent
fd72372312
commit
cf26b93f2f
2 files changed
+24
-24
No files matched your search
@@ -3325,41 +3325,41 @@ static const uint32_t //
|
|||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635328;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635328;
|
||||||
|
|
||||||
#define WUFFS_GIF__QUIRK_FIRST_FRAME_LOCAL_PALETTE_MEANS_BLACK_BACKGROUND \
|
#define WUFFS_GIF__QUIRK_FIRST_FRAME_LOCAL_PALETTE_MEANS_BLACK_BACKGROUND \
|
||||||
1041635334
|
1041635329
|
||||||
|
|
||||||
static const uint32_t //
|
static const uint32_t //
|
||||||
wuffs_gif__quirk_first_frame_local_palette_means_black_background //
|
wuffs_gif__quirk_first_frame_local_palette_means_black_background //
|
||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635334;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635329;
|
||||||
|
|
||||||
#define WUFFS_GIF__QUIRK_HONOR_BACKGROUND_COLOR 1041635329
|
#define WUFFS_GIF__QUIRK_HONOR_BACKGROUND_COLOR 1041635330
|
||||||
|
|
||||||
static const uint32_t //
|
static const uint32_t //
|
||||||
wuffs_gif__quirk_honor_background_color //
|
wuffs_gif__quirk_honor_background_color //
|
||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635329;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635330;
|
||||||
|
|
||||||
#define WUFFS_GIF__QUIRK_IGNORE_TOO_MUCH_PIXEL_DATA 1041635330
|
#define WUFFS_GIF__QUIRK_IGNORE_TOO_MUCH_PIXEL_DATA 1041635331
|
||||||
|
|
||||||
static const uint32_t //
|
static const uint32_t //
|
||||||
wuffs_gif__quirk_ignore_too_much_pixel_data //
|
wuffs_gif__quirk_ignore_too_much_pixel_data //
|
||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635330;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635331;
|
||||||
|
|
||||||
#define WUFFS_GIF__QUIRK_IMAGE_BOUNDS_ARE_STRICT 1041635331
|
#define WUFFS_GIF__QUIRK_IMAGE_BOUNDS_ARE_STRICT 1041635332
|
||||||
|
|
||||||
static const uint32_t //
|
static const uint32_t //
|
||||||
wuffs_gif__quirk_image_bounds_are_strict //
|
wuffs_gif__quirk_image_bounds_are_strict //
|
||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635331;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635332;
|
||||||
|
|
||||||
#define WUFFS_GIF__QUIRK_REJECT_EMPTY_FRAME 1041635332
|
#define WUFFS_GIF__QUIRK_REJECT_EMPTY_FRAME 1041635333
|
||||||
|
|
||||||
static const uint32_t //
|
static const uint32_t //
|
||||||
wuffs_gif__quirk_reject_empty_frame //
|
wuffs_gif__quirk_reject_empty_frame //
|
||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635332;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635333;
|
||||||
|
|
||||||
#define WUFFS_GIF__QUIRK_REJECT_EMPTY_PALETTE 1041635333
|
#define WUFFS_GIF__QUIRK_REJECT_EMPTY_PALETTE 1041635334
|
||||||
|
|
||||||
static const uint32_t //
|
static const uint32_t //
|
||||||
wuffs_gif__quirk_reject_empty_palette //
|
wuffs_gif__quirk_reject_empty_palette //
|
||||||
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635333;
|
WUFFS_BASE__POTENTIALLY_UNUSED = 1041635334;
|
||||||
|
|
||||||
// ---------------- Struct Declarations
|
// ---------------- Struct Declarations
|
||||||
|
|
||||||
@@ -8782,19 +8782,19 @@ wuffs_gif__decoder__set_quirk_enabled(wuffs_gif__decoder* self,
|
|||||||
if (self->private_impl.f_call_sequence == 0) {
|
if (self->private_impl.f_call_sequence == 0) {
|
||||||
if (a_quirk == 1041635328) {
|
if (a_quirk == 1041635328) {
|
||||||
self->private_impl.f_quirk_enabled_delay_num_decoded_frames = a_enabled;
|
self->private_impl.f_quirk_enabled_delay_num_decoded_frames = a_enabled;
|
||||||
} else if (a_quirk == 1041635334) {
|
} else if (a_quirk == 1041635329) {
|
||||||
self->private_impl
|
self->private_impl
|
||||||
.f_quirk_enabled_first_frame_local_palette_means_black_background =
|
.f_quirk_enabled_first_frame_local_palette_means_black_background =
|
||||||
a_enabled;
|
a_enabled;
|
||||||
} else if (a_quirk == 1041635329) {
|
|
||||||
self->private_impl.f_quirk_enabled_honor_background_color = a_enabled;
|
|
||||||
} else if (a_quirk == 1041635330) {
|
} else if (a_quirk == 1041635330) {
|
||||||
self->private_impl.f_quirk_enabled_ignore_too_much_pixel_data = a_enabled;
|
self->private_impl.f_quirk_enabled_honor_background_color = a_enabled;
|
||||||
} else if (a_quirk == 1041635331) {
|
} else if (a_quirk == 1041635331) {
|
||||||
self->private_impl.f_quirk_enabled_image_bounds_are_strict = a_enabled;
|
self->private_impl.f_quirk_enabled_ignore_too_much_pixel_data = a_enabled;
|
||||||
} else if (a_quirk == 1041635332) {
|
} else if (a_quirk == 1041635332) {
|
||||||
self->private_impl.f_quirk_enabled_reject_empty_frame = a_enabled;
|
self->private_impl.f_quirk_enabled_image_bounds_are_strict = a_enabled;
|
||||||
} else if (a_quirk == 1041635333) {
|
} else if (a_quirk == 1041635333) {
|
||||||
|
self->private_impl.f_quirk_enabled_reject_empty_frame = a_enabled;
|
||||||
|
} else if (a_quirk == 1041635334) {
|
||||||
self->private_impl.f_quirk_enabled_reject_empty_palette = a_enabled;
|
self->private_impl.f_quirk_enabled_reject_empty_palette = a_enabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ pub const quirk_delay_num_decoded_frames base.u32 = (0xF8586 << 10) | 0
|
|||||||
//
|
//
|
||||||
// There isn't really much of a rationale for this, other than it matches the
|
// There isn't really much of a rationale for this, other than it matches the
|
||||||
// behavior of another GIF implementation.
|
// behavior of another GIF implementation.
|
||||||
pub const quirk_first_frame_local_palette_means_black_background base.u32 = (0xF8586 << 10) | 6
|
pub const quirk_first_frame_local_palette_means_black_background base.u32 = (0xF8586 << 10) | 1
|
||||||
|
|
||||||
// When this quirk is enabled, the background color is taken from the GIF
|
// 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
|
// instead of always being transparent black. If the background color index in
|
||||||
@@ -100,12 +100,12 @@ pub const quirk_first_frame_local_palette_means_black_background base.u32 = (0xF
|
|||||||
// processing WUFFS_BASE__ANIMATION_DISPOSAL__RESTORE_BACKGROUND. In both
|
// processing WUFFS_BASE__ANIMATION_DISPOSAL__RESTORE_BACKGROUND. In both
|
||||||
// cases, the caller of Wuffs, not Wuffs itself, is responsible for filling the
|
// cases, the caller of Wuffs, not Wuffs itself, is responsible for filling the
|
||||||
// pixel buffer with that color.
|
// pixel buffer with that color.
|
||||||
pub const quirk_honor_background_color base.u32 = (0xF8586 << 10) | 1
|
pub const quirk_honor_background_color base.u32 = (0xF8586 << 10) | 2
|
||||||
|
|
||||||
// When this quirk is enabled, silently ignore e.g. a frame that reports a
|
// 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
|
// 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.
|
// case, we process the first 36 pixel values and discard the excess 14.
|
||||||
pub const quirk_ignore_too_much_pixel_data base.u32 = (0xF8586 << 10) | 2
|
pub const quirk_ignore_too_much_pixel_data base.u32 = (0xF8586 << 10) | 3
|
||||||
|
|
||||||
// When this quirk is enabled, if the initial frame bounds extends beyond the
|
// 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
|
// image bounds, then the image bounds stay unchanged. By default (with this
|
||||||
@@ -114,15 +114,15 @@ pub const quirk_ignore_too_much_pixel_data base.u32 = (0xF8586 << 10) | 2
|
|||||||
//
|
//
|
||||||
// For more discussion, see
|
// For more discussion, see
|
||||||
// https://github.com/google/wuffs/blob/master/test/data/artificial/gif-frame-out-of-bounds.gif.make-artificial.txt
|
// 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 = (0xF8586 << 10) | 3
|
pub const quirk_image_bounds_are_strict base.u32 = (0xF8586 << 10) | 4
|
||||||
|
|
||||||
// When this quirk is enabled, a frame with zero width or height is rejected
|
// When this quirk is enabled, a frame with zero width or height is rejected
|
||||||
// during decode_frame (but accepted during decode_frame_config).
|
// during decode_frame (but accepted during decode_frame_config).
|
||||||
pub const quirk_reject_empty_frame base.u32 = (0xF8586 << 10) | 4
|
pub const quirk_reject_empty_frame base.u32 = (0xF8586 << 10) | 5
|
||||||
|
|
||||||
// When this quirk is enabled, a frame with no explicit palette is rejected,
|
// 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.
|
// instead of implicitly having a palette with every entry being opaque black.
|
||||||
pub const quirk_reject_empty_palette base.u32 = (0xF8586 << 10) | 5
|
pub const quirk_reject_empty_palette base.u32 = (0xF8586 << 10) | 6
|
||||||
|
|
||||||
// --------
|
// --------
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user