Frank Barchard
80e27fc747
Add MaskCpuFlags(benchmark_cpu_info_) to unittest initialization
...
When command line --libyuv_cpu_info is used the individual tests
used to need to set the cpumask. This CL moves that to the init
for each test class so the individual tests dont need to set it.
TBR=kjellander@chromium.org
BUG=libyuv:720
TEST=LibYUVBaseTest.TestCpuHas
Change-Id: I6ae180388debf6cf76be6df5b81cfffeb35ee2eb
Reviewed-on: https://chromium-review.googlesource.com/662367
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-09-12 19:13:06 +00:00
Frank Barchard
8f5e9cd9eb
ScaleRowUp2_16_C port of NEON to C
...
Single pass upsample with bilinear filter.
NEON version optimized - Pixel Sailfish QC821
Was TestScaleRowUp2_16 (5741 ms)
Now TestScaleRowUp2_16 (4484 ms)
C TestScaleRowUp2_16 (6555 ms)
TBR=kjellander@chromium.org
BUG=libyuv:718
TEST=LibYUVScaleTest.TestScaleRowUp2_16 (709 ms)
Change-Id: Ib04ceb53e0ab644a392c39c3396e313530161d92
Reviewed-on: https://chromium-review.googlesource.com/646701
Reviewed-by: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-09-05 21:40:39 +00:00
Frank Barchard
78e44628c6
Add MSA optimized SplitUV, Set, MirrorUV, SobelX and SobelY row functions.
...
TBR=kjellander@chromium.org
R=fbarchard@google.com
Bug:libyuv:634
Change-Id: Ie2342f841f1bb8469fc4631b784eddd804f5d53e
Reviewed-on: https://chromium-review.googlesource.com/616765
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-08-17 18:39:22 +00:00
Frank Barchard
bb17da97cf
Test C vs NEON for ScaleDown2Box_16
...
TBR=kjellander@chromium.org
BUG=libyuv:718
TEST=LibYUVScaleTest.TestScaleRowDown2Box_16
Change-Id: Ic74d29d6f14983ff26e8af541ef702a0f8bf3f17
Reviewed-on: https://chromium-review.googlesource.com/616189
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-16 22:18:48 +00:00
Frank Barchard
7e59ee4c75
Upsample 8x2 pixels to 16x1 with bilinear filtering
...
Downsample 16x2 to 8x1 with box filtering
[ RUN ] LibYUVScaleTest.TestScaleRowUp2_16
[ OK ] LibYUVScaleTest.TestScaleRowUp2_16 (579 ms)
[ RUN ] LibYUVScaleTest.TestScaleRowDown2Box_16
[ OK ] LibYUVScaleTest.TestScaleRowDown2Box_16 (329 ms)
[----------] 2 tests from LibYUVScaleTest (909 ms total)
TBR=kjellander@chromium.org
BUG=libyuv:718
TEST=LibYUVScaleTest.TestScaleRowUp2_16 and LibYUVScaleTest.TestScaleRowDown2Box_16
Change-Id: I457d44123f2751e5f71bf3935401fff74b8e9db2
Reviewed-on: https://chromium-review.googlesource.com/608876
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-15 22:28:15 +00:00
Frank Barchard
44abf70187
ScaleDown odd functions adjust math so last pixel is half width source.
...
existing test passes
out/Release/libyuv_unittest --gtest_filter=*Blend* --libyuv_width=33 --libyuv_height=16
new test added
BUG=libyuv:705
TEST=LibYUVScaleTest.TestScaleOdd
Change-Id: Ica91812aee2e4ed9bcc18df4962b089c2e4ae704
Reviewed-on: https://chromium-review.googlesource.com/524932
Reviewed-by: Cheng Wang <wangcheng@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-06-06 01:37:26 +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
cc88adc620
YUV scale filter columns improved filtering accuracy
...
upscale a YUV image. observe change in hue.. green especially.
disable ScaleFilterCols_SSSE3, falling back on ScaleFilterCols_C
observe hue.. green especially, is better.
was ScaleFrom1280x720_Bilinear (1620 ms)
now ScaleFrom1280x720_Bilinear (1907 ms)
BUG=libyuv:605
TEST=try bots
R=harryjin@google.com , wangcheng@google.com
Review URL: https://codereview.chromium.org/2084533006 .
2016-06-23 20:16:55 -07:00
Frank Barchard
07cb92272f
If image sizes are greater than 32768, fixed point stepping will overflow an int. This CL changes the max size to 32768 and disables the test if larger.
...
BUG=libyuv:590
TESTED=LIBYUV_FLAGS=-1 LIBYUV_WIDTH=8192 LIBYUV_HEIGHT=16 out/Release/libyuv_unittest --gtest_filter=*
R=harryjin@google.com
Review URL: https://codereview.chromium.org/1947783002 .
2016-05-05 19:09:02 -07:00
Frank Barchard
80ca4514ef
change scale down by 4 to use rounding.
...
TBR=harryjin@google.com
BUG=libyuv:447
Review URL: https://codereview.chromium.org/1525033005 .
2015-12-15 21:25:18 -08:00
Frank Barchard
70445ef2ef
avx2 scale down by 2 for gcc
...
R=dhrosa@google.com , harryjin@google.com
BUG=libyuv:527
Review URL: https://codereview.chromium.org/1520423003 .
2015-12-15 10:59:20 -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
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
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
fbarchard@google.com
a09fd1aa0f
scale tests use int64 for size
...
BUG=none
TESTED=untested
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/51199004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1421 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-06-04 21:34:16 +00:00
fbarchard@google.com
e787144c2d
adjust dimensions for scale factor tests to ensure the scale factor tested is actually used.
...
BUG=none
TESTED=set LIBYUV_WIDTH=1918 libyuvTest.ScaleDownBy3by4_None
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/47349004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1416 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-05-30 00:45:08 +00:00
fbarchard@google.com
535a7140f2
Scale Down by factor tests scale down to specified ratio rather than up. This ensures the alignment constrains on the destination dont cause a different factor to be used.
...
BUG=431
TESTED=libyuvTest.ScaleDownBy3_Bilinear
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/47309004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1413 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-05-26 23:22:01 +00:00
fbarchard@google.com
bb43f064df
Add a scale down by 3 test for testing general purpose box/bilinear with scale factor of 3, but allowing width/height specified to do odd with testing.
...
BUG=libyuv:427
TESTED=libyuvTest.ScaleDownBy3*
R=bcornell@google.com
Review URL: https://webrtc-codereview.appspot.com/45169004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1370 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-15 22:46:45 +00:00
fbarchard@google.com
62a9fe303c
code style cleanup of scale functions. no functional change.
...
BUG=none
TESTED=lint
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/48839004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1354 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-02 21:23:52 +00: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
008ce53ac4
pavgb with memory op requires alignment. This CL disables conversions that use pavgb, and resolves scale by 3/8 unittest for checking alignment works. The 3/8 code used a pavgb with a memory operand. tests are added for scaling and allow unaligning on purpose.
...
BUG=365
TESTED=local change to force unaligned memory fails on some conversions and scaling code.
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/29699004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1114 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-10-07 01:57:34 +00:00
fbarchard@google.com
b18413e568
YUV scaling with 16 bit planes
...
BUG=331
TESTED=libyuv_unittest --gunit_also_run_disabled_tests --gtest_filter=**.ScaleFrom1280x720*
R=debargha@google.com , tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/17569004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1005 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-05-20 19:22:30 +00:00
fbarchard@google.com
398de7d0be
ARGBScale down bilinear clip to edge of image to avoid overread.
...
BUG=317
TESTED=drmemory out\debug\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_filter=*ARGBScale*
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/10159004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@984 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-03-18 21:39:42 +00:00
fbarchard@google.com
b14f46fa30
NaCL pepper_33 port of scale and compare using lock/unlock. Remove less useful scaling tests and change default size to a multiple of 16 for better assembly coverage.
...
BUG=none
TESTED=ncval
R=nfullagar@google.com
Review URL: https://webrtc-codereview.appspot.com/5939005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@917 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-17 18:27:06 +00:00
fbarchard@google.com
5ed2b2e465
Test scaling to/from 1 pixel
...
BUG=none
TEST=scale unittests updated to test to/from 1 pixel
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/5479005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@908 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-10 01:25:35 +00:00
fbarchard@google.com
dd2fca5f9c
scale down 4
...
BUG=none
TEST=none
R=ryanpetrie@google.com
Review URL: https://webrtc-codereview.appspot.com/5389004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@907 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-09 21:07:37 +00:00
fbarchard@google.com
09d5f2bfd6
Change scale factors to test QVGA to/from CIF
...
BUG=261
TESTED=valgrind
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/5129004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@895 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-05 22:32:46 +00:00
fbarchard@google.com
4163003f66
Add CIF scale test to confirm DrMemory bug is fixed.
...
BUG=none
TESTED=untested
R=wuwang@google.com
Review URL: https://webrtc-codereview.appspot.com/4479004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@875 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-11-27 00:36:14 +00:00
fbarchard@google.com
431f5f0388
Fix scaling bug
...
BUG=none
TEST=none
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/3979007
git-svn-id: http://libyuv.googlecode.com/svn/trunk@864 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-11-20 01:23:04 +00:00
fbarchard@google.com
a0630d77f0
Report of affine to nacl using %k0
...
BUG=none
TEST=none
R=johannkoenig@google.com
Review URL: https://webrtc-codereview.appspot.com/3929004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@855 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-11-15 17:42:44 +00:00
fbarchard@google.com
43b4dd2955
Allow error of 3 (was 2) for scale by 8.
...
BUG=none
TEST=libyuvTest.ScaleDownBy8_Bilinear
Review URL: https://webrtc-codereview.appspot.com/3799004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@852 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-11-13 07:01:46 +00:00
fbarchard@google.com
f7eb04bc41
Port ScaleCols to SSSE3 for Win.
...
BUG=none
TEST=Scale*
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/3759004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@849 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-11-11 23:13:57 +00:00
fbarchard@google.com
788f757016
Linear interpolation.
...
BUG=none
TEST=*Linear*
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/3689004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@848 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-11-11 18:53:19 +00:00
fbarchard@google.com
a721402a20
Disable xgetbv for NaCL
...
BUG=none
TEST=ncval
R=nfullagar@google.com
Review URL: https://webrtc-codereview.appspot.com/2719004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@822 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-10-21 22:59:51 +00:00
fbarchard@google.com
095f33d870
Coalesce rows by changing width/height and dropping into code instead of recursing. Improve coalesce by setting stride to 0 so it can be used even on odd width images. Reduce unittests to improve time to run emulators.
...
BUG=277
TEST=unittests all build and pass
R=ryanpetrie@google.com
Review URL: https://webrtc-codereview.appspot.com/2589004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@819 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-10-21 19:29:10 +00:00
fbarchard@google.com
a03b8adde8
Do fewer scale tests to speed up overall unittest
...
BUG=273
TEST=timex emuyuv Scale*
R=ryanpetrie@google.com
Review URL: https://webrtc-codereview.appspot.com/2469005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@815 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-10-18 22:22:09 +00:00
fbarchard@google.com
dcd87ffb8c
Vertical-only scale for YUV.
...
BUG=260
TEST=ScaleDownByVertical2by3_Bilinear
R=jingning@google.com , thorcarpenter@google.com
Review URL: https://webrtc-codereview.appspot.com/2165004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@779 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-09-03 20:00:10 +00:00
fbarchard@google.com
f2f9dbb644
FixedDiv function in C and benchmark
...
BUG=none
TEST=FixedDiv*
R=johannkoenig@google.com
Review URL: https://webrtc-codereview.appspot.com/1668004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@727 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-06-15 21:10:19 +00:00
fbarchard@google.com
ae67c900f4
Randomize function for filling a buffer with random values.
...
BUG=244
TEST=*ScaleFrom1366x768_Box
R=mflodman@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1644004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@720 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-06-10 16:12:20 +00:00
fbarchard@google.com
76f86067a2
Additional scale resolutions tested
...
BUG=none
TEST=*Scale*
R=mikhal@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1608005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@718 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-06-05 15:10:43 +00:00
fbarchard@google.com
dee86a1484
Add comment about return value from scaling unittest internal function - TestFilter.
...
BUG=none
TEST=*Scale* unittests
R=fischman@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1599005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@716 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-06-04 16:47:30 +00:00
fbarchard@google.com
97c9626107
Test yuv scaler with scale factor of 1
...
BUG=none
TEST=ScaleDownBy1
R=gangji@google.com
Review URL: https://webrtc-codereview.appspot.com/1592004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@715 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-06-03 15:09:58 +00:00
fbarchard@google.com
b911428afd
Adapt row interpolator to do YUV as well as ARGB without extrude so it can be used in I420Scale.
...
BUG=237
TEST=Scale*
R=ryanpetrie@google.com
Review URL: https://webrtc-codereview.appspot.com/1587004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@710 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-30 23:42:27 +00:00
fbarchard@google.com
5cf8a881e0
Clip scale API
...
BUG=225
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1455004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@693 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-13 23:51:12 +00:00
fbarchard@google.com
306e984451
YUV scaler mirror horizontal if src_width is negative
...
BUG=
Review URL: https://webrtc-codereview.appspot.com/1449004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@692 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-13 17:57:27 +00:00
fbarchard@google.com
25120f2196
Add a unittest for scaling from VGA to whatever.
...
BUG=208
TESTED=out\release\libyuv_unittest --gtest_filter=*ScaleFrom*
Review URL: https://webrtc-codereview.appspot.com/1250004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@620 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-25 22:53:29 +00:00
fbarchard@google.com
7d25fe2ddb
bilinear scaling allow higher error for differences in SSSE3 7 bit math vs C/SSE2 15 bit math, when extreme scale factors are used.
...
BUG=200
TEST=*Scale* width LIBYUV_WIDTH=16 LIBYUV_HEIGHT=16
Review URL: https://webrtc-codereview.appspot.com/1197004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@606 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-13 18:33:41 +00:00
fbarchard@google.com
5f8858665b
Box filter start from 0,0. Fixes crash that overreads horizontally.
...
BUG=185
TEST=scale_test
Review URL: https://webrtc-codereview.appspot.com/1094009
git-svn-id: http://libyuv.googlecode.com/svn/trunk@571 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-02-12 19:05:40 +00:00
fbarchard@google.com
8e26eada77
Fix for mutated registers on AVX2
...
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1090007
git-svn-id: http://libyuv.googlecode.com/svn/trunk@565 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-02-08 02:29:21 +00:00
fbarchard@google.com
cde587092f
Replace two spaces with one after .
...
BUG=none
TEST=lint
Review URL: https://webrtc-codereview.appspot.com/1063010
git-svn-id: http://libyuv.googlecode.com/svn/trunk@553 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-01-28 00:02:35 +00:00