Commit Graph

2788 Commits

Author SHA1 Message Date
Pascal Massimino
469ba2cdfd vwebp: fix incorrect clipping w/NO_BLEND
when the previous frame does not specify dispose to background only the
current frame's rectangle should be cleared

related to bug #245

Change-Id: I2fc4f5be99057e0bf87d8fedec57b06859b070bd
2015-10-23 12:18:39 -07:00
James Zern
4b9186b2eb update issue tracker url
code.google.com -> bugs.chromium.org

Change-Id: I0dc99a85c29657415401160df3c7dd0423f96457
2015-10-19 20:06:50 -07:00
Pascal Massimino
d64d376c2a change WEBP_ALIGN_CST value to 31
(and make dec/frame.c use the common macros too)

Change-Id: Ie44dbd82e067934b17ca3ffba4dd45ab0d61d3f6
2015-10-19 21:39:55 +00:00
James Zern
f717b82864 vp8l.c, cosmetics: fix indent after 95509f9
95509f9 large re-organization of the delta-palettization code

Change-Id: I9d27f15cb6072a2bd1dd593d53db5b2dd3c30133
2015-10-19 12:28:57 -07:00
James Zern
927ccdc43b Merge "fix alignment of allocated memory in AllocateTransformBuffer" 2015-10-19 19:15:04 +00:00
Pascal Massimino
fea94b2b36 fix alignment of allocated memory in AllocateTransformBuffer
likely to avoid unaligned reads in the future

Change-Id: I434ba17c139ad6e190ebd9b909b241c6c6f1e7f8
2015-10-18 13:09:22 -07:00
Pascal Massimino
5aa8d61f75 Merge "MIPS: rescaler code synced with C implementation" 2015-10-17 07:52:36 +00:00
Djordje Pesut
e7fb267df7 MIPS: rescaler code synced with C implementation
Change-Id: I4cec115d3fe6f3f825084d7388249694c500256a
2015-10-17 00:16:27 -07:00
Pascal Massimino
93c86ed5b9 Merge "format_constants.h: MKFOURCC, correct cast" 2015-10-17 05:45:05 +00:00
James Zern
5d791d2603 format_constants.h: MKFOURCC, correct cast
'd' should be promoted to uint32 before shifting by 24

Change-Id: I6212661af3802709b0098af8402ed73a0d9373ee
2015-10-16 18:43:40 -07:00
James Zern
65726cd3a7 dsp/lossless: Average2, make a constant unsigned
use 'u' rather than the unnecessary 'l' as a suffix. this prevents a
conversion warning with some toolchains

Change-Id: I21c33ce08819b3c839c75e03a8f7f3a6041d0695
2015-10-16 18:39:42 -07:00
Johann
d26d9def80 Use __has_builtin to check clang support
Older versions of Xcode with clang reporting versions 4.[012] and 5.0
did not include support for __builtin_bswap16. Checking in this manner
avoids using brittle version checks.

Matches a change to libvpx:
https://chromium-review.googlesource.com/305573
to fix:
https://code.google.com/p/webm/issues/detail?id=1082

Change-Id: I23ea466ee1b53b12cd3fb45f65a2186c8dda95a1
2015-10-14 17:48:08 -07:00
Pascal Massimino
12ec204ec7 moved ALIGN_CST into util/utils.h and renamed WEBP_ALIGN_xxx
Note that ALIGN_CST is still kept different in dec/frame.c for now,
because the values is 31 there, not 15. We might re-unite these two
later.

Change-Id: Ibbee607fac4eef02f175b56f0bb0ba359fda3b87
2015-10-14 00:03:14 -07:00
Pascal Massimino
a26408389a Merge "rescaler: ~20% faster SSE2 implementation for lossless ImportRowExpand" 2015-10-14 06:26:13 +00:00
James Zern
3fb600d50d Merge "wicdec: fix alpha detection w/64bpp BGRA/RGBA" 2015-10-14 06:22:57 +00:00
Pascal Massimino
67c547fdcd rescaler: ~20% faster SSE2 implementation for lossless ImportRowExpand
lossy (1-channel) speed-up is more on the 5% side.

Change-Id: Id19d97b9e9a34804b59604a5b48f94a37fdafd62
2015-10-14 07:32:12 +02:00
Pascal Massimino
99e3f8128a Merge "large re-organization of the delta-palettization code" 2015-10-14 05:11:47 +00:00
Pascal Massimino
95509f9914 large re-organization of the delta-palettization code
same functionality, but better code layout.

