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
James Zern
d623a8706f
dec_neon: add whitespace around stringizing operator
...
prevents unintentional side-effects (though unlikely in this case) with
future compilers, cf:
eebaf97
dsp/mips: add whitespace around stringizing operator
Change-Id: I0537091fcc97b4f54d0a156c3c83a28c51456b17
2015-09-03 23:13:56 -07:00
James Zern
29377d55b6
dsp/mips: cosmetics: add whitespace around XSTR macro
...
normalizes formatting after:
eebaf97
dsp/mips: add whitespace around stringizing operator
Change-Id: I1e3986b6d08195d79072747eb99d7e0549aece72
2015-09-03 23:09:13 -07:00
James Zern
eebaf97f5a
dsp/mips: add whitespace around stringizing operator
...
fixes compile with gcc 5.1
BUG=259
Change-Id: Ideb39c6290ab8569b1b6cc835bea11c822d0286c
2015-09-02 23:21:13 -07:00
James Zern
14efabbf1c
Android: limit use of cpufeatures
...
cpufeatures is only used with armeabi-v7a.*
Change-Id: I80284061d71d9defa50d139c7f1bda67c00f567e
2015-08-19 18:44:33 -07:00
skal
bd55604d1b
SSE2: add yuv444 converters, re-using yuv_sse2.c
...
Change-Id: I4d5c9df8a4c8e8cb8b5daa537af07382894503a8
2015-08-17 21:15:37 -07:00
James Zern
155c1b222b
Merge changes I76f4d6fe,I45434639
...
* changes:
lossless_enc_neon: add VP8LTransformColor
lossless_neon: add VP8LTransformColorInverse
2015-08-06 23:00:03 +00:00
Djordje Pesut
717e4d5a7c
mips32/mipsDSPr2: function ImportRow rebased
...
Change-Id: Id58d266040fdb5fe1e507cd0f6370ea625156e4d
2015-08-06 17:09:10 +02:00
Pascal Massimino
7df93893dc
fix rescaling bug (uninitialized read, see bug #254 ).
...
the x_add/x_sub increments were wrong for u/v in the upscaling case.
They shouldn't be left to the caller's discretion, but set up by
WebPRescalerInit to their exact necessary values.
-> Cleaned-up WebPRescalerInit() param list.
-> added safety asserts
-> removed the mips32/mips_r2 variant of "ImportRow" which were buggy prior
Change-Id: I347c75804d835811e7025de92a0758d7929dfc09
2015-08-05 23:00:00 -07:00
James Zern
5cdcd561e2
lossless_enc_neon: add VP8LTransformColor
...
based on SSE2, ~32% faster
Change-Id: I76f4d6fe456baceba46ffebf2f699e98691eefdf
2015-08-05 00:15:13 -07:00
James Zern
a53c336919
lossless_neon: add VP8LTransformColorInverse
...
based on SSE2, only ~11% faster
Change-Id: I45434639d81e153f01f77c1f5d2da510b542170e
2015-08-04 23:22:36 -07:00
James Zern
99131e7f8c
Merge changes I9fb25a89,Ibc648e9e
...
* changes:
lossless_neon: remove predictors 5-13
ll_enc_neon: enable VP8LSubtractGreenFromBlueAndRed
2015-08-04 02:24:15 +00:00
Pascal Massimino
c455676680
simplify the main loop for downscaling
...
(part of bug #254 investigation)
no speed change observed.
Change-Id: Ie21b33171def367f37643fef6a0bd378e49468c7
2015-08-03 16:57:35 +02:00
James Zern
2a010f992a
lossless_neon: remove predictors 5-13
...
operating on single uint32's isn't helped by NEON.
this improves aarch64 performance by ~4%
Change-Id: I9fb25a8962de7b80e893e756ee7c76393cfd40c7
2015-07-28 19:44:58 -07:00
James Zern
ca221bbc48
ll_enc_neon: enable VP8LSubtractGreenFromBlueAndRed
...
this moves the function outside the WEBP_USE_INTRINSICS check.
there's no alternative version and it's ~54% faster at the
function level and mildly faster overall
Change-Id: Ibc648e9ee35021d48901e05aa596aa01067796a2
2015-07-28 19:44:45 -07:00
Jyrki Alakuijala
85b44d8a69
lossless: encoding, don't compute unnecessary histo
...
share the computation between different modes
3-5 % speedup for lossless alpha
1 % for lossy alpha
no change in compression density
Change-Id: I5e31413b3efcd4319121587da8320ac4f14550b2
2015-07-07 20:24:26 -07:00
Pascal Massimino
0ae2c2e4b2
SSE2/SSE41: optimize SSE_16xN loops
...
After several trials at re-organizing the main loop and accumulation scheme,
this is apparently the faster variant.
removed the SSE41 version, which is no longer faster now.
For some reason, the AVX variant seems to benefit most for the change.
Change-Id: Ib11ee18dbb69596cee1a3a289af8e2b4253de7b5
2015-07-02 20:55:04 +02:00
James Zern
39216e59d9
cosmetics: fix indent after 32462a07
...
Change-Id: If9a5d91c25e981bc4cd81adb476244e63fc7c3c8
2015-07-01 23:49:20 -07:00
James Zern
559e54ca60
Merge "SSE2: slightly faster FTransformWHT"
2015-07-02 06:36:33 +00:00
Pascal Massimino
8ef9a63b45
SSE2: slightly faster FTransformWHT
...
goes from 0.3% to 0.1% overall CPU time, but...
Change-Id: I4c9a92b1e1d6b58ed57c6b890366f1dbeaf84f84
2015-07-01 23:03:17 -07:00
James Zern
f27f773576
lossless_neon: enable VP8LAddGreenToBlueAndRed
...
this moves the function outside the WEBP_USE_INTRINSICS check.
there's no alternative version and it's ~70% faster at the
function level and 1-2% faster overall
Change-Id: I59fb4918ec86b1ac3a47cbd5d05ce62f007461cb
2015-07-01 22:50:54 -07:00
Pascal Massimino
36e9c4bc50
SSE2: minor cosmetrics on in-loop filter code
...
Change-Id: Ic0e6502081d7063bb2841df74e05c450d708aaf2
2015-06-28 11:59:22 +02:00
James Zern
4741fac42e
dsp/lossless_*sse2: remove some unnecessary inlines
...
TransformColor / TransformColorInverse are the top-level function
pointer calls
Change-Id: Ieabdb4005ff3e4f9bb3ebcb140ccb6bef5d28f8b
2015-06-25 21:02:01 -07:00
Pascal Massimino
1819965e0a
fix warning ("left shift of negative value") using a cast
...
Change-Id: Ie99e8ff87924a1d15e2c5d83bd9adf07dab04e94
2015-06-24 23:46:09 -07:00
Pascal Massimino
7017001462
SSE2: speed-up some lossless-encoding functions
...
optimized: CollectColorRedTransforms, CollectColorBlueTransforms, SubtractGreenFromBlueAndRed
overall effect is sub-1% speed-up, though.
Change-Id: I9cb49af5c56e4c03db417929b0a2cf575d60a5c6
2015-06-24 20:09:13 -07:00
Pascal Massimino
abcb012841
Merge "SSE2: slightly faster (~5%) AddGreenToBlueAndRed()"
2015-06-24 09:37:46 +00:00
Pascal Massimino
2df5bd30a6
Merge "Speedup to HuffmanCostCombinedCount"
2015-06-24 07:42:26 +00:00
Pascal Massimino
9e356d6b25
SSE2: slightly faster (~5%) AddGreenToBlueAndRed()
...
Change-Id: Ie147010b66544c4e959f26966ad588394302d418
2015-06-24 09:36:44 +02:00
Pascal Massimino
fc6c75a2a2
SSE2: 53% faster TransformColor[Inverse]
...
Changed the code (again) to process 4 pixels at a time. Loop is more
involved, but overall it's faster.
Removed the SSE4.1 implementation which is now slower than SSE2.
Change-Id: I7734e371033ad8929ace7f7e1373ba930d9bb5f1
2015-06-23 14:52:01 -07:00
Pascal Massimino
49073da6d6
SSE2: 46% speed-up of TransformColor[Inverse]
...
Change-Id: If3bf26dc8ed32a7c03cb438e5d5fc996e2e96b5e
2015-06-23 20:09:04 +02:00
Pascal Massimino
32462a072c
Speedup to HuffmanCostCombinedCount
...
~3% speedup for lossless encoding
Improves compression ratio by ~0.03%
Change-Id: Ic6d05fb0b1099b5ca56689b92b1c6515d54a5d6b
2015-06-23 16:41:03 +02:00
Pascal Massimino
f3d687e3fa
SSE4.1 implementation of some lossless encoding functions
...
New implementations: SubtractGreenFromBlueAndRed and TransformColor
around 1-2% faster lossless encoding.
Change-Id: I1668e36fdc316ba55b3b798b91b4a3e36ce62861
2015-06-23 08:46:57 +02:00
Pascal Massimino
bfc300c7ff
SSE4.1 implementation of some alpha-processing functions
...
DispatchAlpha* functions are hard to speed up, compared to SSE2.
ExtractAlpha sees a ~15% speed-up though.
Change-Id: I8715c2defecbc832f469eed7e6ffd012146b52de
2015-06-19 14:17:39 -07:00
Pascal Massimino
7f9c98f21d
Merge "sse2 in-loop: simplify SignedShift8b() a bit"
2015-06-12 07:37:32 +00:00
James Zern
ef314a5d6c
dec_sse2/GetNotHEV: micro optimization
...
trade 2 subtractions + logical or for 1 max + 1 subtraction
Change-Id: I7d1f25f7cda2a89bc8247f3d3d5417f6b0e3d96c
2015-06-11 22:46:24 -07:00
Pascal Massimino
a729cff987
sse2 in-loop: simplify SignedShift8b() a bit
...
Change-Id: Ida3e096bb41451194d03dc7a97753a222ff0135c
2015-06-11 15:26:31 -07:00
Pascal Massimino
422ec9fb62
simplify Load8x4() a bit
...
Change-Id: I68cf09c432f48e34bbe1d47dd091417cfd40cf4e
2015-06-10 12:35:50 -07:00
James Zern
8df238ec8a
Merge "remove some duplicate FlipSign()"
2015-06-06 05:25:04 +00:00
Pascal Massimino
751506c484
remove some duplicate FlipSign()
...
ApplyFilter2NoFlip is the new variant of ApplyFilter2 without the sign-flip
Change-Id: I2af54bd1499118c8321183e42251d265ba76219c
2015-06-05 17:20:29 +02:00
James Zern
65ef5afc27
Merge "lossless: 0.13% compression density gain"
2015-06-03 03:02:09 +00:00
Jyrki Alakuijala
2beef2f245
lossless: 0.13% compression density gain
...
over a 1000 image corpus
Single photograph benchmark:
Before:
Q=20: 2.560 MP/s
Q=40: 2.593 MP/s
Q=60: 1.795 MP/s
Q=80: 1.603 MP/s
Q=99: 1.122 MP/s
After:
Q=20: 3.334 MP/s
Q=40: 2.464 MP/s
Q=60: 2.009 MP/s
Q=80: 1.871 MP/s
Q=99: 1.163 MP/s
This CL allows for some further improvements that would not be possible
otherwise.
Change-Id: I61ba154beca2266cb96469281cf96e84a4412586
2015-06-02 17:27:36 -07:00
Pascal Massimino
3033f24c26
lossless: 0.06 % compression density improvement
...
Change-Id: Ib662e6aec53b40d6bc736d3ecfd6475bb005c790
2015-06-02 14:51:51 +02:00
James Zern
64960da9e1
dec_neon: add VE8uv / VE16
...
VE8uv/VE16: ~25%/~33% faster over 20M pixels
Change-Id: Ifac1114091527a05ed10edfcc43852edff012d14
2015-05-30 13:40:00 -07:00
James Zern
14dbd87bed
dec_neon: add HE8uv / HE16
...
HE8uv/HE16: ~91%/~83% faster over 20M pixels
Change-Id: Ib0a776f7c193593ea0993e92cfa6e6be000fb810
2015-05-30 13:39:24 -07:00
skal
ac76801159
introduce FTransform2 to perform two transforms at a time.
...
FTransform goes from ~12.0% to 11.5% total CPU time.
Change-Id: Ibcb23155324f4fd8b235563f80668531c781f624
2015-05-18 21:06:15 -07:00
James Zern
aa6065aedd
dec_neon: use vld1_dup(mem) rather than vdup(mem[0])
...
should result in slightly less general purpose register use
Change-Id: I6069f49541392e56c8db2c28c8d1fdf88c1a1726
2015-05-16 11:24:32 -07:00
Pascal Massimino
8b63ac78e0
Merge "dec_neon: add TM16"
2015-05-16 10:56:07 +00:00
Pascal Massimino
f51be09e1f
Merge "dec_neon/TrueMotion: simply left border load"
2015-05-16 10:54:05 +00:00
James Zern
dc48196bd9
dec_neon: add TM16
...
over 20M pixels ~78% faster
Change-Id: I420d5d590f275f19e08f86df1d1caa6b82fffbde
2015-05-15 12:50:11 -07:00
James Zern
ea95b305ca
dec_neon/TrueMotion: simply left border load
...
use vld1_dup_u8() rather than a separate ld+dup after the values were
zero extended; mildly faster at the function level
Change-Id: I1b3666a6aeb465722a1214dbc6d71c27689a7f89
2015-05-15 12:48:13 -07:00
Pascal Massimino
f262d6120e
speed-up SetResidualSSE2
...
(was unnecessarily complicated)
Before:
VP8SetResidualCoeffs: checksum = 1127918 elapsed = 475 ms.
Change-Id: Ia54bef86c45f9f474622ff16e594bf1da4f67ebd
After:
VP8SetResidualCoeffs: checksum = 1127918 elapsed = 404 ms.
2015-05-14 21:24:24 -07:00
James Zern
bf46d0acff
fix mips2 build target
...
tested with mips1 and mips2; this should cover 3/4 as well.
fixes an ftbfs reported on the debian issue tracker:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=785000
Change-Id: I2458487c92bd638589fdfec5adb4f22102a5960c
2015-05-13 10:36:22 -07:00
James Zern
929a0fdccd
enc_sse2/TTransform: simplify abs calculation
...
max(b, 0 - b) works as well as (b ^ sign) - b
Change-Id: Iad923236fd70db85ff58a64d3c8e25e4f42a525d
2015-05-08 19:50:29 -07:00
James Zern
17dbd05819
enc_sse2/CollectHistogram: simplify abs calculation
...
max(out, 0 - out) works as well as (out ^ sign) - out
Change-Id: Id820ab9b296512cb0d56c8026b986bf98e3d3909
2015-05-08 19:49:08 -07:00
James Zern
a6c1593645
dec_neon: add DC16 intra predictors
...
improvement over 20M pixels:
DC16: ~77%
DC16NoTop: ~78%
DC16NoLeft: ~83%
DC16NoTopLeft: ~83%
Change-Id: I4c4ee16a8fa0eb466eee45dfa6f6bbce5ce64b99
2015-05-08 00:12:48 -07:00
James Zern
f274a96ce9
dsp/enc_sse2: add luma4 intra predictors
...
VP8EncPredLuma4 improvement over ~20M pixels: ~39%
Change-Id: I9cd841250771276d2d1bef3991215a56e83f7f20
2015-05-05 23:51:19 -07:00
James Zern
040b11bdf6
dsp/enc_sse2: add chroma intra predictors
...
VP8EncPredChroma8 improvements over ~20M pixels
left/top: ~67%
left-only: ~52%
top-only: ~57%
none: ~61%
based on dec_sse2 versions with minor changes to benefit from the linear
storage of the left boundary
Change-Id: Iee7e387fb2570b4eb5af5bfd123e9c2e9ea49c76
2015-05-05 23:51:14 -07:00
James Zern
aee021bbb1
dsp/enc_sse2: add luma16 intra predictors
...
VP8EncPredLuma16 improvements over ~20M pixels
left/top: ~75%
left-only: ~47%
top-only: ~59%
none: ~63%
based on dec_sse2 versions with minor changes to benefit from the linear
storage of the left boundary
Change-Id: I7548be7214fa85c38fd11d30f5b8b271f437657d
2015-05-05 23:51:07 -07:00
James Zern
4c9af02326
dec_neon: add DC8uvNoTopLeft
...
~93% faster
Change-Id: Icf0fd5f85ac53c306a1b69d84275023e5b24a602
2015-05-01 20:03:57 -07:00
Pascal Massimino
9287761d95
Merge "GetResidualCostSSE2: simplify abs calculation"
2015-04-30 06:30:58 +00:00
James Zern
0e009366f8
dsp/cpu.c(x86): check maximum supported cpuid feature
...
structured extended feature flags require eax = 7; avoids incorrectly
detecting avx2 on some older processors that support avx.
for completeness also check for value=1 support used by the other
checks.
from [1]:
INPUT EAX = 0: Returns CPUID’s Highest Value for Basic Processor
Information and the Vendor Identification String
[1]
http://www.intel.com/content/www/us/en/processors/processor-identification-cpuid-instruction-note.html
Change-Id: I60b20d661a978d551614dbf7acdc25db19cb6046
2015-04-29 23:22:53 -07:00
James Zern
b243a4bc30
GetResidualCostSSE2: simplify abs calculation
...
max(coeff, 0 - coeff) works as well as min/max/sub or
(coeff ^ sign) - coeff
Change-Id: I9b11715372e49cd83820677bf4beba4a1c04931c
2015-04-21 20:29:12 -07:00
James Zern
0768b252fa
dsp/enc.c: cosmetics: move DST() def closer to use
...
Change-Id: Iccbcf046412426c2893b71eced517f611d2ffc3f
2015-04-15 20:03:39 -07:00
James Zern
9904e365a8
dsp/dec_sse2: DC8uv / DC8uvNoLeft speedup
...
use psadbw to perform top row summation; left remains in C as repacking
it into a vector to apply the same operation is too costly.
DC8uv: ~19% faster
DC8uvNoLeft: ~12% faster
Change-Id: I707c4f6177a65b5d1f2d3deeca87d2bb740185e2
2015-04-08 23:12:53 -07:00
James Zern
7df2049785
dsp/dec_sse2: DC16 / DC16NoLeft speedup
...
use psadbw to perform top row summation; left remains in C as repacking
it into a vector to apply the same operation is too costly.
DC16: ~20% faster
DC16NoLeft: ~14% faster
Change-Id: I7ec3f8a6e5923f88a530f79fceb88d5001bef691
2015-04-08 23:10:39 -07:00
James Zern
b44eda3f60
dsp: add DSP_INIT_STUB
...
generates a stub function when the specific architecture is not enabled,
exposing a symbol in the module, avoiding a compiler warning
Change-Id: Ia9336e57466a9b5241b85c1c95838e91c9283147
2015-04-02 23:55:35 -07:00
James Zern
1a338fb306
enc_sse41: add Disto4x4 / Disto16x16
...
direct translation from sse2; minor gain, fewer instructions
Change-Id: I60288a842fac1a686b82b5cab637931789fe29f2
2015-03-25 23:28:46 -07:00
Pascal Massimino
94055503e3
encoding SSE4.1 stub for StoreHistogram + Quantize + SSE_16xN
...
Visible speed-up, thanks to pshufb and pabsw and psignw use.
had to tweak configure.ac to make "smmintri.h" presence correctly
detected (we need to set the CPPFLAGS instead of the CFLAGS!)
Change-Id: I2ab99e16a27a64fdf1f09b2b4e30a5e74ccca080
2015-03-25 20:23:51 -07:00
Pascal Massimino
c64659e1b4
remove duplicate variables after the lossless{_enc}.c split
...
clang was giving "duplicate symbols" error messages at link time.
Change-Id: I2b77b55222fe033cc1d4636567902e80d814aab6
2015-03-25 11:10:21 +01:00
James Zern
67ba7c7acc
enc_sse2: call local FTransform in CollectHistogram
...
allows the former to be inlined; negligible speed-up in most cases,
however this is structure is consistent with the rest of the optimized
modules
Change-Id: Ib080240b06f7a995b47f1906627850c355b82901
2015-03-24 20:22:24 -07:00
James Zern
182497993b
dsp: s/VP8LSetHistogramData/VP8SetHistogramData/
...
this function is for lossy encoding; the VP8L prefix is used by lossless
Change-Id: I147590a91477a77af51ed79cc640546dfe53abdb
2015-03-24 18:27:41 -07:00
James Zern
ede5e1584c
cosmetics: dsp/lossless.h: reorder prototypes
...
group decoding / encoding functions together, followed by their
respective Init() function.
Change-Id: Ib4d22f8ec2369efec752faf733ecf53acc67b1ca
2015-03-24 17:52:42 -07:00
James Zern
553051f741
dsp/lossless: split enc/dec functions
...
adds lossless_enc*.c; reduces the size of the decode-only so: ~78K
w/gcc-4.8.2 on x86_64.
Change-Id: If5e4610b67d05eba5896bc64bab79e9df92b2092
2015-03-23 22:57:50 -07:00
James Zern
cecf509662
dsp/yuv*.c: rework WEBP_USE_<arch> ifdef
...
add a dummy init rather than repeating the '#ifdef WEBP_USE_...'
pattern.
Change-Id: I42e621481be7305bb7c426b4d0b279619195611e
2015-03-20 19:19:46 -07:00
James Zern
6584d398eb
dsp/upsampling*.c: rework WEBP_USE_<arch> ifdef
...
add a dummy init rather than repeating the '#ifdef WEBP_USE_...'
pattern.
Change-Id: I3c753915eefe900987c9720733efb720ebe6bfa7
2015-03-20 19:19:46 -07:00
James Zern
808094228c
dsp/rescaler*.c: rework WEBP_USE_<arch> ifdef
...
add a dummy init rather than repeating the '#ifdef WEBP_USE_...'
pattern.
Change-Id: Ife9c7cd363b3692b64a7ade1960cfce3a76c3ba2
2015-03-20 19:19:46 -07:00
James Zern
1d93ddec19
dsp/lossless*.c: rework WEBP_USE_<arch> ifdef
...
add a dummy init rather than repeating the '#ifdef WEBP_USE_...'
pattern.
Change-Id: If8b4459556e6bfaa36ef046f66520558b9444fc2
2015-03-20 19:19:46 -07:00
James Zern
73805ff270
dsp/filters*.c: rework WEBP_USE_<arch> ifdef
...
add a dummy init rather than repeating the '#ifdef WEBP_USE_...'
pattern.
Change-Id: Idf08ffeb2aef1392a6d69596d897a59deebb64cf
2015-03-20 19:19:46 -07:00
James Zern
fbdcef2401
dsp/enc*.c: rework WEBP_USE_<arch> ifdef
...
add a dummy init rather than repeating the '#ifdef WEBP_USE_...'
pattern.
Change-Id: I0cf40b500f9b3eed55a3211213db180c7c0dd43b
2015-03-20 19:19:46 -07:00
James Zern
66de69c1fe
dsp/dec*.c: rework WEBP_USE_<arch> ifdef
...
add a dummy init rather than repeating the '#ifdef WEBP_USE_...'
pattern.
Change-Id: I319bc7714f36b8a3d8b35f6474e5592a439aaf24
2015-03-20 19:19:37 -07:00
James Zern
48e4ffd15e
dsp/cost*.c: rework WEBP_USE_<arch> ifdef
...
add a dummy init rather than repeating the '#ifdef WEBP_USE_...'
pattern.
Change-Id: Ie9bee5eaf9daebe0909ab1dda1cf1aa4ee1ef03e
2015-03-20 19:18:50 -07:00
James Zern
29fd6f90c0
dsp/argb*.c: rework WEBP_USE_<arch> ifdef
...
add a dummy init rather than repeating the '#ifdef WEBP_USE_...'
pattern.
Change-Id: I46b89909a0279172d37dbda70f731c7b9f052dad
2015-03-20 19:18:50 -07:00
James Zern
80ff38130e
dsp/alpha*.c: rework WEBP_USE_<arch> ifdef
...
add a dummy init rather than repeating the '#ifdef WEBP_USE_...'
pattern.
Change-Id: I9e7f187daffe1a3b1bc92953dce980c38d1a6269
2015-03-20 19:18:41 -07:00
Pascal Massimino
e9570dd987
stub for SSE4.1 support.
...
Change-Id: I0c845a98d2871cc8907ff7b914bab7747a92c7ed
2015-03-20 00:26:35 -07:00
James Zern
cabf4bd2bc
dsp: add sse4.1 detection
...
bit 19 in ecx
no targets or code
https://software.intel.com/en-us/articles/using-cpuid-to-detect-the-presence-of-sse-41-and-sse-42-instruction-sets
Change-Id: Ie61b004dd5b6a3639b30bd9d2a09e6d7359b8040
2015-03-18 19:16:47 -07:00
Sam Clegg
ac4f5784a0
Disable NEON code on Native Client
...
The NEON assember in libwebp has not yet been ported
to Native Client. This changes disables it.
Related issue:
https://code.google.com/p/nativeclient/issues/detail?id=3205
Change-Id: I200291db7aa79d40c1f10cff7622c9b8599e6886
2015-03-10 16:17:25 -07:00
Djordje Pesut
241bb5d9d9
MIPS: dspr2: added optimization for TrueMotion
...
affected functions:
TM4 - TrueMotion4
TM8uv - TrueMotion8
TM16 - TrueMotion16
Change-Id: Iff4377c4b0ae94716789c03fe1cd5bfd91f79188
2015-02-26 10:22:19 +01:00
Djordje Pesut
b5e79422d5
MIPS: dspr2: Added optimization for some convert functions
...
affected functions:
VP8LConvertBGRAToRGBA4444_C
VP8LConvertBGRAToRGB565_C
VP8LConvertBGRAToBGR_C
Change-Id: I81513d242d33ebb9fef397ee6a2ca75d17f66e97
2015-02-24 10:51:34 +01:00
Djordje Pesut
0f595db60c
MIPS: dspr2: Added optimization for some convert functions
...
affected functions:
VP8LConvertBGRAToRGB_C
VP8LConvertBGRAToRGBA_C
Change-Id: I5f25795c385688f2432d0710296e589f3793cb2b
2015-02-23 17:44:06 +01:00
Djordje Pesut
8a218b4a96
MIPS: [mips32|dspr2]: GetResidualCost rebased
...
Change-Id: Ie15524c773f7a8c79e002097881a508187ca7cc6
2015-02-23 10:43:42 +01:00
James Zern
602a00f93f
fix iOS arm64 build with Xcode 6.3
...
the standard vtbl functions are available there [1][2].
based on a patch from: aaroncrespo
fixes issue #243 .
[1]
http://adcdownload.apple.com//Developer_Tools/Xcode_6.3_beta/Xcode_6.3_beta_Release_Notes.pdf
[2] Apple LLVM Compiler Version 6.1
- Xcode 6.3 updates the Apple LLVM compiler to version 6.1.0.
[...]
Support for the arm64 architecture has been significantly revised to
align with ARM's implementation, where the most visible impact is that a
few of the vector intrinsics have changed to match ARM's specifications.
Change-Id: I79a0016f44b9dbe36d0373f7f00a50ab3c2ca447
2015-02-19 12:16:58 -08:00
Pascal Massimino
2382050748
1-2% faster encoding by removing an indirection in GetResidualCost()
...
The MIPS code for cost is not updated yet, that's why i keep Residual::*cost
around for now. Should be removed in favor of *costs later.
Change-Id: Id1d09a8c37ea8c5b34ad5eb8811d6a3ec6c4d89f
2015-02-19 08:44:35 +01:00
Djordje Pesut
eddb7e70be
MIPS: dspr2: added otpimization for DC8uv, DC8uvNoTop and DC8uvNoLeft
...
added macros for load/store
Change-Id: I151d4d49bf1fab87fc3a82cb8e8e0835fe10b690
2015-02-18 18:24:10 +01:00
Djordje Pesut
73ba29158f
MIPS: dspr2: added optimization for functions RD4 and LD4
...
Change-Id: I71216c1300f4eb254de4ae940ea9dcdba50aa080
2015-02-18 15:11:34 +01:00
Pascal Massimino
c7129da5b6
Merge "4-5% faster encoding using SSE2 for GetResidualCost"
2015-02-18 04:46:53 -08:00
Djordje Pesut
94380d00d9
MIPS: dspr2: added optimizaton for functions VE4 and DC4
...
Change-Id: I118adc6d3872742d8b1f9dbac438cba6fc90b7a9
2015-02-18 11:25:08 +01:00
Pascal Massimino
2a407092ab
4-5% faster encoding using SSE2 for GetResidualCost
...
new file: cost_sse2.c
Change-Id: I4896c07f5ff2443ef743f4435fe2758d95a672ed
2015-02-18 09:41:02 +01:00
James Zern
17e1986214
Merge "MIPS: dspr2: added optimization for simple filtering functions"
2015-02-17 14:57:05 -08:00
pascal massimino
3ec404c47a
Merge "dsp: normalize WEBP_TSAN_IGNORE_FUNCTION usage"
2015-02-14 01:57:08 -08:00
James Zern
b969f5dfac
dsp: normalize WEBP_TSAN_IGNORE_FUNCTION usage
...
the attribute is only necessary in one location; remove it from the
prototypes.
Change-Id: I3820a3c34fbb029fd7ac69a1b0a9b76091bdbde2
2015-02-13 15:23:40 -08:00
Djordje Pesut
d7b8e71126
MIPS: dspr2: added optimization for simple filtering functions
...
affected functions: SimpleVFilter16, SimpleHFilter16,
SimpleVFilter16i and SimpleHFilter16i
noticed bug in FilterLoop26 (fix included in this patch)
Change-Id: I72d9c1e45cbac6393eba52bb549b04924d463e30
2015-02-13 11:18:43 +01:00
Djordje Pesut
42a8a6280c
MIPS: dspr2: Added optimization for function VP8LTransformColorInverse_C
...
Change-Id: I8b60e22c9f6c0badab6267a33751dfc28750f457
2015-02-13 08:57:20 +01:00
James Zern
3030f11525
Merge "dsp/mips: add some missing TSan annotations"
2015-02-12 14:55:32 -08:00
pascal massimino
dfcf4593fe
Merge "MIPS: dspr2: Added optimization for function VP8LAddGreenToBlueAndRed_C"
2015-02-12 14:48:17 -08:00
James Zern
55c75a25f0
dsp/mips: add some missing TSan annotations
...
Change-Id: I3c832aefdeac26c6c75c35b19b45c1a2f67493c5
2015-02-12 14:36:33 -08:00
Djordje Pesut
2cb879f0c6
MIPS: dspr2: Added optimization for function VP8LAddGreenToBlueAndRed_C
...
Change-Id: If897c6c2f1c4b8405789298e135d6a1e4bf13012
2015-02-12 09:06:49 +01:00
James Zern
e15560107c
move some cost tables from enc/ to dsp/
...
removes circular dependency between dsp and enc.
since:
a987fae
MIPS: dspr2: added optimization for function GetResidualCost
Change-Id: Ifeb8fc02de89e2ba982ed7ffacd925d649bfec3c
2015-02-11 16:10:06 -08:00
pascal massimino
39537d7cfe
Merge "VP8LDspInitMIPSdspR2: add missing TSan annotation"
2015-02-10 00:02:41 -08:00
James Zern
43fd3543df
VP8LDspInitMIPSdspR2: add missing TSan annotation
...
Change-Id: Ic0d84e95daf063976b40fb5ba1e94d3547e2afba
2015-02-09 23:55:30 -08:00
pascal massimino
c7233dfcdc
Merge "VP8LDspInit: remove memcpy"
2015-02-09 23:48:44 -08:00
James Zern
35579a4902
VP8LDspInit: remove memcpy
...
without this change the TSan annotation is useless
Change-Id: Ief511379f3aad75889815d4fe8362aed5c1abac7
2015-02-09 23:41:24 -08:00
James Zern
97f6aff874
VP8YUVInit: add missing TSan annotation
...
Change-Id: I7f8868de425e1aac3721b3e328844725104d14db
2015-02-09 22:50:31 -08:00
James Zern
f9016d6662
dsp/enc::InitTables: add missing TSan annotation
...
Change-Id: I262b9071417a0ec502c7c0380f27da6413cc74e4
2015-02-09 22:40:45 -08:00
James Zern
e3d9771aa1
VP8EncDspCostInit*: add missing TSan annotations
...
Change-Id: I4cdb84bc8c9a8c6aa34b5773c8fb69e5810a9809
2015-02-09 22:39:14 -08:00
Djordje Pesut
309b790867
MIPS: mips32: Added optimization for function SetResidualCoeffs
...
Change-Id: If67c10285df71ba7dd1aff6c24c2145c280dd2bf
2015-02-09 13:17:49 +01:00
Pascal Massimino
a987faedfa
MIPS: dspr2: added optimization for function GetResidualCost
...
set/get residual C functions moved to new file in src/dsp
mips32 version of GetResidualCost moved to new file
Change-Id: I7cebb7933a89820ff28c187249a9181f281081d2
2015-02-07 02:13:26 -08:00
James Zern
c24d8f144f
cosmetics: upsampling_sse2: add const to some casts
...
source pointers are often cast to __m128*, retain the const in those
cases
Change-Id: Ia6df6690c85f580b20f19ce85cc6ec7b52620aee
2015-02-05 23:51:57 -08:00
James Zern
1829c42c58
cosmetics: lossless_sse2: add const to some casts
...
source pointers are often cast to __m128*, retain the const in those
cases
Change-Id: I2405b18c6bb829b76c3a9814057ccbe6e14220d9
2015-02-05 23:51:44 -08:00
James Zern
183168f332
cosmetics: enc_sse2: add const to some casts
...
source pointers are often cast to __m128*, retain the const in those
cases
Change-Id: Ib85d63abbb9fc33096f893c2524d3ce8ae3ebd03
2015-02-05 23:51:29 -08:00
James Zern
860badcacc
cosmetics: dec_sse2: add const to some casts
...
source pointers are often cast to __m128*, retain the const in those
cases
Change-Id: I77decb55f1382bea4b646a11b77dfa40bf1ef94d
2015-02-05 23:51:16 -08:00
James Zern
0254db9793
cosmetics: argb_sse2: add const to some casts
...
source pointers are often cast to __m128*, retain the const in those
cases
Change-Id: I87fa2de11dafcc77767aab64e13b8c5585ebf5cd
2015-02-05 23:51:07 -08:00
James Zern
1aadf856c9
cosmetics: alpha_processing_sse2: add const to some casts
...
source pointers are often cast to __m128*, retain the const in those
cases
Change-Id: I00ba15af2f43d125ceb2620e82fd43d420fbb9d3
2015-02-05 23:50:39 -08:00
Pascal Massimino
19f0ba0eb9
Implement true-motion prediction in SSE2
...
(along with DC/HE/VE for chroma/luma16)
Overall effect is ~1% faster decoding.
Change-Id: I90917e050d61874cbc8da0e88f26b5dd6131c265
2015-02-04 17:02:22 +01:00
Pascal Massimino
774d4cb758
make VP8PredLuma16[] array non-const
...
Change-Id: I0ce7e4e847f9fffefb6544db9636068442a2d264
2015-02-04 17:00:22 +01:00
Djordje Pesut
6ce296da12
MIPS: dspr2: Added optimization for function CollectHistogram
...
Change-Id: Id6b87ea1c9d21fee9494ad6c53ffc84ef60d5974
2015-02-03 14:11:20 +01:00
James Zern
b7de794622
Merge "lossless_neon: enable subtract green for aarch64"
2015-02-02 16:01:40 -08:00
Pascal Massimino
77724f70e9
SSE2 version of GradientUnfilter
...
somewhat 1-2% faster decoder for lossy+alpha
Change-Id: Ib317e26e9fcb8d37af02668ffbfccc4664e659fe
2015-01-31 23:18:00 +01:00
James Zern
416e1cea9b
lossless_neon: enable subtract green for aarch64
...
similar to:
1ba61b0
enable NEON intrinsics in aarch64 builds
vtbl1_u8 is available everywhere but Xcode-based iOS arm64 builds, use
vtbl1q_u8 there.
performance varies based on the input, 1-3% on encode was observed
Change-Id: Ifec35b37eb856acfcf69ed7f16fa078cd40b7034
2015-01-31 11:32:05 -08:00
Pascal Massimino
022d2f886c
add SSE2 variants for alpha filtering functions
...
The 'inverse' variants are harder to parallelize, since
the result of filtering is used for prediction.
The 'direct' way is relatively easier.
The heavy bottleneck left for optimization is still GradientUnfilter()
Change-Id: I358008f492a887e8fff6600cb27857b18dee86e9
2015-01-29 08:46:22 +01:00
Pascal Massimino
7afdaf8496
Alpha coding: reorganize the filter/unfiltering code
...
Move the filtering code to their own dsp/ spot
New function: VP8FiltersInit()
Change-Id: I0b2041eab42346c59b972f2575b05509e6a8f7b1
2015-01-28 08:02:41 +01:00
Djordje Pesut
da0912126b
MIPS: dspr2: Added optimization for function FTransformWHT
...
Change-Id: I918366cd1908304068c66da9965efb0aa63320cd
2015-01-19 10:15:13 +01:00
pascal massimino
daeb276a2b
Merge "MIPS: dspr2: Added optimization for MultARGBRow function"
2015-01-17 08:56:01 -08:00
James Zern
0de5f33e31
dsp/cpu: (msvs) add include for __cpuidex
...
and only use it on x86 / x64 where it's available.
has the side-effect of quieting a msvs /analyze warning:
C6001: Using uninitialized memory 'cpu_info'.
Change-Id: Iae51be3b22b2ee949cfc473eeea9fd9fb6b3c2cb
2015-01-16 18:16:10 -08:00
Djordje Pesut
7d850f7b9a
MIPS: dspr2: Added optimization for MultARGBRow function
...
Change-Id: Ide549ae0d80413bea8c19fe091d97bffe8b17985
2015-01-16 15:56:34 +01:00
Djordje Pesut
5487529368
MIPS: dspr2: added optimization for function QuantizeBlock
...
Change-Id: Id217116890b7408d23464216608ce67ae545688a
2015-01-16 12:51:13 +01:00
James Zern
4fbe9cf202
dsp/cpu: (msvs) avoid immintrin.h on _M_ARM
...
_xgetgv() isn't relevant there anyway
broken since:
279e661
Merge "dsp/cpu: add include for _xgetbv() w/MSVS"
Change-Id: Iaa7bc0c5be9c06bfffab39e194c64c09bf5b5a27
2015-01-15 23:04:08 -08:00
Pascal Massimino
3fd59039bd
simplify/reorganize arguments for CollectColorBlueTransforms
...
and other various call sites too.
Change-Id: Icb8f828dfe25672662de18d0e48e7d3144b1f38d
2015-01-15 18:12:12 -08:00
Djordje Pesut
a7e7caa486
MIPS: dspr2: added optimization for function TransformColorRed
...
added new function CollectColorRedTransforms to C, which calls
TransformColorRed and it is realized via pointer to function
Change-Id: Ia68d73bfcf1ca2cb443dc2825910946221f87835
2015-01-15 09:32:09 +01:00
pascal massimino
2cb39180cc
Merge "MIPS: dspr2: added optimization for function TransformColorBlue"
2015-01-15 00:06:01 -08:00
pascal massimino
279e66138d
Merge "dsp/cpu: add include for _xgetbv() w/MSVS"
2015-01-15 00:05:35 -08:00
James Zern
b6c0428e8c
dsp/cpu: add include for _xgetbv() w/MSVS
...
explicitly add immintrin.h instead of transitively picking it up via
windows.h presumably. makes the code easier to move around.
Change-Id: If70d5143ac94fc331da763ce034358858e460e06
2015-01-14 23:31:35 -08:00
Djordje Pesut
7b16197361
MIPS: dspr2: added optimization for function TransformColorBlue
...
added new function CollectColorBlueTransforms to C, which calls
TransformColorBlue and it is realized via pointer to function
Change-Id: Ia488b7a7a689223b5d33aae9724afab89b97fced
2015-01-13 10:39:38 +01:00
James Zern
d7c4b02a57
cpu: fix AVX2 detection for gcc/clang targets
...
ecx needs to be set to 0; the visual studio builds were already doing
this.
https://software.intel.com/en-us/articles/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family
Change-Id: I95efb115b4d50bbdb6b14fca2aa63d0a24974e55
2015-01-12 17:58:57 -08:00
Pascal Massimino
d581ba40ba
follow-up: clean up WebPRescalerXXX dsp function
...
by removing redundant RFIX macros and using a plain-C fallback.
Change-Id: I52436c672bf20780b6fe3bcf43fe73e1abac10ff
2015-01-12 15:26:55 -08:00
James Zern
f8740f0d6c
dsp: s/USE_INTRINSICS/WEBP_USE_INTRINSICS/
...
for consistency with other defines shared across modules
Change-Id: I30cdb9f892e9ea48265883f560500ffb1d6799ee
2015-01-12 14:27:36 -08:00
Pascal Massimino
ab66becaae
introduce a separate WebPRescalerDspInit to initialize pointers
...
so that we keep the details of WebPRescaler in utils/rescaler.c
when possible.
Change-Id: Ib6c1029a09b84cbc7a7d2f70dafa4d4d9132cecc
2015-01-12 13:58:30 -08:00
pascal massimino
cbcdd5ffaf
Merge "move rescaler functions to rescaler* files in src/dsp/"
2015-01-10 05:41:45 -08:00
pascal massimino
bf586e8844
Merge changes I230b3532,Idf3057a7
...
* changes:
enable NEON for Windows ARM builds
Makefile.vc: add rudimentary Windows ARM support
2015-01-10 02:14:48 -08:00
James Zern
4f43d38ca8
enable NEON for Windows ARM builds
...
Change-Id: I230b353214ce44ab29ffd2df6ccd14345d6578e8
2015-01-09 19:11:55 -08:00
James Zern
e7c5954c10
dec_neon: remove returns from void functions
...
Change-Id: I3c66a5dfe3de2bb3653cbbf1b92b0328aba62881
2015-01-09 18:08:05 -08:00
Djordje Pesut
cbcbedd0de
move rescaler functions to rescaler* files in src/dsp/
...
Change-Id: I906add1b1010a59ebfcc2dd81e15745433cc206b
2015-01-09 16:47:09 +01:00
Djordje Pesut
a28c4b363d
MIPS: move WORK_AROUND_GCC define to appropriate place
...
Change-Id: I3055eca57dc4e9d39533a5b8170bbf7af9cd818f
2015-01-08 15:55:41 +01:00
Djordje Pesut
012d2c60fa
MIPS: dspr2: added optimization for functions SSEAxB
...
list of optimized functions: SSE16x16, SSE8x8, SSE16x8, SSE4x4
Change-Id: Ie99e7cdd73b0d4ff855977315a5d0db9ffaa5f04
2015-01-08 13:49:17 +01:00
Djordje Pesut
9241ecf45d
MIPS: dspr2: added optimization for function Average
...
Change-Id: I7ca316bc3f5fbdaf8dcaf9a2d2227a5134bf4f63
2015-01-08 11:46:15 +01:00
pascal massimino
c6d3292738
argb_sse2: cosmetics
...
clarify some variable names in PackARGB() + add some comments
Change-Id: I2bb91d6c52dcbcdebe0f92d5f2136c2d7d11af2a
2015-01-08 00:18:54 -08:00
James Zern
67f601cd46
make the 'last_cpuinfo_used' variable names unique
...
allows the sources to be #include'd in some hackish builds (don't do
that!)
Change-Id: I0c7a43acbebd0e2d5068845e6daa8ce47361cd91
2015-01-07 23:38:53 -08:00
Pascal Massimino
9592053859
Merge "multi-thread fix: lock each entry points with a static var"
2015-01-07 00:03:51 -08:00
Pascal Massimino
4c1b300ada
Merge "SSE2 implementation of VP8PackARGB"
2015-01-06 23:53:50 -08:00
James Zern
04c20e75ea
Merge "MIPS: dspr2: added optimization for function Intra4Preds"
2015-01-06 16:15:10 -08:00
Pascal Massimino
a437694a17
multi-thread fix: lock each entry points with a static var
...
we compare the current VP8GetCPUInfo pointer to the last used.
This is less code overall and each implementation is still
testable separately (by just changing VP8GetCPUInfo, but not
a separate threads!)
Change-Id: Ia13fa8ffc4561a884508f6ab71ed0d1b9f1ce59b
2015-01-05 07:48:49 -08:00
Pascal Massimino
ca7f60db5f
SSE2 implementation of VP8PackARGB
...
Change-Id: I40c0e26a6a2701216e4ddebcf793aa535677f437
2015-01-05 05:17:51 -08:00
Pascal Massimino
72d573f693
simplify the PackARGB signature
...
Change-Id: I51570e362126b2681f93211a4f59a3fedb5fd4b5
2015-01-05 02:10:04 -08:00
James Zern
f8abb112f2
Merge changes I109ec4d9,I73fe7743
...
* changes:
dec_neon: add DC8uvNoTop / DC8uvNoLeft
dec_neon: add DC8uv
2014-12-23 09:11:22 -08:00
Djordje Pesut
ae2188a435
MIPS: dspr2: added optimization for function Intra4Preds
...
Change-Id: Ie2a23c356a8715817b020fbee2b40e878e2946de
2014-12-23 17:32:27 +01:00
James Zern
14108d7878
dec_neon: add DC8uvNoTop / DC8uvNoLeft
...
adds do_top/do_left flags to DC8uv; ~88% / ~92% faster respectively
no change in DC8uv speed.
Change-Id: I109ec4d9ad13c9db64516e98ed4693a21a3e9b54
2014-12-22 15:47:38 -05:00
James Zern
d8340da756
dec_neon: add DC8uv
...
~87% faster.
Change-Id: I73fe77437792f1361ce8ab0b411132c6ec0fa021
2014-12-22 14:36:45 -05:00
Djordje Pesut
7ce8788b06
MIPS: dspr2: added optimization for function MakeARGB32
...
inline function MakeARGB32 calls changed to call
via pointers to functions which make (a)rgb for
entire row
Change-Id: Ia4bd4be171a46c1e1821e408b073ff5791c587a9
2014-12-22 12:31:36 +01:00
Pascal Massimino
87c3d53180
method=0: Don't evaluate any predictor
...
and apply Paeth predictor (predictor#11) for the low effort (m=0) mode.
For 1000 image PNG corpus (m=0), this change yields speedup of 25% at lower quality
range and about 10% for higher quality range.
Change-Id: I0f036b8ffe45c241e63a067cbf01527b13d8de93
2014-12-17 18:41:08 +01:00
Pascal Massimino
31a9cf6417
Speedup WebP lossless compression for low effort (m=0) mode with following:
...
- Disable Cross-Color transform.
- Evaluate predictors #11 (paeth), #12 and #13 only.
Change-Id: I857264c85c61c3957d4fb45ae32d261d947c8bed
2014-12-17 11:52:11 +01:00
Djordje Pesut
9275d91c79
MIPS: dspr2: added optimization for function TrueMotion
...
Change-Id: Id006d9591c0c922e28f7f4c01e4006f0f07bdd56
2014-12-12 14:38:55 +01:00
James Zern
a3946b8956
enc_neon: fix building with non-Xcode clang (iOS)
...
check for __apple_build_version__ to distinguish the two; a version
check could work as Apple bumped Xcode's to 5.x/6.x, but it's unclear
how upstream will deal with their versioning as they go 3.6+, so avoid
it for now.
Change-Id: I67cda67c4f68e262a92d805a63cc1496374be063
2014-12-10 15:50:26 -08:00
Pascal Massimino
8ed9c00d5e
Merge "simplify the Histogram struct, to only store max_value and last_nz"
2014-12-10 02:02:05 -08:00
Pascal Massimino
bad775715a
simplify the Histogram struct, to only store max_value and last_nz
...
we don't need to store the whole distribution in order to compute the alpha
Later, we can incorporate the max_value / last_non_zero bookkeeping
in SSE2 directly.
Change-Id: I748ccea4ac17965d7afcab91845ef01be3aa3e15
2014-12-10 10:44:57 +01:00
Djordje Pesut
3cca0dc7f0
MIPS: dspr2: Added optimization for DCMode function
...
Change-Id: I8ea31907c1ea1259ec4db8cee1a479bd13a025a1
2014-12-09 13:58:39 +01:00
Djordje Pesut
37e395fd1c
MIPS: fix functions to use generic BPS istead of hardcoded value
...
Change-Id: I2d68abef886eff7f8df230f155b758dccd7d04fd
2014-12-05 15:55:47 +01:00
Pascal Massimino
4a279a680e
cosmetics: add some missing != NULL comparisons
...
Change-Id: I55f8da527e5e8ee4b49c7e7aa0d61ea4a6c80904
2014-12-04 14:54:11 +01:00
Pascal Massimino
66ad372500
factorize BPS definition in dsp.h and add VP8Copy16x8
...
Change-Id: Id73a1e968c96455808755df4d131d74e3e2e135d
2014-12-04 13:45:14 +01:00
Pascal Massimino
57606047ec
encoder: switch BPS to 32 instead of 16
...
this is a first step to unifying encoding/decoding cache stride
and possibly sharing the prediction functions in dsp/
With this layout, there's a little (~7%) space lost with unused samples.
But no speed change was observed.
Change-Id: I016df8cad41bde5088df3579e6ad65d884ee711e
2014-12-04 09:17:18 +01:00
Djordje Pesut
1b66bbe998
MIPS: dspr2: added optimization for function TransformColor_C
...
Change-Id: Idbf5cecf6775340585b0fd7e6ddcb29c2fcbea36
2014-12-01 15:46:06 +01:00
James Zern
9de9074c92
dec_neon: add TM8uv
...
~68% faster
reuses TM4() adding support for the additional rows, the columns were
already being done.
Change-Id: I6eac17e58cd1c636082bf7281f70f884ec399a6b
2014-11-25 14:40:17 -08:00
James Zern
e18571393d
dsp: initialize VP8PredChroma8 in VP8DspInit()
...
the table becomes non-const to allow for platform-specific optimizations
Change-Id: I32d2b51480020dc653ecfafd20b6b0f096af349f
2014-11-24 22:12:42 -08:00
Vikas Arora
e0c809ad23
Move Entropy methods to lossless.c
...
Move all the Entropy evaluation methods to lossless.c (from histogram.c).
There's slight difference in the way entropy is computed for evaluating
entropy in prediction methods and histogram (literal) for huffman trees.
Plan (later) to merge few (static) methods and reduce the code size.
This change has no impact on the compression speed/density.
Change-Id: Ife3d96a3c4a8d78a91723d9e0a8d1b78c0256a15
2014-11-20 13:48:05 -08:00
Djordje Pesut
2f0e2ba826
MIPS: dspr2: added optimization for function Select
...
Change-Id: I22470d8b9ab8c5e90c5330ff12c9852676da1a3d
2014-11-07 09:44:16 +01:00
Djordje Pesut
54f2c14cce
MIPS: dspr2: added optimization for function FTransform
...
Change-Id: Ib5850edbc2a586ec9781f494b2337f024e22af78
2014-11-06 14:21:33 +01:00
Djordje Pesut
aa42f4231f
MIPS: dspr2: Added optimization for function VP8LSubtractGreenFromBlueAndRed
...
Change-Id: I683c73cceee4a40ca810deba15e54fbf7dbe8918
2014-11-06 10:56:18 +01:00
Djordje Pesut
95ca44a718
MIPS: dspr2: added optimization for Disto4x4
...
enc/dec common macros moved to mips_macro.h
Change-Id: I38d491e772554ac663dd5eb4d15485c0343f23b1
2014-11-05 12:06:15 +01:00
Djordje Pesut
5798eee6be
MIPS: dspr2: unfilters bugfix (Ie7b7387478a6b5c3f08691628ae00f059cf6d899)
...
Change-Id: I78d97960efbd1ec1af51a5426e38dc01bdb48140
2014-11-03 15:39:00 +01:00
James Zern
572022a350
filters_mips_dsp_r2.c: disable unfilters
...
the output does not match the C-code.
Change-Id: Ie7b7387478a6b5c3f08691628ae00f059cf6d899
2014-10-30 11:10:11 +01:00
Djordje Pesut
a28e21b141
MIPS: dspr2: Added optimization for function ClampedAddSubtractFull
...
Change-Id: Iee98eaf007158f44a299dd5ba8d972d0d4108380
2014-10-29 13:08:06 +01:00
Djordje Pesut
18d5a1efa8
MIPS: dspr2: added optimization for function ClampedAddSubtractHalf
...
Change-Id: Iec22e897a4f56e79c18ec00f8caa9cefac67f186
2014-10-29 11:08:37 +01:00
Djordje Pesut
829a8c19a0
MIPS: dspr2: added optimization for ITransform
...
Change-Id: I3534fca143535c53d18a3749b3a1b0c8a7563463
2014-10-28 14:28:14 +01:00
James Zern
22881c999e
dec_neon: add RD4 intra predictor
...
based on the SSE2 version; a bit rough around the loads, but still ~38%
faster.
Change-Id: I22426d939a7354cbc9a85ca8c68235d6081b882f
2014-10-24 21:22:07 +02:00
James Zern
1304eb3418
Merge "dec_neon: DC4: use pair-wise adds for top row"
2014-10-23 08:08:34 -07:00
James Zern
0db9031c79
dsp/dec_{neon,sse2}: VE4: normalize variable names
...
use '0' rather than '_' when dealing with variables that result from a
shift
Change-Id: I29280c0dead645ce39dc4bb42c3e19929b302fd4
2014-10-23 16:04:13 +02:00
James Zern
b5bc15305b
dec_neon: DC4: use pair-wise adds for top row
...
reduces load count, slightly faster
Change-Id: I880340ef8ef75ce4ce321c330f56f86b758bda08
2014-10-23 15:48:49 +02:00
James Zern
eba6ce06c3
dec_neon: add DC4 intra predictor
...
~70% faster
Change-Id: I2e06907b8d69be71a8c5581832c931923c24bab0
2014-10-23 14:21:08 +02:00
James Zern
79abfbd9df
dec_neon: add TM4 intra predictor
...
~21% faster
Change-Id: Ia9ed4ca650f9d544821fa1faf3173611806a272a
2014-10-23 14:21:08 +02:00
James Zern
fe395f0e4d
dec_neon: add LD4 intra predictor
...
based on SSE2 version, ~55% faster
Change-Id: I782282ffc31dcf238890b3ba0decccf1d793dad0
2014-10-23 14:20:47 +02:00
James Zern
32de385eca
dec_neon: add VE4 intra predictor
...
based on SSE2 version, ~59% faster
Change-Id: Iaa2181eb51bd975de0e9fe5c7b66ed18188f0e3b
2014-10-23 11:46:08 +02:00
Pascal Massimino
b7a33d7e91
implement VE4/HE4/RD4/... in SSE2
...
(30% faster prediction functions, but overall speed-up is ~1% only)
Change-Id: I2c6e7074aa26a2359c9198a9015e5cbe143c2765
2014-10-22 18:25:36 +02:00
Pascal Massimino
97c76f1f30
make VP8PredLuma4[] non-const and initialize array in VP8DspInit()
...
also convert 'type *dst' to 'type* dst'
Change-Id: I41ab66ad15b548cc45d1cb8b10bbca4fe1528cae
2014-10-22 18:14:20 +02:00
James Zern
f85ec712b0
PrintReg: output to stderr
...
allows use of '-o -' while testing
Change-Id: Ibc02d7cede2df4eb8be0a28c0ca4bf5e91864191
2014-10-22 17:28:19 +02:00
James Zern
d1c359ef29
fix shared object build with -fvisibility=hidden
...
set WEBP_EXTERN to visibility=default
+ explicitly mark VP8GetCPUInfo as it's referenced within the examples
Change-Id: Ie3d2b15088e888f0b55203b205993eba75899d99
2014-10-17 11:50:52 +02:00
James Zern
a4c3a31b8f
WEBP_TSAN_IGNORE_FUNCTION: fix gcc compat warning
...
move the attribute to the front of the function to quiet clang warning:
GCC does not allow no_sanitize_thread attribute in this position on a
function definition
Change-Id: Ie4cc6e35a07bd00eab67d9cd6801bd2be9cfe676
2014-10-16 18:06:43 +02:00
Pascal Massimino
80247291c6
mark some init function as being safe for thread_sanitizer.
...
introduces the macro WEBP_TSAN_IGNORE_FUNCTION
Change-Id: I3de2b6c1a2076fba4da7ae50322551e026b2082b
2014-10-16 16:34:07 +02:00
James Zern
0ce27e715e
enc_mips32: workaround gcc-4.9 bug
...
avoids an ICE with NDK r10b + NDK_TOOLCHAIN_VERSION=4.9
In function 'SSE16x16':
enc_mips32.c (684) internal compiler error: Segmentation fault
Change-Id: I1a3d33c0a9534c97633ab93bcdf9bf59d3a7e473
2014-10-15 19:14:04 +02:00
pascal massimino
32f67e309f
Merge "enc_neon: initialize vectors w/vdup_n_u32"
2014-10-09 12:23:18 -07:00
Pascal Massimino
fabc65da32
1-3% faster encoding optimizing SSE_NxN functions
...
got rid of the |a-b|^|b-a| method and went back
to just (a-b)^2 instead.
quality | size(bytes) after/before | time (ms) after/before
Change-Id: Ia3e0e6507b3f903deb1e182f78dad6df07380fd0
2014-10-09 07:20:00 -07:00
James Zern
7534d71640
enc_neon: initialize vectors w/vdup_n_u32
...
replaces {} initialization gnu-ism
Change-Id: I5a7b2d4246f0205e4bfb7f4b77d720c47d8674ec
2014-10-09 12:35:41 +02:00
Pascal Massimino
2d9b0a4472
add WebPDispatchAlphaToGreen() to dsp
...
SSE2 version is 2.1x faster
This is used to transfer the alpha plane to green channel before lossless compression.
Change-Id: I01d9df0051c183b1ff5d6eb69961d4f43e33141a
2014-10-06 23:15:44 +02:00
Yang Zhang
ab70794ddb
rewrite Disto4x4 in enc_neon.c with intrinsic
...
Performance test:
Platform: A9
Input data: bryce.yuv 11158x2156
performance of assembly is the base. Less ratio is better.
|toolchain |assembly |intrinsic |
|gcc4.6 |100% |97.15% |
|gcc4.8 |100% |95.51 |
Change-Id: Idc2446685acdeb58a4dbdcdae533c68a83a1b879
2014-09-23 18:28:36 -07:00
Djordje Pesut
d4471637ef
MIPS: dspr2: added optimization for function FilterLoop24
...
affected functions: VFilter16i, HFilter16i, VFilter8i and HFilter8i
Change-Id: I5d2bc7716e60e048a33d630fe4a86011bfb6d42e
2014-09-23 10:32:55 +02:00
Djordje Pesut
49e15044ef
MIPS: dspr2: added optimization for function FilterLoop26
...
affected functions: VFilter16, HFilter16, VFilter8 and HFilter8
Change-Id: Ib2fc41aaa00b10c2906d689bdc5a10f4568e70a8
2014-09-23 08:46:05 +02:00
Pascal Massimino
cddd334050
Add a WebPExtractAlpha function to dsp
...
This is the opposite of WebPDispatchAlpha
+ Implement the SSE2 version
Change-Id: I0c297309255f508c5261da8aad01f7e57f924d6c
2014-09-15 08:12:03 +02:00
Pascal Massimino
690b491af1
fix loop bug in DispatchAlpha()
...
* We were re-doing most of the work in plain-C as 'left-over'.
* we were always returning has_alpha = true because of a bad mask all_0xff
These bugs were conservative and silent, in the sense that we were 'just' doing
more work than necessary.
Now, the SSE2 version is really 2x faster than the C version.
Change-Id: I6c8132a267fe3c7a3d1fa70e7a5fcd10719543fa
2014-09-11 22:35:08 +02:00
Djordje Pesut
3101f53720
MIPS: dspr2: added optimization for TransformOne
...
added macros for TransformOne, TransformAC3 and TransfromDC
Change-Id: I4341450f443cf46dcf91c0db17bde63c8fb8afee
2014-09-11 17:02:02 +02:00
Pascal Massimino
a6bb9b17d8
SSE2 for inverse Mult(ARGB)Row and ApplyAlphaMultiply
...
Change-Id: Iab5c0e4a4d2b31f86736a9b277e62b6e28c3d2b4
WebPMultRow: ~7x faster
WebPMultARGBRow: ~3x faster
ApplyAlphaMultiply: 60% faster
2014-09-11 07:58:42 +02:00
Djordje Pesut
e2502a97c1
MIPS: dspr2: added optimization for TransformAC3
...
Change-Id: Icd789ee5f6d764297e7dc0a0f8a3bc47ab92ac65
2014-09-09 14:53:36 +02:00
Djordje Pesut
24e1072aac
MIPS: dspr2: added optimization for TransformDC
...
Change-Id: Iee69758f6442ea9c80ddaa32cea8d00dda4c6252
2014-09-09 14:15:04 +02:00
Djordje Pesut
f0103595dd
MIPS: dspr2: added optimization for ColorIndexInverseTransforms
...
Change-Id: I5b6094ce489d4f896bc4b8f575142eb3c5054beb
2014-09-08 17:22:59 +02:00
James Zern
637b388809
dsp/lossless: workaround gcc-4.9 bug on arm
...
force Sub3() to not be inlined, otherwise the code in Select() will be
incorrect.
https://android-review.googlesource.com/#/c/102511
Change-Id: I90ae58bf3e6cc92ca9897f69974733d562e29aaf
2014-08-27 20:31:21 -07:00
James Zern
8323a9038d
dsp.h: collect gcc/clang version test macros
...
endian_inl.h already relies on dsp.h, grab the definitions from there.
Change-Id: I445f7d0631723043c55da1070498f89965bec7b1
2014-08-27 19:33:09 -07:00
skal
e6c4b52f28
move static initialization of WebPYUV444Converters[] to the Init function.
...
Split initialization of YUV444Converters[] out of Upsamplers init.
update test for NULL function pointers
Change-Id: I9603f54250f90c85a12ffbecfd6c59e9b06c47e0
2014-08-27 11:36:37 -07:00
skal
f5c04d64b7
Merge "add a DispatchAlpha() for SSE2 that handles 8 pixels at a time"
2014-08-25 22:43:42 -07:00
skal
fc98edd936
add a DispatchAlpha() for SSE2 that handles 8 pixels at a time
...
Only slightly faster.
Change-Id: Ie2e57e6a0950166124cf1075c6c9b45b7abdad8c
2014-08-25 21:03:03 -07:00
skal
73d361dd5f
introduce VP8EncQuantize2Blocks to quantize two blocks at a time
...
No speed diff for now. We might reorder better the instructions later,
to speed things up.
Change-Id: I1949525a0b329c7fd861b8dbea7db4b23d37709c
2014-08-25 20:21:42 -07:00
Djordje Pesut
0b21c30b1a
MIPS: dspr2: added optimization for EmitAlphaRGB
...
New dsp function: WebPDispatchAlpha()
Change-Id: I48e539d22471279ec75185759bc68d18b127f716
2014-08-21 20:39:35 -07:00
James Zern
953acd56a4
enc_neon: enable QuantizeBlock for aarch64
...
vtbl4_u8 is available everywhere except iOS arm64: use vtbl2q_u8 there
with a corresponding change in the load.
Change-Id: Ib84212dda3c7875348282726c29e3b79b78b0eac
2014-08-20 11:48:25 -07:00
Djordje Pesut
f4ae143720
MIPS: mips32: code rebase
...
mips code rebased to be same as C code
from commit I8c29a8a0285076cb3423b01ffae9fcc465da6a81
Change-Id: I3848f4ce43387c3a62b336606498779f7b07ec44
2014-08-19 15:13:16 +02:00
Djordje Pesut
569771549a
MIPS: dspr2: added optimizations for VP8YuvTo*
...
VP8YuvToRgb
VP8YuvToBgr
VP8YuvToRgb565
VP8YuvToRgba4444
VP8YuvToArgb
VP8YuvToBgra
VP8YuvToRgba
Change-Id: I22212a125d890e1fd28388fec906a1a5c07ff386
2014-08-19 14:29:32 +02:00
James Zern
3fca851a20
cpu: check for _MSC_VER before using msvc inline asm
...
_M_IX86 will be defined in mingw builds after including windows.h. as
the gcc inline asm is first, this missing check would only have caused
an error if the code was reorganized.
Change-Id: I395679bcfc43e94d308d1ceb0c0fbf932b2c378c
2014-08-15 15:11:40 -07:00
Djordje Pesut
b4dc4069a2
MIPS: dspr2: added optimization for (un)filters
...
HorizontalFilter
VerticalFilter
GradientFilter
HorizontalUnfilter
VerticalUnfilter
GradientUnfilter
Change-Id: I54055b4767c37719691811072e95bf79c1f627b1
2014-08-14 11:55:19 -07:00
Djordje Pesut
b61c9ceca8
MIPS: dspr2: Optimization of some simple point-sampling functions
...
Change-Id: I6a4ab29bd0cc5a2951a8882cf9997032dc38bd79
2014-08-13 17:18:49 +02:00
Djordje Pesut
98c54107df
MIPS: mips32r2: added optimization for BSwap32
...
gcc < 4.8.3 doesn't translate bswap optimally.
use optimized version always
Change-Id: I979ea26ad6dc0166d3d2f39c4148eb8adfb7ddec
2014-08-12 09:29:13 +02:00
Djordje Pesut
b7e5a5c451
MIPS: detect mips32r6 and disable mips32r1 code
...
Change-Id: Id1325c789a990c9a8704e84e99a22d580303eb8a
2014-08-08 17:29:31 +02:00
pascal massimino
bb07022b66
Merge "cosmetics"
2014-08-06 12:30:08 -07:00
James Zern
e300c9d819
cosmetics
...
fix some indent/whitespace, remove a few duplicate includes, extra
semi-colons
Change-Id: If937182b40a21e0f2028496e7b4b06c6e8a41352
2014-08-06 12:10:59 -07:00
James Zern
f7b4c48bba
cosmetics: remove some extraneous 'extern's
...
Change-Id: Ib3f0cff37120c51633387dd1c46592c53ab0ba6d
2014-08-05 22:14:24 -07:00
James Zern
0524d9e5e8
dsp: detect mips64 & disable mips32 code
...
Change-Id: Icf68dafd5cf0614ca25b36a0252caa1784ac8059
2014-08-01 21:18:53 -07:00
skal
8f6f8c5dde
remove the !WEBP_REFERENCE_IMPLEMENTATION tweak in Put8x8uv
...
There's no speed diff, so better remove it altogether
Reported in https://code.google.com/p/webp/issues/detail?id=215
Change-Id: I991330de18bec340029d6df5fed0dfb4337e4662
2014-07-23 14:15:40 -07:00
James Zern
c76f07ecc2
dec_neon/TransformAC3: initialize vector w/vcreate
...
replaces {} initialization gnu-ism
Change-Id: I5bedcba1a9c21883207301f07456cc6a843199a0
2014-07-11 15:56:53 -07:00
James Zern
380cca4f2c
configure.ac: add AC_C_BIGENDIAN
...
this defines WORDS_BIGENDIAN, replacing uses of
__BIG_ENDIAN__/__BYTE_ORDER__ with it
+ fixes lossless BGRA output with big-endian toolchains
that do not define __BIG_ENDIAN__ (codesourcery mips gcc)
Change-Id: Ieaccd623292d235343b5e34b7a720fc251c432d7
2014-07-03 18:15:50 -07:00
James Zern
47779d46c8
endian_inl.h: add BSwap32
...
Change-Id: I96e3ae49659307024415d64587e6312888a0070f
2014-07-03 13:28:13 -07:00
James Zern
e59f53600f
neon: normalize vdup_n_* usage
...
with constants, prefer this over vmov_n_* or vcreate_*
Change-Id: Ia84b2a82faea58e2626211a7e2257e0ba4af358a
2014-07-01 00:55:05 -07:00
James Zern
bc03670f01
neon: add INIT_VECTOR4
...
used to initialize NxMx4 vector types
replaces initialization via '{{ }}' gnu-ism.
Change-Id: I0da7b3d321f3d48579b7863fb2e4d3f449ae7f5e
2014-07-01 00:18:23 -07:00
James Zern
6c1c632b03
neon: add INIT_VECTOR3
...
used to initialize NxMx3 vector types
replaces initialization via '{{ }}' gnu-ism.
Change-Id: Idad2f278ab104cf2cc650517194258ce3cfb37b4
2014-06-30 23:53:23 -07:00
James Zern
dc7687e51b
neon: add INIT_VECTOR2
...
used to initialize NxMx2 vector types
replaces initialization via '{{ }}' gnu-ism.
Change-Id: I4accc305c7dd4c886b63c22e38890b629bffb139
2014-06-30 23:52:42 -07:00
Pascal Massimino
1f3e5f1e60
remove unused 'shift' argument and QFIX2 define
...
this will remove a warning about the shift amount not being
an immediate (=constant).
Change-Id: Ie9a00fefdb9a07ec8994fb113f24234518bc878a
Also: fix the NULL sharpen argument mismatch.
2014-06-26 00:44:12 -07:00
levytamar82
27bfeee43a
QuantizeBlock SSE2 Optimization:
...
Another store to load forward block was detected coming from the function
FTransform.
FTransform save the output data 4 times 8 bytes each. when this data is
later being loaded by the QuantizeBlock function in one chunk of 16 bytes
that caused a store to load forward block.
The fix was done in the FTransform function where each two consecutive 8 bytes
were merged into one 16 bytes register and saved into the memory.
This fix gives ~21% function level gain and 1.6% user level gain.
Change-Id: Idc27c307d5083f3ebe206d3ca19059e5bd465992
2014-06-18 16:22:00 -07:00
James Zern
7a93c000ee
**/Makefile.am: remove unused AM_CPPFLAGS
...
only 1 of <lib>_CPPFLAGS and AM_CPPFLAGS is used, with the former
getting precedence when it's defined. configure's DEFAULT_INCLUDES is
covering what's necessary given the include paths are all source
relative.
Change-Id: I7d14076acd266b28a88a3d92bcc3d7165284d5f3
2014-06-12 11:59:05 -07:00