Commit Graph

179 Commits

Author SHA1 Message Date
James Zern
a3ba6f19e9 Makefile.vc: fix gif2webp link error
Add missing dependency on libsharpyuv.

needed after:
f999d94f gif2webp: add -sharp_yuv/-near_lossless

Change-Id: I8bdd5c0fd4622f9c8ec6ffdf4ac11399f86350da
2024-11-06 10:14:05 -08:00
James Zern
f99305e9e5 Makefile.vc: add ARM64 support
This enables the executables and the correct flags, it's a full desktop
platform. This is different from the old Windows mobile ARM target.

Change-Id: I610d1579e5dac7b0a6a50ab9194a5f1fef2fc907
2024-01-31 14:12:03 -08:00
James Zern
5efd6300dc mv SharpYuvEstimate420Risk to extras/
There's no need for this in libsharpyuv currently. This avoids an ABI
bump and library size increase.

Change-Id: I3e4c79052fdb4d628a2d36491547233dd0b6dc34
2024-01-12 15:25:27 -08:00
James Zern
e78e924f84 Makefile.vc: add sharpyuv_risk_table.obj
missed in:
d7a0506d Add YUV420 riskiness metric.

Change-Id: I5c3cfeaf6757792ac97902f587e04bf95fd4c5a1
2023-12-21 15:43:17 -08:00
Vincent Rabaud
eac3bd5c53 Have the palette code be in its own file.
Change-Id: I099a342effedd9f451c94d00a14aead27079e6cc
2023-07-06 22:09:24 +02:00
James Zern
1275fac820 Makefile.vc: fix img2webp link w/dynamic cfg
add a dependency on libsharpyuv, which is needed after:
0825faa4c img2webp: add -sharp_yuv/-near_lossless

Change-Id: I2471549aa85a4ead6e00d6c459d9774ea4254eaa
2023-03-18 13:58:21 -07:00
James Zern
3f73e8f7ac sharpyuv: add SharpYuvGetVersion()
Change-Id: Ic7e93c7c3ec33b8ab0105a6e81b76a7869422b55
2022-10-28 19:15:32 -07:00
James Zern
979c0ebbcd sharpyuv: add SharpYuvGetCPUInfo
This gives a similar structure to libwebp and fixes a bug where passing
NULL to SharpYuvInit() would unconditionally set optimized function
pointers. SharpYuvInit() is left as an undocumented public function and
SharpYuvGetCPUInfo is kept private to serialize updates to the pointer.

Change-Id: Id72fbf3ba5b396367510e3bcd1ee2e4e11b95b8c
2022-10-26 13:07:01 -07:00
Maryla
780db75618 Update Windows makefile to build libsharpyuv library.
Change-Id: I2d260aa11c06ba1c33e40e94537f5a9afe5d3880
2022-10-05 14:21:35 +02:00
James Zern
639619ce72 cmake: fix dll exports
move WEBP_EXTERN definition from Makefile.vc to webp/types.h using the
existing WEBP_DLL define to control its declaration to
__declspec(dllexport); the same is done for SHARPYUV_EXTERN

Change-Id: Iecea360305bdd19a878255470a00b9dcc344c730
2022-08-11 19:33:37 -07:00
Maryla
2d607ee646 sharpyuv: increase precision of gamma<->linear conversion
Change-Id: I261bae3628315bda4ec0dafb8798c7512dd03a36
2022-06-01 15:38:44 +02:00
James Zern
deb426becc Makefile.vc: add sharpyuv_csp.obj to SHARPYUV_OBJS
missed in:
01a05de1a libsharpyuv: add colorspace utilities

Change-Id: Ic6d754757a54dc098d5c761f03480a3766d60db6
2022-04-09 11:06:17 -07:00
Maryla
d55d447c9a Make libwebp depend on libsharpyuv.
Change-Id: I6d8ebfe1f855024fc0694b1aa584f71fa27b83ae
2022-03-04 11:35:03 +01:00
James Zern
0fa0ea5488 Makefile.vc: use /MANIFEST:EMBED
this removes the mt.exe step and may fix some build failures if the
executable is locked after linking, e.g., by an antivirus program

