Commit Graph

484 Commits

Author SHA1 Message Date
pascal massimino
631117ea5e Merge "cosmetics & warnings" 2012-01-30 22:04:11 -08:00
James Zern
a0b2736d79 cosmetics & warnings
- remove some unused functions
- move global arrays from data to read only section
- explicitly cast malloc returns; not specifically necessary, but helps
  show intent
- miscellaneous formatting

Change-Id: Ib15fe5b37fe6c29c369ad928bdc3a7290cd13c84
2012-01-30 17:19:53 -08:00
Pascal Massimino
f73947f41d use 32bit for storing dequant coeffs, instead of 16b.
is a tad faster

Change-Id: Ibef8f3b4f3f04a9a647098e5946f616e211a61cd
2012-01-29 17:38:37 -08:00
Pascal Massimino
b9600308e8 Merge "store prediction mode array as uint8_t[16], not int[16]." 2012-01-27 07:16:50 -08:00
Pascal Massimino
7b67881a23 store prediction mode array as uint8_t[16], not int[16].
This allow faster copy and gives a little bit of speed-up

Change-Id: I5f478229766098630b53b8a4982442fe29290ee6
2012-01-27 03:17:41 -08:00
Johann
cab8d4dc22 Merge "NEON TransformOne" 2012-01-26 11:38:16 -08:00
Johann
ba503fdac6 NEON TransformOne
As with the loop filter, implementing this with intrinsics is difficult
because we require subscript access for reading and writing 32 bits at a
time.

Approximately 5% decode speed improvement. This could be increased by
exposing TransformOne and rewriting TransformTwo to only handle dual
IDCTs.

Change-Id: Idd409264ab5d154a537107a1d54b419a48f7c1a8
2012-01-26 11:37:32 -08:00
Pascal Massimino
9f740e3b1a Merge "gcc warning fix: remove the 'const' qualifier." 2012-01-25 15:53:10 -08:00
Pascal Massimino
f76d3587e5 gcc warning fix: remove the 'const' qualifier.
Change-Id: I47b8f147f54072cb9b62669efd78c7b958aa5c08
2012-01-25 15:50:24 -08:00
James Zern
e78478d62c Merge "webpmux: make more use of WebPData" 2012-01-25 13:06:49 -08:00
James Zern
f85bba3dae Merge "manpages: add BUGS section" 2012-01-25 12:43:16 -08:00
James Zern
48a43bbfae Merge "makefile.unix: variable cosmetics" 2012-01-25 12:42:09 -08:00
James Zern
c274dc9679 makefile.unix: variable cosmetics
use CPPFLAGS to hold include paths, makes overriding CC a bit more
intuitive.

Change-Id: I6ecfc1957cae423dd150ebf37b878f1da6bbcef3
2012-01-25 10:46:28 -08:00
Pascal Massimino
1f7b8595ae re-organize the error-handling in the main loop a bit
Change-Id: Id74298131df9c33a86b989e15c11ffb6d04960d8
2012-01-25 08:34:58 -08:00
Pascal Massimino
1336fa719d Only recompute level_cost_[] when needed
Add a dirty_ flag to keep track of updated probabilities and the need to
recompute the level costs.
This only makes a difference for "-m 2" method which was sub-optimal.
But it's overall cleaner to have this flag.

Change-Id: I21c71201e1d07a923d97a3adf2fbbd7d67d35433
2012-01-25 07:52:34 -08:00
James Zern
771ee449b0 manpages: add BUGS section
reorder sections to better match 'man man-pages'

Change-Id: I6cc3cd7f74b6cc6848c407cb1f042207c82f847e
2012-01-24 17:40:42 -08:00
James Zern
0f7820e65c webpmux: make more use of WebPData
Add WebPDataCopy and use it in ReadImage which now returns WebPData*s.
Update ReadData prototype variables used with it to avoid unnecessary
const casting back and forth from void*.

