This is a (minor) bitstream change: if the 'color_space' bit is set to '1'
(which is normally an undefined/invalid behaviour), we add extra data at the
end of partition #0 (so-called 'extensions')
Namely, we add the size of the extension data as 3 bytes (little-endian),
followed by a set of bits telling which extensions we're incorporating.
The data then _preceeds_ this trailing tags.
This is all experimental, and you'll need to have
'#define WEBP_EXPERIMENTAL_FEATURES' in webp/types.h to enable this code
(at your own risk! :))
Still, this hack produces almost-valid WebP file for decoders that don't
check this color_space bit. In particular, previous 'dwebp' (and for instance
Chrome) will recognize this files and decode them, but without the alpha
of course. Other decoder will just see random extra stuff at the end of
partition #0.
To experiment with the alpha-channel, you need to compile on Unix platform
and use PNGs for input/output.
If 'alpha.png' is a source with alpha channel, then you can try (on Unix):
cwebp alpha.png -o alpha.webp
dwebp alpha.webp -o test.png
cwebp now has a '-noalpha' flag to ignore any alpha information from the
source, if present.
More hacking and experimenting welcome!
Change-Id: I3c7b1fd8411c9e7a9f77690e898479ad85c52f3e
For now, SSE2 functions are compiled a-minima: only on platforms
where __SSE2__ is defined. Let's later add some autoconf-based
config to enable/disable at will.
One can disable SSE2 at run-time by hooking-up VP8GetInfo.
There is a new option "-noasm" in cwebp for that.
Output should be binary the same between C and SSE2 version. If not,
that's a bug!
patch by Christian Duvivier (cduvivier at google dot com)
Change-Id: Iae006c3cdcb7e8280e846cedb94d239dab1e42ae
to return the sum directly.
output is bitwise the same, speed up 1-2%. This is preparatory to a
more efficient SSE2 implementation.
Change-Id: I0bcdf05808c93420fbe9dcb75e5e7e55a4ae5b89
Makes things lighter at the expense of requiring the user
to be up-to-date for autotools.
patch by Jan Engelhardt (jengelh at medozas dot de)
Change-Id: Icfcab2d899828a213d9fade0dab350dacd0c070a
patch by Jan Engelhardt (jengelh at medozas dot de)
Fixes the error:
aclocal: couldn't open directory "m4": No such file or directory
autoreconf: aclocal failed with exit status: 1
Change-Id: I1c1cd2c3d96f0d7d25616ec084dfc9bf9077fd4f
going down to strict -ansi c89 is quite overkill (no 'inline',
and /* */-style comments).
But with these fixes, the code compiles with the stringent flags:
-Wextra -Wold-style-definition -Wmissing-prototypes
-Wmissing-declarations and -Wdeclaration-after-statement
Change-Id: I36222f8f505bcba3d9d1309ad98b5ccb04ec17e3
WebPGetDecoderVersion() and WebPGetEncoderVersion()
will not return 0.1.2 encoded as 0x000102
dwebp and cwebp also have a new "-version" flag
Change-Id: I4fb4b5a8fc4e53681a386ff4b74fffb639fa237a
The object WebPIDecoder is available to store the
decoding state. The flow is typically:
WebPIDecoder* const idec = WebPINew(mode);
while (has_more_data) {
// ... (get additional data)
status = WebPIAppend(idec, new_data, new_data_size);
if (status != VP8_STATUS_SUSPENDED ||
break;
}
// The above call decodes the current available buffer.
// Part of the image can now be refreshed by calling to
// WebPIDecGetRGB()/WebPIDecGetYUV() etc.
}
WebPIDelete(idec);
Doing so, one can try and decode new macroblocks everytime fresh
bytes are available.
There's two operating modes: either appending fresh bytes, or
updating the whole buffer with additional data in the end.
The latter requires less memcpy()'s
main patch by Somnath Banerjee (somnath at google.com)
Change-Id: Ie81cbd0b50f175743af06b1f964de838b9a10a4a
use top_srcdir rather than top_builddir for AM_CPPFLAGS
add EXTRA_DIST to man Makefile. fixes distcheck target.
Change-Id: I308dc1c98f096de1efe188f63d040ef953598e78
non-zero dc-bit was mixed with non-zero ac-bit, preventing
finer optimization during VP8ReconstructBlock.
Depending on sparsity, i see 2-5% gain on average.
Change-Id: I7f34f18d0701c77837de3540b732e5b7d85d7c5d
(this makes initialization easier and will be helpful for incremental
decoding).
Modify ParsePartitions() to accommodate for truncated input.
Change-Id: I62f52078d6b7a2314a11880a20d9eac5b4714bd0
libvpx (and ffvp8) implementations are completely skipping the deblocking
step if loop_filter_level is 0, which is _not_ equivalent to performing
the loop-filtering with a 0 value for loop_filter_level. In the latter case
(which we followed), few pixels were modified here and there and you could
observe off-by-1 errors on few places.
This patch will reconcile the 3 implementations (since the difference
is minor, skipping the deblocking step will save CPU for virtually
no visible difference).
The spec will be made clearer about the expected behaviour:
* if the global loop_filter_level is 0, turn deblocking off.
* if it's not 0 but the local loop_filter_level ends up being 0 for whatever
reason (lf_delta, mode delta, ref delta, etc.) on a particular
macroblock, skip the deblocking too.
Change-Id: I157f1f8de463b8a76caddb3f347b7fbc7bd527d2