Change-Id: I9a8184f3aaecb62a133a13d9ad3383667bc93fd3
2022-02-19 17:02:31 -08:00
Ilya Kurdyukov
a09a647241 SSE4.1 version of TransformColorInverse
Change-Id: I6ba5cb35917eef7a52152c4924eca205b4af7220
2021-02-18 12:42:39 +01:00
James Zern
ec5f12c11a Makefile.vc: remove deprecated /Gm option
this was only used in debug builds, the build should be fast enough in
either case.

https://docs.microsoft.com/en-us/cpp/build/reference/gm-enable-minimal-rebuild?view=vs-2019
/Gm is deprecated. It may not trigger a build for certain kinds of
header file changes. You may safely remove this option from your
projects. To improve build times, we recommend you use precompiled
headers and incremental and parallel build options instead.

Change-Id: I8e3c0e7cc82e10bd1d2b0904d290fe4e050ebe8b
2020-10-14 13:22:23 -07:00
James Zern
cf047e8347 Makefile.vc: fix webp_quality.exe link
when building a dll based libwebp include the dsp private symbols that
WebPUnmultiplyARGB requires

Change-Id: I7cf7da0b20d6cf6740219c8562380926a0abd93c
2019-12-20 08:55:37 -08:00
Johann
0fd7514b55 neon: SetResidualCoeffs
Much faster with aarch64. Still somewhat faster without vmaxv.

C: 3.700s
ArmV7: 3.675
aarch64: 3.600

BUG=b/118740850

Change-Id: I3be852da89633eca4bddce443c87f5e4a2f55868
2018-11-14 11:46:40 -08:00
Yannis Guyon
dc1a9518bc Merge "libwebp: Unicode command tools on Windows" 2018-10-17 11:55:49 +00:00
Yannis Guyon
9cf9841b5e libwebp: Unicode command tools on Windows
Define macros in examples/unicode.h to use Unicode argv
on Windows. Keep char everywhere on Unix since it handles
UTF-8 without any change.

Impact:
 - All fopen () and SHCreateStreamOnFile(),
 - All fprintf() printing file paths,
 - All strcmp() used with "-",
 - File path parsing,
 - Gif reading.

Concerned executables from examples/ and extras/:
  anim_diff, anim_dump, vwebp, vwebp_sdl,
  cwebp, dwebp, gif2webp, img2webp,
  webpmux, webpinfo, webp_quality, get_disto

When compiled on Windows with Unicode enabled, webpmux and
img2webp will not work when used with an argument file and
will print "Reading arguments from a file is a feature
unavailable with Unicode binaries."

BUG=webp:398

Change-Id: Ic55d222a3ce1a715f9c4cce57ecbe2705d5ce317
2018-10-17 13:19:40 +02:00
Vincent Rabaud
cbf82cc04d Remove AVX2 files.
There is only enc_avx2.c and we never managed to get
something fast enough.

Change-Id: I7465b5d8ccf47d9aa612173b8f80f96060cdb366
2018-10-16 14:12:03 +02:00
Pascal Massimino
641cedccd3 imagedec: support metadata reading for WebP image decoding
Needs to link imagedec.a to demux/libwebpdemux.a

Change-Id: Id8f4068718b0e4a1e84607bccd5af5419120c231
2018-03-28 16:36:37 -07:00
James Zern
f4dd92565e remove WEBP_EXPERIMENTAL_FEATURES
the webp bitstream is considered stable at this point

Change-Id: I4b13f9ed4c45f63785474b097e96cb7bf651be7b
2018-02-09 10:25:11 -08:00
James Zern
ccbeb32c04 Makefile.vc: add missing sse41 files
upsampling_sse41.c and yuv_sse41.c added in:
807b53c4 Implement the upsampling/yuv functions in SSE41

Change-Id: I186cb6f6c296ba26b8e9b42d88da7f58c55710a9
2017-12-05 23:27:16 -08:00
James Zern
a439972175 WIP: list includes as descendants of the project dir
#include "(.|..)/..." -> #include "src/..."