Change-Id: I3f83db6729306eab0db9027b68706c8a7005ec10
2012-01-24 17:18:45 -08:00
James Zern
974aaff360 examples: logging updates
- send errors to stderr
- send help to stdout
- add image size to webpmux -info output and send to stdout
- correct webpmux exit values

Change-Id: Ifd8e8493aab33a82765f7b7903cef345d96da9ae
2012-01-24 16:55:38 -08:00
Pascal Massimino
6c14aaddc4 Merge "better token buffer code" 2012-01-23 18:55:11 -08:00
Pascal Massimino
f40542508c better token buffer code
(still not finished, but compiles and works ok)

Change-Id: I7002bf8017e31e7af34a53126072b625d23e2589
2012-01-23 18:54:24 -08:00
James Zern
18d959fa9a Merge "mux: add WebPData type" 2012-01-23 18:00:21 -08:00
James Zern
eec4b87718 mux: add WebPData type
slightly simplifies Get process

Change-Id: I9db365da29038e02a032494e0ef3d8a0d7515210
2012-01-23 17:51:01 -08:00
Pascal Massimino
0de3096b3a use 16bit counters for recording proba counts
This proved being ok, even for large pictures, provided one
takes care of overflow. When an overflow is bound to occur, the
counters are renormalized.
Overall, shaves ~12k of memory.

Change-Id: I2ba21a407964fe1a34c352371cba15166e0c4548
2012-01-23 17:50:58 -08:00
Pascal Massimino
7f23678da0 fix for LevelCost + little speed-up
the p0 proba was incorrectly accumulated. Merging its contribution into
the LevelCost[] was creating more problems than anything (esp. with trellis)
so let's just not.

