mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-10-29 02:17:13 +08:00
Implement Qualcomm Hexagon Vector Extensions (HVX) 128-byte SIMD optimizations and runtime CPU detection for Hexagon DSP targets: - CPU detection: Add kCpuHasHexagon and kCpuHasHVX flags, LIBYUV_DISABLE_HVX environment variable support, and Hexagon unit_test mmap/munmap shims. - Rotate/Transpose (rotate_hvx.cc): Implement TransposeWxH_HVX, TransposeUVWxH_HVX, TransposeWxH_16_HVX, and TransposeWxH_32_HVX using power-of-2 vdeal/vshuff butterfly networks. - Compare (compare_hvx.cc): Implement HammingDistance_HVX, SumSquareError_HVX, HashDjb2_HVX, and Ssim4x4Row_HVX. - Scale (scale_hvx.cc): Implement 16 scale row kernels including ScaleAddRow_HVX, ScaleRowDown2*_HVX (8-bit and 16-bit), ScaleRowDown4*_HVX, ScaleARGBRowDown2*_HVX, and ScaleUVRowDown2*_HVX. - Row functions (row_hvx.cc): Implement 58 row kernels covering copy/set/mirror, split/merge, 8/16-bit conversions, YUV-to-ARGB, ARGB-to-YUV, ARGB channel swizzles, blend, attenuate, and interpolate using hardware-predicated partial loads/stores. R=rrwinterton@gmail.com Bug: None Test: libyuv_unittest on Hexagon v81 simulator and Snapdragon 8 Elite Change-Id: Ib6713de51f6246d95e58c95e629ff03f18e3b91e Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8604586 Reviewed-by: richard winterton <rrwinterton@gmail.com>
118 lines
3.4 KiB
Makefile
118 lines
3.4 KiB
Makefile
# This is the Android makefile for libyuv for NDK.
|
|
|
|
# Ignore this file during non-NDK builds.
|
|
ifdef NDK_ROOT
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_CPP_EXTENSION := .cc
|
|
|
|
LOCAL_SRC_FILES := \
|
|
source/compare.cc \
|
|
source/compare_common.cc \
|
|
source/compare_gcc.cc \
|
|
source/compare_hvx.cc \
|
|
source/compare_neon.cc \
|
|
source/compare_neon64.cc \
|
|
source/compare_win.cc \
|
|
source/convert.cc \
|
|
source/convert_argb.cc \
|
|
source/convert_from.cc \
|
|
source/convert_from_argb.cc \
|
|
source/convert_to_argb.cc \
|
|
source/convert_to_i420.cc \
|
|
source/cpu_id.cc \
|
|
source/planar_functions.cc \
|
|
source/rotate.cc \
|
|
source/rotate_any.cc \
|
|
source/rotate_argb.cc \
|
|
source/rotate_common.cc \
|
|
source/rotate_gcc.cc \
|
|
source/rotate_hvx.cc \
|
|
source/rotate_neon.cc \
|
|
source/rotate_neon64.cc \
|
|
source/rotate_rvv.cc \
|
|
source/rotate_win.cc \
|
|
source/row_any.cc \
|
|
source/row_common.cc \
|
|
source/row_gcc.cc \
|
|
source/row_hvx.cc \
|
|
source/row_neon.cc \
|
|
source/row_neon64.cc \
|
|
source/row_rvv.cc \
|
|
source/row_win.cc \
|
|
source/scale.cc \
|
|
source/scale_any.cc \
|
|
source/scale_argb.cc \
|
|
source/scale_common.cc \
|
|
source/scale_gcc.cc \
|
|
source/scale_hvx.cc \
|
|
source/scale_neon.cc \
|
|
source/scale_neon64.cc \
|
|
source/scale_rgb.cc \
|
|
source/scale_rvv.cc \
|
|
source/scale_uv.cc \
|
|
source/scale_win.cc \
|
|
source/video_common.cc
|
|
|
|
common_CFLAGS := -Wall -fexceptions
|
|
ifneq ($(LIBYUV_DISABLE_JPEG), "yes")
|
|
LOCAL_SRC_FILES += \
|
|
source/convert_jpeg.cc \
|
|
source/mjpeg_decoder.cc \
|
|
source/mjpeg_validate.cc
|
|
common_CFLAGS += -DHAVE_JPEG
|
|
LOCAL_SHARED_LIBRARIES := libjpeg
|
|
endif
|
|
|
|
LOCAL_CFLAGS += $(common_CFLAGS)
|
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
|
|
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
|
|
|
|
LOCAL_MODULE := libyuv_static
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libyuv_static
|
|
LOCAL_MODULE := libyuv
|
|
ifneq ($(LIBYUV_DISABLE_JPEG), "yes")
|
|
LOCAL_SHARED_LIBRARIES := libjpeg
|
|
endif
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
include $(CLEAR_VARS)
|
|
LOCAL_STATIC_LIBRARIES := libyuv_static
|
|
LOCAL_SHARED_LIBRARIES := libjpeg
|
|
LOCAL_MODULE_TAGS := tests
|
|
LOCAL_CPP_EXTENSION := .cc
|
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
|
|
LOCAL_SRC_FILES := \
|
|
unit_test/basictypes_test.cc \
|
|
unit_test/color_test.cc \
|
|
unit_test/compare_test.cc \
|
|
unit_test/convert_argb_test.cc \
|
|
unit_test/convert_test.cc \
|
|
unit_test/cpu_test.cc \
|
|
unit_test/cpu_thread_test.cc \
|
|
unit_test/math_test.cc \
|
|
unit_test/planar_test.cc \
|
|
unit_test/rotate_argb_test.cc \
|
|
unit_test/rotate_test.cc \
|
|
unit_test/scale_argb_test.cc \
|
|
unit_test/scale_plane_test.cc \
|
|
unit_test/scale_rgb_test.cc \
|
|
unit_test/scale_test.cc \
|
|
unit_test/scale_uv_test.cc \
|
|
unit_test/unit_test.cc \
|
|
unit_test/video_common_test.cc
|
|
|
|
LOCAL_MODULE := libyuv_unittest
|
|
include $(BUILD_NATIVE_TEST)
|
|
endif # NDK_ROOT
|