Use EXIT_SUCCESS / EXIT_FAILURE in most cases as more granularity isn't
useful. For anim_diff, use 0 (success), 1 (image difference) and 2
(error) to align it with other diff utilities (diff, etc.).
Bug: webp:637
Change-Id: I52925de8622a5a4d2141883279d69a1d95ef9b12
Options can precede the file name. This still won't be correct for
Unicode file names, but an approximation will be displayed (with '?'s)
rather than the first character if kParams.file_name were used.
glutCreateWindow() looks like it will prohibit correcting this as it
expects an ASCII string.
Change-Id: I96986a178a0bbce6971d2ac415222d4a456ce1a3
This is to make the initial window be rescaled in case the image
dimension is too large to fit the display.
BUG=webp:433
Change-Id: Ib04c12962bc8c26e74c8a6193829214da636ebde
Define macros in examples/unicode.h to use Unicode argv
on Windows. Keep char everywhere on Unix since it handles
UTF-8 without any change.
Impact:
- All fopen () and SHCreateStreamOnFile(),
- All fprintf() printing file paths,
- All strcmp() used with "-",
- File path parsing,
- Gif reading.
Concerned executables from examples/ and extras/:
anim_diff, anim_dump, vwebp, vwebp_sdl,
cwebp, dwebp, gif2webp, img2webp,
webpmux, webpinfo, webp_quality, get_disto
When compiled on Windows with Unicode enabled, webpmux and
img2webp will not work when used with an argument file and
will print "Reading arguments from a file is a feature
unavailable with Unicode binaries."
BUG=webp:398
Change-Id: Ic55d222a3ce1a715f9c4cce57ecbe2705d5ce317
The graphical bug happens when there is a frame disposed to background
color, followed by another frame that does not blend, and their areas
don't fully overlap. Only the previous frame clears its part of the
viewport. The fix consists in clearing the screen for the previous and
the current frame if needed.
Change-Id: I3425cf7297f0c7b2cf13a3a61b517cc0b1c031d8
Option -usebgcolor may be used to display ANIM background color (or white if no ANIM chunk), blended on top of checkerboard. By default this is disabled (old behavior) to easily see transparent areas. Spec says that "background color MAY be used", so it's an option.
Key b may be pressed to toggle ANIM background color display. There are visual artifacts (leftovers) when toggling during an animation. This is already the case for rescaling, toggling info etc. (fixing it implies storing viewport render or rendering whole animation from start till current frame).
BUG=webp:394
Change-Id: If9ab898b2eac77226f30f062d522f9861789ef8f
Container spec indicates that background color is written
in BGRA byte order, but glClearColor() parameters are RGBA.
Anyway the checkerboard is displayed right after glClear()
calls so it replaces background color.
In response to webp-discuss/TkLHALGaHaM
Change-Id: Ief5435fadfd6a422b881a9dc240b5e8dc6546e19
this results in flickering with animated webp + alpha. disabling the
option is a workaround to restore the behavior to the previous release.
BUG=webp:365
Change-Id: Iac7fcc0d483837e76cc54ad3f26c4e0e5511e31d
it actually disables the disposal / blending method
and just displays the raw delta values.
Useful for debugging.
TODO: Outline the refreshed area with a drawn rectangle?
Change-Id: I6f8cddd0aad8b953cff78a693ae7e8c31def010c
quiets a -Wimplicit-function-declaration with some configurations of gcc
(-std=c99).
_POSIX_C_SOURCE is preferred over _BSD_SOURCE with newer versions of
glibc
Change-Id: I378bffb13ba52ff5c4bad1433090dcc387e5d507
The image is scaled to fit the whole viewport.
Avoid some oddities with offsets, etc.
removes some TODO.
Change-Id: I52fae9ca80a2feed234f32261c7f6358d7594e21
decoding and file i/o have been split to imageio, all that remains is
some string routines used for parameter parsing in the examples
Change-Id: I77386cd8aa39124b9e14c95fdbaa17ea4ab5bb24
when the previous frame does not specify dispose to background only the
current frame's rectangle should be cleared
related to bug #245
Change-Id: I2fc4f5be99057e0bf87d8fedec57b06859b070bd
this is in line with the recommendation in the spec, cf.,
5603947 webp-container-spec: clarify background clear on loop
Change-Id: Id3910395b05a1a1f2804be841b61f97bd4bac593
previously the first frame would be redisplayed, which might be
unexpected if the final frame was meant to be a composite, for example.
Change-Id: I4da795623c71501e2fa426e8fba8fb2ffcbab58a
new options:
dwebp -alpha_dither
vwebp -noalphadither
When the source was marked as quantized, we use a threshold-averaging
filter to smooth the decoded alpha plane.
Note: this option forces the decoding of alpha data in one pass, and
might slow the decoding a bit.
The new field in WebPDecoderOptions struct is 'alpha_dithering_strength'
(0 by default, means: off). Max strength value is '100'.
Change-Id: I218e21af96360d4781587fede95f8ea4e2b7287a
this change has the side-effect of using directory names in the
include, silencing a lint warning.
Change-Id: Ib91cf63a90534e32fadfa5c2372bfdb29f854d02
Even at high quality setting, the U/V quantizer step is limited
to 4 which can lead to banding on gradient.
This option allows to selectively apply some randomness to
potentially flattened-out U/V blocks and attenuate the banding.
This option is off by default in 'dwebp', but set to -dither 50
by default in 'vwebp'.
Note: depending on the number of blocks selectively dithered,
we can have up to a 10% slow-down in decoding speed it seems.
Change-Id: Icc2446007f33ddacb60b3a80a9e63f2d5ad162de
...and make gif2webp and vwebp compile without them.
Makefile.vc still to be updated...
Meanwhile the CL environment variable can be supplemented with
set CL=/DWEBP_HAVE_GL /IC:\opt\freeglut\include
Change-Id: I37a60b8c32aafd125bffa98b6cc9f57c022ebbd0
rather than symlink the webm/vpx terms, use the same header as libvpx to
reference in-tree files
based on the discussion in:
https://codereview.chromium.org/12771026/
Change-Id: Ia3067ecddefaa7ee01550136e00f7b3f086d4af4