Commit Graph

849 Commits

Author SHA1 Message Date
James Zern
d9d0ea1bf9 Merge changes If21e3ec7,I991fc30b into 0.3.0
* changes:
  add libwebpmux.pc
  add libwebpdemux.pc
2013-03-13 12:53:32 -07:00
James Zern
627f5ca66b automake: add reference to libwebp for mux/demux
this allows DLLs to be built under mingw and sets up a more obvious
dependency in the shared objects

Change-Id: I33e8a6132a16ca49563492438a1b3b74be9ed6a1
2013-03-13 12:29:37 -07:00
skal
eef73d07a3 don't consolidate proba stats too often
adds a minimum count before FinalizeToken() is called for update.

Change-Id: I445be6a3e347620583d87c33067cefa656a25039
2013-03-13 13:50:08 +01:00
James Zern
05ec4cc2d3 libwebp{,decoder}.pc: add pthread flags
expands to e.g., -lpthread/-pthread, etc. if --enable-threading is used
and additional libs/flags are required

Change-Id: I8e8a7b44450bee32ddc58097e1e309d972b1092a
2013-03-12 23:02:12 -07:00
James Zern
1bfcf5bf42 add libwebpmux.pc
Change-Id: If21e3ec73f2eb451c6042d1aecda8d03259f601f
2013-03-12 22:58:37 -07:00
James Zern
26ca843d71 add libwebpdemux.pc
Change-Id: I991fc30b5287016066fae1ba11ec842c88994c41
2013-03-12 22:58:37 -07:00
James Zern
69e2590642 Merge "Tune Lossless compression for lower qualities." 2013-03-12 22:08:29 -07:00
Vikas Arora
0478b5d214 Tune Lossless compression for lower qualities.
This is required for WebP lossy+Alpha images, where Alpha channel is taking
60-70% of the compression (CPU) cycles.

Also evaluated on 1000 PNG corpus and overall compression speed
is 15-40% better for lossy (PNG+Alpha) compression.
The pure lossless compression numbers are almost same (or little
better) with this change.

Change-Id: I9e5ae7372ed6227a9a5b64cd9cff84c747195a57
2013-03-12 14:17:28 -07:00
skal
9bfbdd144f 1.5x-2x faster encoding for method 3 and up
using token-buffer (that is: slightly more memory. O(output_size))

This change is ON by default. To return to previous behaviour, use
'cwebp -low_memory' or set config.low_memory to true.

Side-effect of this new mode: it forces 1 partition only (which was
default anyway), and makes some statistics about the bitstream
no longer available. cwebp will no longer report 'intra4-coeffs', etc.

This mode also doesn't work (yet) with multi-pass, and -low_memory
is currently forced for multi-pass.

also: reversed the flag: USE_TOKEN_BUFFER -> DISABLE_TOKEN_BUFFER
also: fixed the kAverageBytesPerMB estimate

Change-Id: I4ea80382038d6df4309663e0cb7bd88d9bca9cf1
2013-03-11 17:01:33 -07:00
Urvang Joshi
be2fd1735a Mux: fix a scenario with bad ANMF/FRGM size
When a ANMF/FRGM chunk size (read from file) is smaller than ANMF/FRGM header
size (which is constant and implicit), the parser should report an error.

Change-Id: I91d71889937f5133a97f1e83d5254cb2d7f37028
2013-03-08 17:34:20 -08:00
James Zern
19eb012c55 Merge "Demux: Add option to get frame count using GetI()" 2013-03-08 16:11:37 -08:00
James Zern
7368b8cbb2 Merge "WebPGetFeatures() out of if condition for clarity." 2013-03-08 16:07:47 -08:00
James Zern
f604c9a4a2 Merge "fix windows build" 2013-03-08 15:51:07 -08:00
James Zern
153f94e8b5 fix windows build
broken since:
ad25032 Merge "multi-threaded alpha encoding for lossy"

this produced an error due to an empty VP8TBuffer struct.

Change-Id: I640809d07d20092c1d660e2b59b58a62a12e4371
2013-03-08 15:50:04 -08:00
Urvang Joshi
068eba8d58 Demux: Add option to get frame count using GetI()
Also tweak the code for single image and fragmented image cases, so that
dmux->num_frames_ is always correct.

