33 Commits

Author SHA1 Message Date
Frank Barchard
fa043c7a64 Android420ToI420Rotate function to convert with rotation
- adapted from Android420ToI420, adding a rotation parameter
- SplitRotateUV added to rotate and split the UV channel of NV12 or NV21
- rename RotateUV functions to SplitRotateUV

Bug: b/203549508
Change-Id: I6774da5fb5908fdf1fc12393f0001f41bbda9851
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3251282
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2021-10-28 22:38:04 +00:00
Frank Barchard
287158925b use width + 1 for odd width tests
Bug: libyuv:894, libyuv:898, libyuv:899
Change-Id: Ieba8eaeb8b06f0323824967776673e339b263220
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2809701
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
2021-04-09 20:17:55 +00:00
Frank Barchard
681c6c6739 Add LIBYUV_API to NV12ToABGR and I444Rotate, I444Scale
Gaussian blur low levels ported to 32 bit neon.
But they are not hooked up to anything but a unittest.

Bug:b/248041731, b/132108021, b/129908793
Change-Id: Iccebb8ffd6b719810aa11dd770a525227da4c357
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1611206
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Chong Zhang <chz@google.com>
2019-05-14 01:18:06 +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
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
54bbea1701 Disable I420Blend_Any test that uses C
Also renames Inverted to Invert in test name for consistency.

TBR=harryjin@google.com
BUG=libyuv:543

Review URL: https://codereview.chromium.org/1577973004 .
2016-01-11 18:23:04 -08:00
Frank Barchard
8030a711aa Rename rotate tests to include _Opt and disable _Odd tests
TBR=harryjin@google.com
BUG=libyuv:543

Review URL: https://codereview.chromium.org/1577723003 .
2016-01-11 17:30:27 -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
01ca0712c7 Test rotation with negative height
BUG=446
TESTED=libyuvTest.NV12Rotate180_Inverted
R=bcornell@google.com

Review URL: https://webrtc-codereview.appspot.com/51169004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1420 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-06-02 22:42:45 +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
d10f80500f Improve cmake build. Add unittests to cmake build and automatically detect jpeg support. This change was originally generated to support the build of libyuv in naclports: https://chromium.googlesource.com/external/naclports/+/master/ports/libyuv/. Also add cmake artifacts to .gitignore file.
BUG=366
TESTED=build and run unittests with cmake
R=harryjin@google.com

Review URL: https://webrtc-codereview.appspot.com/27009004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1146 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-10-28 23:37:11 +00:00
fbarchard@google.com
ae9a1388a7 Use malloc for row buffers in rotate
BUG=296
TESTED=rotate_test
R=tpsiaki@google.com

Review URL: https://webrtc-codereview.appspot.com/6329004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@922 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-26 21:41:11 +00:00
fbarchard@google.com
a14b5cdfb3 Simplify rotate unittests
BUG=233
TEST=*Rotate*
R=ryanpetrie@google.com

Review URL: https://webrtc-codereview.appspot.com/1581004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@705 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-28 22:40:51 +00:00
fbarchard@google.com
e3230e4a93 Iterate the rotate functions for benchmarking purposes
BUG=233
TESTED=runyuv10 Rot*
R=ryanpetrie@google.com

Review URL: https://webrtc-codereview.appspot.com/1580004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@703 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-28 19:19:15 +00:00
fbarchard@google.com
04de744106 fix for bayer unittest, transpose and rotate, and Ssim tolerance.
BUG=198
TESTED=*Bayer*
Review URL: https://webrtc-codereview.appspot.com/1194004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@604 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-13 01:52: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
fbarchard@google.com
3e46444727 Mirror source to continuous destination with Neon
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/937020

git-svn-id: http://libyuv.googlecode.com/svn/trunk@488 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-14 02:03:49 +00:00
fbarchard@google.com
bd4fcb9877 Switch to 128x72 for default testing size when not benchmarking.
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/935004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@442 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-10-24 19:52:14 +00:00
fbarchard@google.com
3bb60b37fd Use width variable for all tests
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/934004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@441 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-10-24 18:31:55 +00:00
fbarchard@google.com
de07146fa4 ifdef around mips detect code
BUG=none
TEST=build on x86 linux
Review URL: https://webrtc-codereview.appspot.com/889005

