Frank Barchard 196e2e72a3 Revert "Allow negative height when ConvertToI420/ARGB is called with NV12/NV21"
This reverts commit a8aa921c4614f9d6a0e8f3459648ca1ae75cdbe6.

Reason for revert: breaks a webrtc unittest on Windows.

https://bugs.chromium.org/p/webrtc/issues/detail?id=9263&can=2&start=0&num=100&q=&colspec=ID%20Pri%20M%20ReleaseBlock%20Component%20Status%20Owner%20Summary&groupby=&sort=

Original change's description:
> Allow negative height when ConvertToI420/ARGB is called with NV12/NV21
> 
> ConvertToI420 and ConvertToARGB support the use of a negative height
> parameter to flip the image vertically. When converting from NV12 or
> NV21 this parameter was misinterpreted, resulting in invalid output.
> This CL introduces the use of abs_src_height to correctly calculate
> the location of the source UV plane.
> 
> The sign of crop_height is not used, to reduce confusion ConvertToI420
> and ConvertToARGB no longer accept negative crop height.
> 
> Unit tests for Android420ToI420 are updated to fix miscalculation of
> src_stride_uv, fix incorrect pixel strides, and to test inversion.
> New unit tests are included to test inversion for ConvertToARGB,
> ConvertToI420, Android420ToARGB, and Android420ToABGR.
> For consistency the test NV12Crop is renamed ConvertToI420_NV12_Crop.
> 
> Bug: libyuv:446
> Test: out/Release/libyuv_unittest --gtest_filter=*.ConvertTo*:*.Android420To*
> Change-Id: Idc98e62671cb30272cfa7e24fafbc8b73712f7c6
> Reviewed-on: https://chromium-review.googlesource.com/994074
> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
> Reviewed-by: Frank Barchard <fbarchard@chromium.org>

TBR=fbarchard@chromium.org,robert@bares.me

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

Bug: libyuv:446, chromium:9263, libyuv:801
Change-Id: I7c55b3fcb477f9754c249b9c2c54b24da2c29283
Reviewed-on: https://chromium-review.googlesource.com/1081267
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Weiyong Yao <braveyao@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-06-01 00:19:40 +00:00
build_overrides Make libyuv use the hermetic xcode toolchain. 2018-03-20 08:28:33 +00:00
docs Disable AVX512 for iOS simulator xcode 9 builds. 2018-04-03 18:45:14 +00:00
include ARGBExtractAlphaRow_Any_AVX2 fix pixel count mask 2018-05-11 07:13:58 +00:00
infra/config Remove Rietveld CQ config. 2017-10-12 06:43:30 +00:00
source Revert "Allow negative height when ConvertToI420/ARGB is called with NV12/NV21" 2018-06-01 00:19:40 +00:00
tools_libyuv Skip cipd dependencies when autorolling. 2018-04-18 18:37:26 +00:00
unit_test Revert "Allow negative height when ConvertToI420/ARGB is called with NV12/NV21" 2018-06-01 00:19:40 +00:00
util tidy applied with all cppcoreguidelines and google 2018-02-07 02:28:25 +00:00
.clang-format clang-format libyuv 2016-11-07 17:37:23 -08:00
.gitignore Rename convert to yuvconvert to avoid name clash with linux util 2017-04-06 18:58:42 +00:00
.gn Make libyuv use the hermetic xcode toolchain. 2018-03-20 08:28:33 +00:00
.vpython Add psutil to vpython dependencies (used on builder bots) 2017-09-07 07:21:25 +00:00
all.gyp Android support 2013-11-21 19:57:10 +00:00
Android.bp AVX512 VMBI version of ARGBToRGB24 2018-03-10 02:04:48 +00:00
Android.mk Remove Mips DSPR2 code 2017-12-14 18:22:16 +00:00
AUTHORS Revert "Allow negative height when ConvertToI420/ARGB is called with NV12/NV21" 2018-06-01 00:19:40 +00:00
BUILD.gn Revert "Revert "Fixing libyuv gn check."" 2018-02-12 19:36:52 +00:00
cleanup_links.py Use DEPS for all dependencies + add PRESUBMIT.py 2017-02-03 11:36:53 +00:00
CM_linux_packages.cmake Add installer builds to cmake for linux 2017-01-26 23:05:17 +00:00
CMakeLists.txt Make the gflags library optional in the CMake build 2018-03-31 00:40:15 +00:00
codereview.settings Make Gerrit the default for libyuv code reviews 2017-01-24 18:34:48 +00:00
DEPS Make libyuv use the hermetic xcode toolchain. 2018-03-20 08:28:33 +00:00
download_vs_toolchain.py Roll chromium_revision 260824:262938 + fix binutils. Since it's not possible to have platform-specific hooks executing, binutils must be downloaded for all platforms in order for the download.py hook to execute properly on non-unix platforms. 2014-04-11 23:40:41 +00:00
gyp_libyuv Skip running GYP if GYP_CHROMIUM_NO_ACTION is set in environment 2016-04-08 14:01:29 +02:00
gyp_libyuv.py Use DEPS for all dependencies + add PRESUBMIT.py 2017-02-03 11:36:53 +00:00
libyuv_nacl.gyp NaCl/GYP: remove references to prep_toolchain from libyuv. prep_toolchain is now a no-op. 2015-04-22 17:42:21 +00:00
libyuv_test.gyp Remove Mips DSPR2 code 2017-12-14 18:22:16 +00:00
libyuv.gni Add MIPS SIMD Arch (MSA) optimized MirrorRow function 2016-09-22 16:12:22 -07:00
libyuv.gyp Remove Mips DSPR2 code 2017-12-14 18:22:16 +00:00
libyuv.gypi Remove Mips DSPR2 code 2017-12-14 18:22:16 +00:00
LICENSE Update Copyright notice to follow new chromium conventions. 2012-08-08 19:04:24 +00:00
linux.mk update linux makefile with mips/msa files 2018-04-13 18:58:52 +00:00
OWNERS Remove kjellander@ and torbjorng@ from OWNERS. 2017-09-26 18:48:09 +00:00
PATENTS LibYuv: Adding PATENT and LICENSE files 2011-10-25 16:15:49 +00:00
PRESUBMIT.py Use DEPS for all dependencies + add PRESUBMIT.py 2017-02-03 11:36:53 +00:00
public.mk Android.mk moved into libyuv to central support 2012-09-19 07:27:17 +00:00
pylintrc Use DEPS for all dependencies + add PRESUBMIT.py 2017-02-03 11:36:53 +00:00
README.chromium ARGBExtractAlphaRow_Any_AVX2 fix pixel count mask 2018-05-11 07:13:58 +00:00
README.md Remove Mips DSPR2 code 2017-12-14 18:22:16 +00:00
winarm.mk Adds files and functions for rotate any, but does not hook them up to the caller. 2015-07-27 10:32:08 -07:00

libyuv is an open source project that includes YUV scaling and conversion functionality.

  • Scale YUV to prepare content for compression, with point, bilinear or box filter.
  • Convert to YUV from webcam formats for compression.
  • Convert to RGB formats for rendering/effects.
  • Rotate by 90/180/270 degrees to adjust for mobile devices in portrait mode.
  • Optimized for SSSE3/AVX2 on x86/x64.
  • Optimized for Neon on Arm.
  • Optimized for MSA on Mips.

Development

See [Getting started] 1 for instructions on how to get started developing.

You can also browse the [docs directory] 2 for more documentation.