Change-Id: I31e6904222e4d96a54a0d8c8aa73d43b7a9094e7
2013-03-06 13:14:05 -08:00
Urvang Joshi
988b8f56b3 WebPGetFeatures() out of if condition for clarity.
Also, some comment tweaks in decode.h

Change-Id: I9d4e80f2ffdc51d35bd3215486e26448bddd143b
2013-03-05 18:05:12 -08:00
James Zern
4d0f7c5543 Merge "WebPGetFeatures() behavior change:" 2013-03-05 17:03:20 -08:00
skal
ad2503203a Merge "multi-threaded alpha encoding for lossy" 2013-03-01 16:00:10 -08:00
skal
4e32d3e1e7 Merge "fix compilation of token.c" 2013-03-01 01:07:56 -08:00
skal
f817930a55 multi-threaded alpha encoding for lossy
new option: 'cwebp -mt ...'
new config flag: config.thread_level
(allowed thread_level are 0 or 1 for now. Maybe more later...)
If -mt is activated (and WEBP_USE_THREAD is used for compile), the alpha-compression
will be done in parallel to RGB coding for lossy. Can save quite a bit of latency...
Has no effect for lossless encoding.

Change-Id: I769d0bf90e7380cf99344ad62cd77277f4df5a46
2013-03-01 10:04:08 +01:00
skal
88050351f4 fix compilation of token.c
(TOKEN_BUFFER still disabled)
also: made VP8TBufferClear() always visible

Change-Id: Iff353fe70b2f3c5b0ab4ef7f143e1d65b0ab2b0d
2013-03-01 09:58:14 +01:00
skal
fc816219e1 code using the actual values for num_parts_, not the ones from config
Change-Id: Icb961c66fe62cb703a12c5ff8a9aa4fc884bac1c
2013-03-01 09:48:33 +01:00
skal
72655350ea Merge "move the config check from .c to .h" 2013-02-28 12:25:53 -08:00
skal
dd9e76f7b4 move the config check from .c to .h
+ minor doc cosmetics

Change-Id: I351ce63f4463fd1c1546f58697440ad01eac860c
2013-02-28 21:23:39 +01:00
Urvang Joshi
956b217a8b WebPGetFeatures() behavior change:
It should return VP8_STATUS_NOT_ENOUGH_DATA when it doesn't have enough
data.

Change-Id: I5acff04f9ba51dab150dc6d137c5ad00ea61c64a
2013-02-27 15:27:43 -08:00
Urvang Joshi
df02e4ce93 WebPDemuxGetI behavior change:
It now returns ALPHA_FLAG for lossless images with alpha, that don't
have a VP8X chunk.

This is consistent with similar methods WebPMuxGetFeatures() and
WebPGetFeatures().

Change-Id: Ia3a4ca8f3e0f102f478bd33e0727ca5be98593df
2013-02-27 11:49:26 -08:00
Pascal Massimino
633c004db1 Merge "rebalance method tools (-m) for methods [0..4]" 2013-02-27 10:20:27 -08:00
Pascal Massimino
58ca6f65b7 rebalance method tools (-m) for methods [0..4]
(methods 5 and 6 are still untouched).

Methods #0 and #1 got much faster
Method #2 gets vastly improved in quality
Method #3 is noticeably faster for little lower quality
Method #4 (default) is 10-20% faster for comparable quality

+ update the internal doc about the methods' tools.

Example of speed difference:

Time to encode picture:
Method | Before | After
-m 0   | 1.272s | 0.517s
-m 1   | 1.295s | 0.623s
-m 2   | 2.217s | 0.834s
-m 3   | 2.816s | 2.243s
-m 4   | 3.235s | 3.014s
-m 5   | 3.668s | 3.654s
-m 6   | 8.296s | 8.235s

Change-Id: Ic41fda5de65066b3a6586cb8ae1ebb0206d47fe0
2013-02-27 02:19:20 -08:00
Pascal Massimino
7648c3ccb8 Merge "describe rd-opt levels introduce VP8RDLevel enum" 2013-02-27 01:45:14 -08:00
Urvang Joshi
a5042a3240 GetVersion() methods for mux and demux
Also use the same in example binaries.

Change-Id: Id4bb4c4231a6b8fe9ed4370a6f46567c52a04a17
2013-02-26 14:22:06 -08:00
Pascal Massimino
5189957e07 describe rd-opt levels introduce VP8RDLevel enum
makes things somehow clearer compared to using magic constants