What changed:
  * don't trash the palette_[] in EncodePalette(), so it can be re-used
  * split generation of image from bit-stream coding
  * move all the delta-palette code to delta_palettization.c, and only have 1 entry point there WebPSearchOptimalDeltaPalette()
  * minimize the number of "#ifdef WEBP_EXPERIMENTAL_FEATURES" in vp8l.c
  * clarify the TransformBuffer stuff. more clean-up to come here...

This should make experimenting with delta-palettization easier and more compartimentalized.

Change-Id: Iadaa90e6c5b9dabc7791aec2530e18c973a94610
2015-10-14 00:25:42 +02:00
Pascal Massimino
74fb458bbc fix for weird msvc warning message
" warning C4098: 'RescalerImportRowShrinkSSE2' : 'void' function returning a value"

Change-Id: Ifa893502e3e4b394910e142d954393dda9d59d1a
2015-10-10 22:35:59 -07:00
Pascal Massimino
ae49ad8641 Merge "SSE2 implementation of ImportRowShrink" 2015-10-10 06:02:24 +00:00
Pascal Massimino
932fd4df61 SSE2 implementation of ImportRowShrink
some limitations: only for RGBA output,
and if reduction factor is not too small (dst_width > src_width / 128)

20-25% faster, ~4-6% global improvement total decoding.

Change-Id: I95366ddaa4a38e0a96bed754dfe790126f7bb84a
2015-10-09 13:04:54 -07:00
James Zern
badfcbaa1e wicdec: fix alpha detection w/64bpp BGRA/RGBA
Change-Id: Ia712cf736e490d482a52b63d8e2816d0b7035cd0
2015-10-08 20:33:33 -07:00
James Zern
35cafa6ca3 Merge "iosbuild: fix linking with Xcode 7 / iOS SDK 9" 2015-10-09 02:42:28 +00:00
Pascal Massimino
b0c9d8af32 label rename: NO_CHANGE -> NoChange
Change-Id: I5b2beb93169d7c2bc95e6cdeb57770fc44b4963f
2015-10-07 22:53:34 -07:00
skal
b4e731cd93 neon-implementation for rescaler code
It's better to stay with a 32b fixed-point precision overall, otherwise
the C-version on ARM gets *slower*.
Actually, gcc ARM compiler optimizes some instructions pretty
well when WEBP_RESCALER_FIX is exactly 32, even in C.

Change-Id: I0eea97f7db5947470f5af355dee098eca81e178d
2015-10-07 21:18:39 -07:00
James Zern
db1321a6a2 iosbuild: fix linking with Xcode 7 / iOS SDK 9
-fembed-bitcode is the default, a framework built without this flag will
fail to link against an application using it.

BUG=267

Change-Id: I83461cb058b1866ac99b3f0bdfa890933e88ed26
2015-10-08 02:08:19 +00:00
Pascal Massimino
6dfa5e3e58 rescaler: better handling of the fxy_scale=0 special case.
Change-Id: I635cb62c028e373a54fcafdc6b996812a9b2ace5
2015-10-07 17:53:16 -07:00
Pascal Massimino
55c05293d5 Revert "rescaler: better handling of the fxy_scale=0 special case."
This reverts commit 9f226bf8c3.

I dropped a 'dst_height' from 'ratio'!! My bad...

Change-Id: Id355f0f012a754cddf97012715d69aa5e03c2e5c
2015-10-07 17:49:24 -07:00
Pascal Massimino
9f226bf8c3 rescaler: better handling of the fxy_scale=0 special case.
Change-Id: I1d1852d989519d40e672995be4f08706265271f5
2015-10-07 09:39:20 +02:00
James Zern
f7b8f90740 delta_palettization.*: add copyright
Change-Id: I5dc0ae0de88968d2c73b7025ce18319897219630
2015-10-03 10:05:09 -07:00
Mislav Bradac
c1e1b7104c Changed delta palette to compress better
New palette compresses more than 20% better with minimum quality loss.
Tested on set of wikipedia images with command line:
cwebp -delta_palettization

Change-Id: I82ec7d513136599cd70386f607f634502eb9095d
2015-10-03 08:48:42 +00:00
Pascal Massimino
0dd282672e Merge "Add delta_palettization feature to WebP" 2015-10-03 05:42:36 +00:00
Mislav Bradac
48f66b6687 Add delta_palettization feature to WebP
Change-Id: Ibaf4e49aa67d63d0eb11848cca4fd0c60815864a
2015-10-02 14:29:54 -07:00
Urvang Joshi
27933e2a8e anim_encoder: drop a frame if it has same pixels as the prev frame.
Earlier, we stored a 1x1 frame for such frames. Now, we drop every such
frame and increase the duration of its previous frame instead.

