40 Commits

Author SHA1 Message Date
Frank Barchard
a6a2ec654b Add AMXINT8 cpu detect
sde -spr -- libyuv_test -- --gunit_filter=*Cpu*
Note: Google Test filter = *Cpu*
[==========] Running 4 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 3 tests from LibYUVBaseTest
[ RUN      ] LibYUVBaseTest.TestCpuHas
Cpu Flags 0x57fff9
Has X86 0x8
Has SSE2 0x10
Has SSSE3 0x20
Has SSE41 0x40
Has SSE42 0x80
Has AVX 0x100
Has AVX2 0x200
Has ERMS 0x400
Has FMA3 0x800
Has F16C 0x1000
Has AVX512BW 0x2000
Has AVX512VL 0x4000
Has AVX512VNNI 0x8000
Has AVX512VBMI 0x10000
Has AVX512VBMI2 0x20000
Has AVX512VBITALG 0x40000
Has AVX10 0x0
HAS AVXVNNI 0x100000
Has AVXVNNIINT8 0x0
Has AMXINT8 0x400000
[       OK ] LibYUVBaseTest.TestCpuHas (34 ms)

Bug: b/324356616
Change-Id: I5129b8946363a501bdd570e6dba3936c54aacd6c
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5283433
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2024-02-15 21:44:47 +00:00
Hans Wennborg
2f2c04c157 Drop TARGET_IPHONE_SIMULATOR macro check
Recent versions of Clang always define these TARGET_ macros (to 0 or 1
as appropriate) for Apple targets.
https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5249072
made the code correctly check the *value* of the macro rather than
whether it was defined or not.

However, the code was still broken when actually targeting the iOS
simulator (where the macro is now 1).

It seems the use of this macro was just incorrect, and the code only
worked since it was never defined at all.

The original use of the macro in this file was added in
2c8108e6c2
but it 's not quite clear to me why.

All other uses have subsequently been removed, e.g. in
6a1d01220a

this removes the last instance, and should fix the iOS simulator builds.

Bug: chromium:1519899
Change-Id: Iaf44d2c37086f1153096044df5d9b61797f66a4f
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5272224
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2024-02-06 17:38:45 +00:00
Hans Wennborg
d359a9f922 Correctly check the TARGET_IPHONE_SIMULATOR macro
The macro may be defined to 0; the code needs to check the value, not
just whether it's defined.

Recent Clang versions will define all Apple "target OS" macros by
default (see bug).

Bug: chromium:1519899
Change-Id: I3d61f1b23de06d7db7db7916182a789f26345bce
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5249072
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2024-01-31 19:33:56 +00:00
Frank Barchard
610e0cdead MT2T Warning fixes for fuchsia
Bug: b/258474032, b/257266635
Change-Id: Ic5cbbc60e2e1463361e359a2fe3e97976c1ea929
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4081348
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Justin Green <greenjustin@google.com>
2022-12-06 19:54:40 +00:00
Frank Barchard
33a68ec779 JPeg decoder remove assert when out of data
Bug: b/186665202
Change-Id: I406cc2ef8cfa2cdf987d41c4bd85d3024aedfaab
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3166710
Reviewed-by: richard winterton <rrwinterton@gmail.com>
2021-09-16 23:11:14 +00:00
Frank Barchard
4205d7a6c9 Fix for jpeg to allow fuzz
Bug: None
Change-Id: I6eecef4f755ffb9e3eeee9f8ca7890b3445b14a5
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1884878
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2019-10-28 23:35:13 +00:00
Frank Barchard
f9aacffa02 Fix arm unittest failure by removing unused FloatDivToByteRow.
Apply clang-format to fix jpeg if() for lint fix.
Change comments about 4th pixel for open source compliance.
Rename UVToVU to SwapUV for consistency with MergeUV.

BUG=b/135532289, b/136515133

Change-Id: I9ce377c57b1d4d8f8b373c4cb44cd3f836300f79
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1685936
Reviewed-by: Chong Zhang <chz@google.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2019-07-02 20:00:30 +00:00
Frank Barchard
09cfb2bbd6 Update to r1732 for more robust jpeg
Includes a rounding change for neon.
BUG=b/135532289

Change-Id: I36ffb57b55db6c64804ad169def865be1ac6d66e
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1684439
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Chong Zhang <chz@google.com>
2019-07-01 22:32:36 +00:00
Frank Barchard
6630558875 10 bit YUV to 10 bit BGR
BGR variation of 10 bit conversion using swapped U and V
and mirrored matrix to produce AB30 format instead of AR30.

