Frank Barchard
fce0fed542
ARGBToY use 8 bit precision instead of 7 bit.
...
Neon and GCC Intel optimized, but win32 and mips not optimized.
BUG=libyuv:842, b/141482243
Change-Id: Ia56fa85c8cc1db51f374bd0c89b56d21ec94afa7
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1825642
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Reviewed-by: richard winterton <rrwinterton@gmail.com>
2019-10-07 23:01:10 +00:00
Frank Barchard
92e22cf5b6
Lint cleanup after C99 change CL
...
TBR=braveyao@chromium.org
Bug: libyuv:774
Test: git cl lint
Change-Id: I51cf8107a8db17fbc9952d610f3e4d7aac5aa743
Reviewed-on: https://chromium-review.googlesource.com/882217
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-01-24 19:16:03 +00:00
Frank Barchard
7e389884a1
Switch to C99 types
...
Append _t to all sized types.
uint64 becomes uint64_t etc
Bug: libyuv:774
Test: try bots build on all platforms
Change-Id: Ide273d7f8012313d6610415d514a956d6f3a8cac
Reviewed-on: https://chromium-review.googlesource.com/879922
Reviewed-by: Miguel Casas <mcasas@chromium.org>
2018-01-23 19:16:05 +00:00
Frank Barchard
efbf15754a
Step thru full color test by increments of 5 for better test speed.
...
Full color test is the slowest of the unittests, and not catching any
additional bugs at the moment. Step thru range of 0 to 255 in steps of
5 to speed up the test. 255 is 3 * 5 * 17, so any of those primes would
hit 0 and 255 exactly.
Was LibYUVColorTest.TestFullYUV (896 ms)
Now LibYUVColorTest.TestFullYUV (212 ms)
TBR=kjellander@chromium.org
Bug: libyuv:736
Test: LibYUVColorTest.TestFullYUV
Change-Id: I5b55fb07ada0dc7bdc3c3c20569d36bf09bb3804
Reviewed-on: https://chromium-review.googlesource.com/672064
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-09-19 02:01:53 +00:00
Frank Barchard
e62309f259
clang-format libyuv
...
BUG=libyuv:654
R=kjellander@chromium.org
Review URL: https://codereview.chromium.org/2469353005 .
2016-11-07 17:37:23 -08:00
Frank Barchard
462be27ec8
j422 now uses j420 source code so increase error threshold to match.
...
R=harryjin@google.com
BUG=libyuv:597
Review URL: https://codereview.chromium.org/2024213003 .
2016-05-31 19:45:34 -07:00
Frank Barchard
ade85fb55c
remove row.h from unittests
...
add SIMD_ALIGNED to unittest header.
BUG=libyuv:594
TESTED=local build passes with row.h removed from tests.
R=harryjin@google.com
Review URL: https://codereview.chromium.org/2001373002 .
2016-05-27 10:57:49 -07:00
Frank Barchard
8c196f4d4c
Fix testi420 unittest for odd height
...
When the image height for unittests was set to an
odd height, the TestI420 unittest would not fill
the complete source buffer. This change handles
the odd height test case.
No change to library code.
TBR=harryjin@google.com
BUG=libyuv:549
Review URL: https://codereview.chromium.org/1609103002 .
2016-01-19 16:16:39 -08:00
Frank Barchard
c629cb3afe
add command line cpu info to allow android neon test
...
in order to compare C and Neon code, a new command line flag is added.
historically environment variables controlled cpu features, but on
android apk it is easier to pass a command line option to disable cpu
optimizations.
R=harryjin@google.com
BUG=libyuv:516
Review URL: https://codereview.chromium.org/1407193009 .
2015-11-03 17:01:48 -08:00
Frank Barchard
00f15e3c6c
color unittest allow j420 error of 5 for arm
...
R=harryjin@google.com
BUG=libyuv:511
Review URL: https://codereview.chromium.org/1412683005 .
2015-10-22 11:25:04 -07:00
Frank Barchard
5d0a871d37
remove have jpeg test
...
This test is just a printf, not a real test, but somehow
fails on arm.
TBR=harryjin@google.com
BUG=libyuv:506
Review URL: https://codereview.chromium.org/1409913002 .
2015-10-15 19:13:07 -07:00
Frank Barchard
d5c2a11529
disable color test that hangs on C version for Arm.
...
TBR=harryjin@google.com
BUG=libyuv:506
Review URL: https://codereview.chromium.org/1403183002 .
2015-10-14 18:48:56 -07:00
Frank Barchard
e2417df4cb
create color test category of unittests to narrow down arm bug
...
A hang in color conversion on arm occurs somewhere in yuv to rgb.
Breaking the color test into its own category of test will help
run selective tests to narrow down the issue.
R=harryjin@google.com
BUG=libyuv:506
Review URL: https://codereview.chromium.org/1405543003 .
2015-10-14 16:58:55 -07:00
Frank Barchard
26db4de2ae
break up unittests into categories
...
R=harryjin@google.com
BUG=none
Review URL: https://codereview.chromium.org/1399523004 .
2015-10-13 16:01:07 -07:00
Frank Barchard
f4c1ac10f0
Speed up rounding to byte test
...
R=harryjin@google.com
BUG=libyuv:492
Review URL: https://codereview.chromium.org/1367403007 .
2015-10-02 15:27:13 -07:00
Frank Barchard
16f12b58cc
Replace random with fastrand
...
random / rand is slow and impacts performance testing.
Although its only called to clear a frame once, a typical profile shows
it high in the overall profile, when doing 1000 frames for a benchmark.
95.10% libyuv_unittest libyuv_unittest [.] YUY2ToARGBRow_SSSE3
2.01% libyuv_unittest libc-2.19.so [.] __random_r
1.13% libyuv_unittest libc-2.19.so [.] __random
Replace random is a faster version for unittests.
set LIBYUV_WIDTH=1280
set LIBYUV_HEIGHT=720
set LIBYUV_REPEAT=999
set LIBYUV_FLAGS=-1
out\release\libyuv_unittest --gtest_filter=*YUY2ToARGB* | findms
Was
libyuvTest.YUY2ToARGB_Opt (497 ms)
Now
libyuvTest.YUY2ToARGB_Opt (454 ms)
R=harryjin@google.com
BUG=none
Review URL: https://codereview.chromium.org/1361813002 .
2015-09-22 15:47:36 -07:00
Frank Barchard
478ff9608b
Increase error tolerance to 4 for arm on J420 convert
...
BUG=libyuv:479
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/53789004 .
2015-08-07 12:24:25 -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
fbarchard@google.com
f16f33d4ce
All cpu flags to be set so that instead of comparing C code, compare assembler to assembler, for benchmarking purposes.
...
BUG=none
TESTED=libyuv_unittest.exe
R=bcornell@google.com
Review URL: https://webrtc-codereview.appspot.com/50499004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1346 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-26 18:22:29 +00:00
fbarchard@google.com
4f46a3e03d
remove 1 tab from each row of histograms in libyuvTest.TestFullYUV and libyuvTest.TestScaleFullYUV.
...
BUG=none
TESTED=libyuvTest.TestScaleFullYUV
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/47799004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1345 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-25 22:38:01 +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
f301777060
Fix YToARGB and tweaks to thresholds in YUV tests.
...
BUG=411
TESTED=libyuvTest.TestYToARGB
R=bcornell@google.com
Review URL: https://webrtc-codereview.appspot.com/44709004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1330 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-16 19:50:33 +00:00
fbarchard@google.com
bfba8e41c4
Add test for color accuracy of J422ToARGB
...
BUG=414
TESTED=libyuvTest.TestFullYUVJ
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/41309004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1329 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-16 18:47:42 +00:00
fbarchard@google.com
63726ed9c6
test different ways to round and clamp
...
BUG=none
TESTED=TestRoundToByte
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/41299004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1325 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-13 22:24:45 +00:00
fbarchard@google.com
8f152605c7
test for cast and clamp performance.
...
BUG=none
TESTED=libyuv unittest added to benchmark and confirm behavior of cast
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/44649004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1323 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-12 18:49:32 +00:00
fbarchard@google.com
be77e062da
Make TestFullYUV test do full yuv color space by default with randomized Y for inner loop
...
BUG=none
TESTED=out\release\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_filter=*TestFullYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/47499005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1319 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-10 21:26:46 +00:00
fbarchard@google.com
1d87532f00
Make color_test using if statements for clamping values from 0 to 255.
...
BUG=none
TESTED=libyuvTest.TestFullYUV
Review URL: https://webrtc-codereview.appspot.com/47479004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1316 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-10 01:51:01 +00:00
fbarchard@google.com
cdd80e04c9
Port I444ToARGB to AVX2.
...
BUG=403
TESTED=I444ToARGB unittests
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/45589004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1314 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-09 21:56:48 +00:00
fbarchard@google.com
7c55ae4ada
Change YUV full test to use pseudo random order
...
BUG=none
TESTED=libyuvTest.TestFullYUV
Review URL: https://webrtc-codereview.appspot.com/45539004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1313 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-08 23:00:39 +00:00
fbarchard@google.com
9c96867a97
lrintf is not supported by visual studio 2010; replace instances of lrintf with a cast to int.
...
BUG=409
TESTED=python build\gyp_chromium -fninja -G msvs_version=2010 --depth=. libyuv_test.gyp
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/44569004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1312 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-06 22:20:41 +00:00
yang.zhang@arm.com
94e3d5a3be
Improve the accuracy YUV to RGB for ARMv7 NEON
...
NEON version of YUV422TORGB is updated based on C algorithm. Accuracy YUV to RGB
of NEON is also updated according to test result. Macro LIBYUV_NEON is added to
identify accuracy YUV to RGB for ARM platform.
Except TestJ420 and TestYUV, all the other tests are passed.
BUG=324
TESTED=libyuvTest on ARMv7 with Android
R=fbarchard@google.com
Change-Id: I492ca628679940534f40341721dc5b6dc2d7a5b6
Review URL: https://webrtc-codereview.appspot.com/40609004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1296 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-25 06:51:29 +00:00
fbarchard@google.com
796396b226
Switch step for libyuvTest.TestFullYUV from 3 to 5 for better test performance.
...
BUG=397
TESTED=libyuvTest.TestFullYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/37249004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1281 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-13 21:48:29 +00:00
fbarchard@google.com
695f42fdb8
fix for odd width but even height in TestI420
...
BUG=400
TESTED=libyuv unittests pass locally with width of 11
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/41859004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1271 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-09 21:40:27 +00:00
fbarchard@google.com
6c200c5924
Test YUV against reference
...
BUG=393
TESTED=TestGreyYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/33229004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1265 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-05 23:58:01 +00:00
fbarchard@google.com
9d67669697
make histogram use 8 digits for all values for more consistent formatting.
...
BUG=394
TESTED=TestFullYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/34129004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1260 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-04 20:00:38 +00:00
fbarchard@google.com
c4e032c543
change Y multiplier and bias to compensate for 257/256 which makes YToARGB exactly match float math.
...
Histogram Before
hist -3 -2 -1 0 1 2 3
red 0 0 1809408 13140736 1827072 0 0
green 0 0 1679912 13471329 1625975 0 0
blue 168448 994816 1876480 10655488 1893376 1006336 182272
Histogram After
hist -3 -2 -1 0 1 2 3
red 0 0 558848 15632128 586240 0 0
green 0 0 209907 16350588 216721 0 0
blue 14848 642816 1989376 11363328 2053120 695040 18688
BUG=394
TESTED=more stringent luma tests
R=brucedawson@google.com
Review URL: https://webrtc-codereview.appspot.com/38859004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1259 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-04 19:45:26 +00:00
fbarchard@google.com
0494ffee81
use lrintf to round from float to int instead of round and then cast.
...
BUG=393
TESTED=local windows test passed.
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/37899004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1257 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-02 21:06:51 +00:00
fbarchard@google.com
4e155ef6c4
Change test to test for Arm, since all CPUs except arm provide accurate yuv conversion
...
BUG=392
TESTED=try bots
Review URL: https://webrtc-codereview.appspot.com/34059004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1254 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-27 00:22:10 +00:00
fbarchard@google.com
4848b06016
YPixel subtract bias to match C code
...
BUG=392
TESTED=TestGreyYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/37799004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1253 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-26 23:58:20 +00:00
fbarchard@google.com
f0845348fe
Add a test for YToARGB to match exactly I420ToARGB
...
BUG=392
TESTED=TestGreyYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/38739004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1252 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-26 23:22:13 +00:00
fbarchard@google.com
48da8c2991
print min max error per channel
...
BUG=324
TESTED=TestFullYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/40499004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1244 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-22 18:27:29 +00:00
fbarchard@google.com
3e18ca4cdb
make 'full' test do multiples of 3 which includes 0 and 255.
...
BUG=324
TESTED=libyuvTest.TestFullYUV
R=brucedawson@google.com
Review URL: https://webrtc-codereview.appspot.com/35829004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1242 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-21 22:41:58 +00:00
fbarchard@google.com
7772ab1fb1
Remove integer prototype YUV conversion code from tests.
...
BUG=324
TESTED=local tests still build/pass.
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/37709004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1241 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-21 20:08:25 +00:00
fbarchard@google.com
ada1b914ea
when using high accuracy YUV have tighter tolerances.
...
BUG=324
TESTED=TestI420
R=brucedawson@google.com
Review URL: https://webrtc-codereview.appspot.com/39609004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1240 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-21 19:48:21 +00:00
fbarchard@google.com
c6b52cb590
Allow C and ASM to be different for I420 for now.
...
BUG=324
TESTED=TestI420
R=brucedawson@google.com
Review URL: https://webrtc-codereview.appspot.com/39599004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1239 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-21 19:24:01 +00:00
fbarchard@google.com
ddf114624a
More accurate tests when running improved luma/chroma accuracy code.
...
BUG=324
TESTED=TestYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/39589004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1237 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-21 18:42:16 +00:00
fbarchard@google.com
3c834b6ce2
add an exhaustic yuv color space test, and relax yuv conversion results to allow for future change.
...
BUG=324
TESTED=TestFullYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/37689004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1234 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-20 23:48:21 +00:00
fbarchard@google.com
292c2286a6
prototype of a YUV to RGB function to achieve higher quality and performance at the same time. The chroma is made more accurate by using negative values that allow more range and then subtract the contributions from the luma contributes. The luma is made more accurate using a multiply that duplicates the Y bits out to 16 bits and then does a 2.14 bit fixed point coefficient. The replication is done for free as part of the multiply.
...
BUG=391
TESTED=TestYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/36819004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1232 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-20 18:21:16 +00:00
fbarchard@google.com
d586d55a53
Tests the full range of Y
...
BUG=391
TESTED=TestYUV
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/36809004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1231 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-16 02:23:19 +00:00
fbarchard@google.com
131aef142a
math header needed on osx version.
...
BUG=391
TESTED=try bots
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/39529004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1230 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-15 21:53:52 +00:00