Frank Barchard 451af5e922 scale by 1 for neon implemented
void HalfFloat1Row_NEON(const uint16* src, uint16* dst, float, int width) {
  asm volatile (
  "1:                                          \n"
    MEMACCESS(0)
    "ld1        {v1.16b}, [%0], #16            \n"  // load 8 shorts
    "subs       %w2, %w2, #8                   \n"  // 8 pixels per loop
    "uxtl       v2.4s, v1.4h                   \n"  // 8 int's
    "uxtl2      v1.4s, v1.8h                   \n"
    "scvtf      v2.4s, v2.4s                   \n"  // 8 floats
    "scvtf      v1.4s, v1.4s                   \n"
    "fcvtn      v4.4h, v2.4s                   \n"  // 8 floatsgit
    "fcvtn2     v4.8h, v1.4s                   \n"
   MEMACCESS(1)
    "st1        {v4.16b}, [%1], #16            \n"  // store 8 shorts
    "b.gt       1b                             \n"
  : "+r"(src),    // %0
    "+r"(dst),    // %1
    "+r"(width)   // %2
  :
  : "cc", "memory", "v1", "v2", "v4"
  );
}

void HalfFloatRow_NEON(const uint16* src, uint16* dst, float scale, int width) {
  asm volatile (
  "1:                                          \n"
    MEMACCESS(0)
    "ld1        {v1.16b}, [%0], #16            \n"  // load 8 shorts
    "subs       %w2, %w2, #8                   \n"  // 8 pixels per loop
    "uxtl       v2.4s, v1.4h                   \n"  // 8 int's
    "uxtl2      v1.4s, v1.8h                   \n"
    "scvtf      v2.4s, v2.4s                   \n"  // 8 floats
    "scvtf      v1.4s, v1.4s                   \n"
    "fmul       v2.4s, v2.4s, %3.s[0]          \n"  // adjust exponent
    "fmul       v1.4s, v1.4s, %3.s[0]          \n"
    "uqshrn     v4.4h, v2.4s, #13              \n"  // isolate halffloat
    "uqshrn2    v4.8h, v1.4s, #13              \n"
   MEMACCESS(1)
    "st1        {v4.16b}, [%1], #16            \n"  // store 8 shorts
    "b.gt       1b                             \n"
  : "+r"(src),    // %0
    "+r"(dst),    // %1
    "+r"(width)   // %2
  : "w"(scale * 1.9259299444e-34f)    // %3
  : "cc", "memory", "v1", "v2", "v4"
  );
}

TEST=LibYUVPlanarTest.TestHalfFloatPlane_One
BUG=libyuv:560
R=hubbe@chromium.org

Review URL: https://codereview.chromium.org/2430313008 .
2016-10-21 14:30:03 -07:00
build_overrides Add linux_use_bundled_binutils_override = true to build_overrides. 2016-10-12 18:15:21 -07:00
chromium Enable building with Native Client. 2016-04-12 06:40:04 +02:00
docs Remove I411 support. 2016-10-11 11:14:16 -07:00
include scale by 1 for neon implemented 2016-10-21 14:30:03 -07:00
source scale by 1 for neon implemented 2016-10-21 14:30:03 -07:00
third_party/gflags Roll chromium_revision 1d144ca7f86..2a818f5413 (375480:395512) 2016-05-24 11:41:04 +02:00
tools landmine to clobber old GYP build artifacts to enable moving to GN. 2016-10-18 08:56:41 +02:00
unit_test scale by 1 for neon implemented 2016-10-21 14:30:03 -07:00
util Add f16c (halffloat) cpuid 2016-10-14 16:34:08 -07:00
.gitignore Add landmine support 2016-10-17 15:37:47 +02:00
.gn Add GN files that need exec_script to list for win64 clang-cl 2016-10-12 12:46:22 -07:00
all.gyp Android support 2013-11-21 19:57:10 +00:00
Android.mk Add MIPS SIMD Arch (MSA) optimized MirrorRow function 2016-09-22 16:12:22 -07:00
AUTHORS Adding AUTHORS file to libyuv 2011-11-01 20:44:21 +00:00
BUILD.gn HalfFloatPlane unittest for denormal half floats 2016-10-19 18:13:01 -07:00
CMakeLists.txt Add MIPS SIMD Arch (MSA) optimized MirrorRow function 2016-09-22 16:12:22 -07:00
codereview.settings Remove references to svn version control. 2016-09-14 14:54:47 -07:00
DEPS Add landmine support 2016-10-17 15:37:47 +02: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 Minor fixes to gyp_libyuv.py 2014-03-28 19:38:05 +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 fix warning on visual C for mips cpu detect 2016-09-22 18:25:52 -07:00
libyuv.gni Add MIPS SIMD Arch (MSA) optimized MirrorRow function 2016-09-22 16:12:22 -07:00
libyuv.gyp fix warning on visual C for mips cpu detect 2016-09-22 18:25:52 -07:00
libyuv.gypi Add MIPS SIMD Arch (MSA) optimized MirrorRow function 2016-09-22 16:12:22 -07:00
LICENSE Update Copyright notice to follow new chromium conventions. 2012-08-08 19:04:24 +00:00
LICENSE_THIRD_PARTY README.chromium license field for WebView and LICENSE_THIRD_PARTY to show files with special licenses. 2013-04-24 00:12:28 +00:00
linux.mk Remove -lc++ link and document -fno-exceptions 2016-07-06 16:02:17 -07:00
OWNERS Add new OWNERS and remove drover.properties. 2016-02-16 19:53:11 +01:00
PATENTS LibYuv: Adding PATENT and LICENSE files 2011-10-25 16:15:49 +00:00
PRESUBMIT.py PRESUBMIT: Remove GYP trybots 2016-10-18 07:54:36 +02:00
public.mk Android.mk moved into libyuv to central support 2012-09-19 07:27:17 +00:00
README.chromium scale by 1 for neon implemented 2016-10-21 14:30:03 -07:00
README.md Docs: Fix broken links from README.md 2016-03-15 17:38:14 -07:00
setup_links.py setup_links.py: Use junctions instead of symlinks on Windows. 2016-09-22 18:26:32 -07:00
sync_chromium.py Enable building with Native Client. 2016-04-12 06:40:04 +02: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.
  • Convert from YUV to formats for rendering/effects.
  • Rotate by 90/180/270 degrees to adjust for mobile devices in portrait mode.
  • Optimized for SSE2/SSSE3/AVX2 on x86/x64.
  • Optimized for Neon on Arm.
  • Optimized for DSP R2 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.