lint warning fixes for CpuID

The CpuId function is a wrapper for the intrinsic, or
implemented with inline if unavailable.  It had been
using uint32, but the intrinsics use int, so it was causing
casting and lint warnings.  This change makes the internal
implementation use int.

Casting was also done for xgetbv, and the cast is simply
removed, and is not causing a build error.

MipCpuCaps was doing strlen to check for white space after the
instruction set.  Arm also does this but with a hard coded offset.
This was causing a cast from size_t to int, which produced a lint
warning.  The change removes the white space detect.
In theory the code could be used to detect SSE vs SSE2, and it would
need to check SSE is followed by a space or end of line.  But this
code is only used on Arm and Mips, where there there is one form
of SIMD detected.  e.g. MSA for mips.  If a new instruction set is
added with a similar name, the write space check could be reintroduced.
But its more likely the code can be rewritten to use a better form
of detection by then. Or remove detection and require the instructions

BUG=libyuv:641
TEST=try bots build on all platforms without error and lint is clean

Change-Id: I9f55f8e57bba0f78571bdddbe63b945dea3e8809
Reviewed-on: https://chromium-review.googlesource.com/514524
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
Reviewed-by: Wan-Teh Chang <wtc@chromium.org>
6 files changed
tree: 1d7082355eef461021e0ce524e4bb2e7e1b88bc9
  1. build_overrides/
  2. docs/
  3. include/
  4. infra/
  5. source/
  6. tools_libyuv/
  7. unit_test/
  8. util/
  9. .clang-format
  10. .gitignore
  11. .gn
  12. all.gyp
  13. Android.mk
  14. AUTHORS
  15. BUILD.gn
  16. cleanup_links.py
  17. CM_linux_packages.cmake
  18. CMakeLists.txt
  19. codereview.settings
  20. DEPS
  21. download_vs_toolchain.py
  22. gyp_libyuv
  23. gyp_libyuv.py
  24. libyuv.gni
  25. libyuv.gyp
  26. libyuv.gypi
  27. libyuv_nacl.gyp
  28. libyuv_test.gyp
  29. LICENSE
  30. LICENSE_THIRD_PARTY
  31. linux.mk
  32. OWNERS
  33. PATENTS
  34. PRESUBMIT.py
  35. public.mk
  36. pylintrc
  37. README.chromium
  38. README.md
  39. 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.
  • 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.