24 Commits

Author SHA1 Message Date
Frank Barchard
94af5319f4 Remove M420 and refactor NV12ToI420
M420 is a row biplanar variation of NV12 supported on Microsoft webcams.
The code was hardcoded to bt.601 and should be jpeg, but the format is
very old and rare.  Is a variation on NV12, so if someone needs it, it
can be re-implemented easily.

Bug: libyuv:858
Change-Id: I246167dba3c190cc76af741b8e91e58e68fde28f
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2212608
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2020-05-26 18:48:00 +00:00
Frank Barchard
4d67b3e851 Add H420 and H422 to ConvertToARGB()
H420/H422 are bt.720 variants

TBR=braveyao@chromium.org
BUG=libyuv:799
TESTED=try bots tested build on all platforms

Change-Id: I007d8981d91ca0748c59403759109bbcd88f286c
Reviewed-on: https://chromium-review.googlesource.com/1115719
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-06-26 22:52:42 +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
26173eb73e H010ToAR30 for 10 bit bt.709 YUV to 30 bit RGB
This version of the H010ToAR30 provides a 3 step conversion
Convert16To8Row_AVX2
H420ToARGB_AVX2
ARGBToAR30_AVX2

Low level function added to convert 16 bit to 8 bit using multiply
to adjust 10 bit or other bit depths and then save the upper 16 bits.

Bug: libyuv:751
Test: LibYUVPlanarTest.Convert16To8Row_Opt unittest added
Change-Id: I9cc576fda8afa1003cb961d03e0e656e0b478f03
Reviewed-on: https://chromium-review.googlesource.com/783554
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: richard winterton <rrwinterton@gmail.com>
2017-11-22 23:58:30 +00:00
Frank Barchard
19a126ddfa Add AR30 fourcc unittest
Bug: libyuv:749
Test: LibYUVBaseTest.TestFourCC
Change-Id: Iec378947248840c7e2cd87b1198503f39e7c7258
Reviewed-on: https://chromium-review.googlesource.com/780619
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2017-11-20 23:52:01 +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
198bce3959 Cast for clang-cl 64 bit build warnings in unittests
R=kjellander@chromium.org
BUG=libyuv:649

Review URL: https://codereview.chromium.org/2414763002 .
2016-10-12 13:09:57 -07:00
Frank Barchard
d363ea6527 Remove I411 support.
YUV 411 is very uncommon format.  Remove support.

Update documentation to reflect that 411 is deprecated.

Simplify tests for YUV to only test with the new side by side YUV but keep old 3 plane test around with a macro for now.

BUG=libyuv:645
R=kjellander@chromium.org

Review URL: https://codereview.chromium.org/2406123002 .
2016-10-11 11:14:16 -07:00
Niels Möller
365ed3851c Treat YU12 as an alias for I420. Simplify setting of inv_crop_height.
BUG=
R=fbarchard@google.com

Review URL: https://codereview.chromium.org/2020193002 .
2016-06-16 12:49:17 +02: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
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
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
dd49958058 Only do 1x1 work around for large source
BUG=302
TESTED=hammer effects

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@949 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-03 08:42:55 +00:00
fbarchard@google.com
277378723a Add little endian 555/565 kCMPixelFormat's to alias list
BUG=none
TESTED=unittests added
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@939 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-02 20:31:40 +00:00
fbarchard@google.com
d1206caefa Apple uses 'BGRA' to mean 'ARGB', so map this on Apple machines.
BUG=229
TESTED=untested
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@934 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-31 19:01:14 +00:00
fbarchard@google.com
031f05fd00 Add OSX fourcc for 32 and 24 bit big endian formats, using by camtwist
BUG=229
TEST=untested
Review URL: https://webrtc-codereview.appspot.com/1506004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@698 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-19 18:32:45 +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
d0780dde6e More fourcc testing
BUG=170
TEST=libyuvTest.TestFourCC and TestCanonicalFourCC
Review URL: https://webrtc-codereview.appspot.com/991006

git-svn-id: http://libyuv.googlecode.com/svn/trunk@522 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-12-18 18:33:16 +00:00
fbarchard@google.com
442b0ad0ac Call CanonicalCode in convert functions and add unittest for function.
BUG=none
TEST=video_common_test added
Review URL: https://webrtc-codereview.appspot.com/1001007

git-svn-id: http://libyuv.googlecode.com/svn/trunk@521 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-12-18 17:23:15 +00:00