Commit Graph

3292 Commits

Author SHA1 Message Date
Pascal Massimino
276ae82512 Remove files not mean to be in git, and update .gitignore
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
2011-03-29 09:07:06 -07:00
Jan Engelhardt
2486845580 build: prepare libwebp.pc
libwebp.pc needs to be created from libwebp.pc.in, or installation
will fail.

Change-Id: If0afe8d5c722b3394778b309dc0b676e603a4282
2011-03-28 11:38:47 -07:00
Pascal Massimino
14ceb6e803 add "-version" description to man pages
Change-Id: I699899b11db3b62628c9438f07c379d2ae413031
2011-03-28 11:12:39 -07:00
Pascal Massimino
b247a3b279 Create the m4 directory, and also place .gitignore in there for libtool.
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
2011-03-28 07:09:35 -07:00
Pascal Massimino
cdd734c9e3 Resolve automake warnings
patch by Jan Engelhardt (jengelh at medozas dot de)

fixes http://code.google.com/p/webp/issues/detail?id=60

Change-Id: Ifd07974e89bdc18da4c2f4667a9cae9f6c07e649
2011-03-26 10:25:21 -07:00
Pascal Massimino
c5fa726e18 build: add pkgconfig files
patch by Jan Engelhardt (jengelh at medozas dot de)

fixes http://code.google.com/p/webp/issues/detail?id=64

Change-Id: I5b3bc9b88af967e48b949d9c85daacda45693b1f
2011-03-26 10:15:44 -07:00
Pascal Massimino
b20aaca285 build: just use autoreconf, avoid calling tools manually
patch by Jan Engelhardt (jengelh at medozas dot de)

fixes http://code.google.com/p/webp/issues/detail?id=59

Change-Id: I3fbb9124ce0b430b6340b3df5496e75cc5a9fedc
2011-03-26 09:50:31 -07:00
Pascal Massimino
4b0b0d66cc cwebp: use modern functions
patch by Jan Engelhardt (jengelh at medozas dot de)

Change-Id: I0e1766469fc4bc229488018b30416e3359c43012
2011-03-26 09:27:45 -07:00
Pascal Massimino
efbc6c41fc update Android.mk
idec.c was missing

Change-Id: I18fe8eb6576c52b56519567b9905ad5ac2db60c0
2011-03-26 07:33:19 -07:00
Pascal Massimino
7777570b9a better version of ChangeLog
(not including this Change, heh!)

+ fix NEWS's dates

Change-Id: I2bf6230a33d2a1606986432c53294240bac2dd2c
2011-03-25 18:15:34 -07:00
Pascal Massimino
fa70d2b771 update version number in the DOC
Change-Id: I791be1c6678fa4bd2f0f330cd53aa5837dedbebf
2011-03-25 16:54:47 -07:00
Pascal Massimino
f8db5d5d1c more C89-fixes
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
2011-03-25 15:19:37 -07:00
Pascal Massimino
0de013b3a4 fix typos
Change-Id: Ib83202e639a16d569ce21e7d057fe83817479d61
2011-03-24 16:32:29 -07:00
Pascal Massimino
650ffa3bbb add version getters for decoder and encoder
WebPGetDecoderVersion() and WebPGetEncoderVersion()
will not return 0.1.2 encoded as 0x000102

dwebp and cwebp also have a new "-version" flag

Change-Id: I4fb4b5a8fc4e53681a386ff4b74fffb639fa237a
2011-03-24 16:17:10 -07:00
Pascal Massimino
be4867d2f8 doc for incremental decoding
Change-Id: Idff912525b38aaed22113557a50abcb8422a9ab5
2011-03-24 15:50:02 -07:00
Pascal Massimino
56732a1b4d add idec.obj in MSVC makefile
Change-Id: I5064805991cdb811bc230cd184276bdd3abf017e
2011-03-24 06:38:39 -07:00
Pascal Massimino
208afb5ea1 add c++ guards
Change-Id: I0d4fa090e88499e2e3f1571b149666bde3304cda
2011-03-23 18:41:18 -07:00
Pascal Massimino
8bf76fe0c8 add incremental decoding
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
2011-03-23 18:33:26 -07:00
Pascal Massimino
1f28832834 'inline' isn't defined in strict ansi c89
=> don't use it if ANSI is define