Change-Id: I4c07bfee471085df901228d97b20a4d9606ba44e
2012-01-23 09:21:17 -08:00
Pascal Massimino
7107d54483 further speed-up/cleanup of RecordCoeffs() and GetResidualCost()
(note: Incorporated the cost of bin #1 into the LevelCost[])

Change-Id: I6408b2a822efdb97ad6a3a21d380bc7b0da9c715
2012-01-23 07:01:37 -08:00
Pascal Massimino
fd22104022 Introduce Token buffer (unused for now)
Later, will be useful to collect stats and code bitstream in one single pass

Change-Id: Icf866473958b5eff879e219dbb1d7e350f2268ba
2012-01-23 05:57:12 -08:00
Pascal Massimino
5fa148f47c Merge "speed-up GetResidualCost()" 2012-01-23 02:50:58 -08:00
Pascal Massimino
28a9d9b41a speed-up GetResidualCost()
+ misc cosmetics and code polishing

Change-Id: I5830cd2f268d64c072b1cbccc0a4674833875055
2012-01-23 02:36:38 -08:00
Pascal Massimino
11e7dadd96 Merge "misc cosmetics" 2012-01-22 23:52:29 -08:00
Pascal Massimino
378086bd0a misc cosmetics
Change-Id: Iafc73f9fece13b5ca900a8b9c1039268872a181b
2012-01-22 23:20:53 -08:00
Pascal Massimino
d61479f95b add -print_psnr and -print_ssim options to cwebp.
These will report the 7x7-averaged PSNR or SSIM, using the
new internal function WebPPictureDistortion().
This is for information only. These flags have no encoding impact.

+misc opportunistic cosmetics

Change-Id: I64c0a7eca679134d39062e438886274b22bb643f
2012-01-20 07:37:29 -08:00
Pascal Massimino
2e3e8b2ef5 add a WebPCleanupTransparentArea() method
to 'clean up' the fully-transparent area and make it more compressible
new cwebp flags: -alpha_cleanup (off by default, since gain is not 100% guaranteed)

Change-Id: I74d77e1915eee146584cd61c9c1132a41db922eb
2012-01-18 14:01:24 -08:00
James Zern
552c121715 Merge "mux: plug some memory leaks on error" 2012-01-18 13:46:38 -08:00
James Zern
a2a81f7d61 Merge "fix Mach-O shared library build" 2012-01-18 13:16:12 -08:00
James Zern
b3482c4300 Merge "fix gcc-4.0 apple 32-bit build" 2012-01-18 13:15:23 -08:00
James Zern
e4e3ec19ad fix gcc-4.0 apple 32-bit build
gcc-4.0 defines __PIC__ but not __pic__. This leaves the test for
__pic__ should the inverse case exist.
Fixes issue #103; build failing with:
"error: can't find a register in class 'BREG' while reloading 'asm'"

Change-Id: Ia767a733de6ce0294146f9477ff9c46f0ebe13b0
2012-01-18 13:12:45 -08:00
Urvang Joshi
b0d2fecf25 mux: plug some memory leaks on error
Make sure chunk->data and wpi are not leaked by
MuxAddFrameTileInternal() in case of MEMORY_ERROR in ChunkSetNth().

Change-Id: Ie20e84b92f4bdcb7c3b94520f36b20dd2e730545
2012-01-17 18:40:25 -08:00
Pascal Massimino
f0d2c7a76f pass of cosmetics
Change-Id: Id031221b7499e8cfc460c873d0f8124c9bef3aa3
2012-01-17 18:32:27 -08:00
James Zern
b309a6f901 fix Mach-O shared library build
Add extern to kChunks[] in muxi.h.
Fixes:
ld: duplicate symbol _kChunks in .libs/muxinternal.o and .libs/muxedit.o

Change-Id: Ibeb060f7fdec5fe904097a2443f0cda2f7ede884
2012-01-17 16:51:19 -08:00
James Zern
241ddd38e2 doc: delete mux container pdf
The source is now webp-container-spec.txt.

Change-Id: I43debf616b7eec774b5e1586c286974c7332fb48
2012-01-17 12:54:51 -08:00
James Zern
8b1ba272d2 doc: update VP8 decode guide link
The draft is now RFC6386.

Change-Id: Ief019357af5a5de9c6290cafd34db09d984f58aa
2012-01-17 12:52:27 -08:00
James Zern
7e4371c5b3 WebPMuxCreate: fix unchecked malloc
Change-Id: Ic824cdfbede4abe8e5106904dd17d564bb1b32d4
2012-01-15 11:18:23 -08:00
James Zern
eb425586e1 Merge "have makefile.unix clean up src/webp/*~ too" 2012-01-13 14:27:46 -08:00
James Zern
a85c363186 Merge "correct EncodeAlpha documentation" 2012-01-13 14:27:03 -08:00
James Zern
a33842fdb0 Merge "Update webp container spec with alpha filter options." 2012-01-13 14:25:39 -08:00
Urvang Joshi
8d6490dae6 Incremental support for some of the mux APIs.
This CL adds incremental support for WebPMuxCreate() and
WebPMuxGetFeatures()

Change-Id: I312122f5e817d58366e18ae238cb9e2a493811fb
2012-01-13 14:47:53 +05:30
Pascal Massimino
b8375abd08 have makefile.unix clean up src/webp/*~ too
Change-Id: Ida17b92346055b197fe6ccb60a9ac223ddd46f90
2012-01-12 18:49:29 -08:00
James Zern
b5855fc78d correct EncodeAlpha documentation
The paeth filter was removed in 8ca2076

Change-Id: I743502147da4e0b5506e49382311b8f592973d41
2012-01-12 18:37:45 -08:00
Urvang Joshi
dba37fea0e Update webp container spec with alpha filter options.
Change-Id: I032f350c8c698aeb139f7dd148f01a0a3b012b6d
2012-01-12 18:25:00 -08:00
Pascal Massimino
2e74ec8b5f fix compile under MINGW
there was a type conflict around INT32 (in libjpeg).

Patch by nipmarsh
Issue 102: http://code.google.com/p/webp/issues/detail?id=102

Change-Id: I6425b6b9b9861bcaa8bb1adc8a78541e44031a6e
2012-01-12 04:53:30 -08:00