372 Commits

Author SHA1 Message Date
Frank Barchard
ef09d53f61 Remove redundent rounding test from scale.
There is still a rounding test in color test.

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

Review URL: https://codereview.chromium.org/1347893003 .
2015-09-16 17:54:41 -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
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
4dfdabb552 I420AlphaToABGR for android version of yuva conversion
Same as I420AlphaToARGB but first step converts to ABGR instead of ARGB.

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

Review URL: https://webrtc-codereview.appspot.com/52779004.
2015-08-20 19:36:59 -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
8e7a62f22a I420AlphaToARGB conversion for planar YUV with Alpha to ARGB.
R=brucedawson@chromium.org, harryjin@google.com
BUG=libyuv:473

Review URL: https://webrtc-codereview.appspot.com/54829004.
2015-08-12 17:01:24 -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
f242a4a1a1 ValidateJpeg check for valid pointer and size
R=harryjin@google.com
BUG=chromium:497297

Review URL: https://webrtc-codereview.appspot.com/57649004.
2015-07-30 15:49:48 -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
f5c71e52bb rowbytes fix for nv12 tests
R=harryjin@google.com
BUG=libyuv:466

Review URL: https://webrtc-codereview.appspot.com/50349004.
2015-07-21 10:48:10 -07:00
Frank Barchard
ce98129951 yuy2tonv12
R=bcornell@google.com
BUG=libyuv:466

Review URL: https://webrtc-codereview.appspot.com/51309004.
2015-07-17 16:22:59 -07:00
Frank Barchard
faa4b14f85 uyvy to nv12
R=harryjin@google.com
BUG=libyuv:466

Review URL: https://webrtc-codereview.appspot.com/50339004.
2015-07-17 14:43:19 -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
5edb101088 disable version which fails under git
R=harryjin@google.com, harryjin
BUG=none

Review URL: https://webrtc-codereview.appspot.com/52739004.
2015-06-16 10:02:41 -07:00
fbarchard@google.com
d880a90eca make randomize take 64 bit count to allow larger images to be tested
BUG=none
TESTED=untested

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1429 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-06-09 01:55:01 +00:00
fbarchard@google.com
05416e2d9a Box filter for YUV use rows with accumulation buffer for better memory behavior. The old code would do columns accumulated into registers, and then store the result once. This was slow from a memory point of view. The new code does a row of source at a time, updating an accumulation buffer every row. The accumulation buffer is small, and should fit cache. Before each accumulation of N rows, the buffer needs to be reset to zero. If the memset is a bottleneck, it would be faster to do the first row without an add, storing to the accumulation buffer, and then add for the remaining rows.
BUG=425
TESTED=out\release\libyuv_unittest --gtest_filter=*ScaleTo1x1*
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1428 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-06-09 01:05:18 +00: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
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
d3d8e0d933 make source for planar tests contiguous to test planar functions coalesce into a single low level call.
BUG=431
TESTED=SetPlane unittest
R=bcornell@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1419 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-06-01 23:28:59 +00:00
fbarchard@google.com
00c0141f30 Add scale color test place holder source
BUG=401
TESTED=untested

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1418 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-06-01 23:27:07 +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
80be2468b0 add test for box filter before improving odd width.
BUG=431
TESTED=ARGBScaleDownBy4_Box

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1411 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-05-22 23:32:20 +00:00
fbarchard@google.com
e52b9c3405 make box filter upsampler consider a pixel width of less than 1 to be 1. This makes it behave as a point sampler.
BUG=428
TESTED=set LIBYUV_WIDTH=1900 && out\release\libyuv_unittest.exe
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1372 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-16 21:02:16 +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
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
d28cd77f99 Enable assembly for clangcl build on Windows. Previously assembly was disabled so clangcl would work, but only with C code. As clangcl mimics both Visual C and GCC, ifdefs need to pick one or the other or often you'll end up with both. In this CL we disable most Visual C code and use the GCC versions which allow assembly for both 32 and 64 bit intel.
BUG=412
TESTED=clang=1 build on windows
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1341 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-19 20:36:31 +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
24152b2435 Dither from I420 to RGB565 in 2 steps - I420ToARGB then ARGBToRGB565.
BUG=407
TESTED=untested
R=brucedawson@google.com, tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1315 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-10 01:45:04 +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
fbarchard@google.com
bdeb9ac584 switch from 8x8 to 4x4 matrix for dithering
BUG=407
TESTED=Dither unittests
R=brucedawson@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1310 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-06 18:28:00 +00:00
fbarchard@google.com
0fe4abbc5c ARGBToRGB565 AVX2 with dithering
BUG=407
TESTED=ARGBToRGB565Dither unittest
R=brucedawson@google.com, harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1309 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-04 22:31:43 +00:00
fbarchard@google.com
933bd40c3c port ARGBToRGB565 and ARGB1555 to AVX2. Enable functions that use ARGBToRGB565 AVX2 code. Add ARGBToRGB565Dither function.
BUG=403
TESTED=local windows build
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1302 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-27 21:15:28 +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
194f740d0e Scan from start of buffer to handle case where an invalid size was passed.
BUG=404
TESTED=libyuvTest.ValidateJpegLarge
R=brucedawson@google.com, harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1285 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-18 01:57:31 +00:00
fbarchard@google.com
a965a97d8e Unittest to test ValidateJpeg when jpeg is small but buffer is large
BUG=404
TESTED=libyuvTest.ValidateJpegLarge
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1284 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-17 19:16:14 +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
5ab38f9258 Remove Q420 fourcc support.
BUG=396
TESTED=local build of unittest builds and passes
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1278 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-11 18:20:54 +00:00
fbarchard@google.com
738dfa0307 Support odd widths for NV12 format when cropping vertically.
BUG=400
TESTED=CropNV12
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1272 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-10 02:18:38 +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