The values for the R/G/B floating point formulas resembled
https://fourcc.org/fccyvrgb.php and Video Demystified, but the fixed
point values are more closely aligned to rounded values from
https://en.wikipedia.org/wiki/YCbCr and BT.601.
The R/G/B formulas with the values prior to this change are added to
sharpyuv_csp.c as they align with the fixed values. The origin of those
coefficients is unclear. For consistency between library versions we'll
leave them as is.
Bug: webp:375011696
Change-Id: Id3f2a57530eee700cc52a899b32b25b5c015e89b
With older toolchains, at the least, visibility attributes don't
work and all symbols are exported along with lots of unsupported
warnings.
Change-Id: I6ffe220b7589a6bda00f42c17ead35592de7cc5a
There's no need for this in libsharpyuv currently. This avoids an ABI
bump and library size increase.
Change-Id: I3e4c79052fdb4d628a2d36491547233dd0b6dc34
Basic version for 8 bit only and C only (no simd).
Hidden behind a compile flag because the precompiled table is
fairly large (114kiB) and more than triples the size of the library.
Change-Id: I165c78e863df6a17b32f578bdbffe3adda9ac1d0
This avoids defining a version in each translation unit when using
__declspec(dllexport) which causes failures due to multiply defined
symbols with clang-cl:
lld-link: error: duplicate symbol: VP8GetCPUInfo
>>> defined at CMakeFiles\webpdecode.dir\Debug\src\dec\alpha_dec.c.obj
>>> defined at CMakeFiles\webpdsp.dir\Debug\src\dsp\dec_sse41.c.obj
...
Bug: webp:607
Change-Id: I6cd1ee75b3db984aa513263a05516e867a64925d
Rather than make a copy, requiring an additional lock/unlock only to set
the pointer to itself, pass the address of SharpYuvGetCPUInfo and use it
as a sentinel to avoid updating the pointer.
Change-Id: I22fb467f1659c16805c0d3bc7aaeba6a1bb16dbb
this was removed in:
979c0ebb sharpyuv: add SharpYuvGetCPUInfo
but currently, consumers of sharpyuv_dsp.h depend on the presence of
WEBP_USE_*
Change-Id: I9524aa5ab767a1b46770022220372455a86f198f
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
* changes:
picture_csp_enc.c: remove SafeInitSharpYuv
sharpyuv: prefer webp/types.h
sharpyuv,SharpYuvInit: add mutex protection when available
sharyuv_{neon,sse2}.c: merge WEBP_USE_* sections
add a few missing <stddef.h> includes for NULL
sharpyuv.h: remove <inttypes.h>
this provides better compatibility for older Visual Studio versions;
stdint.h is a part of C99.
this is consistent with the core libwebp library:
8fbb9188 prefer webp/types.h over stdint.h
Change-Id: I777cad70d9a407646c4193db9ca0f09e65d88735
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
this is similar to WEBP_DSP_INIT and avoids the potential for a race in
initializing the function pointers and gamma table
Change-Id: I15af7d1a3e92c42eaa735751ca33eba0d1e83283
this hasn't been needed since:
93c54371 sharpyuv: add support for 10/12/16 bit rgb and 10/12 bit yuv.
Change-Id: I02051e8b576d7fd27824e13be0d087dc4e18209e
Headers are installed in a "sharpyuv" subdirectory of the webp
dir, e.g. /usr/local/include/webp/sharpyuv/
Remove unnecessary dependency from sharpyuv to webp/types.h
Add SHARPYUV_EXTERN so that only symbols meant to be public
are exported.
Sharpyuv users can use the library with:
find_package(WebP)
if(TARGET WebP::sharpyuv)
# ... use WebP::sharpyuv
endif()
Change-Id: I602a25521a135a2edc39d6587610484fe6447ec5
libwebp still has a size threshold of 4 pixels in picture_csp_enc.c
but the sharpyuv library itself can handle any image size.
Change-Id: Ic1c78c8f8fae528395fa46a74f717f47cb13098e
- Remove SHALF constant so that we get back the original value when
calling UpScale then downscale with rounding
- Make the linear->gamma precomputed table bigger (8 bits rather than 5)
- Round values in kLinearToGammaTabS
Change-Id: Ic9634d32cf93de321d2f6e9e4cad7f156d8d07df
Remove unused constants.
Use ALL_CAPS for defines and kCamelCase for static const values.
Change some defines into static constants if they are not used in array sizes.
Change-Id: I036b0f99215fd0414a33f099bd6b809ff8ee4541