diff options
Diffstat (limited to 'third_party/aom/aom_ports')
-rw-r--r-- | third_party/aom/aom_ports/aom_ports.cmake | 10 | ||||
-rw-r--r-- | third_party/aom/aom_ports/mem.h | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/third_party/aom/aom_ports/aom_ports.cmake b/third_party/aom/aom_ports/aom_ports.cmake index 922691ed1..e1ffb56f5 100644 --- a/third_party/aom/aom_ports/aom_ports.cmake +++ b/third_party/aom/aom_ports/aom_ports.cmake @@ -22,16 +22,16 @@ set(AOM_PORTS_INCLUDES "${AOM_ROOT}/aom_ports/msvc.h" "${AOM_ROOT}/aom_ports/system_state.h") +set(AOM_PORTS_ASM_X86 "${AOM_ROOT}/aom_ports/emms.asm") + set(AOM_PORTS_INCLUDES_X86 "${AOM_ROOT}/aom_ports/x86_abi_support.asm") -set(AOM_PORTS_ASM_MMX "${AOM_ROOT}/aom_ports/emms.asm") - set(AOM_PORTS_SOURCES_ARM "${AOM_ROOT}/aom_ports/arm.h" "${AOM_ROOT}/aom_ports/arm_cpudetect.c") -# For arm targets and targets where HAVE_MMX is true: +# For arm and x86 targets: # Creates the aom_ports build target, adds the includes in aom_ports to the # target, and makes libaom depend on it. # Otherwise: @@ -39,8 +39,8 @@ set(AOM_PORTS_SOURCES_ARM # For all target platforms: # The libaom target must exist before this function is called. function (setup_aom_ports_targets) - if (HAVE_MMX) - add_asm_library("aom_ports" "AOM_PORTS_ASM_MMX" "aom") + if ("${AOM_TARGET_CPU}" MATCHES "^x86") + add_asm_library("aom_ports" "AOM_PORTS_ASM_X86" "aom") set(aom_ports_has_symbols 1) elseif ("${AOM_TARGET_CPU}" MATCHES "arm") add_library(aom_ports OBJECT ${AOM_PORTS_SOURCES_ARM}) diff --git a/third_party/aom/aom_ports/mem.h b/third_party/aom/aom_ports/mem.h index bd881cdc8..500e397c6 100644 --- a/third_party/aom/aom_ports/mem.h +++ b/third_party/aom/aom_ports/mem.h @@ -54,12 +54,14 @@ (((value) < 0) ? -ROUND_POWER_OF_TWO_64(-(value), (n)) \ : ROUND_POWER_OF_TWO_64((value), (n))) +/* shift right or left depending on sign of n */ +#define RIGHT_SIGNED_SHIFT(value, n) \ + ((n) < 0 ? ((value) << (-(n))) : ((value) >> (n))) + #define ALIGN_POWER_OF_TWO(value, n) \ (((value) + ((1 << (n)) - 1)) & ~((1 << (n)) - 1)) #define CONVERT_TO_SHORTPTR(x) ((uint16_t *)(((uintptr_t)(x)) << 1)) -#if CONFIG_HIGHBITDEPTH #define CONVERT_TO_BYTEPTR(x) ((uint8_t *)(((uintptr_t)(x)) >> 1)) -#endif // CONFIG_HIGHBITDEPTH #endif // AOM_PORTS_MEM_H_ |