document cpuid command line behavior

cpu_info_ is zero for uninitialized state and all bits are off, disabling all cpu optimizations.
the 1 bit indicates cpu_info_ is initialized avoiding calling the detection code again for performance.

MaskCpuFlags initializes the cpu ignoring existing flags, then masks with the supplied flags and stores to cpu_info_.
As a mask, -1 has no effect, enabling all cpu features that were detected, but nothing that wasnt detected.
Setting to 0 will cause the next call to re-initialize the cpu, which is same as enabling all features.
Setting mask to 1 will turn off all cpu features but keep the initialized bit on, so the next detection call wont reinitialize and the cpu features are all disabled.

So normal behavior for command line and programatic masking is:
1 = C
-1 = SIMD

TBR=harryjin@google.com
BUG=libyuv:600
TESTED=out64/Release/bin/run_libyuv_unittest -s libyuv_unittest --verbose --release --gtest_filter=*ARGBExtractAlpha* -a "--libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=9999 --libyuv_flags=1 --libyuv_cpu_info=1"

Review URL: https://codereview.chromium.org/2042933002 .
5 files changed
tree: b9afc4382e0b00507da3c3e0fbc8b184c2e8bf56
  1. build_overrides/
  2. chromium/
  3. docs/
  4. include/
  5. source/
  6. third_party/
  7. tools/
  8. unit_test/
  9. util/
  10. .gitignore
  11. .gn
  12. all.gyp
  13. Android.mk
  14. AUTHORS
  15. BUILD.gn
  16. CMakeLists.txt
  17. codereview.settings
  18. DEPS
  19. download_vs_toolchain.py
  20. gyp_libyuv
  21. gyp_libyuv.py
  22. libyuv.gyp
  23. libyuv.gypi
  24. libyuv_nacl.gyp
  25. libyuv_test.gyp
  26. LICENSE
  27. LICENSE_THIRD_PARTY
  28. linux.mk
  29. OWNERS
  30. PATENTS
  31. PRESUBMIT.py
  32. public.mk
  33. README.chromium
  34. README.md
  35. setup_links.py
  36. sync_chromium.py
  37. 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.