pascal massimino
aed0f5a231
Merge "MIPS: dspr2: added optimization for function FilterLoop26"
2014-09-23 00:17:25 -07:00
skal
286306853e
prepare VP8LDecodeImage for incremental decode
...
- don't call VP8LClear() when there's no error (and let the caller do it)
- only initialize output once if state_ is not READ_DATA
- don't over-set dec->status_ = READ_DATA
- don't re-set dec->status_ if DecodeImageStream() fails
- remove unneeded dec->action_ field
- make ReadImageInfo() check br->eos_
- use ErrorStatusLossless() more consistently
Change-Id: Ica6e4b1c82e3fce8b1ce0274def551a886b73b0b
2014-09-23 00:13:52 -07:00
skal
248f3aed22
remove br->error_ field
...
it's somewhat redundant with br->eos_
also make the status-check coherent.
Change-Id: I98e755e037d45acb0760baf2344bf11fb5fb5cda
2014-09-23 00:04:58 -07:00
Djordje Pesut
49e15044ef
MIPS: dspr2: added optimization for function FilterLoop26
...
affected functions: VFilter16, HFilter16, VFilter8 and HFilter8
Change-Id: Ib2fc41aaa00b10c2906d689bdc5a10f4568e70a8
2014-09-23 08:46:05 +02:00
James Zern
38128cb9df
iobuild.sh: only install .h files in Headers
...
cp * -> cp *.h; avoids picking up autoconf files
Change-Id: I57c04562d554431ddf4605af65077f32d90ac58e
2014-09-22 17:28:51 -07:00
skal
c792d4129a
Premultiply with alpha during U/V downsampling
...
This prevents the 'alpha-leak' reported in issue #220
Speed-diff is kept minimal.
Change-Id: I1976de5e6de7cfcec89a54df9233c1a6586a5846
2014-09-18 23:40:34 -07:00
Urvang Joshi
0cc811d7d6
gif2webp: Background color correction
...
For some GIF images, the first frame is missing the corresponding
graphic control extension. For such cases, we were never calling
GetBackgroundColor(), and default background color value (white) was being used
incorrectly.
So, we call GetBackgroundColor() when we encounter the first image
descriptor instead, to make sure that it is always called.
Change-Id: I00fc8e943d8a0c1578dcd718f3e74dec7de4ed61
2014-09-18 15:07:28 -07:00
Pascal Massimino
d7167ff7ce
Amend the lossless spec according to issue #205 , #206 and #224
...
http://code.google.com/p/webp/issues/detail?id=205 <- Select()
http://code.google.com/p/webp/issues/detail?id=206 <- out-of-bound colormap index
http://code.google.com/p/webp/issues/detail?id=224 <- version number MUST be 0
Change-Id: I56a575529862dfc8ad189ddcfc47ef59a58f273d
2014-09-18 08:21:02 +02:00
Vikas Arora
b901416b90
Record the lossless size stats.
...
Record and show the lossless header and image data sizes in the cwebp.
Change-Id: I08f19693cb7a756b6fdce5b55d71f5367b5f02fc
2014-09-17 15:16:05 -07:00
Pascal Massimino
cddd334050
Add a WebPExtractAlpha function to dsp
...
This is the opposite of WebPDispatchAlpha
+ Implement the SSE2 version
Change-Id: I0c297309255f508c5261da8aad01f7e57f924d6c
2014-09-15 08:12:03 +02:00
Pascal Massimino
0716a98eb3
fix indent after I0204949917836f74c0eb4ba5a7f4052a4797833b
...
Change-Id: I5d9e5d0a2ad2cefd8c539571d2eaee948da60ad5
2014-09-12 19:59:53 +02:00
Vikas Arora
f9ced95a9b
Optimize lossless decoding for trivial(ARB) codes.
...
Optimize the decoding for region that have trivial literal codes.
The trivial literal is defined as huffman image with Red, Blue and Alpha
huffman trees with only single code values.
This speeds up lossless decoding by 3%
Change-Id: I0204949917836f74c0eb4ba5a7f4052a4797833b
2014-09-12 09:08:08 -07:00
James Zern
924fcfd900
Merge "webpmux: simplify InitializeConfig()"
2014-09-12 00:43:06 -07:00
James Zern
c0a462cac2
webpmux: simplify InitializeConfig()
...
put WebPMuxConfig on the stack in main() rather than allocating it in
InitializeConfig(); removes a level of indirection there.
Change-Id: I81d386f7472ebbd322dd3fdbfda9d78dbeb62a66
2014-09-12 00:23:06 -07:00
James Zern
6986bb5e12
webpmux: fix indent
...
+ remove unnecessary cast
Change-Id: I2070fbe6aeda49f5790c69390e5b539a2c1a5616
2014-09-12 00:11:56 -07:00
James Zern
f89e1690df
webpmux: fix exit status on numeric value parse error
...
in most cases 'ok' is set via a goto macro
Change-Id: I17c832446bf3e716d3bcd323dbcc72bec544029c
2014-09-12 00:10:09 -07:00
pascal massimino
2172cb626a
Merge "webpmux: fix loop_count range check"
2014-09-11 23:02:37 -07:00
pascal massimino
e3b343ece7
Merge "examples: warn on invalid numeric parameters"
2014-09-11 23:02:18 -07:00
James Zern
0e23c487da
webpmux: fix loop_count range check
...
explicitly check [0, 65535], the use of 'long' was removed in a prior
commit
Change-Id: I70d5bf286908459b5d4d619c657853f0e833b6ea
2014-09-11 15:26:11 -07:00
Pascal Massimino
6208338a6c
Merge "fix loop bug in DispatchAlpha()"
2014-09-11 14:48:19 -07:00
Urvang Joshi
d51f3e4069
gif2webp: Handle frames with missing graphic control extension
...
According to the GIF spec (http://www.w3.org/Graphics/GIF/spec-gif89a.txt ),
this block is optional, and its scope is only the first graphic rendering block
that follows.
The spec doesn't mention what default values of frame dimensions, offsets,
duration and transparent index to use in such a case, though. So, we use the
defaults used by GIF reader in Chromium:
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.h&l=186
Change-Id: Iecc6967847192483770e85ac15fe2835cd01ce7b
2014-09-11 14:35:21 -07:00
Pascal Massimino
690b491af1
fix loop bug in DispatchAlpha()
...
* We were re-doing most of the work in plain-C as 'left-over'.
* we were always returning has_alpha = true because of a bad mask all_0xff
These bugs were conservative and silent, in the sense that we were 'just' doing
more work than necessary.
Now, the SSE2 version is really 2x faster than the C version.
Change-Id: I6c8132a267fe3c7a3d1fa70e7a5fcd10719543fa
2014-09-11 22:35:08 +02:00
James Zern
96d43a873a
examples: warn on invalid numeric parameters
...
add ExUtilGet[U]Int / ExUtilGetFloat which print an error message on
parse failure.
fixes issue #219 .
Change-Id: Ie537f5aebd138925bf1a48289b6b5e261b3af2ca
2014-09-11 11:18:28 -07:00
Djordje Pesut
3101f53720
MIPS: dspr2: added optimization for TransformOne
...
added macros for TransformOne, TransformAC3 and TransfromDC
Change-Id: I4341450f443cf46dcf91c0db17bde63c8fb8afee
2014-09-11 17:02:02 +02:00
Pascal Massimino
a6bb9b17d8
SSE2 for inverse Mult(ARGB)Row and ApplyAlphaMultiply
...
Change-Id: Iab5c0e4a4d2b31f86736a9b277e62b6e28c3d2b4
WebPMultRow: ~7x faster
WebPMultARGBRow: ~3x faster
ApplyAlphaMultiply: 60% faster
2014-09-11 07:58:42 +02:00
Vikas Arora
d84a8ffdf7
Remove default initialization of decoder status.
...
emove the default initialization of decoder status in the method
VP8LDecodeImage().
Change-Id: Ie6b949606349f4e937c4c1dd2c02ff2a4f86870f
2014-09-10 14:55:46 -07:00
James Zern
be70b86c57
configure: simplify libpng-config invocation
...
use --ldflags over --prefix + --libs combination
based on comment in issue #180 .
Change-Id: If2ca06053d5237b6722ddf4117917e5f3c06ab59
2014-09-09 22:57:39 -07:00
Vikas Arora
e0a9932161
Rectify bug in lossless incremental decoding.
...
Handle the corner case when VP8LDecodeImage() method is called with an invalid
header data. The lossless decoding doesn't support incremental mode yet.
Return the error status as BITSTREAM error in case not all pixels are decoded
with the provided bit-stream. Also added asserts in the VP8LDecodeImage() method
to validate the decoder header with appropriate/valid data for huffman trees
(htree_groups_ etc).
Change-Id: Ibac9fcfc4bd0a2c5f624bb9d4a2b9f6459aa19ea
2014-09-09 15:34:16 -07:00
Djordje Pesut
e2502a97c1
MIPS: dspr2: added optimization for TransformAC3
...
Change-Id: Icd789ee5f6d764297e7dc0a0f8a3bc47ab92ac65
2014-09-09 14:53:36 +02:00
Djordje Pesut
24e1072aac
MIPS: dspr2: added optimization for TransformDC
...
Change-Id: Iee69758f6442ea9c80ddaa32cea8d00dda4c6252
2014-09-09 14:15:04 +02:00
Pascal Massimino
c0e84df8e8
Merge "Slightly faster lossless decoding (1%)"
2014-09-09 03:55:00 -07:00
Pascal Massimino
8dd28bb560
Slightly faster lossless decoding (1%)
...
-> introduce special case 64b pattern-copy, similar to the 8b one for alpha.
-> use mempcy() for non-overlapping areas
+ cosmetics and homogenezation of the code
Change-Id: I0e65e04b96fec94c009a4614137dfba2a0f98561
2014-09-09 11:18:30 +02:00
Djordje Pesut
f0103595dd
MIPS: dspr2: added optimization for ColorIndexInverseTransforms
...
Change-Id: I5b6094ce489d4f896bc4b8f575142eb3c5054beb
2014-09-08 17:22:59 +02:00
Pascal Massimino
d3242aee16
make VP8LSetBitPos() set br->eos_ flag
...
ReadSymbol() finishes with a VP8LSetBitPos() call only and could miss an eos_ during the decode loop.
Things are faster because of inlining too.
Change-Id: I2d2a275f38834ba005bc767d45c5de72d032103e
2014-09-06 08:40:20 +02:00
Pascal Massimino
a9decb5584
Lossless decoding: fix eos_ flag condition
...
eos_ needs to be set only when superfluous bits have actually
been requested.
Earlier, we were assuming pre-mature end-of-stream to be an error.
Now, more precisely, we mark error when we have encountered end-of-stream *and*
we attempt to read more bits after that.
This handles cases where image data requires no bits to be read
Change-Id: I628e2c39c64f10c443fb51f86b1f5919cc9fd299
2014-09-05 20:21:50 +02:00
Pascal Massimino
3fea6a28da
fix erroneous dec->status_ setting
...
We only need to set BITSTREAM_ERROR if !ok.
Change-Id: I5bd13e64797e8bc509477edb29158abb39cb0ee1
2014-09-05 19:48:11 +02:00
Djordje Pesut
80b8099fd8
MIPS: dspr2: add some specific mips code to commit I2c3f2b12f8df15b785fad5a9c56316e954ae0c53
...
added some C-code tuning also
Change-Id: I67ce70a063ef6b5821b9158a4defd6987eccbb9a
2014-09-04 13:42:39 +02:00
skal
e564062522
Merge "further refine the COPY_PATTERN optim for DecodeAlpha"
2014-09-04 03:43:55 -07:00
James Zern
854509fec0
enc/histogram.c: reindent after f4059d0
...
fixes indent in HistogramRemap after:
f4059d0
Code cleanup for HistogramRemap.
Change-Id: I9f53a088749e9100a70331bda1662488666c5156
2014-09-03 16:58:49 -07:00
skal
344219645b
Merge "~3-5% faster encoding optimizing PickBestIntra*()"
2014-09-03 15:53:32 -07:00
skal
865069c12e
further refine the COPY_PATTERN optim for DecodeAlpha
...
* use functions instead of MACRO
* adjust var's name
Overall, same speed, with more readible code
Change-Id: I2c3f2b12f8df15b785fad5a9c56316e954ae0c53
2014-09-04 00:25:27 +02:00
Djordje Pesut
a59562283f
added C-level optimization for DecodeAlphaData function
...
Copies with short distances of 1,2 and 4 are specialized.
up to 10-14% faster alpha decoding.
Change-Id: I9708e98193910bfaf8ef43091f3fdea73b63896d
2014-09-03 16:49:17 +02:00
skal
187d379db6
add a fallback to ALPHA_NO_COMPRESSION
...
if ALPHA_LOSSLESS_COMPRESSION produces a too big file (very rare!),
we fall-back to no-compression automatically.
Change-Id: I5f3f509c635ce43a5e7c23f5d0f0c8329a5f24b7
2014-09-02 21:55:13 +02:00
skal
a48a2d7635
~3-5% faster encoding optimizing PickBestIntra*()
...
* Add early-out check for Intra16
* replace some memcpy() by pointer swap
Change-Id: I5edc5f7fbc8e39984deb48e6c045c97c61418589
2014-09-01 14:40:25 +02:00
James Zern
a6140194ff
ExUtilReadFromStdin: (windows) open stdin in bin mode
...
fixes input/decode from stdin in the examples
Change-Id: Ie8052da758a9ef64477501b709408236d258da82
2014-08-29 19:25:46 -07:00
James Zern
e80eab1fbc
webpmux: (windows) open stdout in binary mode
...
prevents corrupt output. related to issue #217
Change-Id: I6f0dac8131127717ba72b0709fb35d421ab41acb
2014-08-29 19:25:45 -07:00
James Zern
e9bfb1166d
cwebp: (windows) open stdout in binary mode
...
prevents corrupt output. fixes issue #217
Change-Id: If90afb441636144300da66d64f0e7f78505b4060
2014-08-29 19:11:41 -07:00
James Zern
5927e15bc7
example_util: add ExUtilSetBinaryMode
...
use it in dwebp when dealing with 'stdout'
Change-Id: I8b8a0b0de9e73731e913ac3c83b5e2b33c693175
2014-08-29 19:07:17 -07:00
Urvang Joshi
30f3b75b33
webpmux man page: Clarify some title, descriptions and examples
...
Based on the feedback here:
https://groups.google.com/a/webmproject.org/d/msg/webp-discuss/qY6rWJLqRTY/pF8oSj8DOGYJ
Change-Id: I9119ea8e211ffb269026010e3c590385bc6a9f17
2014-08-29 14:30:53 -07:00
skal
77d4c7e337
address cosmetic comments from patch #71380
...
Change-Id: Iaba301b9e77aa4febe0efe1e6016fab42d5589f3
2014-08-28 18:08:00 -07:00