Change-Id: I772880aa097a770722043c8a4393552ba38a89b6
2017-10-10 23:04:05 -07:00
Pascal Massimino
f66f94ef36 anim_dump: small tool to dump frames from animated WebP
dumps frames to PNG, PAM or TIFF files.


Change-Id: I86a4d7e235cb7040cf5bbcae28270cb5a84be087
2017-08-30 06:12:03 +00:00
James Zern
8e42ba4c80 simplify WEBP_EXTERN macro
including the type in the macro doesn't bring much benefit to ordering,
current platforms work with a prefix, this would be insufficient if the
attribute needed to follow the function prototype. this form makes it
easier to override on the command line.

BUG=webp:355

Change-Id: Iba41ec0bb319403054be0e899c4cc472dd932fd9
2017-07-31 18:27:52 -07:00
Vincent Rabaud
8acb4942f7 Remove the argb* files.
Half of the functionality was duplicated.
The rest is about the alpha channel handling so we
might as well put it in the appropriate file.

Change-Id: I8d5ef0afce82cc4842ab7132fd97995c42e6140a
2017-06-25 14:44:33 +02:00
Vincent Rabaud
b903b80c30 Split cost-based backward references in its own file.
Change-Id: I4d8281e69b0e41f7c90337e5be70a6c65b044086
2017-06-01 16:22:31 +02:00
Pascal Massimino
52245424b0 NEON implementation of some Sharp-YUV420 functions
Change-Id: I449ef9c76b06f971f6e2ad7f9db96bf906d8fe1f
new-file: dsp/yuv_neon.c
2017-04-18 19:22:37 +02:00
Pascal Massimino
274daf5415 Add webpinfo tool.
A command line tool to print out the chunk level structure of
WebP files along with basic integrity checks.

BUG=webp:330

Change-Id: Ic69f646f649abb655b1854621d99afedeed158d7
2017-03-14 11:41:17 +01:00
Pascal Massimino
693bf74ec0 move the SSIM calculation code in ssim.c / ssim_sse2.c
Change-Id: I63a63fa7f44f257f2e17e45358b206c23069c448
2017-02-21 12:53:35 +01:00
Pascal Massimino
84c2a7b01c fix path typo for vwebp_sdl in Makefile.vc
Change-Id: Ia9656f1627ecbb58512927e234d18816941b3c9c
2017-02-04 00:01:23 -08:00
Pascal Massimino
57d8de8a79 Merge "vwebp_sdl: simple viewer based on SDL" 2017-02-03 09:43:57 +00:00
Pascal Massimino
dcf9d82a95 imageio: add limited PNM support for reading
see: http://netpbm.sourceforge.net/

Only reads P5 and P6 pnm files for now.

Change-Id: I2332a623f803df67455047f570f1cff9f464480a
2017-02-01 07:41:56 +00:00
Pascal Massimino
6524fcd614 vwebp_sdl: simple viewer based on SDL
Uses WebPToSDL() generic function defined in vwebp_sdl.[ch].
This function is not included in the libextras library, because it
would bring in an SDL dependency. Probably too heavy for now.

WebPToSDL() is separate, because it will be called used by the javascript
version of libwebp (through emscripten build rules)

Change-Id: Ic85b36f8ce4784f46023656278f6480be6802834
2017-01-31 10:23:03 +01:00
James Zern
84cef16f47 Makefile.vc: fix CFG=debug-dynamic build
strip '_debug' from the library basename to form the resource target.
since:
919f9e2f Merge "add .rc files for windows dll versioning"

BUG=webp:323

Change-Id: I97cfa48afa846211385720034a40aa452c68134c
2017-01-20 17:03:51 -08:00
James Zern
43d3f01a2f add .rc files for windows dll versioning
BUG=webp:323

Change-Id: Id415a32b63618d39af2e599cec0d40f64c35bbce
2017-01-20 00:35:15 -08:00
James Zern
668e1dd44f src/{dec,enc,utils}: give filenames a unique suffix
this avoids duplicates between these trees and dsp/, e.g., enc/tree.c,
dec/tree.c, making pulling the whole library source tree into one target
possible

BUG=webp:279

