166 Commits

Author SHA1 Message Date
Frank Barchard
0071f46a1f Side by side 420 test
I420 output can be slow due to multi channel write.
Putting the U and V into a single side by side buffer can improve performance.

TBR=wangcheng@google.com
BUG=None

Review URL: https://codereview.chromium.org/2403223003 .
2016-10-10 19:28:33 -07:00
Frank Barchard
edd3a84d05 libyuv::YUY2ToY for isolating Y channel of YUY2.
This function is the first step of YUY2 To I420.
Provided primarily for diagnostics.

TBR=wangcheng@google.com
BUG=libyuv:647
TESTED=LibYUVConvertTest.YUY2ToY_Opt

Review URL: https://codereview.chromium.org/2399153004 .
2016-10-07 17:20:30 -07:00
Frank Barchard
17d31e6a4a NV12 allow NULL for Y
The conversion from NV12 and other Bi or Tri planar formats, differs only in the UV handling.  The helper function supports passing a NULL for the dst_y channel indicating you only want to do the UV conversion.

TBR=harryjin@google.com
TEST=LibYUVConvertTest.NV12ToI420_NullY (601 ms)
BUG=libyuv:626

Review URL: https://codereview.chromium.org/2276703002 .
2016-08-23 19:05:25 -07:00
Frank Barchard
3efba30cf0 Disable yuv3 test which fails msan
BUG=604

Review URL: https://codereview.chromium.org/2146763002 .
2016-07-12 18:48:03 -07:00
Frank Barchard
abcb70f183 Test nv21 layout of Android420ToI420 function.
to Y,U,V and a pixel stride for U and V.  The pixel stride is expected to be 1 or 2.