git-svn-id: http://libyuv.googlecode.com/svn/trunk@421 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-10-16 08:38:44 +00:00
fbarchard@google.com
c4163acb7b Additional rotate test
BUG=none
TEST=adds new test in rotate_test
Review URL: https://webrtc-codereview.appspot.com/883004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@417 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-10-14 06:02:28 +00:00
fbarchard@google.com
7781d943b0 Disable V210 unittest that fails valgrind, and some warning fixes for android.
BUG=91
TEST=try
Review URL: https://webrtc-codereview.appspot.com/813004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@362 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-09-18 22:58:34 +00:00
fbarchard@google.com
142f6c4ed5 Move row.h to include and remove rotate_priv.h
BUG=93
TESTED=try server
Review URL: https://webrtc-codereview.appspot.com/811004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@360 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-09-18 20:56:51 +00:00
fbarchard@google.com
b0c9797589 Update Copyright notice to follow new chromium conventions.
BUG=63
TEST=none
Review URL: https://webrtc-codereview.appspot.com/730004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@314 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-08-08 19:04:24 +00:00
fbarchard@google.com
81b804e35c ARGBQuantize to do a posterizing effect. Added random resolution unittest.
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/654005

git-svn-id: http://libyuv.googlecode.com/svn/trunk@289 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-06-20 02:15:01 +00:00
fbarchard@google.com
810cd91079 ARGBUnattenuateRow_SSE2 use reciprocal table and pmul
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/497001

git-svn-id: http://libyuv.googlecode.com/svn/trunk@244 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-04-20 20:15:27 +00:00
frkoenig@google.com
c82af4a59c Order includes.
Use the following order.
local
system
libyuv
Review URL: http://webrtc-codereview.appspot.com/270007

git-svn-id: http://libyuv.googlecode.com/svn/trunk@76 16f28f9a-4ce2-e073-06de-1de4eb20be90
2011-11-11 00:54:34 +00:00
mikhal@webrtc.org
1b06484b4a libyuv: clean up:
1. Removing libyuv:: when not needed
2. Test clean-up 
Review URL: http://webrtc-codereview.appspot.com/279002

git-svn-id: http://libyuv.googlecode.com/svn/trunk@74 16f28f9a-4ce2-e073-06de-1de4eb20be90
2011-11-10 23:58:32 +00:00
frkoenig@google.com
f7e74a1a6f Move neon rotate code from straight assembly to inline.
Allow assemblers with a slightly different syntax to use
the optimized neon routines.

Removed extra constraints on the calling of the optimized
routines.  All neon routines can load unaligned and handle
odd widths.

Align allocated buffers in rotate_test.cc

Add neon rotate file to gyp file for arm targets.
Review URL: http://webrtc-codereview.appspot.com/253007

git-svn-id: http://libyuv.googlecode.com/svn/trunk@59 16f28f9a-4ce2-e073-06de-1de4eb20be90
2011-11-03 22:41:59 +00:00
frkoenig@google.com
3de12ae1c6 I420 and NV12 rotate functions.
Consolidate rotate files.  Add unit tests for I420
and NV12 rotate functions.  Fix remaining pitch/stride
references.
Review URL: http://webrtc-codereview.appspot.com/239001

git-svn-id: http://libyuv.googlecode.com/svn/trunk@32 16f28f9a-4ce2-e073-06de-1de4eb20be90
2011-10-19 17:52:15 +00:00
frkoenig@google.com
ed6edcab8b Fixed image rotators.
90, 180, 270 rotate of array with a minimum size of 8x8.
Also deinterleave on rotate for NV12/NV21 formats.
Review URL: http://webrtc-codereview.appspot.com/195002

git-svn-id: http://libyuv.googlecode.com/svn/trunk@23 16f28f9a-4ce2-e073-06de-1de4eb20be90
2011-10-12 21:37:43 +00:00