Also, modify the anim_diff tool to handle animated images that are
equivalent, but have different number of frames.

Change-Id: I2688b1771e1f5f9f6a78e48ec81b01c3cd495403
2015-10-01 11:14:49 -07:00
Pascal Massimino
df9f6ec829 Merge "webpmux/DisplayInfo: send non-error output to stdout" 2015-09-26 05:36:40 +00:00
Pascal Massimino
8af4993b63 Merge "rescaler_mips_dsp_r2: cosmetics, fix indent" 2015-09-26 05:35:39 +00:00
Pascal Massimino
2b9d2495ef Merge "rescaler: cosmetics, join two lines" 2015-09-26 05:35:07 +00:00
James Zern
cc020a8c96 webpmux/DisplayInfo: send non-error output to stdout
Change-Id: I4ed0d10e4a7cbc8f2d204b33a483990f1ace58ff
2015-09-25 18:49:08 -07:00
James Zern
a288e74658 configure: add -Wshorten-64-to-32
adds a visual studio like warning about implicit conversions from 64 to
32-bits

Change-Id: I8a984ec6f61bd65f0c71756f3e1ee89a68fed852
2015-09-25 18:46:22 -07:00
James Zern
c4c3cf2d0e pngdec: fix type conversion warnings
Change-Id: I1719cbed4521b492d3504a8a478cdd395060d43e
2015-09-25 18:43:01 -07:00
James Zern
bef8e97d5d webpmux: fix type conversion warning
Change-Id: I65de23f376570346a9489c2116a0effa60345157
2015-09-25 18:42:31 -07:00
James Zern
5a84460d6d rescaler_mips_dsp_r2: cosmetics, fix indent
Change-Id: I59a432a66a658a74f383bd81b6f9abb5e5bb409e
2015-09-25 18:35:16 -07:00
James Zern
acde0aae5a rescaler: cosmetics, join two lines
Change-Id: Ic231dd048c82a934122ce4884180a2339f7ce2f8
2015-09-25 18:34:45 -07:00
Pascal Massimino
306ce4fde1 rescaler: move the 1x1 or 2x1 handling one level up
=> no need to handle it in the sub-functions.

Change-Id: I4b0211ecfafbc9c80a73bf2206809a13c94e7911
2015-09-25 14:35:35 -07:00
Pascal Massimino
cced974bb2 remove _mm_set_epi64x(), which is too specific
Change-Id: I4b1035f9c548b804f31c68a00b0a1aa8e13550bb
2015-09-25 14:35:33 -07:00
Pascal Massimino
56668c9fc5 fix warnings about uint64_t -> uint32_t conversion
Change-Id: Iee027979b404d4b7edda506b844d354aa1026dae
2015-09-25 17:36:11 +02:00
Pascal Massimino
76a7dc39e5 rescaler: add some SSE2 code
The rounding and arithmetic is not the same as previously, to prevent overflow cases for large upscale factors.

We still rely on 32b x 32b -> 64b multiplies. Raised the fixed-point precision to 32b
so that we have some nice shifts from epi64 to epi32.
Changed rescaler_t type to 'uint32_t' in order to squeeze in all the precision required.

The MIPS code has been disabled because it's now out-of-sync. Will be fixed in
a subsequent CL when the dust settles.
~30-35% faster

Change-Id: I32e4ddc00933f1b1aa3463403086199fd5dad07b
2015-09-25 15:07:13 +02:00
James Zern
1df1d0eedb rescaler: harmonize function protos
Change-Id: I13b5f9add83c1225c82a650f3ef717582b057247
2015-09-19 22:57:25 -07:00
Pascal Massimino
9ba1894b9b rescaler: simplify ImportRow logic
incorporates the loop over 'channel' and removes one parameter

Change-Id: I4e3b33c111ca825fe96461583420413b17326409
2015-09-19 10:07:26 -07:00
Pascal Massimino
5ff0079ece fix rescaler vertical interpolation
* vertical expansion now uses bilinear interpolation
  * heavily assumes that the alpha plane is decoded in full, not row-by-row
  * split the RescalerExportRow and RescalerImportRow methods into Shrink
    and Expand variants.
  * MIPS implementation of ExportRowExpand is missing.

There's room for extra speed optim and code re-org, but let's keep that for later patches.

addresses https://code.google.com/p/webp/issues/detail?id=254

Change-Id: I8f12b855342bf07dd467fe85e4fde5fd814effdb
2015-09-18 17:32:11 -07:00