Change-Id: I9115cee71252511f722806427ee8a97f1a1cd95f
2013-02-26 02:20:59 -08:00
skal
b7eaa85d6a inline VP8LFastLog2() and VP8LFastSLog2 for small values
larger values are still dealt with in the .cc

~5% faster encoding
Output size is slightly different (variably), because of
different floating-point calculation ordering.

Change-Id: I6ede18b09c753997cf78aa1199a807d9ddb5d4b4
2013-02-25 22:46:52 +01:00
skal
5cf7792e40 split quant_levels.c into decoder and encoder version
-> split libraries further into decoder / encoder
-> add libwebpdecoder.a in Makefile.unix
-> make dwebp link against libwebpdecoder.a in Makefile.unix

also: in makefile.unix, pass EXTRA_FLAGS to LDFLAGS too
(otherwise, -m32 wouldn't work, e.g.)

Change-Id: Ief3da02a729dd86bbaf949ed048836716941657f
2013-02-24 21:40:39 +01:00
Urvang Joshi
38a91e990b Add example code snippet for demux API
Change-Id: I4e9f32d030dd7f184e1cedf5b37f6f640ba4845e
2013-02-22 14:16:48 -08:00
James Zern
c0ba090335 backward_references: avoid signed integer overflow
signed integer overflow behavior is undefined, split PrefixEncode() to
two branches to avoid this.

Change-Id: I6e2761d0d77f0aaceafdc4e07232e089c22beb64
2013-02-20 13:35:00 -08:00
skal
943386db4b disable SSE2 for now
(until proper run-time detection is ready)

Change-Id: I7b8eee52b23fce2f1612ad7d4ed603ffb02620a2
2013-02-20 08:20:47 +01:00
skal
9479fb7d2d lossless encoding speedup
* add SSE2 variant for lossless
* speed-up TransformColor calls using specialized TransformColorBlue/Red
* Fuse the Shannon Entropy calls to compute it for X and X+Y simultaneously.

This latter changes the output size a little bit.

Change-Id: Ie5df94da78bf51a58da859c9099b56340da9ec89
2013-02-20 08:13:12 +01:00
Pascal Massimino
ec2030a8a2 merge two lines together
Change-Id: I6f7935cfdac52d793ba08b1c050160d3417b8eb0
2013-02-19 23:01:10 -08:00
skal
b67956c037 Merge "Remove ReadOneBit() and ReadSymbolUnsafe()" 2013-02-19 15:16:21 -08:00
skal
1667bded67 Remove ReadOneBit() and ReadSymbolUnsafe()
Simplify and re-organize the VP8L bit-reader functions
(e.g.: the 40-bit look-ahead code was helping much)

Speed-up with LBITS=64, on arm7-a:

=> before:
./dwebp_justify_24_neon -v bryce_ll.webp
Time to decode picture: 11.393s
File bryce_ll.webp can be decoded (dimensions: 11158 x 2156).
...

=> after (LBITS=64):	Time to decode picture: 9.953s

making the VP8L bit-reader in 32 bit mode is going to be
harder (because we need to be able to read two symbols
at a time, each with max length 15 bits)

Change-Id: I89746fb103b87b5e2fd40a3208a6fbc584b88297
2013-02-20 00:13:23 +01:00
Pascal Massimino
92668da6f2 change default filtering parameters:
* type is now 'strong'
  * strength is now '60'

These help with gradients and blocking

Change-Id: Ie1c8265c557306ef5e9ccefacf43e10946e55370
2013-02-15 01:09:32 -08:00
skal
b7490f8553 introduce WEBP_REFERENCE_IMPLEMENTATION compile option
This flag will make the code use no uint64, no asm, and no fancy
trick, but instead aim at being as simple and straightforward as
possible.
Main use is to help emscripten generate proper JS code.
More code needs to be simplified later.

Also: tune the BITS values to be 24 and make use of WEBP_RIGHT_JUSTIFY
Here are the typical timing for decoding a large image:

        ARM7-a:
        dwebp_justify_32_neon Time to decode picture: 3.280s
        dwebp_justify_24_neon Time to decode picture: 2.640s
        dwebp_justify_16_neon Time to decode picture: 2.723s
        dwebp_justify_8_neon Time to decode picture: 2.802s
        dwebp_justify_32 Time to decode picture: 4.264s
        dwebp_justify_24 Time to decode picture: 3.696s
        dwebp_justify_16 Time to decode picture: 3.779s
        dwebp_justify_8 Time to decode picture: 3.834s
        dwebp_32_neon Time to decode picture: 4.010s
        dwebp_24_neon Time to decode picture: 2.725s
        dwebp_16_neon Time to decode picture: 2.852s
        dwebp_8_neon Time to decode picture: 2.778s
        dwebp_32 Time to decode picture: 4.587s
        dwebp_24 Time to decode picture: 3.800s
        dwebp_16 Time to decode picture: 3.902s
        dwebp_8 Time to decode picture: 3.815s
        REFERENCE (HEAD) Time to decode picture: 3.818s

        x86_64:
        dwebp_justify_32 Time to decode picture: 0.473s
        dwebp_justify_24 Time to decode picture: 0.434s
        dwebp_justify_16 Time to decode picture: 0.450s
        dwebp_justify_8 Time to decode picture: 0.467s
        dwebp_32 Time to decode picture: 0.474s
        dwebp_24 Time to decode picture: 0.468s
        dwebp_16 Time to decode picture: 0.468s
        dwebp_8 Time to decode picture: 0.481s
        REFERENCE (HEAD) Time to decode picture: 0.436s

        i386:
        dwebp_justify_32 Time to decode picture: 0.723s
        dwebp_justify_24 Time to decode picture: 0.618s
        dwebp_justify_16 Time to decode picture: 0.626s
        dwebp_justify_8 Time to decode picture: 0.651s
        dwebp_32 Time to decode picture: 0.744s
        dwebp_24 Time to decode picture: 0.627s
        dwebp_16 Time to decode picture: 0.642s
        dwebp_8 Time to decode picture: 0.642s

Change-Id: Ie56c7235733a24f94fbfc2e4351aae36ec39c225
2013-02-14 15:46:12 +01:00
skal
3383885799 faster decoding (3%-6%)
. revamped the boolean decoder to use less shifts
. added some description and ASCII art as explanations too.
. clarified the types further (bit_t, lbit_t, range_t, etc.)
. changed the negative field 'missing_' into positive 'bits_'

Some stats, decoding some randomly encoded WebP files:

with USE_RIGHT_JUSTIFY:
  BITS=32 => 133 files, 50 loops => 7.3s (1.097 ms/file/iterations)
  BITS=24 => 133 files, 50 loops => 7.3s (1.097 ms/file/iterations)
  BITS=16 => 133 files, 50 loops => 7.4s (1.120 ms/file/iterations)
  BITS=8 => 133 files, 50 loops => 7.5s (1.128 ms/file/iterations)

without USE_RIGHT_JUSTIFY:
  BITS=32 => 133 files, 50 loops => 7.5s (1.131 ms/file/iterations)
  BITS=24 => 133 files, 50 loops => 7.6s (1.142 ms/file/iterations)
  BITS=16 => 133 files, 50 loops => 7.6s (1.143 ms/file/iterations)
  BITS=8 => 133 files, 50 loops => 7.6s (1.149 ms/file/iterations)

Change-Id: I9277fb051676c05582e9c7ea3cb5a4b2a3ffb12e
2013-02-14 15:42:58 +01:00
skal
5c3e381b2f Merge "add a -jpeg_like option" 2013-02-13 22:17:58 -08:00
Pascal Massimino
c23110467e remove unused declaration of VP8Zigzag
Change-Id: I80bdf4b692dcdad1fc2b0cfffcaebb5fef5dde34
2013-02-12 07:14:21 -08:00
skal
23c0f354a6 fix missing intptr_t->int cast for MSVC
Change-Id: I39acdfbe287ef7b7f615d59e0729aab161189bf9
2013-02-06 17:51:10 +01:00
skal
e895059a05 add a -jpeg_like option
This option remaps internal parameters to better match
the expected compression curve of JPEG and produce output files
of similar size, but with better quality.

Change-Id: I96a1cbb480b1f6a0c6845a23c33dfd63f197b689
2013-02-06 14:19:16 +01:00
pascal massimino
1f803f645d Merge "Tune alpha quality mapping to more reasonable values." 2013-02-05 10:50:28 -08:00
Urvang Joshi
1267d498dc Tune alpha quality mapping to more reasonable values.
This results in a significant speedup  with minimal increase in file sizes.

Change-Id: I6ecefe33eee219fba4099810d04a916f7efbd292
2013-02-05 19:49:35 +01:00
skal
043076e2ef Merge "speed-up lossless in BackwardTrace" 2013-02-05 10:46:06 -08:00
skal
f3a44dcd83 remove one malloc from TraceBackwards()
Change-Id: I4f77c0240ca2ece86e8beab11d02c74277409921
2013-02-05 19:43:43 +01:00
skal
0fc1a3a072 speed-up lossless in BackwardTrace
we special-case code=2 (with a later TODO to adapt this on quality)

Change-Id: I93d43f5b3f8f1ef9f211cce253bb4b415918ee57
2013-02-05 19:42:23 +01:00
James Zern
7defbfadbe encode.h: note the need to free() WebPMemoryWriter
Change-Id: Iec873764e9f4c085c634498630b8c1ced3283984
2013-02-01 19:18:47 -08:00
Urvang Joshi
b01681a93f Fix for demuxer frame iteration:
Return error in WebPDemuxGetFrame() when static method GetFrame()
returns NULL.

Change-Id: Idbc54037047c3df75209ac67ff8bede3f83042be
2013-01-29 10:58:04 -08:00
Urvang Joshi
56c12aa698 Demuxer creation fix:
If it's not a partial file and parser returns PARSE_NEED_MORE_DATA, then
consider it to be PARSE_ERROR.

Change-Id: Id652a345bd2a9f574970272dd0a00517de113215
2013-01-29 10:53:52 -08:00
pascal massimino
841a3ba5da Merge "Remove -Wshadow warnings." 2013-01-28 13:15:54 -08:00
pascal massimino
8fd0252787 Merge "upsampling_neon.c: fix build" 2013-01-28 13:14:39 -08:00
Johann
6efed26865 Remove -Wshadow warnings.
Accidentally carried some bad habits from SSE code. Copy over fixes
from 0d19fbf

Change-Id: I763312c9d176c434ba41f95602bada1aeffebfb2
2013-01-28 12:29:12 -08:00
Pascal Massimino
60904aa629 Merge "allow WebPINewRGB/YUVA to be passed a NULL output buffer." 2013-01-28 04:06:16 -08:00
Pascal Massimino
b7adf37621 allow WebPINewRGB/YUVA to be passed a NULL output buffer.
If a NULL pre-allocated buffer is passed, a buffer will be automatically
allocated.

+ add some parameter checks.

reported in http://code.google.com/p/webp/issues/detail?id=139

Change-Id: I9e14ed97db30ee12e46b5e92aac7eeaaeb99bfd5
2013-01-28 00:07:32 -08:00
James Zern
27f8f7420e upsampling_neon.c: fix build
store values to a temporary variable before calling functions that take
vector types.
removes non-standard constructs such as:
  (uint8x8x2_t){{ a, b }}
fixing:
  src/dsp/upsampling_neon.c:69:32: error: macro "vst2_u8" passed 3
arguments, but takes just 2

Change-Id: Ib4368e16e3a3efac18024f02be94e76243ade2dc
Fixes: https://code.google.com/p/webp/issues/detail?id=140
2013-01-25 19:42:50 -08:00
Mans Rullgard
090b708a00 NEON optimised yuv to rgb conversion
- along the lines of the SSE chroma upsampling.
Total speedup is ~30%.

4% speed loss on YuvToRgbXX conversion using tables instead
of 14-bit fixed precision. TODO(later): investigate, and compare
to x86.

see http://code.google.com/p/webp/issues/detail?id=134

Change-Id: Idc2261037cd13b4553ca20ecc4c4007099c37009
2013-01-25 15:46:40 -08:00
pascal massimino
aeb91a9d49 Merge "cosmetics: break a few long lines" 2013-01-23 15:05:40 -08:00
James Zern
be7c96b069 cosmetics: break a few long lines
Change-Id: I785763b974b4e7664ad8e9884251aa2d5274b456
2013-01-23 14:50:19 -08:00
pascal massimino
cff8ddb61b Merge "add libwebpdecoder.pc" 2013-01-23 14:27:41 -08:00
pascal massimino
93148ab867 Merge "libwebp.pc.in: detab" 2013-01-23 14:25:06 -08:00
James Zern
bed1ed7c28 add libwebpdecoder.pc
Change-Id: Ifc47549a9fe206fa174236664345d3ee064849f5
2013-01-23 13:57:08 -08:00
James Zern
46168b2d00 libwebp.pc.in: detab
Change-Id: I60f38e9f6e1cdba29163240a394b5be0a14c4bca
2013-01-23 13:31:43 -08:00
Vikas Arora
a941a3463e Fixed few nits in the build files.
Fixed the nits from last change (Provide an option to build decoder
library).

Change-Id: I7d8675b8156dc63cf21ef64810722552e7fb59f6
2013-01-23 13:22:06 -08:00
pascal massimino
08e7c58ee1 Merge "Provide an option to build decoder library." 2013-01-23 11:54:24 -08:00
Vikas Arora
0aeba52852 Provide an option to build decoder library.
When the config option '--enable-libwebpdecoder' is specified, the
lean decoder library 'libwebpdecoder' will be created in addition to
libwebp. Also dwebp binary will be linked to libwebpdecoder, if this
config option is specified.

Change-Id: I9de3e149b59c9a8390fae2ba660941749640e54a
2013-01-23 11:43:36 -08:00
skal
757ebcb1c1 catch malloc(0)/calloc(0) with an assert
Actually, it turns out we now should never call these functions
with a zero size, otherwise something is wrong in the logic.

Change-Id: Ie414fcbec95486c169190470a71f2cff0843782a
2013-01-23 20:09:28 +01:00
skal
152ec3d2ee Merge "handle malloc(0) and calloc(0) uniformly on all platforms" 2013-01-23 04:41:36 -08:00
James Zern
2b252a53a8 Merge "Provide option to swap bytes for 16 bit colormodes" 2013-01-22 15:00:39 -08:00
Vikas Arora
94a48b4bc3 Provide option to swap bytes for 16 bit colormodes
Color modes: RGB_565 & RGBA_4444
Change-Id: I571b6832b9848e5c4109272978f68623ca373383
2013-01-22 14:51:20 -08:00
skal
42f8f9346c handle malloc(0) and calloc(0) uniformly on all platforms
also change lossless encoder logic, which was relying on explicit
NULL return from WebPSafeMalloc(0)

renamed function to CheckSizeArgumentsOverflow() explicitly

addresses issue #138

Change-Id: Ibbd51cc0281e60e86dfd4c5496274399e4c0f7f3
2013-01-22 23:40:16 +01:00
skal
8b2152c579 Merge "add an extra assert to check memory bounds" 2013-01-22 14:10:02 -08:00
skal
0d19fbff51 remove some -Wshadow warnings
these are quite noisy, but it's not a big deal to remove
them.

Change-Id: I5deb08f10263feb77e2cc8a70be44ad4f725febd
2013-01-22 23:06:28 +01:00
skal
cd22f655e8 add an extra assert to check memory bounds
-> will remove a static-analysis warning about unused value.
addresses issue #138

Change-Id: I8ba4bf71a41e32759da41907aab73108dd230bc4
2013-01-22 13:38:58 +01:00
skal
a556cb1ab4 Add details and reference about the YUV->RGB conversion
Originated from the discussion at
   http://code.google.com/p/webp/issues/detail?id=134

Change-Id: I24384e2d2f5cf262d8632fc98303cba5e2d27224
2013-01-18 23:26:55 +01:00
pascal massimino
f4a97970de Merge "Disto4x4 and Disto16x16 in NEON" 2013-01-17 11:07:20 -08:00
Johann
47b7b0ba47 Disto4x4 and Disto16x16 in NEON
Change-Id: Ic6d9dbbc97b5025ce359332c33ae306d5d8925a5
2013-01-16 16:57:33 -08:00
vikas arora
e6409adc2e Remove redundant include from dsp/lossless code.
Change-Id: Ie8a497a486653f907c2a27f4027640a3308c6cc8
2013-01-10 15:09:19 -08:00
Pascal Massimino
0f57dcc31f decoding speed-up (~1%)
- precompute filtering strength once for all at the beginning
  instead of per-macroblock
- reduce size of VP8MB struct from 8 bytes to 4.
- removed VP8StoreBlock() accordingly

Change-Id: Icf3d329473e21c464770be3d72a04c9ee4c321f2
2012-12-14 10:22:54 -08:00
James Zern
d6b88b7694 cosmetics: use '== 0' in size checks
Change-Id: I8ac18e2e570e4c6a8569a3955afa11fc943bee28
2012-12-10 23:27:34 -08:00
James Zern
d65ec6786a fix build, move token.c to src/enc/
broken in:
  657f5c9 move token buffer to its own file (token.c)

Change-Id: I8944a0b5760979bd43008c501b55df1d22d32180
2012-12-03 11:16:08 -08:00
skal
657f5c91b1 move token buffer to its own file (token.c)
Change-Id: Ib9791c52f48d98fad5ed3830f36894ef5ac362fa
2012-12-03 13:50:14 +01:00
skal
c34a3758ad introduce GetLargeValue() to slim-fast GetCoeffs().
GetCoeffs is (by far) the most consuming function of the decoder.
No speed change (unfortunately), but the main loop is somehow clearer.

Change-Id: I78f1c10cadc2c8696c041f5cbda86cab92cc6598
2012-11-28 08:24:23 +01:00
skal
d5838cd598 faster non-transposing SSE2 4x4 FTransform
1-2% faster.
uses pmaddwd instead of transpose + pmullw.
Can possibly be simplified further.

Change-Id: I420e148816c4c6ab5e2080c9b1719dbbe6762d4e
2012-11-27 08:38:24 +01:00
skal
f76191f9db speed up GetResidualCost()
* treat the last coeff as a special case
* re-arrange the inner code to be shorter
* replace some VP8EncBands[n] by n, for n = 0 or 1

Change-Id: I71e17b014cffad7b073e787fde06260905a6953f
2012-11-26 23:50:37 +01:00
skal
ba2aa0fdda Add support for BITS=24 case
The main advantage is that you can avoid the use of uint64_t
some times, sticking to 32bit only.
Default still is BITS=32, this is mainly "in case".

Change-Id: Id694028793117ba822c37d46ef6c52fa0afed4ac
2012-11-26 23:47:08 +01:00
Urvang Joshi
23782f95b4 Separate out mux and demux code and libraries:
- Separate out mux.h and demux.h
- muxtypes.h: new header for data types common to mux/demux
- Move some misc read/write utilities to utils/utils.h
- Remove some duplicate methods.
- Separate out mux/demux libraries

Change-Id: If9b9569b10d55d922ad9317ef51710544315d6de
2012-11-19 11:40:18 -08:00
skal
42c3b550ba simplify the fwd transform
-> remove two shifts

Change-Id: Ibc55bca98588da30553a7870224ffd0e13d57f52
2012-11-15 09:51:35 +01:00
skal
118cb31270 Merge "add SSE2 version of Sum of Square error for 16x16, 16x8 and 8x8 case" 2012-11-15 00:07:44 -08:00
skal
99e0a707da Merge "Simplify the texture evaluation Disto4x4()" 2012-11-15 00:07:11 -08:00
skal
0f923c3ffd make the bundling work in a tmp buffer
This avoids modifying the source picture.

Change-Id: I5b472859cda17fd3236a9e0fbedbb68977e09f85
2012-11-15 09:05:25 +01:00
skal
e5c3b3f554 Simplify the texture evaluation Disto4x4()
We don't need to use the exact forward transform,
since it's only a rough evaluation.
-> Removed some shifts and rounding constants.

Change-Id: I3fdf8b4fe9720473894155e1ad0345f4d1fd9a33
2012-11-14 07:49:31 +01:00
skal
35bfd4c08f add SSE2 version of Sum of Square error for 16x16, 16x8 and 8x8 case
+ replace mm_set1_ps(0) by _mm_setzero_si128()

Change-Id: I4601033c27466532373f5dabfaf349ce5e5039da
2012-11-14 06:16:49 +01:00
Urvang Joshi
2ca642e02a Rectify WebPMuxGetFeatures:
It should return ALPHA_FLAG for lossless bit-stream

Change-Id: I900bd5b58bf75bc25fca1abf4ecc12aea26eac1c
2012-11-09 14:37:20 -08:00
Urvang Joshi
7caab1d8f6 Some cosmetic/comment fixes.
Change-Id: Id0613f84cc53fcbeceb913c835a262451687e27b
2012-11-09 10:46:38 -08:00