Frank Barchard
cf19a0c9a2
nv21 any fix
...
R=harryjin@google.com
BUG=libyuv:507
Review URL: https://codereview.chromium.org/1410643002 .
2015-10-15 16:24:51 -07:00
Frank Barchard
76a599ec3b
fix jpeg and bt.709 yuvconstants for neon64.
...
yuv constants for bt.601 were previously ported to neon64, as well
as the code to respect other color spaces. But the jpeg and bt.709
colour conversion constants were still in armv7 form. This changes
the constants for aarch64 builds to be compatible with the code.
yuv constants are now passed as const *
Remove Yvu constants which were used for older version on nv21 but not new code.
TBR=harryjin@google.com
BUG=none
Review URL: https://codereview.chromium.org/1398623002 .
2015-10-07 19:46:56 -07:00
Frank Barchard
914a9856c7
Reimplement NV21ToARGB to allow different color matrix.
...
Low level for NV21ToARGB written to accept yuv matrix used by
other YUV to ARGB functions.
Previously NV21 was implemented for Windows using NV12 with a different
matrix that swapped U and V. But the Arm version of the low level does
not allow the matrix U and V contributions to be swapped.
Using a new low level function that reads NV21 and uses the same
yuvconstants as other YUV conversion functions allows an Arm port of
this function.
TBR=harryjin@google.com
BUG=libyuv:500
Review URL: https://codereview.chromium.org/1388273002 .
2015-10-06 20:34:44 -07:00
Frank Barchard
2cc1a2b233
Remove sse2 functions that also have ssse3
...
ARGBBlendRow_SSE2, ARGBAttenuateRow_SSE2, and MirrorRow_SSE2
Since vast majority of CPUs have SSSE3 now, removing the SSE2
improves the performance of CPU dispatching.
R=harryjin@google.com
BUG=none
Review URL: https://codereview.chromium.org/1377053003 .
2015-09-30 14:24:44 -07:00
Frank Barchard
9a0e12f5f1
AVX2 1 step I422AlphaToARGB for gcc and win.
...
C I420AlphaToARGB_Opt (5169 ms)
SSSE3 I420AlphaToARGB_Opt (432 ms)
AVX2 I420AlphaToARGB_Opt (358 ms)
and with premultiplication as 2 step process:
I420AlphaToARGB_Premult (7029 ms)
I420AlphaToARGB_Premult (757 ms)
I420AlphaToARGB_Premult (508 ms)
R=harryjin@google.com
BUG=libyuv:496,libyuv:473
Review URL: https://codereview.chromium.org/1372653003 .
2015-09-25 13:37:42 -07:00
Frank Barchard
e365cdde3b
I420Alpha row function in 1 pass.
...
API change - I420AlphaToARGB takes flag indicating if RGB should be
premultiplied by alpha.
This version implements an efficient SSSE3 version for Windows.
C version done in 2 steps.
Was
libyuvTest.I420AlphaToARGB_Any (1136 ms)
libyuvTest.I420AlphaToARGB_Unaligned (1210 ms)
libyuvTest.I420AlphaToARGB_Invert (966 ms)
libyuvTest.I420AlphaToARGB_Opt (1031 ms)
libyuvTest.I420AlphaToABGR_Any (1020 ms)
libyuvTest.I420AlphaToABGR_Unaligned (1359 ms)
libyuvTest.I420AlphaToABGR_Invert (1082 ms)
libyuvTest.I420AlphaToABGR_Opt (986 ms)
R=harryjin@google.com
BUG=libyuv:496
Review URL: https://codereview.chromium.org/1367093002 .
2015-09-25 10:29:20 -07:00
Frank Barchard
f96890a0be
yuvconstants for all YUV to RGB conversion functions.
...
R=harryjin@google.com
BUG=libyuv:488
Review URL: https://codereview.chromium.org/1363503002 .
2015-09-22 10:26:03 -07:00
Frank Barchard
28427a53e2
I444ToABGR for android
...
Reimplements I444ToARGB as a matrix function.
new I444ToABGR as matrix functions with wrappers and any functions.
Allows for future J444 and H444 versions.
I444ToABGR user level function added.
BUG=libyuv:490, libyuv:449
R=harryjin@google.com
Review URL: https://codereview.chromium.org/1355733002 .
2015-09-18 11:20:58 -07:00
Frank Barchard
28ce7d94f5
j422toabgr neon port using i422toabgr matrix function.
...
R=harryjin@google.com
BUG=libyuv:488
Review URL: https://codereview.chromium.org/1353923003 .
2015-09-17 15:20:55 -07:00
Frank Barchard
6fcbae1409
J422ToARGB Neon but not aarch64
...
TBR=harryjin@google.com
BUG=libyuv:493
Review URL: https://codereview.chromium.org/1348203004 .
2015-09-17 12:43:05 -07:00
Frank Barchard
6a6b67e7a9
Add H422ToARGB armv7 neon version.
...
Patch provided by zhongwei.yao@linaro.org
R=fbarchard@chromium.org , fbarchard@google.com
BUG=libyuv:488
Review URL: https://codereview.chromium.org/1344393002 .
2015-09-17 10:38:15 -07:00
Frank Barchard
509c644245
Add J422ToARGB armv7 neon version.
...
R=fbarchard@chromium.org , fbarchard@google.com
BUG=libyuv:488
Review URL: https://codereview.chromium.org/1334173005 .
2015-09-15 15:01:48 -07:00
Frank Barchard
ed55d24d9f
H420 functionality
...
R=harryjin@google.com
BUG=libyuv:488
Review URL: https://webrtc-codereview.appspot.com/54869004 .
2015-09-06 11:01:40 -07:00
Frank Barchard
67b06e66cb
I422ToABGR for win64. Moves any functions to accomidate win64 subset of formats.
...
TBR=harryjin@google.com
BUG=libyuv:488
Review URL: https://webrtc-codereview.appspot.com/57679004 .
2015-09-03 11:00:18 -07:00
Frank Barchard
7060e0d826
I420ToABGRMatrix functions with J420ToABGR wrapper.
...
Allows direct conversion from JPeg to ABGR for android.
BUG=libyuv:488
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/55719004 .
2015-09-03 10:42:36 -07:00
Frank Barchard
cda9d38a4e
xmmword cast for clang
...
clangcl use compare_win for 32 bit, allowing fallback and enabling avx2 code for clang.
move defines/protos to compare_row.h
fix issue with odd width ARGBCopyAlpha functions by copying destination to temp buffer, then doing alpha copy, then copy back to destination.
R=harryjin@google.com
TBR=harryjin@google.com
BUG=libyuv:484
Review URL: https://webrtc-codereview.appspot.com/59379004 .
2015-08-18 11:13:12 -07:00
Frank Barchard
278d88f872
Copy Alpha odd width support
...
R=harryjin@google.com
BUG=none
Review URL: https://webrtc-codereview.appspot.com/59369004 .
2015-08-13 15:05:14 -07:00
Frank Barchard
93464b926c
Add rotate any support. Fix for sobel for neon which does 16 at a time, not 8. Disable scaling color test that fails on arm. Test is not complete.
...
R=harryjin@google.com
BUG=libyuv:479
Review URL: https://webrtc-codereview.appspot.com/52229004 .
2015-07-28 15:06:20 -07:00
Frank Barchard
97b35daf75
disable faulty avx2 in argb conversions and box filter. and extend temporary buffer to 128 for an avx2 any function.
...
R=harryjin@google.com
BUG=libyuv:462
TESTED=libyuv_unittest run on haswell laptop
Review URL: https://webrtc-codereview.appspot.com/53759004 .
2015-07-07 15:40:24 -07:00
Frank Barchard
0737ff5bd0
128 for avx2
...
R=harryjin@google.com
BUG=libyuv:461
Review URL: https://webrtc-codereview.appspot.com/55649004 .
2015-07-04 09:13:20 -07:00
Frank Barchard
9487b9d6d8
any allow for avx2 32 pixels at a time of argb
...
R=harryjin@google.com
BUG=libyuv:461
Review URL: https://webrtc-codereview.appspot.com/54779004 .
2015-07-01 17:50:48 -07:00
Frank Barchard
553c7f85f1
mirror odd width with simd
...
R=harryjin@google.com
BUG=libyuv:448
Review URL: https://webrtc-codereview.appspot.com/54769004 .
2015-06-23 17:53:02 -07:00
Frank Barchard
6a9ef1ea36
any 1 to 2 with stride use SIMD
...
R=harryjin@google.com
BUG=libyuv:448
Review URL: https://webrtc-codereview.appspot.com/54759004 .
2015-06-23 17:08:08 -07:00
Frank Barchard
6dde4f14bd
argb to uv read 4 not 8
...
R=harryjin@google.com
BUG=libyuv:457
Review URL: https://webrtc-codereview.appspot.com/52139004 .
2015-06-23 14:48:37 -07:00
Frank Barchard
54100b91c1
copy 2 rows for interpolate and use SIMD.
...
R=harryjin@google.com
BUG=libyuv:448
Review URL: https://webrtc-codereview.appspot.com/50279004 .
2015-06-23 10:41:46 -07:00
Frank Barchard
3b5d726a4f
1 to 1 any functions with a parameter use memcpy.
...
R=harryjin@google.com
BUG=libyuv:448
Review URL: https://webrtc-codereview.appspot.com/57619004 .
2015-06-22 15:08:20 -07:00
Frank Barchard
a0fca88b1d
remove fmemcpy and bump version
...
R=harryjin@google.com
BUG=libyuv:448
Review URL: https://webrtc-codereview.appspot.com/50269004 .
2015-06-19 17:58:17 -07:00
Frank Barchard
722e87f19f
string.h for memcpy
...
R=harryjin
BUG=libyuv:448
Review URL: https://webrtc-codereview.appspot.com/57609004 .
2015-06-19 16:40:22 -07:00
Frank Barchard
dfb2120a42
set us simd
...
R=harryjin@google.com
BUG=libyuv:448
Review URL: https://webrtc-codereview.appspot.com/55629004 .
2015-06-19 14:18:48 -07:00
Frank Barchard
6608c100e2
copy last 4
...
R=harryjin@google.com
BUG=libyuv:448
Review URL: https://webrtc-codereview.appspot.com/54749004 .
2015-06-18 17:40:19 -07:00
Frank Barchard
a209d7314b
simd for 1 to 1
...
R=harryjin@google.com , harryjin
BUG=448
Review URL: https://webrtc-codereview.appspot.com/55619004 .
2015-06-17 18:22:11 -07:00
Frank Barchard
72a235af9f
repeat y for yuy2 so that unittests that check the 2nd y on odd widths will match the C and SIMD. The C code duplicates the last Y.
...
R=harryjin@google.com
BUG=libyuv:455
Review URL: https://webrtc-codereview.appspot.com/50249004 .
2015-06-16 16:27:15 -07:00
Frank Barchard
44ff3c333d
split share macro
...
R=harryjin@google.com
BUG=libyuv:448
Review URL: https://webrtc-codereview.appspot.com/55609004 .
2015-06-16 12:44:15 -07:00
Frank Barchard
2edfe0f0c6
merge
...
R=harryjin@google.com
BUG=libyuv:448
Review URL: https://webrtc-codereview.appspot.com/52119004 .
2015-06-16 12:17:53 -07:00
Frank Barchard
bff1e18e51
share functions in any
...
R=harryjin@google.com
BUG=libyuv:448
Review URL: https://webrtc-codereview.appspot.com/57599004 .
2015-06-16 12:05:39 -07:00
Frank Barchard
0b3294af6c
disable I422ToYUY2 sse for odd sizes.
...
BUG=455
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/51239004 .
2015-06-16 11:09:03 -07:00
Frank Barchard
68e8d9bebd
Math functions need BPP of 4 for odd width support on first source argument
...
BUG=455
TESTED=ARGBMultply
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/54719004 .
2015-06-16 09:34:51 -07:00
Frank Barchard
b071a3d321
subsample yuy2 dest
...
BUG=455
TESTED=out\release\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_filter=*ARGBToYUY2*
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/58429004 .
2015-06-15 12:01:28 -07:00
Frank Barchard
58ca9f899e
remainder done unconditionally and with a variable
...
BUG=448
TESTED=local build
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/57559004 .
2015-06-12 17:21:41 -07:00
Frank Barchard
242cb2554c
nv12 odd width support using SIMD for remainder
...
BUG=libyuv:448
TESTED=NV21ToRGB565_Any etc
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/53689004 .
2015-06-12 16:07:20 -07:00
Frank Barchard
cae07fb0e0
bump subsampling up
...
BUG=455
TESTED=libyuvTest.ARGBToYUY2_Random
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/58419004 .
2015-06-12 15:25:03 -07:00
Frank Barchard
03da5420bc
use SIMD for I420ToARGB odd widths in a temporary buffer instead of using C for remainder.
...
Enter a description of the change.
use SIMD for I420ToARGB odd widths in a temporary buffer instead of using C for remainder. Currently the C code does not exactly match the SIMD code, so an odd width produces different pixels than an even width, causing a subtle artifact. By using SIMD consistently, there is no difference in even and odd widths. Also the SIMD performance is faster, so even with overhead of memcpy, performance improves.
BUG=447
TESTED=out\release\libyuv_unittest.exe --gtest_filter=*I420ToARGB*
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/55579004 .
2015-06-11 16:38:52 -07:00
fbarchard@google.com
bd2d903e1b
odd width support for ARGBSobel functions. Improves performance for images that are not a multiple of 8 pixels.
...
BUG=444
TESTED=libyuvTest.ARGBSobel_Opt
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/54589004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1415 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-05-28 22:22:28 +00:00
fbarchard@google.com
cfce47efc8
Change Sobel to use JPeg Luma calculation instead of extracting G channel. Using luma produces a better sobel that respects all 3 channels of RGB. Historically the G channel was used to improve performance, and because the luma of I420 is a constrained range, hurting quality. Using the JPeg variation of YUV, the luma is more accurate, including cross platform, better optimized for AVX2 and odd widths, and full range.
...
BUG=444
TESTED=ARGBSobelXY_Opt
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/57479004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1414 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-05-27 22:32:26 +00:00
fbarchard@google.com
bb5a009d11
ARGB4444ToARGB and ARGB1555ToARGB ported to AVX2.
...
BUG=421
TESTED=out\release\libyuv_unittest --gtest_filter=*ARGB4444ToARGB*
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/48009004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1363 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-07 23:52:57 +00:00
fbarchard@google.com
2827277496
port RGB565ToARGB to AVX2.
...
BUG=421
TESTED=out\release\libyuv_unittest --gtest_filter=*RGB565ToARGB*
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/49609004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1357 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-06 19:24:23 +00:00
fbarchard@google.com
0e4388aea3
I422ToRGB24 AVX2 and I422ToRAW
...
BUG=none
TESTED=I422ToRGB24 unittest
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/46619004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1337 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-17 17:25:27 +00:00
yang.zhang@arm.com
e246e6c18f
Add ARGBToRGB565DitherRow_NEON for ARM32/64
...
ARM32/64 NEON versions of ARGBToRGB565DitherRow_NEON are implemented.
BUG=407
TESTED=libyuvTest.* on ARM32/64 with Android
R=fbarchard@google.com
Change-Id: Ia689170fb39db964392e5e1113801592ab0628bf
Review URL: https://webrtc-codereview.appspot.com/49409004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1335 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-17 02:22:25 +00:00
fbarchard@google.com
92f7f421fd
rename I400 to J400 and I400 reference to I400. J400 is a simple replication of values to convert to RGB, which is what the old I400 was. I400 reference is the Y part of the YUV formula, so renaming that to I400.
...
BUG=none
TESTED=libyuvTest (5925 ms total)
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/50369005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1333 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-17 00:01:18 +00:00
fbarchard@google.com
f2fad0faa5
Optimized J422ToARGB.
...
BUG=414
TESTED=J422ToARGB unittest
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/42799004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1328 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-16 18:08:30 +00:00