Change-Id: I060a614833c7c24ddd37bf641702ae6a5eef1775
2017-01-19 19:09:48 -08:00
James Zern
2ede5a198a Makefile.vc: add get_disto.exe, webp_quality.exe
Change-Id: Iebf1ea793a8f2cd97181b10f077099ba15b65208
2017-01-18 17:57:17 -08:00
Pascal Massimino
1de931c669 NEON: implement alpha-filters (horizontal/vertical/gradient)
gradient-filter code is not much faster, but maybe improvable in the future.

Change-Id: Ia16070e409fe8703b02276166f19526917df6b35
2017-01-17 15:44:46 +01:00
Pascal Massimino
49d0280df1 NEON: implement several alpha-processing functions
- ApplyAlphaMultiply
 - DispatchAlpha
 - DispatchAlphaToGreen
 - ExtractAlpha

Decoding to Argb / rgbA / ... is 10-15% faster (measured on N4)

new file: alpha_processing_neon.c

Change-Id: I40f1a809e9885d1031ff0bc886d8d001efa66bca
2017-01-11 17:39:29 +01:00
Pascal Massimino
03f40955a3 img2webp: convert a sequence of images to an animated webp
Usage:

  img2webp [file-level options] [image files...] [per-frame options...]

File-level options (only used at the start of compression):
 -min_size ............ minimize size
 -loop <int> .......... loop count (default: 0, = infinite loop)
 -kmax <int> .......... maximum number of frame between key-frames
                        (0=only keyframes)
 -kmin <int> .......... minimum number of frame between key-frames
                        (0=disable key-frames altogether)
 -mixed ............... use mixed lossy/lossless automatic mode
 -v ................... verbose mode
 -h ................... this help

Per-frame options (only used for subsequent images input):
 -d <int> ............. frame duration in ms (default: 100)
 -lossless  ........... use lossless mode (default)
 -lossy ... ........... use lossy mode
 -q <float> ........... quality
 -m <int> ............. method to use

example: img2webp -loop 2 in0.png -lossy in1.jpg
                  -d 80 in2.tiff -o out.webp

Change-Id: I23771b90eaf0660f420d7ffd304e704155386286
2016-12-02 11:44:17 +01:00
Vincent Rabaud
6cc48b1728 Move some lossless logic out of dsp.
Change-Id: I4cfd60cd5497666a2e1c188ceada2e71b05f1505
2016-09-13 15:37:32 +02:00
Pascal Massimino
af1ad3e2dd libimageenc.a: extract image-saving code from dwebp
BUG=webp:277
Change-Id: I2c0e1df7b13b1f77474b5478048fef022e90f77a
2016-09-08 19:11:26 -07:00
Parag Salasakar
d3ddacb625 Add MSA optimized YUV to RGB upsampling functions
We add the following MSA optimized YUV to RGB upsampling functions:
- UpsampleRgbLinePair
- UpsampleBgrLinePair
- UpsampleRgbaLinePair
- UpsampleBgraLinePair
- UpsampleArgbLinePair
- UpsampleRgba4444LinePair
- UpsampleRgb565LinePair

Change-Id: I7264a615edc7eb376e443e9d38bd8e3c9a2cab1f
2016-07-22 14:28:30 +00:00
James Zern
ebee57f4d1 move imageio/example_util.[hc] (back to) examples/
decoding and file i/o have been split to imageio, all that remains is
some string routines used for parameter parsing in the examples

Change-Id: I77386cd8aa39124b9e14c95fdbaa17ea4ab5bb24
2016-07-21 20:41:03 -07:00
James Zern
bdda5bd4bf split example_util.h
move ExUtil*File to imageio_util.h
ExUtil*WebP* to webpdec.h

string parsing routines remain

Change-Id: I0560c4a74e86710d83bc4b5b234f1b5ef9a86f9d
2016-07-21 19:14:58 -07:00
James Zern
57020525ed Makefile.vc: add missing imageio target
Change-Id: I7069fc70e60ff58d5dc2e365e2b23a0e5be716eb
2016-07-20 23:12:57 -07:00
James Zern
c379b55a93 move examples/{example_util,image_dec} to imageio/
Change-Id: I2508c786a095a2a75bebf766210c64e2af88f9b6
2016-07-19 19:06:29 -07:00