Frank Barchard
7bffe5e1c5
lint warning fixes for CpuID
...
The CpuId function is a wrapper for the intrinsic, or
implemented with inline if unavailable. It had been
using uint32, but the intrinsics use int, so it was causing
casting and lint warnings. This change makes the internal
implementation use int.
Casting was also done for xgetbv, and the cast is simply
removed, and is not causing a build error.
MipCpuCaps was doing strlen to check for white space after the
instruction set. Arm also does this but with a hard coded offset.
This was causing a cast from size_t to int, which produced a lint
warning. The change removes the white space detect.
In theory the code could be used to detect SSE vs SSE2, and it would
need to check SSE is followed by a space or end of line. But this
code is only used on Arm and Mips, where there there is one form
of SIMD detected. e.g. MSA for mips. If a new instruction set is
added with a similar name, the write space check could be reintroduced.
But its more likely the code can be rewritten to use a better form
of detection by then. Or remove detection and require the instructions
BUG=libyuv:641
TEST=try bots build on all platforms without error and lint is clean
Change-Id: I9f55f8e57bba0f78571bdddbe63b945dea3e8809
Reviewed-on: https://chromium-review.googlesource.com/514524
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
Reviewed-by: Wan-Teh Chang <wtc@chromium.org>
2017-05-25 22:00:17 +00:00
Frank Barchard
78ef440a1f
Rename convert to yuvconvert to avoid name clash with linux util
...
Bug: libyuv:695
Test: untested
Change-Id: Ib088fd16fd00bbc50868ea330b2a544e29a3385c
Reviewed-on: https://chromium-review.googlesource.com/469077
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-04-06 18:58:42 +00:00
Frank Barchard
73a603e120
clang-format 5.0 applied to libyuv
...
BUG=None
TEST=try bots and lint test
Change-Id: I1ab462adf2d309117862c5eb4b244a61ae202951
Reviewed-on: https://chromium-review.googlesource.com/450658
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
2017-03-08 18:50:12 +00:00
Frank Barchard
136aa9d37c
any11p fix for buffer overrun
...
BUG=libyuv:686
TESTED=untested
Change-Id: Idfae93349dd78b1b633a596631e5397e11b77d0b
Reviewed-on: https://chromium-review.googlesource.com/448320
Reviewed-by: Frank Barchard <fbarchard@google.com>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-03-03 19:57:35 +00:00
Henrik Kjellander
f49fde796f
Use DEPS for all dependencies + add PRESUBMIT.py
...
This changes libyuv to use the DEPS file for pulling
down all dependencies (thus no Chromium checkout is needed any more).
Add tools_libyuv directory to contain libyuv-specific tools
(needed to avoid name collision with the now DEPSed tools/ directory
of Chromium, which is needed by the toolchain).
Add tools_libyuv/autoroller/roll_deps.py script to automatically
roll all entries in the DEPS file (copied from WebRTC).
third_party/ is now DEPSed as well, including the gtest configuration
headers that used to live inside the libyuv repo.
Add PRESUBMIT.py with a few simple checks + execution of PyLint and
Python unit tests. For PyLint a pylintrc file was also added.
Valgrind in tools_libyuv/valgrind was updated to make PRESUBMIT.py pass
and remove old tsan suppressions (not used).
Removed util/android/test_runner.py since it's no longer needed.
Buildbot changes in https://chromium-review.googlesource.com/436464
are needed for the Memcheck bot to go green.
BUG=libyuv:676
NOTRY=True
Change-Id: Ib86fea2905a1656bba2933703ce5a59d29d8db6b
Reviewed-on: https://chromium-review.googlesource.com/436264
Commit-Queue: Henrik Kjellander <kjellander@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-02-03 11:36:53 +00:00
Frank Barchard
000d2fa91a
Libyuv MIPS DSPR2 optimizations.
...
Optimized functions:
I444ToARGBRow_DSPR2
I422ToARGB4444Row_DSPR2
I422ToARGB1555Row_DSPR2
NV12ToARGBRow_DSPR2
BGRAToUVRow_DSPR2
BGRAToYRow_DSPR2
ABGRToUVRow_DSPR2
ARGBToYRow_DSPR2
ABGRToYRow_DSPR2
RGBAToUVRow_DSPR2
RGBAToYRow_DSPR2
ARGBToUVRow_DSPR2
RGB24ToARGBRow_DSPR2
RAWToARGBRow_DSPR2
RGB565ToARGBRow_DSPR2
ARGB1555ToARGBRow_DSPR2
ARGB4444ToARGBRow_DSPR2
ScaleAddRow_DSPR2
Bug-fixes in functions:
ScaleRowDown2_DSPR2
ScaleRowDown4_DSPR2
BUG=
Review-Url: https://codereview.chromium.org/2626123003 .
2017-01-11 12:19:13 -08: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
fdcf524aac
Add f16c (halffloat) cpuid
...
R=wangcheng@google.com , hubbe@chromium.org
BUG=libyuv:560
Review URL: https://codereview.chromium.org/2418763006 .
2016-10-14 16:34:08 -07:00
Frank Barchard
bcd823805c
remove guard nolints from all headers
...
Remove NOLINT from guards
TEST=git cl lint
BUG=libyuv:634
Review URL: https://codereview.chromium.org/2374653002 .
2016-09-26 18:02:09 -07:00
Frank Barchard
0d880e5bc0
rename MIPS_DSPR2 to DSPR2 for consistency
...
When attempting to normalize function names to end in Row_SIMD it was made
harder with MIPS_DSPR2 naming convention.
Other CPUs do not include the vendor. This should be named consistently.
Removed the DISABLE_MIPS in favour of DISABLE_ASM for consistency with other
processors.
TBR=harryjin@google.com
BUG=libyuv:562
Review URL: https://codereview.chromium.org/1677633002 .
2016-02-05 14:49:54 -08:00
Frank Barchard
ab9a42d982
cpuid tool fix - remove mipsdsp and add avx3
...
TBR=harryjin@google.com
BUG=none
Review URL: https://codereview.chromium.org/1412373006 .
2015-11-03 19:04:36 -08:00
Frank Barchard
be4d445e8c
Add libyuv_unittest_apk target to run tests on Android
...
Roll chromium_revision bfea27a..bb79186 (340499:353481) in DEPS.
Changes: bfea27a..bb79186
To get the Android dependencies, you need to have
target_os = ["android"];
added to the end of your .gclient file (after the solution specs)
+ re-run gclient sync.
You'll also need to run: build/install-android-sdks.sh
Then build and run the test with something like this:
GYP_CROSSCOMPILE=1 GYP_DEFINES="OS=android component=static_library target_arch=arm" ./gyp_libyuv
ninja -C out/Release libyuv_unittest_apk
util/android/test_runner.py gtest -s libyuv_unittest --verbose --release
R=fbarchard@chromium.org
Review URL: https://codereview.chromium.org/1398383003 .
2015-10-12 16:29:14 -07:00
fbarchard@google.com
1be66a7970
psnr tool, work around for ios 64 bit compiler where int passed into assembly needs to be explicitely cast to 'w' register.
...
BUG=437
TESTED=untested
R=bcornell@google.com
Review URL: https://webrtc-codereview.appspot.com/53389004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1403 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-05-05 23:40:03 +00:00
fbarchard@google.com
df90670aa5
clangcl build fix for __cpuid in psnr util. Since clangcl provides the intrinsic thru its Visual C emulation, don't duplicately define the function with an inline version, which is normally needed for gcc/clang.
...
BUG=412
TESTED=set GYP_DEFINES=clang=1 & gyp_libyuv -fninja libyuv_test.gyp
R=brucedawson@google.com
Review URL: https://webrtc-codereview.appspot.com/40339004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1331 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-16 19:56:41 +00:00
fbarchard@google.com
ef1a68ed8d
Remove nacl macro from 64 bit psnr
...
BUG=none
TESTED=try bots
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/32629004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1190 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-12-04 00:01:19 +00:00
fbarchard@google.com
14b46c15a2
psnr utility aarch64 bit version to fix build error on ios and optimize for 64 bit.
...
BUG=383
TESTED=try bots
R=johannkoenig@google.com
Review URL: https://webrtc-codereview.appspot.com/30349004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1189 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-12-03 19:45:20 +00:00
fbarchard@google.com
ac4f03880c
Show jpeg as an option for psnr tool if enabled
...
BUG=339
TESTED=psnr
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/20809005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1026 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-07-01 21:49:40 +00:00
fbarchard@google.com
40b21e20d1
lint fixes for psnr
...
BUG=339
TESTED=lint
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/14789004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1024 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-06-26 22:47:01 +00:00
fbarchard@google.com
b7d674e305
jpeg psnr avoid duplicates with libyuv by checking HAVE_JPEG
...
BUG=339
TESTED=local psnr test
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/15949004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1023 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-06-26 21:55:38 +00:00
fbarchard@google.com
44e049b307
move Calc functions for psnr into header to avoid duplicate links.
...
BUG=339
TESTED=gyp build
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/16769004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1022 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-06-26 17:59:19 +00:00
fbarchard@google.com
f939fb7661
psnr tool accept jpeg files as well as raw YUV
...
BUG=339
TESTED=psnr.exe feet.jpg bluechicken.jpg
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/12839006
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1021 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-06-25 16:54:20 +00:00
fbarchard@google.com
e35422d94b
Fix AVX2 detect and a performance stall for gcc/clang.
...
BUG=276
TEST=Cpu unittest
R=nfullagar@google.com , ryanpetrie@google.com
Review URL: https://webrtc-codereview.appspot.com/2401004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@817 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-10-21 18:10:59 +00:00
fbarchard@google.com
2bbb64df2c
FMA3 version of Polynomial
...
BUG=265
TEST=cpuid and Polynomial unittest
R=changjun.yang@intel.com
Review URL: https://webrtc-codereview.appspot.com/2217004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@790 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-09-16 16:42:19 +00:00
fbarchard@google.com
6da76f3b34
AVX version of Polynomial
...
BUG=265
TEST=untested
R=thorcarpenter@google.com , yunqingwang@google.com
Review URL: https://webrtc-codereview.appspot.com/2166004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@780 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-09-07 07:05:06 +00:00
fbarchard@google.com
ff0db0ea86
change tile size for convert util and unittest to 32x32 which would lend itself to AVX2 or VP9
...
BUG=none
TEST=none
R=dingkai@google.com
Review URL: https://webrtc-codereview.appspot.com/1667004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@726 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-06-13 23:18:08 +00:00
fbarchard@google.com
d36d2606fc
Add -attenuate option to convert util
...
BUG=246
TEST=convert on an unattenuated image
R=johannkoenig@google.com
Review URL: https://webrtc-codereview.appspot.com/1640005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@723 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-06-10 21:16:31 +00:00
fbarchard@google.com
884a939665
Remove blank line from psnr
...
BUG=none
TEST=none
R=dingkai@google.com
Review URL: https://webrtc-codereview.appspot.com/1624004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@719 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-06-06 18:48:33 +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
eed4149e10
gcc msys compile ifdefs avoid Visual C inline
...
BUG=243
TEST=local compile with gcc
R=jkoleszar@google.com
Review URL: https://webrtc-codereview.appspot.com/1613004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@717 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-06-04 17:58:57 +00:00
fbarchard@google.com
235011272a
Fix warning on Windows about conversion from int to bool in convert util
...
BUG=none
TEST=none
R=ryanpetrie@google.com
Review URL: https://webrtc-codereview.appspot.com/1579004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@702 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-28 18:53:47 +00:00
fbarchard@google.com
7a1eb83e1b
convert YUV to YUV with scaling
...
BUG=none
TEST=convert util with YUV source
R=ryanpetrie@google.com
Review URL: https://webrtc-codereview.appspot.com/1513004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@700 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-24 19:12:11 +00:00
fbarchard@google.com
927eb2c1f6
scale argb clip
...
BUG=226
TESTED=libyuv scale unittests
Review URL: https://webrtc-codereview.appspot.com/1470004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@694 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-15 18:44:12 +00:00
fbarchard@google.com
6a34ee200e
Test DJB2 hash with half the buffer same.
...
BUG=none
TEST=libyuvTest.BenchmakDjb2_Test
Review URL: https://webrtc-codereview.appspot.com/1446004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@689 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-08 23:05:08 +00:00
fbarchard@google.com
1a8c791611
Only define SSE2 if necessary
...
BUG=224
TEST=compile with gcc 4.8 on msys
Review URL: https://webrtc-codereview.appspot.com/1411004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@684 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-06 08:51:56 +00:00
fbarchard@google.com
b432b7da2d
Fix for clobber registers on SumSquareError_SSE2 used for PSNR
...
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1410004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@683 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-06 05:36:58 +00:00
fbarchard@google.com
95c29d53f2
Accept negative values to mirror
...
BUG=220
TEST=out\Debug\convert.exe faces_1280x720_ARGB.raw -s 1280 -720 faces_640x360_P420.yuv
Review URL: https://webrtc-codereview.appspot.com/1376004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@681 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-30 21:37:14 +00:00
fbarchard@google.com
0f726731d4
Fix cpuid to be C89 compatible again.
...
BUG=none
TEST=compilte as C
Review URL: https://webrtc-codereview.appspot.com/1335005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@669 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-18 22:16:52 +00:00
fbarchard@google.com
955fc26988
Cleaner cpuid util
...
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1330004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@668 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-18 20:27:45 +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
461767d6d5
Bilinear upsample
...
BUG=208
TEST=out\release\libyuv_unittest --gtest_filter=*ARGBScale*640*
Review URL: https://webrtc-codereview.appspot.com/1303006
git-svn-id: http://libyuv.googlecode.com/svn/trunk@664 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-15 18:32:45 +00:00
fbarchard@google.com
3075ac4187
convert do scaling
...
BUG=217
TEST=convert.exe faces_1280x720_ARGB.raw faces_1920x1080_P420.yuv
Review URL: https://webrtc-codereview.appspot.com/1315004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@659 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-12 07:25:40 +00:00
fbarchard@google.com
492768cbca
isolate jpeg to convert_jpeg and call from convert_to_i420
...
BUG=212
TESTED=manually tested
Review URL: https://webrtc-codereview.appspot.com/1309004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@653 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-09 23:00:56 +00:00
fbarchard@google.com
40f9cd0e97
psnr tool accept files names with _1280x720 as well as .1280x720. And odd widths.
...
BUG=none
TEST=psnr faces_1280x720_P420.yuv faces_c_1280x720_P420.yuv
Review URL: https://webrtc-codereview.appspot.com/1304007
git-svn-id: http://libyuv.googlecode.com/svn/trunk@652 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-09 20:57:34 +00:00
fbarchard@google.com
474e0f058f
Convert util
...
BUG=209
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1299006
git-svn-id: http://libyuv.googlecode.com/svn/trunk@651 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-09 20:55:05 +00:00
fbarchard@google.com
42a90ac3cf
PSNR makefile change
...
BUG=204
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1269010
git-svn-id: http://libyuv.googlecode.com/svn/trunk@637 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-03 20:30:23 +00:00
fbarchard@google.com
8c9de166a1
ERMS
...
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1265004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@625 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-28 09:33:26 +00:00
fbarchard@google.com
d8431003bb
movbe remove - not useful so far.
...
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1255004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@623 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-26 18:04:02 +00:00
fbarchard@google.com
036d06c5c5
psnr tool - disable -t if openmp not enabled
...
BUG=204
TESTED=psnr ?
Review URL: https://webrtc-codereview.appspot.com/1254004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@621 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-26 09:06:32 +00:00
fbarchard@google.com
33d34eaad8
C header compatible
...
BUG=207
TEST=created .c file that includes libyuv.h
Review URL: https://webrtc-codereview.appspot.com/1228004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@617 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-22 08:40:40 +00:00
fbarchard@google.com
597900a7ec
_CRT_SECURE_NO_WARNINGS fix for windows
...
BUG=204
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1227004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@616 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-22 06:57:44 +00:00