Change-Id: Iebd7df224ff7f0e4bfddd3b2f17c1133e57c346f
2011-03-23 17:42:48 -07:00
Pascal Massimino
8b77c63262 move the quantization function to dsp.c
and add a function pointer for it

Change-Id: Ic7012e35c74a474bf140bb23cdaf9d6950026bc6
2011-03-23 17:41:00 -07:00
Pascal Massimino
b2c3575c8f add a 'last_y' field to WebPDecParams
this allows to keep an exact track of the last displayable pixel row

Change-Id: I590306735a82b9249e7bc9fe64eeb3e5bea3376b
2011-03-23 17:24:31 -07:00
Pascal Massimino
2654c3dadc correctly pass along the exact same status returned from ParsePartitions
Change-Id: I5e4ff98dd548b6dceaf36675faa988efb1f47b77
2011-03-23 17:22:07 -07:00
Pascal Massimino
4704146a1f add missing precision in the man
Change-Id: I55ae0547abf742b4620d9faae7fe5163d8459c19
2011-03-23 17:13:54 -07:00
Pascal Massimino
6d978a6c8c add error messages
patch by Christian Duvivier

Change-Id: Iaea71f690b99e313561d0284759531b81c10d7e5
2011-03-17 14:53:57 -07:00
Pascal Massimino
6463e6ab94 add some install instructions, and fix intel-mac flags
patch by Christian Duvivier

Change-Id: I8e38f98c6738c3d89917cd3eb88f6c095335a428
2011-03-17 14:45:23 -07:00
pascal massimino
05fb7bfc2b Merge ".gitignore: initial version" 2011-03-16 13:49:43 -07:00
James Zern
c33f0195aa .gitignore: initial version
Change-Id: Id6f5ee35e3d2374316e616e464379365669a7b8f
2011-03-16 10:33:26 -07:00
James Zern
e532b9abb1 Makefile: allow out of tree builds
use top_srcdir rather than top_builddir for AM_CPPFLAGS
add EXTRA_DIST to man Makefile. fixes distcheck target.

Change-Id: I308dc1c98f096de1efe188f63d040ef953598e78
2011-03-15 15:31:25 -07:00
Pascal Massimino
4c0da7aad5 enable sparse dc/ac transforms
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
2011-03-14 12:33:50 -07:00
Pascal Massimino
07dbb8d5af clarify the return logic
Change-Id: I2b5b239496da6545df2deede6d0ca28a2f9d46bf
2011-03-14 10:29:02 -07:00
Pascal Massimino
5c69e1bb4d fix bigger-by-1 array
and use enums for that.
props to Nigel Tao (at google dot com) for the fix

Change-Id: I68194cb510760dd82a2ae83359154bf622502991
2011-03-13 22:43:35 -07:00
Pascal Massimino
7c5267e36e fix a (harmless) typo: non_zero_ -> non_zero_ac_
props to Nigel Tao (at google dot com) for spotting it!

Change-Id: I113d714242e98edf02328a1898eb235899c07601
2011-03-13 20:36:43 -07:00
Pascal Massimino
bc75213572 fix missing free()
Change-Id: Ia09869321e00bb3fb8e92e5d91993ff583dc6cdf
2011-03-13 00:22:57 -08:00
Pascal Massimino
af3e2aaa04 remove trailing spaces
Change-Id: Ic92addd7c152e0216d5c9a35f5661914a5671f03
2011-03-10 15:57:18 -08:00
Pascal Massimino
13e50da6f8 make the bitreader preload at least 8bits, instead of post-load them
(this makes initialization easier and will be helpful for incremental
decoding).
Modify ParsePartitions() to accommodate for truncated input.