Bug: libyuv:777
Test: LibYUVConvertTest.H010ToAB30_Opt
Change-Id: I96d115a5d1e12138f40cb548871e03aa3ab210eb
Reviewed-on: https://chromium-review.googlesource.com/922284
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
2018-02-15 22:44:36 +00:00
Frank Barchard
8a00c2bb4d Tidy applied with all safe checks on all arm, mips and intel, 32 and 64 bit
Using clang-tidy 7.
warnings=-*,mpi-*,objc-*,llvm-*,hicpp-*,-hicpp-use-noexcept,llvm-*,-hicpp-deprecated-headers,-hicpp-use-auto,bugprone-*,cert-*,google-*,-google-readability-casting,misc-*,,-misc-unused-parameters,-misc-macro-parentheses,cppcoreguidelines-*,-cppcoreguidelines-pro-type-member-init,readability-*,-readability-non-const-parameter,-readability-implicit-bool-conversion,fuchsia-*,-fuchsia-multiple-inheritance,-android-cloexec-*

~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D__ARM_NEON__ -D__arm__   -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D__mips_msa               -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D__aarch64__              -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D_MSC_VER=1600 -D_M_IX86  -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D_MSC_VER=1600 -D_M_X64   -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D__i386__                 -D__clang__ -D__clang_major__=6 -DHAVE_JPEG
~/bin/clang-tidy -fix-errors -format-style=file -checks=$warnings $* -- -Iinclude -D__x86_64__               -D__clang__ -D__clang_major__=6 -DHAVE_JPEG

Bug: libyuv:750
Test: builds and runs and passes more tidy tests
Change-Id: Ieb0f026c5b5a1d2daf8aca18b9290927fdaaa55c
Reviewed-on: https://chromium-review.googlesource.com/907853
Reviewed-by: Weiyong Yao <braveyao@chromium.org>
2018-02-12 18:34:33 +00:00
Frank Barchard
9a765f01bc Revert "tidy applied with readability-*"
This reverts commit 7b9ff4a0355c778f2cf03bdb15029d60a1259061.

Reason for revert: ios build bots are red

Original change's description:
> tidy applied with readability-*
> 
> TBR=braveyao@chromium.org
> Bug: libyuv:750
> Test: builds and runs and passes more tidy tests
> Change-Id: I316822f7d13b370b88b92a693912e880b21f92c8
> Reviewed-on: https://chromium-review.googlesource.com/907371
> Reviewed-by: Frank Barchard <fbarchard@chromium.org>

TBR=fbarchard@chromium.org,braveyao@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: libyuv:750
Change-Id: I4a73ffee2b71664c6cb93f38f2b5d70ebd76953e
Reviewed-on: https://chromium-review.googlesource.com/912175
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-02-09 19:41:26 +00:00
Frank Barchard
7b9ff4a035 tidy applied with readability-*
TBR=braveyao@chromium.org
Bug: libyuv:750
Test: builds and runs and passes more tidy tests
Change-Id: I316822f7d13b370b88b92a693912e880b21f92c8
Reviewed-on: https://chromium-review.googlesource.com/907371
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-02-08 18:13:01 +00:00
Frank Barchard
7e389884a1 Switch to C99 types
Append _t to all sized types.
uint64 becomes uint64_t etc

Bug: libyuv:774
Test: try bots build on all platforms
Change-Id: Ide273d7f8012313d6610415d514a956d6f3a8cac
Reviewed-on: https://chromium-review.googlesource.com/879922
Reviewed-by: Miguel Casas <mcasas@chromium.org>
2018-01-23 19:16:05 +00:00
Frank Barchard
27036e33e8 Revert "include <new> header for benefit of new clang builds"
This reverts commit 1dda4cb0b7bd564e646d6ec2efee497fcd7146ca.

Reason for revert: build error on jpeg FILE

Original change's description:
> include <new> header for benefit of new clang builds
> 
> TBR=kjellander@chromium.org
> BUG=libyuv:712
> TEST=local builds still work
> 
> Change-Id: I040e8edc40aafd820d2a29629fe7aec5c049bc6b
> Reviewed-on: https://chromium-review.googlesource.com/576971
> Reviewed-by: Frank Barchard <fbarchard@google.com>
> Commit-Queue: Frank Barchard <fbarchard@google.com>

TBR=kjellander@chromium.org,fbarchard@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: libyuv:712
Change-Id: I4cf4e26eadb476017dc95e6c9578092204f088a3
Reviewed-on: https://chromium-review.googlesource.com/601211
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-08-03 22:03:47 +00:00
Frank Barchard
1dda4cb0b7 include <new> header for benefit of new clang builds
TBR=kjellander@chromium.org
BUG=libyuv:712
TEST=local builds still work

Change-Id: I040e8edc40aafd820d2a29629fe7aec5c049bc6b
Reviewed-on: https://chromium-review.googlesource.com/576971
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-07-19 17:47:31 +00:00
Frank Barchard
bbe8c233f2 scale warning fixes for unused parameters
BUG=libyuv:680
TEST=builds and runs with no warnings

Change-Id: I7d60ef44292fa6ad4f7c4e2e2657359b864d2dab
Reviewed-on: https://chromium-review.googlesource.com/442670
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
2017-02-15 21:38:59 +00:00
Frank Barchard
1d5630ba2b mjpeg_decoder - fix for unused parameter.
TBR=kjellander@chromium.org
BUG=libyuv:678
TEST=None

