summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* EncodeAlphaInternal: clear result->bw on error1.1.0James Zern2023-02-281-1/+3
| | | | | | | | | | | | | | | | | | This avoids a double free should the function fail prior to VP8BitWriterInit() and a previous trial result's buffer carried over. Previously in ApplyFiltersAndEncode() trial.bw (with a previous iteration's buffer) would be freed, followed by best.bw pointing to the same buffer. Since: 187d379d add a fallback to ALPHA_NO_COMPRESSION In addition, check the return value of VP8BitWriterInit() in this function. Bug: webp:603 Change-Id: Ic258381ee26c8c16bc211d157c8153831c8c6910 (cherry picked from commit a486d800b60d0af4cc0836bf7ed8f21e12974129)
* GetBackwardReferences: fail on alloc errorJames Zern2022-04-061-6/+7
| | | | | | | | | | previously failures in the call to VP8LBackwardReferencesTraceBackwards() would be ignored which, though it wouldn't result in a crash, would produce non-deterministic output Change-Id: Id9890a60883c3270ec75e968506d46eea32b76d4 (cherry picked from commit e3cfafaf719c2e163d3548d7a415da96fdff714f) (cherry picked from commit 20ef03ee351d4ff03fc5ff3ec4804a879d1b9d5c)
* BackwardReferencesHashChainDistanceOnly: fix segfault on OOMJames Zern2022-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | change CostManager to calloc to avoid frees on undefined pointer values in CostManagerClear() should the cost_model allocation succeed, but the cost_manager allocation fail since: v0.5.0-93-g3e023c17 Speed-up BackwardReferencesHashChainDistanceOnly. Tested: for i in `seq 1 639`; do export MALLOC_FAIL_AT=$i ./examples/cwebp -m 6 -q 100 -lossless jpeg_file done Bug: webp:565 Change-Id: I376d81e6f41eb73529053e9e30c142b4b4f6b45b (cherry picked from commit a828a59b49d2e3fbc40dc42a6ee6426cd0f2c9dc) (cherry picked from commit dd80bb43431c222762be47fd92f8a37e032bc2c0)
* VP8LEncodeStream: fix segfault on OOMJames Zern2022-04-061-3/+8
| | | | | | | | | | | | | | | | | | | | initialize bw_side before calling EncoderAnalyze() & EncoderInit() which may fail; previously this would cause a free of an invalid pointer in VP8LBitWriterWipeOut(). since at least: v0.6.0-120-gf8c2ac15 Multi-thread the lossless cruncher. Tested: for i in `seq 1 639`; do export MALLOC_FAIL_AT=$i ./examples/cwebp -m 6 -q 100 -lossless jpeg_file done Bug: webp:565 Change-Id: I1c95883834b6e4b13aee890568ce3bad0f4266f0 (cherry picked from commit fe153fae98a3fe4626ff537ec8d5f4477cec5739) (cherry picked from commit ddd65f0d19bc6a3acbc48e49d315140ccf099b9a)
* alpha_processing_neon.c: fix 0x01... typoJames Zern2022-03-081-1/+1
| | | | | | | one instance was overlong leading to a int64->uint32 conversion warning Change-Id: I56d5ab75d89960c79293f62cd489d7ab519bbc34 (cherry picked from commit 03d12190552c3e95d31aa00303f28a8a2f813bdd)
* alpha_processing_neon.c: fix Dispatch/ExtractAlpha_NEONJames Zern2022-03-031-2/+4
| | | | | | | | | | | the trailing width % 8 bytes would clear the upper bytes of alpha_mask as they're done one at a time since: 49d0280d NEON: implement several alpha-processing functions Change-Id: Iff76c0af3094597285a6aa6ed032b345f9856aae (cherry picked from commit 924e7ca6540d1ac0a2b1b92ee094a64391de0c09)
* Fix lossless encoding for MIPS.Vincent Rabaud2022-03-021-4/+4
| | | | | | Bug: webp:558 Change-Id: I3d3ddb64ed26a8d8ff5664664c5f20f6eadfeb4f (cherry picked from commit e4cbcdd2b5ff33a64f97fe49d67fb56f915657e8)
* update ChangeLogv1.1.0-rc2v1.1.0James Zern2019-12-211-0/+28
| | | | | | BUG=webp:441 Change-Id: Ib401d468c677b9e598ffcec6535a846bf2456a4f
* Makefile.vc: fix webp_quality.exe linkJames Zern2019-12-201-1/+7
| | | | | | | | when building a dll based libwebp include the dsp private symbols that WebPUnmultiplyARGB requires Change-Id: I7cf7da0b20d6cf6740219c8562380926a0abd93c (cherry picked from commit cf047e8347314937435aabe643cf2fee0aa4a55b)
* update NEWSJames Zern2019-12-181-0/+11
| | | | | | BUG=webp:441 Change-Id: I8586b004e28b92d8c3c146f681bc9765f8a1f361
* bump version to 1.1.0James Zern2019-12-1814-32/+32
| | | | | | | | | | | | | | | | libwebp{,decoder} - 1.1.0 libwebp libtool - 8.0.1 libwebpdecoder libtool - 4.0.1 mux - 1.1.0 libtool - 3.5.0 demux - 1.1.0 libtool - 2.6.0 (no code change) BUG=webp:441 Change-Id: I458940f407515e0d95d20bbfd670ee29255c12eb
* update AUTHORSJames Zern2019-12-181-0/+2
| | | | | | BUG=webp:441 Change-Id: I844f1e4b5c32219a1e54de0c57a73822f93c7755
* extras: fix WEBP_SWAP_16BIT_CSP checkJames Zern2019-12-181-2/+2
| | | | | | | this is defined to 0 by dsp.h if it wasn't defined previously, since: 47178dbd extras: add WebPUnmultiplyARGB() convenience function Change-Id: If4dd48360a95b2786410670cff5ac655227fb6dd
* extras: add WebPUnmultiplyARGB() convenience functionSkal2019-12-173-2/+27
| | | | | | This is useful for converting associated to unassociated. Change-Id: I0e6d16ec63cb5514a0f945c14a54e0d01e1fab0a
* idec_dec: fix 0 offset of NULL pointerJames Zern2019-12-141-3/+8
| | | | | | | | in RemapMemBuffer() and AppendToMemBuffer() BUG=chromium:1028716,chromium:1027136 Change-Id: Ibc321d233b6207be3cb5cef4d9e8a60498e32457
* muxread: fix 0 offset of NULL pointerJames Zern2019-12-141-1/+1
| | | | | | BUG=chromium:1028620,chromium:1027409 Change-Id: I2b5527a223a03161afbf39c297c4646954a91fbc
* Merge "lossless_(enc_|)sse2: avoid offsetting a NULL pointer"James Zern2019-12-132-2/+4
|\
| * lossless_(enc_|)sse2: avoid offsetting a NULL pointerJames Zern2019-12-132-2/+4
| | | | | | | | | | | | | | | | | | | | PredictorSub0_SSE2 doesn't use 'upper' (neither does VP8LPredictorsSub_C[0]); just pass NULL when dealing with trailing pixels to avoid undefined behavior when offsetting a NULL pointer BUG=chromium:1026858,oss-fuzz:19430 Change-Id: I08be8899ed2e34f26aaee34defe68dbd0fe216d3
* | fix UBSAN warningSkal2019-12-131-1/+1
|/ | | | | | | | "applying non-zero offset 2044 to null pointer" Fixes chromium bug #19447 Change-Id: I530ae27dc64e92ed0018f36469264c448329e042
* DC8_NEON,aarch64: use vaddvJames Zern2019-12-061-0/+6
| | | | | | | results in one fewer instruction for both DC8uv_NEON and DC8uvNoLeft_NEON Change-Id: Ia4e6f4dbc070079cdc2496a698bd4b34198ea164
* dec_neon: Fix build failure under some toolchainsCheng Yi2019-12-061-1/+2
| | | | | | | | | | | some toolchains may implement vcreate_u64 as an assignment to a vector causing a type mismatch: invalid conversion between vector type 'uint64x1_t' (vector of 1 'uint64_t' value) and integer type 'unsigned int' of different size const uint64x1_t LKJI____ = vcreate_u64(L | (K << 8) | (J << 16) | (I << 24)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I5c7b0076ad66d4b3fcdcb7ee9f59bbaa6f19b783
* dsp/lossless: Fix non gcc ARM buildsOliver Wolff2019-11-271-1/+1
| | | | | | | The workaround for GCC ARM must not be applied when another toolchain (like MSVC) is used for the build. Change-Id: I11ec4558902063ccb085d3f435e24b3a60739dd5
* Remove ubsan errors.Vincent Rabaud2019-11-062-2/+9
| | | | | | | 'upper' could be NULL and it would be increased. But that is for predictor zero that does not use 'upper'. Change-Id: Icd4ae6792cc55ea021b4f828c3dbdb5f03e120d8
* CMake: fix GLUT library linkPascal Massimino2019-10-231-2/+2
| | | | | | use GLUT_LIBRARIES instead of GLUT::GLUT Change-Id: I92af90e09e00b01bd050ebeb8e9003b14c7dc144
* cmake: fix BUILD_SHARED_LIBS build on macJames Zern2019-10-221-5/+6
| | | | | | | | add some missing dependencies and convert utility libraries to static only libraries to avoid creating unnecessary shared object libraries which may fail to link due to missing symbols. Change-Id: Iaa91a3d97fa5af6ada4b2a851cc7fc2879d871da
* libwebp: Remove char-subscripts warning in pnmdec.cYannis Guyon2019-10-161-1/+2
| | | | Change-Id: I7a771e17fca0ba8a49a816b48cc477ad7a03a435
* Merge "Expose WebPMalloc() in addition to WebPFree()"Pascal Massimino2019-10-1612-43/+59
|\
| * Expose WebPMalloc() in addition to WebPFree()Skal2019-10-1512-43/+59
| | | | | | | | | | | | | | | | and use it at various places, including for WebPData. This is an API change! Change-Id: Ic041323a1179c465292a4f981a86c4c34635d243
* | imageio/tiff: Return error before allocating bad tile sizeYannis Guyon2019-10-151-12/+23
|/ | | | Change-Id: I5820b808e25beeda0fd4e755b62da0caabe48d8d
* Fix a Wxor-used-as-pow false positiveNico Weber2019-09-041-6/+10
| | | | | | | | | | | | | | Since people seem to write "2 ^ X" hoping that it means "1 << X", clang recently added a warning for this pattern. It incorrectly fires on this file. To suppress it, restructure the code to be less clever. (Alternatively we could use "xor" instead of "^" or write "0x2" instead of "2" but both seem worse.) No intended behavior change. Bug: chromium:995200 Change-Id: I64744345be5f5a8cd1f4aaeaf0982da239b378a7
* libwebp.py: update to swig 3.0.12James Zern2019-08-313-61/+93
| | | | | | fixes use with python 3 Change-Id: I4035c1c93e9f6551dd2e7e57da7d4ffd42ca06ce
* bugfix: last alpha rows were incorrectly decodedSkal2019-08-301-5/+5
| | | | | | | | | | | | | | sometimes, the last rows of the alpha plane contain more than NUM_ARGB_CACHE_ROWS rows to process. But ExtractAlphaRows() was repeatedly calling ApplyInverseTransforms() without updating the dec->last_row_ field, which is the starting row used as starting point. Fix would consist of either updating correctly dec->last_row_ before calling ApplyInverseTransforms(). Or pass the starting row explicitly, which is simpler. BUG=webp:439 Change-Id: Id99f2c28662d02b2b866cb79e666050be9d59e04
* webp: Fix imageio ReadPNM() TUPLTYPEYannis Guyon2019-07-301-16/+16
| | | | | | | It was colliding with "DEPTH" header value so ignoring "TUPLTYPE" except for unhandled types. Change-Id: I3c69cb6a81c5369e64b59d50567cd7fbc1756d57
* cosmetics: normalize '*' associationJames Zern2019-07-2617-43/+43
| | | | | | we associate '*' with types rather than variables Change-Id: Id93ed65272a8a88e604278693e3850649639e9b6
* update .gitignoreJames Zern2019-07-131-0/+3
| | | | | | anim_dump, webpinfo, vwebp_sdl Change-Id: I66043c9c296fae2319ec9b0acf3031543cb070bd
* update ChangeLogv1.0.3-rc1v1.0.3James Zern2019-07-041-8/+59
| | | | Change-Id: I9cc1442edb7b3fef73c07979d85417e9dcbf5a70
* update NEWSJames Zern2019-07-041-0/+12
| | | | Change-Id: I56c8d9430f0c77e813c2dbeee866387fa7a441c5
* bump version to 1.0.3James Zern2019-07-0413-26/+26
| | | | | | | | | | | | | | libwebp{,decoder} - 1.0.3 libwebp libtool - 7.5.0 libwebpdecoder libtool - 3.5.0 mux - 1.0.3 libtool - 3.4.0 (no code change) demux - 1.0.3 libtool - 2.6.0 (no code change) Change-Id: Ie0eaeff5fd6ab6f957836b50aff565843e6ca845
* update AUTHORSJames Zern2019-07-041-0/+1
| | | | Change-Id: Ic19305928b563110093254e6177f22bbd65b0827
* Fix the oscillating prediction problem at low qualityPascal Massimino2019-07-032-6/+35
| | | | | | | | | | | | | | | | | | | | | For some exact resonance the over-quantization was exactly compensating the under-quantization, leading to resonance and strange patterns. -> we special-handle the very flat blocks, hopefully for the greater good (and not just the bad-resonance case). For 'fast mode' (-m 3 or less), we just pay special attention to the border of the image, where the oscillation / instability usually starts. For the inner part of the image, since we're not doing rd-opt, it's harder to fix anything. Overall, on 'regular' images, the change is written the noise, often leading to overall faster encoding (because of the short-cut). BUG=webp:432 Change-Id: Ifaa8286499add80fd77daecf8e347abbff7c3a15
* makefile.unix: allow *_LIBS to be overridden w/EXTRA_LIBSJames Zern2019-07-011-9/+9
| | | | | | | | | previously setting EXTRA_LIBS on the command line would skip any per-target updates. this allows both EXTRA_LIBS and [CD]WEBP_LIBS, GL_LIBS to be set together avoiding the need to add unnecessary dependencies to EXTRA_LIBS which affects all targets. Change-Id: I63bbc14f0ac0cd04aa50c5d5047060ac57d0c9dc
* filters_sse2,cosmetics: shorten some long linesJames Zern2019-07-011-5/+4
| | | | Change-Id: Ifd8ddec50821aba175d41237df18e41b9ac6c7d4
* filters_sse2.c: quiet integer sanitizer warningsJames Zern2019-07-011-1/+3
| | | | | | | | | | | missed in a788b49 with clang7+ quiets conversion warnings like: implicit conversion from type 'int' of value -114 (32-bit, signed) to type 'uint8_t' (aka 'unsigned char') changed the value to 142 (8-bit, unsigned) Change-Id: I52dcd9cd613107f5424177c277785b92430bffb7
* Fix cpufeatures in CMake.Vincent Rabaud2019-07-011-1/+3
| | | | | | | | cpufeatures was not installed even though WebP depends on it on Android. BUG=webp:415 Change-Id: Iba00001534ceedbf65fbb42244a6c1341eb65134
* Add CMake option for bittrace.Vincent Rabaud2019-07-011-0/+6
| | | | Change-Id: I9f09eb2c0afdac41e94bc10dfedd1fd004c45731
* filters_sse2.c: quiet integer sanitizer warningsJames Zern2019-06-281-6/+7
| | | | | | | | | with clang7+ quiets conversion warnings like: implicit conversion from type 'int' of value -114 (32-bit, signed) to type 'uint8_t' (aka 'unsigned char') changed the value to 142 (8-bit, unsigned) Change-Id: I7f08a836ddcf777454dfd5b877a81b62b2abac86
* filters.c: quiet integer sanitizer warningsJames Zern2019-06-281-6/+6
| | | | | | | | | with clang7+ quiets conversion warnings like: implicit conversion from type 'int' of value -12 (32-bit, signed) to type 'uint8_t' (aka 'unsigned char') changed the value to 244 (8-bit, unsigned) Change-Id: I053c92301e55dcb0cae89a7733636283da942176
* lossless.c: remove U32 -> S8 conversion warningsJames Zern2019-06-281-2/+2
| | | | Change-Id: Ica2664ea087254959391275654412141ed9472df
* remove conversion U32 -> S8 warningsPascal Massimino2019-06-241-5/+9
| | | | | | using an inline U32ToS8() function Change-Id: I45f535c6c9b5de33d69acc17b466e183fcc19a63
* lossless_enc: fix some conversion warningSkal2019-06-241-7/+8
| | | | | | object code is unchanged. Change-Id: I40fc16056c0ab44c5c57ef6b02af14be767abe87