Change-Id: I62f52078d6b7a2314a11880a20d9eac5b4714bd0
2011-03-10 15:05:59 -08:00
Pascal Massimino
f4888f7702 emit 9 - nb_bits trailing zeros instead of 8
Change-Id: I3bd3eb8dac5bcc9fb0d41612ec610ca2046e8c7b
2011-03-10 14:57:38 -08:00
Pascal Massimino
3db6525574 separate block-parsing into a visible VP8DecodeMB()
This is to prepare for incremental decoding.

Change-Id: Ifc7e2df3e18eb56af3752cba8dfe08d370036d7f
2011-03-09 21:29:36 -08:00
Pascal Massimino
a871de0255 add missing extern "C"
Change-Id: Ie325dbbb1c1f0f55a3f207a32c67139f59c03bf2
2011-03-09 21:25:53 -08:00
Pascal Massimino
b3ce8c522a remove a gcc warning about type pun by using a proper union'd type
Change-Id: Ie2dd4aa696318daa84b90de009218311153c0613
2011-03-09 07:18:51 -08:00
Pascal Massimino
e1863715bf update after addition of webpi.h
Change-Id: I747bb0e6ba89ab6733d85ed688db2c608f7e6973
2011-03-09 07:03:40 -08:00
Pascal Massimino
3e856e2dd6 Extract some useful functions around decoding buffer WebPDecParams.
This is to prepare for incremental decoding.

Change-Id: Ibb1ac6c1f2d10e096c4fbcf0c06bce77b30ca457
2011-03-08 19:23:16 -08:00
Pascal Massimino
d5bc05a47b make the filtering process match libvpx and ffvp8
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
2011-03-08 18:47:08 -08:00
Pascal Massimino
dd60138d20 add man pages for cwebp(1) and dwebp(1)
Change-Id: I450717fc82fff19f16df75aca6a9a567773afd00
2011-03-01 16:07:57 -08:00
Pascal Massimino
c4fa36448b fix header
Change-Id: I982868e480434d19e2870780100b1df83df0800a
2011-02-27 21:51:10 -08:00
Pascal Massimino
5b70b378bd * add an option to bypass_filtering in VP8Io.
This will make the decoder skip the filtering process if needed,
resulting in speed-up, but also non-compliant (blocky?) output
+ Add a versioning check for VP8InitIo(), since we've adding a field to VP8Io
+ add some more error checks while at it

Change-Id: I4e9899edc24ecf8600cbb27aa4038490b7b2cef3
2011-02-27 10:55:33 -08:00
Pascal Massimino
b97a4003c0 simplify QuantizeBlock code a bit
Change-Id: I1130859756fa88e88957781f60a3701be354e2a3
2011-02-27 10:46:28 -08:00
Pascal Massimino
84b58ebba3 add more checks around picture allocation
covers overflow corner cases for 32/64bit platforms.

Change-Id: I0c9169264c33a4e9d0bbfdb026fb0d82c7e56de8
2011-02-27 10:31:20 -08:00
Pascal Massimino
b65a3e101e remove absolute_delta_ field and syntax code
we'll always encode using absolute value, not relative ones.
    Both methods use the same number of bits, so we'll go for the
    simpler and most robust one.
    + add some extra checks about pic->u/v being NULL.

Change-Id: I98ea01a1a6b133ab3c816c0fbc50e18269bd2098
2011-02-27 10:27:07 -08:00
Pascal Massimino
0744e8420e Dont' open output file until we're sure the input file is valid
fixes http://code.google.com/p/webp/issues/detail?id=48

Change-Id: I9ce2e500623380ba71ae0e2c8faf80db4568ae50
2011-02-25 12:03:27 -08:00
Pascal Massimino
d5bd54c712 fix typo and buggy line
Change-Id: I744bcfe5e611a49af9ad8a00ba764b74ee8dd727
2011-02-20 11:57:49 -08:00