Change-Id: I5206de2026b56f155531a76f94aeb6cb1b0cd6c9
Reviewed-on: https://chromium-review.googlesource.com/442090
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-02-14 02:22:57 +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
36ae08ce1c Suppress MJPEG fprintf() runtime warning
TBR=harryjin@google.com
BUG=libyuv:630
TEST=local build and try bots pass

Review URL: https://codereview.chromium.org/2264293002 .
2016-08-22 16:30:36 -07:00
Frank Barchard
0bc626a5d7 nolint removed
R=harryjin@google.com
BUG=none

Review URL: https://webrtc-codereview.appspot.com/59389004.
2015-08-31 10:52:13 -07:00
fbarchard@google.com
5abb6d4556 disable stucture padded warnings on win64 builds.
BUG=432
TESTED=local win64 build
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1389 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-28 23:18:07 +00:00
fbarchard@google.com
5bd003f081 fix a lint warning about a space needed after && in ifdef
BUG=348
TESTED=cpplint.py --filter=-readability/casting source/*.cc include/libyuv/*.h
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1048 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-08-18 23:22:20 +00:00
fbarchard@google.com
8b857c0ac6 changes to accommodate libjpeg 9 interface.
BUG=327
TESTED=untested
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1004 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-05-13 19:00:01 +00:00
fbarchard@google.com
2c8108e6c2 Detect pnacl and disable x86 specific code.
BUG=none
TESTED=untested
R=ryanpetrie@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@968 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-14 00:36:31 +00:00
fbarchard@google.com
ae997018e5 Add extern c around jpeg header
BUG=305
TESTED=try bots
R=michaelbai@chromium.org

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@967 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-13 19:43:43 +00:00
fbarchard@google.com
db73518b19 use LIBYUV_BOOL instead of bool
BUG=303
TESTED=try
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@953 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-07 03:59:31 +00:00
fbarchard@google.com
a1f5254a95 Switch to c style casts for all source and includes.
BUG=303
TESTED=try
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@952 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-07 03:03:00 +00:00
fbarchard@google.com
6368c10c9c Add __declspec(safebuffers) to functions with arrays on stack that have explicit checks to avoid a redundent compiler stack check.
BUG=none
TEST=unitests pass
R=ryanpetrie@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@837 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-11-01 21:27:31 +00:00
fbarchard@google.com
15c7b2fffc Remove duplicate function
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1311006

git-svn-id: http://libyuv.googlecode.com/svn/trunk@657 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-11 20:37:10 +00:00
fbarchard@google.com
4ffd9127bd Jpeg invalid step by 2
BUG=210
TESTED=out\release\libyuv_unittest --gtest_filter=*J*
Review URL: https://webrtc-codereview.appspot.com/1276005

git-svn-id: http://libyuv.googlecode.com/svn/trunk@632 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-02 18:34:23 +00:00
fbarchard@google.com
913656a35d Valid search backwards - find EOI quicker if its there.
BUG=210
TEST=out\release\libyuv_unittest --gtest_filter=*Jpeg*
Review URL: https://webrtc-codereview.appspot.com/1271004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@627 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-03-28 21:17:25 +00:00
fbarchard@google.com
d7c7bfac57 Fix lint error in mjpeg and remove unnecessary includes.
BUG=none
TEST=try bots
Review URL: https://webrtc-codereview.appspot.com/1078005

git-svn-id: http://libyuv.googlecode.com/svn/trunk@555 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-01-28 05:08:14 +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
9e4e12352a Avoid memcpy.
BUG=176
TEST=NONE
Review URL: https://webrtc-codereview.appspot.com/1081004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@552 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-01-26 07:29:08 +00:00
fbarchard@google.com
64ce0ab544 Move Neon source to its own files.
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/860009

git-svn-id: http://libyuv.googlecode.com/svn/trunk@396 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-10-09 00:05:29 +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
133adc4647 followup cleanup for blur and make compilable with /clr
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/645007

git-svn-id: http://libyuv.googlecode.com/svn/trunk@284 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-06-12 05:46:49 +00:00
fbarchard@google.com
e2a55aff59 JPEG use new/delete instead of scoped pointer
BUG=none
TEST=jpeg still runs ok
Review URL: https://webrtc-codereview.appspot.com/456006

git-svn-id: http://libyuv.googlecode.com/svn/trunk@225 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-03-27 21:28:05 +00:00
fbarchard@google.com
2842f2536d safe for x86 and memset for arm
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/401005

git-svn-id: http://libyuv.googlecode.com/svn/trunk@183 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-02-22 18:52:29 +00:00
fbarchard@google.com
69fe6bd1ff mjpeg class for low level interface. higher level will be MJPGToI420
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/400002

git-svn-id: http://libyuv.googlecode.com/svn/trunk@177 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-02-17 19:46:26 +00:00