NV21ToRAW and NV12ToRAW functions added

RAW is a big endian style RGB buffer with R first in memory, then G and B.
Convert NV21 and NV12 to RAW format.

Performance on SkylakeX for 720p with AVX2
I420ToRAW_Opt (388 ms)
H420ToRAW_Opt (371 ms)
NV12ToRAW_Opt (341 ms)
NV21ToRAW_Opt (339 ms)

SSSE3
I420ToRAW_Opt (507 ms)
H420ToRAW_Opt (481 ms)
NV12ToRAW_Opt (498 ms)
NV21ToRAW_Opt (493 ms)

C
I420ToRAW_Opt (2287 ms)
H420ToRAW_Opt (2246 ms)
NV12ToRAW_Opt (2191 ms)
NV21ToRAW_Opt (2204 ms)

Performance on Pixel 2 for 720p
out/Release/bin/run_libyuv_unittest -v -t 7200 --gtest_filter=*NV??ToR*Opt --libyuv_repeat=1000 --libyuv_width=1280 --libyuv_height=720
LibYUVConvertTest.NV12ToRGB24_Opt (1739 ms)
LibYUVConvertTest.NV21ToRGB24_Opt (1734 ms)
LibYUVConvertTest.NV12ToRAW_Opt (1719 ms)
LibYUVConvertTest.NV21ToRAW_Opt (1691 ms)
LibYUVConvertTest.NV12ToRGB565_Opt (2152 ms)

Bug: libyuv:778, b:117522975
Test: add new NV21ToRAW and NV12ToRAW tests
Change-Id: Ieabb68a2c6d8c26743e609c5696c81bb14fb253f
Reviewed-on: https://chromium-review.googlesource.com/c/1272615
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
5 files changed
tree: f6e0c69a91440c12b2ccb2fb4188990bfec4da81
  1. .clang-format
  2. .gitignore
  3. .gn
  4. .vpython
  5. AUTHORS
  6. Android.bp
  7. Android.mk
  8. BUILD.gn
  9. CM_linux_packages.cmake
  10. CMakeLists.txt
  11. DEPS
  12. LICENSE
  13. OWNERS
  14. PATENTS
  15. PRESUBMIT.py
  16. README.chromium
  17. README.md
  18. build_overrides/
  19. cleanup_links.py
  20. codereview.settings
  21. docs/
  22. download_vs_toolchain.py
  23. include/
  24. infra/
  25. libyuv.gni
  26. linux.mk
  27. public.mk
  28. pylintrc
  29. source/
  30. tools_libyuv/
  31. unit_test/
  32. util/
  33. winarm.mk
README.md

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 for instructions on how to get started developing.

You can also browse the docs directory for more documentation.