[ RUN      ] LibYUVConvertTest.Android420ToI420_1_Any
[       OK ] LibYUVConvertTest.Android420ToI420_1_Any (253 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_1_Unaligned
[       OK ] LibYUVConvertTest.Android420ToI420_1_Unaligned (250 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_1_Invert
[       OK ] LibYUVConvertTest.Android420ToI420_1_Invert (254 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_1_Opt
[       OK ] LibYUVConvertTest.Android420ToI420_1_Opt (247 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_2_Any
[       OK ] LibYUVConvertTest.Android420ToI420_2_Any (132 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_2_Unaligned
[       OK ] LibYUVConvertTest.Android420ToI420_2_Unaligned (122 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_2_Invert
[       OK ] LibYUVConvertTest.Android420ToI420_2_Invert (124 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_2_Opt
[       OK ] LibYUVConvertTest.Android420ToI420_2_Opt (119 ms)

TEST=LibYUVConvertTest.Android420ToI420_Opt
BUG=libyuv:604
R=braveyao@chromium.org

Review URL: https://codereview.chromium.org/2146733002 .
2016-07-12 18:34:04 -07:00
Frank Barchard
84e04699c2 Add libyuv:Android420ToI420 function which takes 3 pointers
to Y,U,V and a pixel stride for U and V.  The pixel stride is expected to be 1 or 2.

TEST=LibYUVConvertTest.Android420ToI420_Opt
BUG=libyuv:604
R=braveyao@chromium.org

Review URL: https://codereview.chromium.org/2114843002 .
2016-07-12 16:23:51 -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
085bfc1d04 Rename test from CropNV12 to NV12Crop
When scanning profiles for unexpected _C functions
this test function contained the substring.
Changing the name will simplify the search.

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

Review URL: https://codereview.chromium.org/1602363002 .
2016-01-19 16:43:51 -08:00
Frank Barchard
58cb534962 Fix memory overwrite in YUY2ToNV12 odd wdiths
When width was odd Y channel wrote an extra pixel.
This change splits the Y from UV into a temporary
buffer and memcpy's to the destination.  Performance
is slower.

Was
YUY2ToNV12_Any (307 ms)
YUY2ToNV12_Unaligned (213 ms)
TestYUY2ToNV12 (181 ms)
YUY2ToNV12_Opt (177 ms)
YUY2ToNV12_Invert (177 ms)

Npw
YUY2ToNV12_Any (300 ms)
YUY2ToNV12_Unaligned (226 ms)
YUY2ToNV12_Invert (206 ms)
TestYUY2ToNV12 (184 ms)
YUY2ToNV12_Opt (181 ms)
TBR=harryjin@google.com
BUG=libyuv:545

Review URL: https://codereview.chromium.org/1593833002 .
2016-01-19 11:28:09 -08:00
Frank Barchard
081475b3c8 refactor ARGBToI422 using ARGBToI420 internally
R=harryjin@google.com
BUG=libyuv:546

Review URL: https://codereview.chromium.org/1574253004 .
2016-01-12 17:05:49 -08:00
Frank Barchard
0e462e6f45 Remove use_sysroot=0
use_sysroot=0 is required for webrtc on linux intel builds, but
libyuv doesnt use the affected libraries, so removing this.

R=harryjin@google.com, sbc@chromium.org
BUG=libyuv:534,libyuv:542

Review URL: https://codereview.chromium.org/1566303002 .
2016-01-11 14:57:50 -08:00
Frank Barchard
8bca9fc178 remove unused var in a test
remove include from unittest.cc that is already done by unittest.h

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

Review URL: https://codereview.chromium.org/1513263004 .
2015-12-10 18:39:36 -08:00
Frank Barchard
5eefbe2330 Fix for drmemory failure on I411ToARGB
Before
I420ToARGB_Opt (594 ms)
I422ToARGB_Opt (483 ms)
I411ToARGB_Opt (748 ms) ***
I444ToARGB_Opt (452 ms)
I400ToARGB_Opt (218 ms)

After
I420ToARGB_Opt (591 ms)
I422ToARGB_Opt (454 ms)
I411ToARGB_Opt (502 ms)  ***
I444ToARGB_Opt (441 ms)
I400ToARGB_Opt (216 ms)

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

Review URL: https://codereview.chromium.org/1459513002 .
2015-11-17 18:00:52 -08:00
Frank Barchard
ec4b258d4e free src_a in unittest to fix leak
TBR=harryjin@google.com
BUG=libyuv:524

Review URL: https://codereview.chromium.org/1452083002 .
2015-11-17 00:29:53 -08:00
Frank Barchard
6100f50f13 fix yvu constants for avx2 yuv to rgb
the yvu matrix for yuv to rgb had an incorrect entry, affecting yuv to bgra,
yuv to abgr and yuv to raw.
fix the matrix and reenable avx2 functions.

R=harryjin@google.com
BUG=libyuv:522

Review URL: https://codereview.chromium.org/1411763004 .
2015-11-10 10:45:44 -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
ce4c2fad1d Raw 24 bit RGB to RGB24 (bgr)
Add unittests that do 1 step conversion vs 2 step conversion.

Tests end swapping versions match direct conversions.

R=harryjin@google.com
BUG=libyuv:518

Review URL: https://codereview.chromium.org/1419103007 .
2015-11-03 10:30:30 -08:00
Frank Barchard
2c7aa0070a remove I422ToBGRA and use I422ToRGBA internally
Removes low levels for I420ToBGRA and I420ToRAW and reimplements them as I420ToRGBA and I420ToRGB24 with transposed color matrix.

Adds unittests that do 1 step conversion vs 2 steps to test end swapping versions match direct conversions.

R=harryjin@google.com
BUG=libyuv:518

Review URL: https://codereview.chromium.org/1427993004 .
2015-11-02 10:24:12 -08:00
Frank Barchard
e8ee175549 add unittest that compares ABGR to ARGB
TBR=harryjin@google.com
BUG=libyuv:515

Review URL: https://codereview.chromium.org/1423663007 .
2015-10-26 17:51:03 -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
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
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
f00bc9ef46 Add J444ToARGB conversion function.
J444 is JPeg YUV color space with 444 subsampling.
This implementation uses the existing I444ToARGB conversion, which is
BT.601 color space with 444 subsampling, but passing in the jpeg
color matrix constants.

TBR=harryjin@google.com
BUG=449

Review URL: https://codereview.chromium.org/1387313002 .
2015-10-06 18:46:53 -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
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
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
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
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
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
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
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
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
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
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
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
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
0887315390 Remove bayer format support from libyuv. This format is very rare and used on legacy hardware. Its not well optimized and has bugs related to odd widths. Removing the format will allow tests to pass under more circumstances, run faster and allow focus on higher priority quality and performance issues.
BUG=301
TESTED=local unittests build/pass on windows gyp build.
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1270 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-09 19:58:19 +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
3982998c7c YToARGB AVX2 port from SSE2
BUG=393
TESTED=YToARGB unittest
R=brucedawson@google.com, harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1258 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-03 01:35:11 +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
c61394789d Test for YToARGB to ensure ordering of values.
BUG=393
TESTED=TestYToARGB
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1256 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-02 18:51:29 +00:00
fbarchard@google.com
a5a15198b4 Add J422 support which is 2x1 subsampling with jpeg color space.
BUG=391
TESTED=color_test
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1228 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-14 19:16:01 +00:00
fbarchard@google.com
e0a2472fb3 Move color space tests into its own source file.
BUG=391
TESTED=TestI420
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1227 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-13 23:47:25 +00:00
fbarchard@google.com
69df62234b Test J420 conversion to and from ARGB has low absolute difference.
BUG=none
TESTED=TestJ420
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1225 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-13 19:53:15 +00:00
fbarchard@google.com
cb96f37afa Convert to and from J420 to test absolute conversion error.
BUG=241
TESTED=TestJ420
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1224 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-13 18:58:17 +00:00
fbarchard@google.com
40e3457574 J420ToARGB jpeg variation of YUV color space to ARGB.
BUG=241
TESTED=J420ToARGB unittest
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1212 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-12-29 19:17:53 +00:00
fbarchard@google.com
d3bc010367 Use expect near to see exact values for differences.
BUG=269
TESTED=local unittest
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1204 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-12-15 22:48:32 +00:00
fbarchard@google.com
7866d8e082 Make unittest check every pixel and report the first failure.
BUG=269
TESTED=unittest passes on windows
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1203 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-12-15 19:51:50 +00:00
fbarchard@google.com
9107460c7f Offset destination by 1 for I420ToARGB_Unaligned test to ensure destination alignment avoids exceptions.
BUG=372
TESTED=out\release_x64\libyuv_unittest --gtest_catch_exceptions=0 --gtest_filter=*I420ToARGB_Unaligned
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1125 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-10-17 01:18:02 +00:00
ashok.bhat@gmail.com
147bbede9d Row AArch64 Neon implementation - Part 8
BUG=319
TESTED=libyuv_unittest
R=fbarchard@google.com

Change-Id: If30eb2d255a09dece9d216a9d29317dd748ef496
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1109 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-10-03 18:10:05 +00:00
fbarchard@google.com
77564a9323 valgrind fix to CropNV12 unittest. round crop amount to multiple of 2 so UV will be an even number.
BUG=350
TESTED=drmemory out\debug\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_filter=*CropNV12
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1050 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-08-19 18:32:03 +00:00
fbarchard@google.com
455c66b437 Add a gyp define LIBYUV_DISABLE_JPEG to not build jpeg library
BUG=346
TESTED=set GYP_DEFINES=target_arch=ia32 libyuv_disable_jpeg=1 & python gyp_libyuv -fninja -G msvs_version=2010 libyuv_test.gyp
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1038 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-07-28 21:48:43 +00:00
fbarchard@google.com
9f12361e39 redo nv12 crop unittest with expect eq
BUG=334
TESTED=crop
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1037 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-07-18 22:34:04 +00:00
fbarchard@google.com
74ce999a9a Add NV12 cropping unittest to confirm behavior.
BUG=344
TESTED=libyuv_unittest --gtest_filter=*CropNV12
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1036 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-07-18 18:18:35 +00:00
fbarchard@google.com
193c1ff11d test conversions that are reversible.
BUG=334
TESTED=unittests added to test functionality that is reversible.
R=sandersd@chromium.org

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1009 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-06-04 23:19:37 +00:00
fbarchard@google.com
16ea9c816b libyuv::MJPGToI420() and libyuv::MJPGToARGB() return failure if callback to JPeg fails.
BUG=309
TESTED=try bots still pass
R=braveyao@webrtc.org

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@976 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-28 03:08:59 +00:00
fbarchard@google.com
4752dc5949 Clear destinations to different values to detect returning with error code rather than doing the conversion.
BUG=296
TESTED=convert_unittest
R=johannkoenig@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@923 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-26 23:09:57 +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
339ce58196 Aligned buffer sizes for subsampled Bayer formats.
BUG=289
TEST=drmemory

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@888 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-03 11:30:57 +00:00
fbarchard@google.com
04f40278df yasm ALIGN uppercase
BUG=none
TEST=untested
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@885 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-03 00:51:14 +00:00
fbarchard@google.com
545a51c1d3 use scale for subsampling to handle odd source width to even destination width.
BUG=289
TEST=drmemory
R=nfullagar@google.com, ryanpetrie@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@884 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-03 00:27:29 +00:00
fbarchard@google.com
0e82bd7e9f respect subsample in planar unittest
BUG=289
TESTED=drmemory on YUY2ToI420_Opt with odd width
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@881 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-02 18:03:42 +00:00
fbarchard@google.com
88ce3c0caa Change unittests to pass when size is 1 tall.
BUG=202
TEST=set LIBYUV_HEIGHT=1 & out\release\libyuv_unittest
R=ryanpetrie@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@811 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-10-14 19:36:26 +00:00
fbarchard@google.com
47e856c632 Make I411ToARGB read 2 bytes to avoid overread.
BUG=262
TESTED=I411ToARGB
R=kjellander@webrtc.org

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@799 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-09-24 10:07:16 +00:00
fbarchard@google.com
07c3fe2f61 Fix DrMemory errors in unittests that were not initializing memory.
BUG=263
TEST=set GYP_DEFINES=build_for_tool=drmemory target_arch=ia32 & drmemory out\debug\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_filter=*
R=kjellander@webrtc.org

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@798 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-09-24 07:39:10 +00:00
fbarchard@google.com
2b115a5237 Remove cruft.
BUG=208
TEST=lint

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@665 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-15 20:06:52 +00:00
fbarchard@google.com
4127a2637d ARGBInterpolate odd width support and inverted odd width test. ARGBToNV12/21 odd height fix. Compare test tolerate small height with warning.
BUG=202
TEST=libyuvTest.ARGBInterpolate85_Any_Invert
Review URL: https://webrtc-codereview.appspot.com/1325004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@663 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-15 10:43:33 +00:00
fbarchard@google.com
c297d103f1 I420ToARGB for Haswell.
BUG=216
TEST=I420ToARGB
Review URL: https://webrtc-codereview.appspot.com/1314004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@660 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-12 07:26:24 +00:00
fbarchard@google.com
050b39a5cb Recomputed JPeg coefficients normalized to 128. Apply to ARGBGray function reusing YJ function/coefficients and rounding.
BUG=201
TESTED=Gray unittest improved
Review URL: https://webrtc-codereview.appspot.com/1269006

git-svn-id: http://libyuv.googlecode.com/svn/trunk@629 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-01 20:07:14 +00:00
fbarchard@google.com
b36eeee87b Validate MJPG test performance.
BUG=210
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1268004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@626 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-28 20:34:57 +00:00
fbarchard@google.com
4e0d7cc2c6 Y coefficients for J420 need to be scaled by 255/219 to full range.
BUG=159
TESTED=out\release\libyuv_unittest --gtest_filter=*J*
Review URL: https://webrtc-codereview.appspot.com/1264004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@624 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-27 07:35:03 +00:00
fbarchard@google.com
cfaa66c041 ARGBToJ420 and ARGBToJ400 - Full range YUV Jpeg style.
BUG=159
TEST=*J4*
Review URL: https://webrtc-codereview.appspot.com/1243004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@622 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-26 09:14:46 +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
53c4fb4a75 fix odd width unittesting by rounding up to next subsample size.
BUG=198
TEST=set LIBYUV_WIDTH=31 and run unittest
Review URL: https://webrtc-codereview.appspot.com/1192004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@603 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-13 00:57:01 +00:00
fbarchard@google.com
a00da62e52 Add I422Copy and I444Copy
BUG=none
TEST=I422ToI422 and I444ToI444
Review URL: https://webrtc-codereview.appspot.com/1103009

git-svn-id: http://libyuv.googlecode.com/svn/trunk@570 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-02-11 22:00:24 +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
9780dd4e81 Remove V210. Quality of this code is insufficient for libyuv. Unable to make V210 pass valgrind. Would require effort to add missing support and optimization.
BUG=91
TEST=valgrind
Review URL: https://webrtc-codereview.appspot.com/1021009

git-svn-id: http://libyuv.googlecode.com/svn/trunk@536 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-01-11 23:42:00 +00:00
fbarchard@google.com
734787584d I420ToV210 unittest enable
BUG=91
TEST=valgrind on unittests
Review URL: https://webrtc-codereview.appspot.com/1029009

git-svn-id: http://libyuv.googlecode.com/svn/trunk@535 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-01-11 19:41:40 +00:00
fbarchard@google.com
1d160cb99f Attenuate AGRB pixels NEON optimized
BUG=164
TEST=./libyuv_unittest --gtest_filter=*Atten*
Review URL: https://webrtc-codereview.appspot.com/937031

git-svn-id: http://libyuv.googlecode.com/svn/trunk@506 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-28 20:02:55 +00:00
fbarchard@google.com
dd3b137f5d ARGBBlend unaligned unittest
BUG=160
TEST=libyuvTest.ARGBBlend_Unaligned
Review URL: https://webrtc-codereview.appspot.com/935019

git-svn-id: http://libyuv.googlecode.com/svn/trunk@498 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-20 19:30:04 +00:00
fbarchard@google.com
752cb9e057 Some minor fixes for yuy2, r12 register, mask on any function.
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/936023

git-svn-id: http://libyuv.googlecode.com/svn/trunk@489 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-14 05:46:56 +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
e0b63e44e0 hook for cygwin and relax argbtoyuy2 for unittest flakey fail
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/966016

git-svn-id: http://libyuv.googlecode.com/svn/trunk@483 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-13 10:12:28 +00:00
fbarchard@google.com
522d757c92 Neon optimized ARGBToI444/422/411/420 Any variations, ARGB1555ToI420 Neon, ARGB4444ToI420
BUG=148
TEST=sudo LIBYUV_REPEAT=1000 nice --5 ./libyuv_unittest --gtest_filter=*R*ToI4* | sed 's/\(.*(\)\([0-9]*\)\( ms)\)/\2 - \1\2\3/g' | sort -rn | grep ms
Review URL: https://webrtc-codereview.appspot.com/936020

git-svn-id: http://libyuv.googlecode.com/svn/trunk@480 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-09 23:14:57 +00:00
fbarchard@google.com
f1daa3db65 Neon RGB To I420
BUG=none
TEST=convert_test
Review URL: https://webrtc-codereview.appspot.com/936015

git-svn-id: http://libyuv.googlecode.com/svn/trunk@479 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-07 08:27:24 +00:00
fbarchard@google.com
dd2d512e5a 420 subsampler
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/935012

git-svn-id: http://libyuv.googlecode.com/svn/trunk@478 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-07 00:53:52 +00:00
fbarchard@google.com
76e851792c 411 subsampled
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/930013

git-svn-id: http://libyuv.googlecode.com/svn/trunk@477 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-06 22:51:39 +00:00
fbarchard@google.com
bdf7cb5914 RGB formats converted to YUV with Neon
BUG=none
TEST=convert_test
Review URL: https://webrtc-codereview.appspot.com/936013

git-svn-id: http://libyuv.googlecode.com/svn/trunk@471 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-05 23:40:11 +00:00
fbarchard@google.com
30859f75f2 Neon YToARGB and fix SSE2 to match C version
BUG=none
TEST=YToARGB_Opt
Review URL: https://webrtc-codereview.appspot.com/966007

git-svn-id: http://libyuv.googlecode.com/svn/trunk@466 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-02 09:51:29 +00:00