PV_CFLAGS += -Werror
endif
ifeq ($(TARGET_ARCH),arm)
- ifeq ($(TARGET_ARCH_VERSION),armv4t)
- PV_CFLAGS += -DPV_ARM_GCC_V4
+ PV_CFLAGS += -DPV_COMPILER=1
+ ifeq ($(TARGET_ARCH_VERSION),armv7)
+ GLOBAL_CPU_ARCH_VERSION :=7
+ else ifeq ($(TARGET_ARCH_VERSION),armv7-a)
+ GLOBAL_CPU_ARCH_VERSION :=7
+ else ifeq ($(TARGET_ARCH_VERSION),armv7-r)
+ GLOBAL_CPU_ARCH_VERSION :=7
+ else ifeq ($(TARGET_ARCH_VERSION),armv7-m)
+ GLOBAL_CPU_ARCH_VERSION :=7
+ else ifeq ($(TARGET_ARCH_VERSION),armv6)
+ GLOBAL_CPU_ARCH_VERSION :=6
+ else ifeq ($(TARGET_ARCH_VERSION),armv6j)
+ GLOBAL_CPU_ARCH_VERSION :=6
+ else ifeq ($(TARGET_ARCH_VERSION),armv6t2)
+ GLOBAL_CPU_ARCH_VERSION :=6
+ else ifeq ($(TARGET_ARCH_VERSION),armv6z)
+ GLOBAL_CPU_ARCH_VERSION :=6
+ else ifeq ($(TARGET_ARCH_VERSION),armv6zk)
+ GLOBAL_CPU_ARCH_VERSION :=6
+ else ifeq ($(TARGET_ARCH_VERSION),armv6-m)
+ GLOBAL_CPU_ARCH_VERSION :=6
+ else ifeq ($(TARGET_ARCH_VERSION),armv5e)
+ GLOBAL_CPU_ARCH_VERSION :=5
+ else ifeq ($(TARGET_ARCH_VERSION),armv5te)
+ GLOBAL_CPU_ARCH_VERSION :=5
else
- PV_CFLAGS += -DPV_ARM_GCC_V5
+ GLOBAL_CPU_ARCH_VERSION :=5
endif
endif
LOCAL_MODULE := libpvgendatastruct
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmediadatastruct
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmimeutils
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvthreadmessaging
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libthreadsafe_callback_ao
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpv_aac_dec
-LOCAL_CFLAGS := -DAAC_PLUS -DHQ_SBR -DPARAMETRICSTEREO $(PV_CFLAGS)
+LOCAL_CFLAGS := -DAAC_PLUS -DHQ_SBR -DPARAMETRICSTEREO -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "fxp_mul32.h"
#include "aac_mem_funcs.h"
+
/*----------------------------------------------------------------------------
; MACROS
; Define module specific macros here
; Include all pre-processor statements here. Include conditional
; compile variables also.
----------------------------------------------------------------------------*/
-
-
-#if defined (PV_ARM_V5)
-
-
-__inline Int16 sat1(Int32 y)
-{
- __asm
- {
- qdadd y, y, y
- mov y, y, asr #16
- }
-
- return((Int16)y);
-}
-
-#define saturate2( a, b, c, d) *c = sat1( a); \
- *d = sat1( b); \
- c += 2; \
- d -= 2;
-
-
-#elif defined (PV_ARM_V4)
-
-
-__inline Int16 sat(Int32 y)
-{
- Int32 x;
- Int32 z = 31; /* rvct compiler problem */
- __asm
- {
- sub y, y, y, asr 2
- mov y, y, asr N
- mov x, y, asr #15
- teq x, y, asr z
- eorne y, INT16_MAX, y, asr #31
- }
-
- return((Int16)y);
-}
-
-#define saturate2( a, b, c, d) *c = sat( a); \
- *d = sat( b); \
- c += 2; \
- d -= 2;
-
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
__inline Int16 sat(Int32 y)
{
d -= 2;
-#elif defined(PV_ARM_MSC_EVC_V5)
-
-#include "armintr.h"
-
-#define saturate2( a, b, c, d) *c = _DAddSatInt( a, a)>>16; \
- *d = _DAddSatInt( b, b)>>16; \
- c += 2; \
- d -= 2;
-
#else
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* abs(x) ^ (1/3) is multiplied by the signed input value.
*/
-
-
-#if ( defined(_ARM) || defined(_ARM_V4))
-
-/*
- * Absolute value for 16 bit-numbers
- */
-__inline Int32 abs2(Int32 x)
-{
- Int32 z;
- /*
- z = x - (x<0);
- x = z ^ sign(z)
- */
- __asm
- {
- sub z, x, x, lsr #31
- eor x, z, z, asr #31
- }
- return (x);
-}
-
-
-#define pv_abs(x) abs2(x)
-
-
-#elif (defined(PV_ARM_GCC_V5)||defined(PV_ARM_GCC_V4))
-
+#if ((PV_CPU_ARCH_VERSION >=4) && (PV_COMPILER == EPV_ARM_GNUC))
/*
* Absolute value for 16 bit-numbers
*/
Int32 mult_high;
-#if ( defined(_ARM) || defined(_ARM_V4))
-
- {
- Int32 *temp;
- Int32 R12, R11, R10, R9;
-
- deltaOneThird = sizeof(Int32) * sfbWidth;
- temp = coef;
-
- // from standard library call for __rt_memset
- __asm
- {
- MOV R12, #0x0
- MOV R11, #0x0
- MOV R10, #0x0
- MOV R9, #0x0
- SUBS deltaOneThird, deltaOneThird, #0x20
-loop:
- STMCSIA temp!, {R12, R11, R10, R9}
- STMCSIA temp!, {R12, R11, R10, R9}
- SUBCSS deltaOneThird, deltaOneThird, #0x20
- BCS loop
-
- MOVS deltaOneThird, deltaOneThird, LSL #28
- STMCSIA temp!, {R12, R11, R10, R9}
- STMMIIA temp!, {R12, R11}
- }
- }
-
-#else
pv_memset(coef, 0, sizeof(Int32) * sfbWidth);
-#endif
if (maxInput > 0)
{
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
------------------------------------------------------------------------------
*/
-
#ifndef FXP_MUL32
#define FXP_MUL32
-#if defined(PV_ARM_V5)
-
-#include "fxp_mul32_arm_v5.h"
-
-#elif defined(PV_ARM_V4)
-
-#include "fxp_mul32_arm_v4.h"
-
-#elif defined(PV_ARM_MSC_EVC_V4)
-
-#include "fxp_mul32_c_msc_evc.h"
-
-#elif defined(PV_ARM_MSC_EVC_V5)
-
-#include "fxp_mul32_c_msc_evc_armv5.h"
-
-#elif defined(PV_ARM_GCC_V5)
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
+#if ((PV_COMPILER == EPV_ARM_GNUC) && (PV_CPU_ARCH_VERSION >=5))
#include "fxp_mul32_arm_gcc.h"
-#elif defined(PV_ARM_GCC_V4)
-
-#include "fxp_mul32_arm_v4_gcc.h"
-
-#else
+#else/*#else for PV__PROCESSOR__PENTIUM*/
#ifndef C_EQUIVALENT
#define C_EQUIVALENT
-#endif
+#endif/*#endif for C_EQUIVALENT*/
#include "fxp_mul32_c_equivalent.h"
-#endif
-
+#endif/*#endif for PV__PROCESSOR__PENTIUM*/
#endif /* FXP_MUL32 */
-
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef FXP_MUL32_ARM_GCC
#define FXP_MUL32_ARM_GCC
-
#ifdef __cplusplus
extern "C"
{
#include "pv_audio_type_defs.h"
-#if (defined (PV_ARM_GCC_V4) || defined(PV_ARM_GCC_V5)) /* ARM GNU COMPILER */
-
-
#define preload_cache( a)
return (result64_hi);
}
-#endif
-
#ifdef __cplusplus
}
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "pv_audio_type_defs.h"
-
-#if defined (PV_ARM_GCC_V4) /* ARM_V4 GNU COMPILER */
-
-
#define preload_cache( a)
return (result64_hi);
}
-#endif
#ifdef __cplusplus
}
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/*----------------------------------------------------------------------------
; INCLUDES
----------------------------------------------------------------------------*/
-
#include "pv_audio_type_defs.h"
#include "pv_normalize.h"
+
/*----------------------------------------------------------------------------
; MACROS
; Define module specific macros here
; FUNCTION CODE
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5)
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && ((PV_COMPILER == EPV_ARM_RVCT) || (PV_COMPILER == EPV_ARM_GNUC)))
/* function is inlined in header file */
-
-
#else
Int pv_normalize(Int32 x)
#endif
+
+
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; DEFINES AND SIMPLE TYPEDEF'S
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5)
-
-__inline Int pv_normalize(Int32 x)
-{
- Int32 y;
- __asm
- {
- clz y, x;
- sub y, y, #1
- }
- return (y);
-}
-
-
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
__inline Int pv_normalize(Int32 x)
{
extern "C"
{
#endif
-
+ /*C Equivalent code*/
Int pv_normalize(Int32 x);
-
#ifdef __cplusplus
}
#endif
#endif
-
#endif /* PV_NORMALIZE_H */
#include "fxp_mul32.h"
-
/*----------------------------------------------------------------------------
; MACROS
; limit(x) saturates any number that exceeds a 16-bit representation into a
#define ROUNDING_SCALED (ROUNDING<<(16 - SCALING))
-#if defined(PV_ARM_V5)
-
-
-__inline Int16 sat(Int32 y)
-{
- Int32 x;
- Int32 z;
- __asm
- {
- mov x, ROUNDING_SCALED
- mov y, y, lsl #(15-SCALING)
- qdadd z, x, y
- mov y, z, lsr #16
- }
- return((Int16)y);
-}
-
-#define limiter( y, x) y = sat(x);
-
-
-#elif defined(PV_ARM_MSC_EVC_V5)
-
-
-#define limiter( y, x) z = x<< (15-SCALING); \
- y = _DAddSatInt( ROUNDING_SCALED, z)>>16;
-
-
-#else
#define limiter( y, x) z = ((x + ROUNDING )>>SCALING); \
if ((z>>15) != (z>>31)) \
} \
y = (Int16)(z);
-#endif
/*----------------------------------------------------------------------------
Int i;
Int wnd;
-#if !(defined(PV_ARM_V5))
+#if !((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_RVCT))
Int32 z;
#endif
Int i;
Int wnd;
-#if !(defined(PV_ARM_V5))
+#if !((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_RVCT))
Int32 z;
#endif
Int16 *pFreqInfo;
#define LOWER_5_BITS_MASK 0x1F
-#if ( defined(PV_ARM_V5) || defined(PV_ARM_V4))
-
-__inline Int32 abs1(Int32 x)
-{
- Int32 z;
- /*
- z = x - (x<0);
- x = z ^ sign(z)
- */
- __asm
- {
- sub z, x, x, lsr #31
- eor x, z, z, asr #31
- }
- return (x);
-}
-
-#define pv_abs(x) abs1(x)
-
-
-#else
#define pv_abs(x) ((x) > 0)? (x) : (-x)
-#endif
---------------------------------------------------------------------------*/
const Int div_mod[18] = /* mod index Q-format */
-{
- /* ----------------------- */
- 0xCC, /* | | 0 | */
- 0xCC, /* | | 1 | */
- 0xCC, /* | | 2 | */
- 2731, /* | 3 | 3 | 13 */
- 0xCC, /* | | 4 | */
- 0xCC, /* | | 5 | */
- 0xCC, /* | | 6 | */
- 0xCC, /* | | 7 | */
- 1025, /* | 8 | 8 | 13 */
- 911, /* | 9 | 9 | 13 */
- 0xCC, /* | | 10 | */
- 0xCC, /* | | 11 | */
- 0xCC, /* | | 12 | */
- 631, /* | 13 | 13 | 13 */
- 0xCC, /* | | 14 | */
- 0xCC, /* | | 15 | */
- 0xCC, /* | | 16 | */
- 482, /* | 17 | 17 | 13 */
-};
+ {
+ /* ----------------------- */
+ 0xCC, /* | | 0 | */
+ 0xCC, /* | | 1 | */
+ 0xCC, /* | | 2 | */
+ 2731, /* | 3 | 3 | 13 */
+ 0xCC, /* | | 4 | */
+ 0xCC, /* | | 5 | */
+ 0xCC, /* | | 6 | */
+ 0xCC, /* | | 7 | */
+ 1025, /* | 8 | 8 | 13 */
+ 911, /* | 9 | 9 | 13 */
+ 0xCC, /* | | 10 | */
+ 0xCC, /* | | 11 | */
+ 0xCC, /* | | 12 | */
+ 631, /* | 13 | 13 | 13 */
+ 0xCC, /* | | 14 | */
+ 0xCC, /* | | 15 | */
+ 0xCC, /* | | 16 | */
+ 482, /* | 17 | 17 | 13 */
+ };
/*----------------------------------------------------------------------------
; EXTERNAL FUNCTION REFERENCES
LOCAL_MODULE := libgetactualaacconfig
-LOCAL_CFLAGS := -DAAC_PLUS -DHQ_SBR -DPARAMETRICSTEREO $(PV_CFLAGS)
+LOCAL_CFLAGS := -DAAC_PLUS -DHQ_SBR -DPARAMETRICSTEREO -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpv_amr_nb_common_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
----------------------------------------------------------------------------*/
#include "basicop_malloc.h"
-#if defined(PV_ARM_V5)
-#include "basic_op_arm_v5.h"
-
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
#include "basic_op_arm_gcc_v5.h"
#else
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; GLOBAL FUNCTION DEFINITIONS
; Function Prototype declaration
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5) /* Instructions for ARM Assembly on ADS*/
-
- __inline Word32 L_add(register Word32 L_var1, register Word32 L_var2, Flag *pOverflow)
- {
- Word32 result;
-
- OSCL_UNUSED_ARG(pOverflow);
- __asm
- {
- QADD result, L_var1, L_var2
- }
- return(result);
- }
-
-#elif defined(PV_ARM_GCC_V5) /* Instructions for ARM-linux cross-compiler*/
-
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* Instructions for ARM-linux cross-compiler*/
__inline Word32 L_add(register Word32 L_var1, register Word32 L_var2, Flag *pOverflow)
{
register Word32 ra = L_var1;
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; GLOBAL FUNCTION DEFINITIONS
; Function Prototype declaration
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5) /* Instructions for ARM Assembly on ADS*/
-
- __inline Word32 L_mac(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
- {
- Word32 result;
- Word32 L_sum;
-
- OSCL_UNUSED_ARG(pOverflow);
-
- __asm {SMULBB result, var1, var2}
- __asm {QDADD L_sum, L_var3, result}
- return (L_sum);
- }
-
-#elif defined(PV_ARM_GCC_V5) /* Instructions for ARM-linux cross-compiler*/
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* Instructions for ARM-linux cross-compiler*/
static inline Word32 L_mac(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
{
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; GLOBAL FUNCTION DEFINITIONS
; Function Prototype declaration
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5) /* Instructions for ARM Assembly on ADS*/
-
- __inline Word32 L_msu(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
- {
- Word32 product;
- Word32 result;
-
- OSCL_UNUSED_ARG(pOverflow);
-
- __asm
- {
- SMULBB product, var1, var2
- QDSUB result, L_var3, product
- }
-
- return (result);
- }
-
-#elif defined(PV_ARM_GCC_V5) /* Instructions for ARM-linux cross-compiler*/
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* Instructions for ARM-linux cross-compiler*/
__inline Word32 L_msu(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
{
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; GLOBAL FUNCTION DEFINITIONS
; Function Prototype declaration
----------------------------------------------------------------------------*/
-
-#if defined(PV_ARM_V5) /* Instructions for ARM Assembly on ADS*/
-
- __inline Word32 L_mult(Word16 var1, Word16 var2, Flag *pOverflow)
- {
- Word32 result;
- Word32 product;
-
- OSCL_UNUSED_ARG(pOverflow);
-
- __asm
- {
- SMULBB product, var1, var2
- QADD result, product, product
- }
-
- return (result);
- }
-
-#elif defined(PV_ARM_GCC_V5) /* Instructions for ARM-linux cross-compiler*/
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* Instructions for ARM-linux cross-compiler*/
__inline Word32 L_mult(Word16 var1, Word16 var2, Flag *pOverflow)
{
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
----------------------------------------------------------------------------*/
#include "basicop_malloc.h"
+
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C"
; GLOBAL FUNCTION DEFINITIONS
; Function Prototype declaration
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5) /* Instructions for ARM Assembly on ADS*/
-
- __inline Word32 L_sub(Word32 L_var1, Word32 L_var2, Flag *pOverflow)
- {
- Word32 result;
-
- OSCL_UNUSED_ARG(pOverflow);
-
- __asm
- {
- QSUB result, L_var1, L_var2
- }
-
- return(result);
-
- }
-
-#elif defined(PV_ARM_GCC_V5) /* Instructions for ARM-linux cross-compiler*/
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC)) /* Instructions for ARM-linux cross-compiler*/
__inline Word32 L_sub(Word32 L_var1, Word32 L_var2, Flag *pOverflow)
{
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; GLOBAL FUNCTION DEFINITIONS
; Function Prototype declaration
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5) /* Instructions for ARM Assembly on ADS*/
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* Instructions for ARM-linux cross-compiler*/
- __inline Word32 Mpy_32(Word16 L_var1_hi,
+ static inline Word32 Mpy_32(Word16 L_var1_hi,
Word16 L_var1_lo,
Word16 L_var2_hi,
Word16 L_var2_lo,
Flag *pOverflow)
-
- {
- /*----------------------------------------------------------------------------
- ; Define all local variables
- ----------------------------------------------------------------------------*/
- Word32 L_product;
- Word32 L_sum;
- Word32 product32;
-
- OSCL_UNUSED_ARG(pOverflow);
- /*----------------------------------------------------------------------------
- ; Function body here
- ----------------------------------------------------------------------------*/
- /* L_product = L_mult (L_var1_hi, L_var2_hi, pOverflow);*/
-
- __asm {SMULBB L_product, L_var1_hi, L_var2_hi}
- __asm {QDADD L_product, 0, L_product}
- __asm {SMULBB product32, L_var1_hi, L_var2_lo}
- product32 >>= 15;
- __asm {QDADD L_sum, L_product, product32}
- L_product = L_sum;
- __asm {SMULBB product32, L_var1_lo, L_var2_hi}
- product32 >>= 15;
- __asm {QDADD L_sum, L_product, product32}
- return (L_sum);
- }
-
-#elif defined(PV_ARM_GCC_V5) /* Instructions for ARM-linux cross-compiler*/
-
- static inline Word32 Mpy_32(Word16 L_var1_hi,
- Word16 L_var1_lo,
- Word16 L_var2_hi,
- Word16 L_var2_lo,
- Flag *pOverflow)
{
register Word32 product32;
register Word32 L_sum;
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; GLOBAL FUNCTION DEFINITIONS
; Function Prototype declaration
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5) /* Instructions for ARM Assembly on ADS*/
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* Instructions for ARM-linux cross-compiler*/
- __inline Word32 Mpy_32_16(Word16 L_var1_hi,
+ static inline Word32 Mpy_32_16(Word16 L_var1_hi,
Word16 L_var1_lo,
Word16 var2,
Flag *pOverflow)
{
- Word32 L_product;
- Word32 L_sum;
- Word32 result;
-
- OSCL_UNUSED_ARG(pOverflow);
-
- __asm {SMULBB L_product, L_var1_hi, var2}
- __asm {QDADD L_product, 0, L_product}
- __asm {SMULBB result, L_var1_lo, var2}
- result >>= 15;
- __asm {QDADD L_sum, L_product, result}
- return (L_sum);
- }
-
-#elif defined(PV_ARM_GCC_V5) /* Instructions for ARM-linux cross-compiler*/
-
- static inline Word32 Mpy_32_16(Word16 L_var1_hi,
- Word16 L_var1_lo,
- Word16 var2,
- Flag *pOverflow)
- {
-
register Word32 ra = L_var1_hi;
register Word32 rb = L_var1_lo;
register Word32 rc = var2;
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; GLOBAL FUNCTION DEFINITIONS
; Function Prototype declaration
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5)
-
- __inline Word16 mult(Word16 var1, Word16 var2, Flag *pOverflow)
- {
- Word32 product;
-
- OSCL_UNUSED_ARG(pOverflow);
-
- __asm
- {
- SMULBB product, var1, var2
- MOV product, product, ASR #15
- CMP product, 0x7FFF
- MOVGE product, 0x7FFF
- }
-
- return ((Word16) product);
- }
-
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
__inline Word16 mult(Word16 var1, Word16 var2, Flag *pOverflow)
{
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; GLOBAL FUNCTION DEFINITIONS
; Function Prototype declaration
----------------------------------------------------------------------------*/
-#if !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) )
- /* C EQUIVALENT */
- OSCL_IMPORT_REF Word16 norm_l(Word32 L_var1);
-
-#elif defined(PV_ARM_V5)
-
- __inline Word16 norm_l(Word32 L_var1)
- {
- register Word32 var_out = 0;
-
- __asm
- {
- CMP L_var1, #0
- EORNE L_var1, L_var1, L_var1, LSL #1
- CLZNE var_out, L_var1
- }
-
- return ((Word16)var_out);
- }
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
static inline Word16 norm_l(Word32 L_var1)
{
}
return (var_out);
}
+#else/*#else for ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_RVCT))*/
+ /* C EQUIVALENT */
+ OSCL_IMPORT_REF Word16 norm_l(Word32 L_var1);
-#endif
+#endif/*#endif for ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_RVCT))*/
/*----------------------------------------------------------------------------
; END
----------------------------------------------------------------------------*/
#endif
#endif
-
-
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; GLOBAL FUNCTION DEFINITIONS
; Function Prototype declaration
----------------------------------------------------------------------------*/
-#if !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) )
- /* C EQUIVALENT */
- OSCL_IMPORT_REF Word16 norm_s(Word16 var1);
-
-#elif defined(PV_ARM_V5)
-
- __inline Word16 norm_s(Word16 var)
- {
- register Word32 var_out = 0;
- Word32 var1 = var << 16;
-
- __asm
- {
- CMP var1, #0
- EORNE var1, var1, var1, LSL #1
- CLZNE var_out, var1
- }
-
- return ((Word16)var_out);
- }
-
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
static inline Word16 norm_s(Word16 var1)
{
}
return (var_out);
}
-
-#endif
+#else/*#else for ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_RVCT))*/
+ /*C EQUIVALENT */
+ OSCL_IMPORT_REF Word16 norm_s(Word16 var1);
+#endif/*#endif for ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_RVCT))*/
/*----------------------------------------------------------------------------
; END
----------------------------------------------------------------------------*/
#endif
#endif
-
-
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
********************************************************************************
*/
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
#ifndef typedef_h
#define typedef_h "$Id $"
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/*----------------------------------------------------------------------------
; FUNCTION CODE
----------------------------------------------------------------------------*/
-#if !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) )
+#if !((PV_CPU_ARCH_VERSION >=5) && ((PV_COMPILER == EPV_ARM_GNUC) || (PV_COMPILER == EPV_ARM_RVCT)))
OSCL_EXPORT_REF Word16 norm_l(register Word32 L_var1)
{
/*----------------------------------------------------------------------------
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/*----------------------------------------------------------------------------
; FUNCTION CODE
----------------------------------------------------------------------------*/
-#if !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) )
+#if !((PV_CPU_ARCH_VERSION >=5) && ((PV_COMPILER == EPV_ARM_GNUC) || (PV_COMPILER == EPV_ARM_RVCT)))
OSCL_EXPORT_REF Word16 norm_s(register Word16 var1)
{
LOCAL_MODULE := libpvdecoder_gsmamr
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvencoder_gsmamr
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvamrwbdecoder
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; FUNCTION CODE
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5)
-#elif defined(PV_ARM_GCC_V5)
-
+#if ((PV_CPU_ARCH_VERSION >=5) && ((PV_COMPILER == EPV_ARM_RVCT) || (PV_COMPILER == EPV_ARM_GNUC)))
/* function is inlined in header file */
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
----------------------------------------------------------------------------*/
#include "pv_amr_wb_type_defs.h"
-
/*----------------------------------------------------------------------------
; MACROS
; Define module specific macros here
; DEFINES AND SIMPLE TYPEDEF'S
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5)
-
-__inline int16 normalize_amr_wb(int32 x)
-{
- int32 y;
- __asm
- {
- clz y, x;
- sub y, y, #1
- }
- return (y);
-}
-
-
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
__inline int16 normalize_amr_wb(int32 x)
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
-#if defined(PV_ARM_V5)
-
-#include "pvamrwbdecoder_basic_op_armv5.h"
-
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
#include "pvamrwbdecoder_basic_op_gcc_armv5.h"
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef PVAMRWBDECODER_BASIC_OP_GCC_ARMV5_H
#define PVAMRWBDECODER_BASIC_OP_GCC_ARMV5_H
+
#ifdef __cplusplus
extern "C"
{
#endif
-#if (defined(PV_ARM_GCC_V5)||defined(PV_ARM_GCC_V4))
-
static inline int16 sub_int16(int16 var1, int16 var2)
{
register int32 L_var_out;
#define fxp_mul32_by_16b( a, b) fxp_mul32_by_16( a, b)
-#endif
#ifdef __cplusplus
}
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
src/pvmp3_dct_9.cpp \
src/pvmp3_dct_16.cpp
-ifeq ($(TARGET_ARCH),arm)
-LOCAL_SRC_FILES += \
- src/asm/pvmp3_polyphase_filter_window_gcc.s \
- src/asm/pvmp3_mdct_18_gcc.s \
- src/asm/pvmp3_dct_9_gcc.s \
- src/asm/pvmp3_dct_16_gcc.s
-endif
-
LOCAL_MODULE := libpvmp3
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
# Additional assembly files for linux-arm
+ifeq ($(GLOBAL_CPU_ARCH_VERSION),4)
+ ASM_INCLUSION:=1
+else ifeq ($(GLOBAL_CPU_ARCH_VERSION),5)
+ ASM_INCLUSION:=1
+else ifeq ($(GLOBAL_CPU_ARCH_VERSION),6)
+ ASM_INCLUSION:=1
+else
+ ASM_INCLUSION:=0
+endif
+ifneq ($(ASM_INCLUSION),0)
SRCS+= asm/pvmp3_polyphase_filter_window_gcc.s \
asm/pvmp3_mdct_18_gcc.s \
asm/pvmp3_dct_9_gcc.s \
- asm/pvmp3_dct_16_gcc.s
+ asm/pvmp3_dct_16_gcc.s
+endif
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#endif
-#if (defined(PV_ARM_V5)||defined(PV_ARM_V4))
-
-#include "pv_mp3dec_fxd_op_arm.h"
-
-#elif (defined(PV_ARM_GCC_V5)||defined(PV_ARM_GCC_V4))
+#if ((PV_CPU_ARCH_VERSION >=4) && (PV_COMPILER == EPV_ARM_GNUC))
#include "pv_mp3dec_fxd_op_arm_gcc.h"
-#elif (defined(PV_ARM_MSC_EVC_V5)||defined(PV_ARM_MSC_EVC_V4))
-
-#include "pv_mp3dec_fxd_op_msc_evc.h"
-
#else
#ifndef C_EQUIVALENT
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "pvmp3_audio_type_defs.h"
-#if (defined(PV_ARM_GCC_V5)||defined(PV_ARM_GCC_V4))
#define Qfmt_31(a) (int32)(a*0x7FFFFFFF + (a>=0?0.5F:-0.5F))
}
-#endif
#ifdef __cplusplus
}
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
------------------------------------------------------------------------------
*/
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
-#if ( !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) )
+#if !((PV_CPU_ARCH_VERSION >=4) && (PV_COMPILER == EPV_ARM_GNUC))
/*----------------------------------------------------------------------------
; INCLUDES
----------------------------------------------------------------------------*/
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
------------------------------------------------------------------------------
*/
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
-#if ( !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) && !defined(PV_ARM_V5) && !defined(PV_ARM_V4) )
+#if !((PV_CPU_ARCH_VERSION >=4) && ((PV_COMPILER == EPV_ARM_GNUC)|| (PV_COMPILER == EPV_ARM_RVCT)))
/*----------------------------------------------------------------------------
; INCLUDES
----------------------------------------------------------------------------*/
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
------------------------------------------------------------------------------
*/
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
-#if ( !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) && !defined(PV_ARM_V5) && !defined(PV_ARM_V4) )
+#if !((PV_CPU_ARCH_VERSION >=4) && ((PV_COMPILER == EPV_ARM_GNUC)|| (PV_COMPILER == EPV_ARM_RVCT)))
/*----------------------------------------------------------------------------
; INCLUDES
----------------------------------------------------------------------------*/
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; FUNCTION CODE
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5)
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && ((PV_COMPILER == EPV_ARM_RVCT) || (PV_COMPILER == EPV_ARM_GNUC)))
/* function is inlined in header file */
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/*----------------------------------------------------------------------------
; DEFINES AND SIMPLE TYPEDEF'S
----------------------------------------------------------------------------*/
-
-#if defined(PV_ARM_V5)
-
-__inline int32 pvmp3_normalize(int32 x)
-{
- int32 y;
- __asm
- {
- clz y, x;
- sub y, y, #1
- }
- return (y);
-}
-
-
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
__inline int32 pvmp3_normalize(int32 x)
{
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
------------------------------------------------------------------------------
*/
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
-#if ( !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) && !defined(PV_ARM_V5) && !defined(PV_ARM_V4) )
+#if !((PV_CPU_ARCH_VERSION >=4) && ((PV_COMPILER == EPV_ARM_GNUC)|| (PV_COMPILER == EPV_ARM_RVCT)))
/*----------------------------------------------------------------------------
; INCLUDES
----------------------------------------------------------------------------*/
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "pvmp3_audio_type_defs.h"
#include "s_tmp3dec_chan.h"
+
/*----------------------------------------------------------------------------
; MACROS
; Define module specific macros here
#endif
-#if (defined(PV_ARM_V5)||defined(PV_ARM_V4))
-
-
- __inline int16 saturate16(int32 sample)
- {
- int32 a;
- int32 b = 31;
- __asm
- {
- mov a, sample, asr#15
- teq a, sample, asr b
- eorne sample, MAX_16BITS_INT, sample, asr#31
- }
- return sample ;
- }
-
-#else
inline int16 saturate16(int32 sample)
{
return sample;
}
-#endif
void pvmp3_polyphase_filter_window(int32 *synth_buffer,
LOCAL_MODULE := libomx_aac_component_lib
-LOCAL_CFLAGS := -DAAC_PLUS -DHQ_SBR -DPARAMETRICSTEREO $(PV_CFLAGS)
+LOCAL_CFLAGS := -DAAC_PLUS -DHQ_SBR -DPARAMETRICSTEREO -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libomx_amr_component_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libomx_amrenc_component_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
StreamInput.iStopTime = StreamInput.iStartTime + AMR_FRAME_LENGTH_IN_TIMESTAMP * InputFrameNum;
// iNextStartTime = StreamInput.iStopTime; // for the next encoding, not necessary
+#if PROFILING_ON
+ OMX_U32 Start = OsclTickCount::TickCount();
+#endif
// Do encoding at one time for multiple frame input
if (ipGsmEncoder->Encode(StreamInput, StreamOutput) < 0 || StreamOutput.iNumSampleFrames != InputFrameNum)
{
LOCAL_MODULE := libomx_baseclass_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libomx_common_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libomx_avc_component_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libomx_avcenc_component_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libomx_m4v_component_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libomx_m4venc_component_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libomx_mastercore_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libomx_mp3_component_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvomx_proxy_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libomx_queue_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpv_omx_interface
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libcolorconvert
-LOCAL_CFLAGS := -DFALSE=false $(PV_CFLAGS)
+LOCAL_CFLAGS := -DFALSE=false -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
+
#define pvcc_abs(x) ((x)>0? (x): -(x))
#define DITHER_ON
LOCAL_MODULE := libm4v_config
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpv_config_parser
-LOCAL_CFLAGS := -DWMA_AUDIO_SUPPORTED -DWMA_VOICE_SUPPORTED $(PV_CFLAGS)
+LOCAL_CFLAGS := -DWMA_AUDIO_SUPPORTED -DWMA_VOICE_SUPPORTED -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpv_avc_common_lib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvavcdecoder
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#include "avcdec_lib.h"
#include "avcdec_bitstream.h"
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
//#define PV_ARM_V5
-#ifdef PV_ARM_V5
-#define PV_CLZ(A,B) __asm{CLZ (A),(B)} \
- A -= 16;
-#else
#define PV_CLZ(A,B) while (((B) & 0x8000) == 0) {(B) <<=1; A++;}
-#endif
#define PV_NO_CLZ
LOCAL_MODULE := libpvavch264enc
-LOCAL_CFLAGS := -D__arm__ -DYUV_INPUT -DRGB24_INPUT -DRGB12_INPUT -DYUV420SEMIPLANAR_INPUT $(PV_CFLAGS)
+LOCAL_CFLAGS := -D__arm__ -DYUV_INPUT -DRGB24_INPUT -DRGB12_INPUT -DYUV420SEMIPLANAR_INPUT -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef _SAD_HALFPEL_INLINE_H_
#define _SAD_HALFPEL_INLINE_H_
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
+
#ifdef __cplusplus
extern "C"
{
#endif
-#if defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER */
+#if ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_GNUC)) /* ARM GNU COMPILER */
__inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
{
- tmp = (tmp2 >> 1) - tmp;
- if (tmp > 0) sad += tmp;
- else sad -= tmp;
-
- return sad;
- }
-
- __inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
- {
- tmp = (tmp >> 2) - tmp2;
- if (tmp > 0) sad += tmp;
- else sad -= tmp;
-
- return sad;
- }
-
-#elif defined(__CC_ARM) /* only work with arm v5 */
-
- __inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
- {
- __asm
- {
- rsbs tmp, tmp, tmp2, asr #1 ;
- rsbmi tmp, tmp, #0 ;
- add sad, sad, tmp ;
- }
+__asm__ volatile("rsbs %1, %1, %2, asr #1\n\trsbmi %1, %1, #0\n\tadd %0, %0, %1": "=r"(sad), "=r"(tmp): "r"(tmp2));
return sad;
}
__inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
{
- __asm
- {
- rsbs tmp, tmp2, tmp, asr #2 ;
- rsbmi tmp, tmp, #0 ;
- add sad, sad, tmp ;
- }
+__asm__ volatile("rsbs %1, %2, %1, asr #2\n\trsbmi %1, %1, #0\n\tadd %0, %0, %1": "=r"(sad), "=r"(tmp): "r"(tmp2));
return sad;
}
-
-#elif defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER */
-
+#else/*#else for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT)) */
__inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
{
-__asm__ volatile("rsbs %1, %1, %2, asr #1\n\trsbmi %1, %1, #0\n\tadd %0, %0, %1": "=r"(sad), "=r"(tmp): "r"(tmp2));
+ tmp = (tmp2 >> 1) - tmp;
+ if (tmp > 0) sad += tmp;
+ else sad -= tmp;
return sad;
}
__inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
{
-__asm__ volatile("rsbs %1, %2, %1, asr #2\n\trsbmi %1, %1, #0\n\tadd %0, %0, %1": "=r"(sad), "=r"(tmp): "r"(tmp2));
+ tmp = (tmp >> 2) - tmp2;
+ if (tmp > 0) sad += tmp;
+ else sad -= tmp;
return sad;
}
-#endif
+#endif/*#endif for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT)) */
#ifdef __cplusplus
}
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef _SAD_INLINE_H_
#define _SAD_INLINE_H_
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
+
#ifdef __cplusplus
extern "C"
{
#endif
-#if defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER */
+#if ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_GNUC)) /* ARM GNU COMPILER */
__inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
{
- tmp = tmp - tmp2;
- if (tmp > 0) sad += tmp;
- else sad -= tmp;
-
+__asm__ volatile("rsbs %1, %1, %2\n\trsbmi %1, %1, #0\n\tadd %0, %0, %1": "=r"(sad): "r"(tmp), "r"(tmp2));
return sad;
}
{
int32 x7;
- x7 = src2 ^ src1; /* check odd/even combination */
- if ((uint32)src2 >= (uint32)src1)
- {
- src1 = src2 - src1; /* subs */
- }
- else
- {
- src1 = src1 - src2;
- }
- x7 = x7 ^ src1; /* only odd bytes need to add carry */
- x7 = mask & ((uint32)x7 >> 1);
- x7 = (x7 << 8) - x7;
- src1 = src1 + (x7 >> 7); /* add 0xFF to the negative byte, add back carry */
- src1 = src1 ^(x7 >> 7); /* take absolute value of negative byte */
+__asm__ volatile("EOR %1, %2, %0\n\tSUBS %0, %2, %0\n\tEOR %1, %1, %0\n\tAND %1, %3, %1, lsr #1\n\tORRCC %1, %1, #0x80000000\n\tRSB %1, %1, %1, lsl #8\n\tADD %0, %0, %1, asr #7\n\tEOR %0, %0, %1, asr #7": "=r"(src1), "=&r"(x7): "r"(src2), "r"(mask));
+
+ return src1;
+ }
+
+ __inline int32 sad_4pixelN(int32 src1, int32 src2, int32 mask)
+ {
+ int32 x7;
+
+__asm__ volatile("EOR %1, %2, %0\n\tADDS %0, %2, %0\n\tEOR %1, %1, %0\n\tANDS %1, %3, %1, rrx\n\tRSB %1, %1, %1, lsl #8\n\tSUB %0, %0, %1, asr #7\n\tEOR %0, %0, %1, asr #7": "=r"(src1), "=&r"(x7): "r"(src2), "r"(mask));
return src1;
}
+#define sum_accumulate __asm__ volatile("SBC %0, %0, %1\n\tBIC %1, %4, %1\n\tADD %2, %2, %1, lsr #8\n\tSBC %0, %0, %3\n\tBIC %3, %4, %3\n\tADD %2, %2, %3, lsr #8": "=&r" (x5), "=&r" (x10), "=&r" (x4), "=&r" (x11): "r" (x6));
+
#define NUMBER 3
#define SHIFT 24
+#define INC_X8 0x08000001
#include "sad_mb_offset.h"
#define NUMBER 2
#undef SHIFT
#define SHIFT 16
+#undef INC_X8
+#define INC_X8 0x10000001
#include "sad_mb_offset.h"
#undef NUMBER
#define NUMBER 1
#undef SHIFT
#define SHIFT 8
+#undef INC_X8
+#define INC_X8 0x08000001
#include "sad_mb_offset.h"
int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
x9 = 0x80808080; /* const. */
+ x4 = x5 = 0;
x8 = (uint32)ref & 0x3;
if (x8 == 3)
if (x8 == 1)
goto SadMBOffset1;
-// x5 = (x4<<8)-x4; /* x5 = x4*255; */
- x4 = x5 = 0;
-
- x6 = 0xFFFF00FF;
-
- ref -= lx;
- blk -= 16;
-
x8 = 16;
+///
+__asm__ volatile("MVN %0, #0xFF00": "=r"(x6));
LOOP_SAD0:
/****** process 8 pixels ******/
- x10 = *((uint32*)(ref += lx));
- x11 = *((uint32*)(ref + 4));
- x12 = *((uint32*)(blk += 16));
- x14 = *((uint32*)(blk + 4));
+ x11 = *((int32*)(ref + 12));
+ x10 = *((int32*)(ref + 8));
+ x14 = *((int32*)(blk + 12));
+ x12 = *((int32*)(blk + 8));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
/* process x12 & x10 */
x10 = sad_4pixel(x10, x12, x9);
- x5 = x5 + x10; /* accumulate low bytes */
+ x5 = x5 + x10; /* accumulate low bytes */
x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+ x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
x5 = x5 + x11; /* accumulate low bytes */
x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
/****** process 8 pixels ******/
- x10 = *((uint32*)(ref + 8));
- x11 = *((uint32*)(ref + 12));
- x12 = *((uint32*)(blk + 8));
- x14 = *((uint32*)(blk + 12));
+ x11 = *((int32*)(ref + 4));
+__asm__ volatile("LDR %0, [%1], %2": "=&r"(x10), "=r"(ref): "r"(lx));
+ //x10 = *((int32*)ref); ref+=lx;
+ x14 = *((int32*)(blk + 4));
+__asm__ volatile("LDR %0, [%1], #16": "=&r"(x12), "=r"(blk));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
x10 = x10 + x4; /* add with high bytes */
x10 = x10 + (x10 << 16); /* add with lower half word */
- if ((int)((uint32)x10 >> 16) <= dmin) /* compare with dmin */
+ /****************/
+
+ if (((uint32)x10 >> 16) <= (uint32)dmin) /* compare with dmin */
{
if (--x8)
{
SadMBOffset1:
return sad_mb_offset1(ref, blk, lx, dmin);
-
}
-#elif defined(__CC_ARM) /* only work with arm v5 */
-
+#else/*#else for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT)) */
__inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
{
- __asm
- {
- rsbs tmp, tmp, tmp2 ;
- rsbmi tmp, tmp, #0 ;
- add sad, sad, tmp ;
- }
+ tmp = tmp - tmp2;
+ if (tmp > 0) sad += tmp;
+ else sad -= tmp;
return sad;
}
{
int32 x7;
- __asm
- {
- EOR x7, src2, src1; /* check odd/even combination */
- SUBS src1, src2, src1;
- EOR x7, x7, src1;
- AND x7, mask, x7, lsr #1;
- ORRCC x7, x7, #0x80000000;
- RSB x7, x7, x7, lsl #8;
- ADD src1, src1, x7, asr #7; /* add 0xFF to the negative byte, add back carry */
- EOR src1, src1, x7, asr #7; /* take absolute value of negative byte */
- }
-
- return src1;
- }
-
- __inline int32 sad_4pixelN(int32 src1, int32 src2, int32 mask)
- {
- int32 x7;
-
- __asm
- {
- EOR x7, src2, src1; /* check odd/even combination */
- ADDS src1, src2, src1;
- EOR x7, x7, src1; /* only odd bytes need to add carry */
- ANDS x7, mask, x7, rrx;
- RSB x7, x7, x7, lsl #8;
- SUB src1, src1, x7, asr #7; /* add 0xFF to the negative byte, add back carry */
- EOR src1, src1, x7, asr #7; /* take absolute value of negative byte */
- }
-
- return src1;
- }
-
-#define sum_accumulate __asm{ SBC x5, x5, x10; /* accumulate low bytes */ \
- BIC x10, x6, x10; /* x10 & 0xFF00FF00 */ \
- ADD x4, x4, x10,lsr #8; /* accumulate high bytes */ \
- SBC x5, x5, x11; /* accumulate low bytes */ \
- BIC x11, x6, x11; /* x11 & 0xFF00FF00 */ \
- ADD x4, x4, x11,lsr #8; } /* accumulate high bytes */
-
-
-#define NUMBER 3
-#define SHIFT 24
-#define INC_X8 0x08000001
-
-#include "sad_mb_offset.h"
-
-#undef NUMBER
-#define NUMBER 2
-#undef SHIFT
-#define SHIFT 16
-#undef INC_X8
-#define INC_X8 0x10000001
-#include "sad_mb_offset.h"
-
-#undef NUMBER
-#define NUMBER 1
-#undef SHIFT
-#define SHIFT 8
-#undef INC_X8
-#define INC_X8 0x08000001
-#include "sad_mb_offset.h"
-
-
- __inline int32 simd_sad_mb(uint8 *ref, uint8 *blk, int dmin, int lx)
- {
- int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
-
- x9 = 0x80808080; /* const. */
- x4 = x5 = 0;
-
- __asm
- {
- MOVS x8, ref, lsl #31 ;
- BHI SadMBOffset3;
- BCS SadMBOffset2;
- BMI SadMBOffset1;
-
- MVN x6, #0xFF00;
- }
-LOOP_SAD0:
- /****** process 8 pixels ******/
- x11 = *((int32*)(ref + 12));
- x10 = *((int32*)(ref + 8));
- x14 = *((int32*)(blk + 12));
- x12 = *((int32*)(blk + 8));
-
- /* process x11 & x14 */
- x11 = sad_4pixel(x11, x14, x9);
-
- /* process x12 & x10 */
- x10 = sad_4pixel(x10, x12, x9);
-
- x5 = x5 + x10; /* accumulate low bytes */
- x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
- x5 = x5 + x11; /* accumulate low bytes */
- x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
-
- __asm
+ x7 = src2 ^ src1; /* check odd/even combination */
+ if ((uint32)src2 >= (uint32)src1)
{
- /****** process 8 pixels ******/
- LDR x11, [ref, #4];
- LDR x10, [ref], lx ;
- LDR x14, [blk, #4];
- LDR x12, [blk], #16 ;
+ src1 = src2 - src1; /* subs */
}
-
- /* process x11 & x14 */
- x11 = sad_4pixel(x11, x14, x9);
-
- /* process x12 & x10 */
- x10 = sad_4pixel(x10, x12, x9);
-
- x5 = x5 + x10; /* accumulate low bytes */
- x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
- x5 = x5 + x11; /* accumulate low bytes */
- x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
-
- /****************/
- x10 = x5 - (x4 << 8); /* extract low bytes */
- x10 = x10 + x4; /* add with high bytes */
- x10 = x10 + (x10 << 16); /* add with lower half word */
-
- __asm
+ else
{
- /****************/
- RSBS x11, dmin, x10, lsr #16;
- ADDLSS x8, x8, #0x10000001;
- BLS LOOP_SAD0;
+ src1 = src1 - src2;
}
-
- return ((uint32)x10 >> 16);
-
-SadMBOffset3:
-
- return sad_mb_offset3(ref, blk, lx, dmin, x8);
-
-SadMBOffset2:
-
- return sad_mb_offset2(ref, blk, lx, dmin, x8);
-
-SadMBOffset1:
-
- return sad_mb_offset1(ref, blk, lx, dmin, x8);
- }
-
-
-#elif defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER */
-
- __inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
- {
-__asm__ volatile("rsbs %1, %1, %2\n\trsbmi %1, %1, #0\n\tadd %0, %0, %1": "=r"(sad): "r"(tmp), "r"(tmp2));
- return sad;
- }
-
- __inline int32 sad_4pixel(int32 src1, int32 src2, int32 mask)
- {
- int32 x7;
-
-__asm__ volatile("EOR %1, %2, %0\n\tSUBS %0, %2, %0\n\tEOR %1, %1, %0\n\tAND %1, %3, %1, lsr #1\n\tORRCC %1, %1, #0x80000000\n\tRSB %1, %1, %1, lsl #8\n\tADD %0, %0, %1, asr #7\n\tEOR %0, %0, %1, asr #7": "=r"(src1), "=&r"(x7): "r"(src2), "r"(mask));
-
- return src1;
- }
-
- __inline int32 sad_4pixelN(int32 src1, int32 src2, int32 mask)
- {
- int32 x7;
-
-__asm__ volatile("EOR %1, %2, %0\n\tADDS %0, %2, %0\n\tEOR %1, %1, %0\n\tANDS %1, %3, %1, rrx\n\tRSB %1, %1, %1, lsl #8\n\tSUB %0, %0, %1, asr #7\n\tEOR %0, %0, %1, asr #7": "=r"(src1), "=&r"(x7): "r"(src2), "r"(mask));
+ x7 = x7 ^ src1; /* only odd bytes need to add carry */
+ x7 = mask & ((uint32)x7 >> 1);
+ x7 = (x7 << 8) - x7;
+ src1 = src1 + (x7 >> 7); /* add 0xFF to the negative byte, add back carry */
+ src1 = src1 ^(x7 >> 7); /* take absolute value of negative byte */
return src1;
}
-#define sum_accumulate __asm__ volatile("SBC %0, %0, %1\n\tBIC %1, %4, %1\n\tADD %2, %2, %1, lsr #8\n\tSBC %0, %0, %3\n\tBIC %3, %4, %3\n\tADD %2, %2, %3, lsr #8": "=&r" (x5), "=&r" (x10), "=&r" (x4), "=&r" (x11): "r" (x6));
-
#define NUMBER 3
#define SHIFT 24
-#define INC_X8 0x08000001
#include "sad_mb_offset.h"
#define NUMBER 2
#undef SHIFT
#define SHIFT 16
-#undef INC_X8
-#define INC_X8 0x10000001
#include "sad_mb_offset.h"
#undef NUMBER
#define NUMBER 1
#undef SHIFT
#define SHIFT 8
-#undef INC_X8
-#define INC_X8 0x08000001
#include "sad_mb_offset.h"
int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
x9 = 0x80808080; /* const. */
- x4 = x5 = 0;
x8 = (uint32)ref & 0x3;
if (x8 == 3)
if (x8 == 1)
goto SadMBOffset1;
+// x5 = (x4<<8)-x4; /* x5 = x4*255; */
+ x4 = x5 = 0;
+
+ x6 = 0xFFFF00FF;
+
+ ref -= lx;
+ blk -= 16;
+
x8 = 16;
-///
-__asm__ volatile("MVN %0, #0xFF00": "=r"(x6));
LOOP_SAD0:
/****** process 8 pixels ******/
- x11 = *((int32*)(ref + 12));
- x10 = *((int32*)(ref + 8));
- x14 = *((int32*)(blk + 12));
- x12 = *((int32*)(blk + 8));
+ x10 = *((uint32*)(ref += lx));
+ x11 = *((uint32*)(ref + 4));
+ x12 = *((uint32*)(blk += 16));
+ x14 = *((uint32*)(blk + 4));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
/* process x12 & x10 */
x10 = sad_4pixel(x10, x12, x9);
- x5 = x5 + x10; /* accumulate low bytes */
+ x5 = x5 + x10; /* accumulate low bytes */
x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+ x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
x5 = x5 + x11; /* accumulate low bytes */
x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
/****** process 8 pixels ******/
- x11 = *((int32*)(ref + 4));
-__asm__ volatile("LDR %0, [%1], %2": "=&r"(x10), "=r"(ref): "r"(lx));
- //x10 = *((int32*)ref); ref+=lx;
- x14 = *((int32*)(blk + 4));
-__asm__ volatile("LDR %0, [%1], #16": "=&r"(x12), "=r"(blk));
+ x10 = *((uint32*)(ref + 8));
+ x11 = *((uint32*)(ref + 12));
+ x12 = *((uint32*)(blk + 8));
+ x14 = *((uint32*)(blk + 12));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
x10 = x10 + x4; /* add with high bytes */
x10 = x10 + (x10 << 16); /* add with lower half word */
- /****************/
-
- if (((uint32)x10 >> 16) <= dmin) /* compare with dmin */
+ if ((int)((uint32)x10 >> 16) <= dmin) /* compare with dmin */
{
if (--x8)
{
SadMBOffset1:
return sad_mb_offset1(ref, blk, lx, dmin);
- }
+ }
-#endif
+#endif/*#endif for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT)) */
#ifdef __cplusplus
}
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* and limitations under the License.
* -------------------------------------------------------------------
*/
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
-#if defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER */
+#if ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_GNUC))
#if (NUMBER==3)
__inline int32 sad_mb_offset3(uint8 *ref, uint8 *blk, int lx, int dmin)
{
int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
- // x5 = (x4<<8) - x4;
- x4 = x5 = 0;
- x6 = 0xFFFF00FF;
- x9 = 0x80808080; /* const. */
- ref -= NUMBER; /* bic ref, ref, #3 */
- ref -= lx;
- blk -= 16;
- x8 = 16;
-
-#if (NUMBER==3)
-LOOP_SAD3:
-#elif (NUMBER==2)
-LOOP_SAD2:
-#elif (NUMBER==1)
-LOOP_SAD1:
-#endif
- /****** process 8 pixels ******/
- x10 = *((uint32*)(ref += lx)); /* D C B A */
- x11 = *((uint32*)(ref + 4)); /* H G F E */
- x12 = *((uint32*)(ref + 8)); /* L K J I */
-
- x10 = ((uint32)x10 >> SHIFT); /* 0 0 0 D */
- x10 = x10 | (x11 << (32 - SHIFT)); /* G F E D */
- x11 = ((uint32)x11 >> SHIFT); /* 0 0 0 H */
- x11 = x11 | (x12 << (32 - SHIFT)); /* K J I H */
-
- x12 = *((uint32*)(blk += 16));
- x14 = *((uint32*)(blk + 4));
-
- /* process x11 & x14 */
- x11 = sad_4pixel(x11, x14, x9);
-
- /* process x12 & x10 */
- x10 = sad_4pixel(x10, x12, x9);
-
- x5 = x5 + x10; /* accumulate low bytes */
- x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
- x5 = x5 + x11; /* accumulate low bytes */
- x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
-
- /****** process 8 pixels ******/
- x10 = *((uint32*)(ref + 8)); /* D C B A */
- x11 = *((uint32*)(ref + 12)); /* H G F E */
- x12 = *((uint32*)(ref + 16)); /* L K J I */
-
- x10 = ((uint32)x10 >> SHIFT); /* mvn x10, x10, lsr #24 = 0xFF 0xFF 0xFF ~D */
- x10 = x10 | (x11 << (32 - SHIFT)); /* bic x10, x10, x11, lsl #8 = ~G ~F ~E ~D */
- x11 = ((uint32)x11 >> SHIFT); /* 0xFF 0xFF 0xFF ~H */
- x11 = x11 | (x12 << (32 - SHIFT)); /* ~K ~J ~I ~H */
-
- x12 = *((uint32*)(blk + 8));
- x14 = *((uint32*)(blk + 12));
-
- /* process x11 & x14 */
- x11 = sad_4pixel(x11, x14, x9);
-
- /* process x12 & x10 */
- x10 = sad_4pixel(x10, x12, x9);
-
- x5 = x5 + x10; /* accumulate low bytes */
- x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
- x5 = x5 + x11; /* accumulate low bytes */
- x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
-
- /****************/
- x10 = x5 - (x4 << 8); /* extract low bytes */
- x10 = x10 + x4; /* add with high bytes */
- x10 = x10 + (x10 << 16); /* add with lower half word */
-
- if ((int)((uint32)x10 >> 16) <= dmin) /* compare with dmin */
- {
- if (--x8)
- {
-#if (NUMBER==3)
- goto LOOP_SAD3;
-#elif (NUMBER==2)
- goto LOOP_SAD2;
-#elif (NUMBER==1)
- goto LOOP_SAD1;
-#endif
- }
-
- }
-
- return ((uint32)x10 >> 16);
-}
-
-#elif defined(__CC_ARM) /* only work with arm v5 */
-
-#if (NUMBER==3)
-__inline int32 sad_mb_offset3(uint8 *ref, uint8 *blk, int lx, int dmin, int32 x8)
-#elif (NUMBER==2)
-__inline int32 sad_mb_offset2(uint8 *ref, uint8 *blk, int lx, int dmin, int32 x8)
-#elif (NUMBER==1)
-__inline int32 sad_mb_offset1(uint8 *ref, uint8 *blk, int lx, int dmin, int32 x8)
-#endif
-{
- int32 x4, x5, x6, x9, x10, x11, x12, x14;
-
x9 = 0x80808080; /* const. */
x4 = x5 = 0;
+ x8 = 16; //<<===========*******
+
+__asm__ volatile("MVN %0, #0xFF0000": "=r"(x6));
- __asm{
- MVN x6, #0xff0000;
#if (NUMBER==3)
LOOP_SAD3:
#elif (NUMBER==2)
#elif (NUMBER==1)
LOOP_SAD1:
#endif
- BIC ref, ref, #3;
- }
+__asm__ volatile("BIC %0, %0, #3": "=r"(ref));
/****** process 8 pixels ******/
x11 = *((int32*)(ref + 12));
x12 = *((int32*)(ref + 16));
x10 = *((int32*)(ref + 8));
x14 = *((int32*)(blk + 12));
- __asm{
- MVN x10, x10, lsr #SHIFT;
- BIC x10, x10, x11, lsl #(32-SHIFT);
- MVN x11, x11, lsr #SHIFT;
- BIC x11, x11, x12, lsl #(32-SHIFT);
+#if (SHIFT==8)
+__asm__ volatile("MVN %0, %0, lsr #8\n\tBIC %0, %0, %1,lsl #24\n\tMVN %1, %1,lsr #8\n\tBIC %1, %1, %2,lsl #24": "=&r"(x10), "=&r"(x11): "r"(x12));
+#elif (SHIFT==16)
+__asm__ volatile("MVN %0, %0, lsr #16\n\tBIC %0, %0, %1,lsl #16\n\tMVN %1, %1,lsr #16\n\tBIC %1, %1, %2,lsl #16": "=&r"(x10), "=&r"(x11): "r"(x12));
+#elif (SHIFT==24)
+__asm__ volatile("MVN %0, %0, lsr #24\n\tBIC %0, %0, %1,lsl #8\n\tMVN %1, %1,lsr #24\n\tBIC %1, %1, %2,lsl #8": "=&r"(x10), "=&r"(x11): "r"(x12));
+#endif
- LDR x12, [blk, #8];
- }
+ x12 = *((int32*)(blk + 8));
/* process x11 & x14 */
x11 = sad_4pixelN(x11, x14, x9);
sum_accumulate;
- __asm{
- /****** process 8 pixels ******/
- LDR x11, [ref, #4];
- LDR x12, [ref, #8];
- LDR x10, [ref], lx ;
- LDR x14, [blk, #4];
-
- MVN x10, x10, lsr #SHIFT;
- BIC x10, x10, x11, lsl #(32-SHIFT);
- MVN x11, x11, lsr #SHIFT;
- BIC x11, x11, x12, lsl #(32-SHIFT);
+ /****** process 8 pixels ******/
+ x11 = *((int32*)(ref + 4));
+ x12 = *((int32*)(ref + 8));
+ x10 = *((int32*)ref);
+ ref += lx;
+ x14 = *((int32*)(blk + 4));
- LDR x12, [blk], #16;
- }
+#if (SHIFT==8)
+__asm__ volatile("MVN %0, %0, lsr #8\n\tBIC %0, %0, %1,lsl #24\n\tMVN %1, %1,lsr #8\n\tBIC %1, %1, %2,lsl #24": "=&r"(x10), "=&r"(x11): "r"(x12));
+#elif (SHIFT==16)
+__asm__ volatile("MVN %0, %0, lsr #16\n\tBIC %0, %0, %1,lsl #16\n\tMVN %1, %1,lsr #16\n\tBIC %1, %1, %2,lsl #16": "=&r"(x10), "=&r"(x11): "r"(x12));
+#elif (SHIFT==24)
+__asm__ volatile("MVN %0, %0, lsr #24\n\tBIC %0, %0, %1,lsl #8\n\tMVN %1, %1,lsr #24\n\tBIC %1, %1, %2,lsl #8": "=&r"(x10), "=&r"(x11): "r"(x12));
+#endif
+__asm__ volatile("LDR %0, [%1], #16": "=&r"(x12), "=r"(blk));
/* process x11 & x14 */
x11 = sad_4pixelN(x11, x14, x9);
x10 = x10 + x4; /* add with high bytes */
x10 = x10 + (x10 << 16); /* add with lower half word */
- __asm{
- RSBS x11, dmin, x10, lsr #16
- ADDLSS x8, x8, #INC_X8
+ if (((uint32)x10 >> 16) <= (uint32)dmin) /* compare with dmin */
+ {
+ if (--x8)
+ {
#if (NUMBER==3)
- BLS LOOP_SAD3;
+ goto LOOP_SAD3;
#elif (NUMBER==2)
-BLS LOOP_SAD2;
+ goto LOOP_SAD2;
#elif (NUMBER==1)
-BLS LOOP_SAD1;
+ goto LOOP_SAD1;
#endif
+ }
+
}
return ((uint32)x10 >> 16);
}
-#elif defined(__GNUC__) && defined(__arm__) /* ARM GNU COMPILER */
+#else/*#else for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT)) */
#if (NUMBER==3)
__inline int32 sad_mb_offset3(uint8 *ref, uint8 *blk, int lx, int dmin)
{
int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
- x9 = 0x80808080; /* const. */
+ // x5 = (x4<<8) - x4;
x4 = x5 = 0;
- x8 = 16; //<<===========*******
-
-__asm__ volatile("MVN %0, #0xFF0000": "=r"(x6));
+ x6 = 0xFFFF00FF;
+ x9 = 0x80808080; /* const. */
+ ref -= NUMBER; /* bic ref, ref, #3 */
+ ref -= lx;
+ blk -= 16;
+ x8 = 16;
#if (NUMBER==3)
LOOP_SAD3:
#elif (NUMBER==1)
LOOP_SAD1:
#endif
-__asm__ volatile("BIC %0, %0, #3": "=r"(ref));
/****** process 8 pixels ******/
- x11 = *((int32*)(ref + 12));
- x12 = *((int32*)(ref + 16));
- x10 = *((int32*)(ref + 8));
- x14 = *((int32*)(blk + 12));
+ x10 = *((uint32*)(ref += lx)); /* D C B A */
+ x11 = *((uint32*)(ref + 4)); /* H G F E */
+ x12 = *((uint32*)(ref + 8)); /* L K J I */
-#if (SHIFT==8)
-__asm__ volatile("MVN %0, %0, lsr #8\n\tBIC %0, %0, %1,lsl #24\n\tMVN %1, %1,lsr #8\n\tBIC %1, %1, %2,lsl #24": "=&r"(x10), "=&r"(x11): "r"(x12));
-#elif (SHIFT==16)
-__asm__ volatile("MVN %0, %0, lsr #16\n\tBIC %0, %0, %1,lsl #16\n\tMVN %1, %1,lsr #16\n\tBIC %1, %1, %2,lsl #16": "=&r"(x10), "=&r"(x11): "r"(x12));
-#elif (SHIFT==24)
-__asm__ volatile("MVN %0, %0, lsr #24\n\tBIC %0, %0, %1,lsl #8\n\tMVN %1, %1,lsr #24\n\tBIC %1, %1, %2,lsl #8": "=&r"(x10), "=&r"(x11): "r"(x12));
-#endif
+ x10 = ((uint32)x10 >> SHIFT); /* 0 0 0 D */
+ x10 = x10 | (x11 << (32 - SHIFT)); /* G F E D */
+ x11 = ((uint32)x11 >> SHIFT); /* 0 0 0 H */
+ x11 = x11 | (x12 << (32 - SHIFT)); /* K J I H */
- x12 = *((int32*)(blk + 8));
+ x12 = *((uint32*)(blk += 16));
+ x14 = *((uint32*)(blk + 4));
/* process x11 & x14 */
- x11 = sad_4pixelN(x11, x14, x9);
+ x11 = sad_4pixel(x11, x14, x9);
/* process x12 & x10 */
- x10 = sad_4pixelN(x10, x12, x9);
+ x10 = sad_4pixel(x10, x12, x9);
- sum_accumulate;
+ x5 = x5 + x10; /* accumulate low bytes */
+ x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+ x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+ x5 = x5 + x11; /* accumulate low bytes */
+ x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+ x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
/****** process 8 pixels ******/
- x11 = *((int32*)(ref + 4));
- x12 = *((int32*)(ref + 8));
- x10 = *((int32*)ref); ref += lx;
- x14 = *((int32*)(blk + 4));
+ x10 = *((uint32*)(ref + 8)); /* D C B A */
+ x11 = *((uint32*)(ref + 12)); /* H G F E */
+ x12 = *((uint32*)(ref + 16)); /* L K J I */
-#if (SHIFT==8)
-__asm__ volatile("MVN %0, %0, lsr #8\n\tBIC %0, %0, %1,lsl #24\n\tMVN %1, %1,lsr #8\n\tBIC %1, %1, %2,lsl #24": "=&r"(x10), "=&r"(x11): "r"(x12));
-#elif (SHIFT==16)
-__asm__ volatile("MVN %0, %0, lsr #16\n\tBIC %0, %0, %1,lsl #16\n\tMVN %1, %1,lsr #16\n\tBIC %1, %1, %2,lsl #16": "=&r"(x10), "=&r"(x11): "r"(x12));
-#elif (SHIFT==24)
-__asm__ volatile("MVN %0, %0, lsr #24\n\tBIC %0, %0, %1,lsl #8\n\tMVN %1, %1,lsr #24\n\tBIC %1, %1, %2,lsl #8": "=&r"(x10), "=&r"(x11): "r"(x12));
-#endif
-__asm__ volatile("LDR %0, [%1], #16": "=&r"(x12), "=r"(blk));
+ x10 = ((uint32)x10 >> SHIFT); /* mvn x10, x10, lsr #24 = 0xFF 0xFF 0xFF ~D */
+ x10 = x10 | (x11 << (32 - SHIFT)); /* bic x10, x10, x11, lsl #8 = ~G ~F ~E ~D */
+ x11 = ((uint32)x11 >> SHIFT); /* 0xFF 0xFF 0xFF ~H */
+ x11 = x11 | (x12 << (32 - SHIFT)); /* ~K ~J ~I ~H */
+
+ x12 = *((uint32*)(blk + 8));
+ x14 = *((uint32*)(blk + 12));
/* process x11 & x14 */
- x11 = sad_4pixelN(x11, x14, x9);
+ x11 = sad_4pixel(x11, x14, x9);
/* process x12 & x10 */
- x10 = sad_4pixelN(x10, x12, x9);
+ x10 = sad_4pixel(x10, x12, x9);
- sum_accumulate;
+ x5 = x5 + x10; /* accumulate low bytes */
+ x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+ x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+ x5 = x5 + x11; /* accumulate low bytes */
+ x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+ x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
/****************/
x10 = x5 - (x4 << 8); /* extract low bytes */
x10 = x10 + x4; /* add with high bytes */
x10 = x10 + (x10 << 16); /* add with lower half word */
- if (((uint32)x10 >> 16) <= (uint32)dmin) /* compare with dmin */
+ if ((int)((uint32)x10 >> 16) <= dmin) /* compare with dmin */
{
if (--x8)
{
return ((uint32)x10 >> 16);
}
-#endif
+
+#endif/*#endif for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT)) */
LOCAL_MODULE := libpvmp4decoder
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvm4vencoder
-LOCAL_CFLAGS := -DBX_RC -DYUV_INPUT -DRGB12_INPUT -DRGB24_INPUT -DYUV420SEMIPLANAR_INPUT $(PV_CFLAGS)
+LOCAL_CFLAGS := -DBX_RC -DYUV_INPUT -DRGB12_INPUT -DRGB24_INPUT -DYUV420SEMIPLANAR_INPUT -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
- k0 = mla724(k12, k2, round);
+ k1 = mla724(k5, k12, round);
+ k0 = mla724(k2, k12, round);
k5 = k1 >> FDCT_SHIFT;
k2 = k0 >> FDCT_SHIFT;
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
- k0 = mla724(k12, k2, round);
+ k1 = mla724(k5, k12, round);
+ k0 = mla724(k2, k12, round);
k5 = k1 >> FDCT_SHIFT;
k2 = k0 >> FDCT_SHIFT;
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
- k0 = mla724(k12, k2, round);
+ k1 = mla724(k5, k12, round);
+ k0 = mla724(k2, k12, round);
k5 = k1 >> FDCT_SHIFT;
k2 = k0 >> FDCT_SHIFT;
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
- k0 = mla724(k12, k2, round);
+ k1 = mla724(k5, k12, round);
+ k0 = mla724(k2, k12, round);
k5 = k1 >> FDCT_SHIFT;
k2 = k0 >> FDCT_SHIFT;
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
+ k1 = mla724(k5, k12, round);
k5 = k1 >> FDCT_SHIFT;
/*****************/
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
+ k1 = mla724(k5, k12, round);
k5 = k1 >> FDCT_SHIFT;
/*****************/
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
- k0 = mla724(k12, k2, round);
+ k1 = mla724(k5, k12, round);
+ k0 = mla724(k2, k12, round);
k5 = k1 >> FDCT_SHIFT;
k2 = k0 >> FDCT_SHIFT;
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
- k0 = mla724(k12, k2, round);
+ k1 = mla724(k5, k12, round);
+ k0 = mla724(k2, k12, round);
k5 = k1 >> FDCT_SHIFT;
k2 = k0 >> FDCT_SHIFT;
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
- k0 = mla724(k12, k2, round);
+ k1 = mla724(k5, k12, round);
+ k0 = mla724(k2, k12, round);
k5 = k1 >> FDCT_SHIFT;
k2 = k0 >> FDCT_SHIFT;
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
- k0 = mla724(k12, k2, round);
+ k1 = mla724(k5, k12, round);
+ k0 = mla724(k2, k12, round);
k5 = k1 >> FDCT_SHIFT;
k2 = k0 >> FDCT_SHIFT;
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
+ k1 = mla724(k5, k12, round);
k5 = k1 >> FDCT_SHIFT;
/*****************/
/* MUL2C k2,k5,724,FDCT_SHIFT */
/* k0, k1 become scratch */
/* assume FAST MULTIPLY */
- k1 = mla724(k12, k5, round);
+ k1 = mla724(k5, k12, round);
k5 = k1 >> FDCT_SHIFT;
/*****************/
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef _DCT_INLINE_H_
#define _DCT_INLINE_H_
-#if !defined(PV_ARM_GCC_V5)
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
-#include "oscl_base_macros.h"
-
-__inline int32 mla724(int32 op1, int32 op2, int32 op3)
-{
- int32 out;
-
- OSCL_UNUSED_ARG(op1);
-
- out = op2 * 724 + op3; /* op1 is not used here */
-
- return out;
-}
-
-__inline int32 mla392(int32 k0, int32 k14, int32 round)
-{
- int32 k1;
-
- OSCL_UNUSED_ARG(k14);
-
- k1 = k0 * 392 + round;
-
- return k1;
-}
-
-__inline int32 mla554(int32 k4, int32 k12, int32 k1)
-{
- int32 k0;
-
- OSCL_UNUSED_ARG(k12);
-
- k0 = k4 * 554 + k1;
-
- return k0;
-}
-
-__inline int32 mla1338(int32 k6, int32 k14, int32 k1)
-{
- int32 out;
-
- OSCL_UNUSED_ARG(k14);
-
- out = k6 * 1338 + k1;
-
- return out;
-}
-
-__inline int32 mla946(int32 k6, int32 k14, int32 k1)
-{
- int32 out;
-
- OSCL_UNUSED_ARG(k14);
-
- out = k6 * 946 + k1;
-
- return out;
-}
-
-__inline int32 sum_abs(int32 k0, int32 k1, int32 k2, int32 k3,
- int32 k4, int32 k5, int32 k6, int32 k7)
-{
- int32 carry, abs_sum;
-
- carry = k0 >> 31;
- abs_sum = (k0 ^ carry);
- carry = k1 >> 31;
- abs_sum += (k1 ^ carry) - carry;
- carry = k2 >> 31;
- abs_sum += (k2 ^ carry) - carry;
- carry = k3 >> 31;
- abs_sum += (k3 ^ carry) - carry;
- carry = k4 >> 31;
- abs_sum += (k4 ^ carry) - carry;
- carry = k5 >> 31;
- abs_sum += (k5 ^ carry) - carry;
- carry = k6 >> 31;
- abs_sum += (k6 ^ carry) - carry;
- carry = k7 >> 31;
- abs_sum += (k7 ^ carry) - carry;
-
- return abs_sum;
-}
-
-#elif defined(__CC_ARM) /* only work with arm v5 */
-
-#if defined(__TARGET_ARCH_5TE)
-
-__inline int32 mla724(int32 op1, int32 op2, int32 op3)
-{
- int32 out;
-
- __asm
- {
- smlabb out, op1, op2, op3
- }
-
- return out;
-}
-
-__inline int32 mla392(int32 k0, int32 k14, int32 round)
-{
- int32 k1;
-
- __asm
- {
- smlabt k1, k0, k14, round
- }
-
- return k1;
-}
-
-__inline int32 mla554(int32 k4, int32 k12, int32 k1)
-{
- int32 k0;
-
- __asm
- {
- smlabt k0, k4, k12, k1
- }
-
- return k0;
-}
-
-__inline int32 mla1338(int32 k6, int32 k14, int32 k1)
-{
- int32 out;
-
- __asm
- {
- smlabb out, k6, k14, k1
- }
-
- return out;
-}
-
-__inline int32 mla946(int32 k6, int32 k14, int32 k1)
-{
- int32 out;
-
- __asm
- {
- smlabb out, k6, k14, k1
- }
-
- return out;
-}
-
-#else // not ARM5TE
-
-
-__inline int32 mla724(int32 op1, int32 op2, int32 op3)
-{
- int32 out;
-
- __asm
- {
- and out, op2, #0xFFFF
- mla out, op1, out, op3
- }
-
- return out;
-}
-
-__inline int32 mla392(int32 k0, int32 k14, int32 round)
-{
- int32 k1;
-
- __asm
- {
- mov k1, k14, asr #16
- mla k1, k0, k1, round
- }
-
- return k1;
-}
-
-__inline int32 mla554(int32 k4, int32 k12, int32 k1)
-{
- int32 k0;
-
- __asm
- {
- mov k0, k12, asr #16
- mla k0, k4, k0, k1
- }
-
- return k0;
-}
-
-__inline int32 mla1338(int32 k6, int32 k14, int32 k1)
-{
- int32 out;
-
- __asm
- {
- and out, k14, 0xFFFF
- mla out, k6, out, k1
- }
-
- return out;
-}
-
-__inline int32 mla946(int32 k6, int32 k14, int32 k1)
-{
- int32 out;
-
- __asm
- {
- and out, k14, 0xFFFF
- mla out, k6, out, k1
- }
-
- return out;
-}
-
-#endif
-
-__inline int32 sum_abs(int32 k0, int32 k1, int32 k2, int32 k3,
- int32 k4, int32 k5, int32 k6, int32 k7)
-{
- int32 carry, abs_sum;
- __asm
- {
- eor carry, k0, k0, asr #31 ;
- eors abs_sum, k1, k1, asr #31 ;
- adc abs_sum, abs_sum, carry ;
- eors carry, k2, k2, asr #31 ;
- adc abs_sum, abs_sum, carry ;
- eors carry, k3, k3, asr #31 ;
- adc abs_sum, abs_sum, carry ;
- eors carry, k4, k4, asr #31 ;
- adc abs_sum, abs_sum, carry ;
- eors carry, k5, k5, asr #31 ;
- adc abs_sum, abs_sum, carry ;
- eors carry, k6, k6, asr #31 ;
- adc abs_sum, abs_sum, carry ;
- eors carry, k7, k7, asr #31 ;
- adc abs_sum, abs_sum, carry ;
- }
-
- return abs_sum;
-}
-
-#elif defined(PV_ARM_GCC_V5) /* ARM GNU COMPILER */
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* ARM GNU COMPILER */
__inline int32 mla724(int32 op1, int32 op2, int32 op3)
{
return abs_sum;
}
+#else/*#else for #if (PV_CPU_ARCH_VERSION>=4 && PV_COMPILER==EPV_ARM_RVCT) */
+/*C Equivalent code*/
+#include "oscl_base_macros.h"
-#endif // Diff. OS
+__inline int32 mla724(int32 op1, int32 op2, int32 op3)
+{
+ int32 out;
-#endif //_DCT_INLINE_H_
+ OSCL_UNUSED_ARG(op2);
+
+ out = op1 * 724 + op3; /* op2 is not used here */
+
+ return out;
+}
+__inline int32 mla392(int32 k0, int32 k14, int32 round)
+{
+ int32 k1;
+
+ OSCL_UNUSED_ARG(k14);
+
+ k1 = k0 * 392 + round;
+ return k1;
+}
+
+__inline int32 mla554(int32 k4, int32 k12, int32 k1)
+{
+ int32 k0;
+
+ OSCL_UNUSED_ARG(k12);
+
+ k0 = k4 * 554 + k1;
+
+ return k0;
+}
+
+__inline int32 mla1338(int32 k6, int32 k14, int32 k1)
+{
+ int32 out;
+
+ OSCL_UNUSED_ARG(k14);
+
+ out = k6 * 1338 + k1;
+
+ return out;
+}
+
+__inline int32 mla946(int32 k6, int32 k14, int32 k1)
+{
+ int32 out;
+
+ OSCL_UNUSED_ARG(k14);
+
+ out = k6 * 946 + k1;
+
+ return out;
+}
+
+__inline int32 sum_abs(int32 k0, int32 k1, int32 k2, int32 k3,
+ int32 k4, int32 k5, int32 k6, int32 k7)
+{
+ int32 carry, abs_sum;
+
+ carry = k0 >> 31;
+ abs_sum = (k0 ^ carry);
+ carry = k1 >> 31;
+ abs_sum += (k1 ^ carry) - carry;
+ carry = k2 >> 31;
+ abs_sum += (k2 ^ carry) - carry;
+ carry = k3 >> 31;
+ abs_sum += (k3 ^ carry) - carry;
+ carry = k4 >> 31;
+ abs_sum += (k4 ^ carry) - carry;
+ carry = k5 >> 31;
+ abs_sum += (k5 ^ carry) - carry;
+ carry = k6 >> 31;
+ abs_sum += (k6 ^ carry) - carry;
+ carry = k7 >> 31;
+ abs_sum += (k7 ^ carry) - carry;
+
+ return abs_sum;
+}
+#endif /*#endif for (PV_CPU_ARCH_VERSION>=4 && PV_COMPILER==EPV_ARM_RVCT) */
+
+#endif //_DCT_INLINE_H_
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "mp4def.h"
#include "oscl_base_macros.h"
-#if !defined(PV_ARM_GCC_V5) /* ARM GNU COMPILER */
-__inline int32 aan_scale(int32 q_value, int32 coeff, int32 round, int32 QPdiv2)
-{
- q_value = coeff * q_value + round;
- coeff = q_value >> 16;
- if (coeff < 0) coeff += QPdiv2;
- else coeff -= QPdiv2;
-
- return coeff;
-}
-
-
-__inline int32 coeff_quant(int32 coeff, int32 q_scale, int32 shift)
-{
- int32 q_value;
-
- q_value = coeff * q_scale; //q_value = -((-(coeff + QPdiv2)*q_scale)>>LSL);
- q_value >>= shift; //q_value = (((coeff - QPdiv2)*q_scale)>>LSL );
- q_value += ((UInt)q_value >> 31); /* add one if negative */
-
- return q_value;
-}
-
-__inline int32 coeff_clip(int32 q_value, int32 ac_clip)
-{
- int32 coeff = q_value + ac_clip;
-
- if ((UInt)coeff > (UInt)(ac_clip << 1))
- q_value = ac_clip ^(q_value >> 31);
-
- return q_value;
-}
-
-__inline int32 coeff_dequant(int32 q_value, int32 QPx2, int32 Addition, int32 tmp)
-{
- int32 coeff;
-
- OSCL_UNUSED_ARG(tmp);
-
- if (q_value < 0)
- {
- coeff = q_value * QPx2 - Addition;
- if (coeff < -2048)
- coeff = -2048;
- }
- else
- {
- coeff = q_value * QPx2 + Addition;
- if (coeff > 2047)
- coeff = 2047;
- }
- return coeff;
-}
-
-__inline int32 smlabb(int32 q_value, int32 coeff, int32 round)
-{
- q_value = coeff * q_value + round;
-
- return q_value;
-}
-
-__inline int32 smulbb(int32 q_scale, int32 coeff)
-{
- int32 q_value;
-
- q_value = coeff * q_scale;
-
- return q_value;
-}
-
-__inline int32 aan_dc_scale(int32 coeff, int32 QP)
-{
-
- if (coeff < 0) coeff += (QP >> 1);
- else coeff -= (QP >> 1);
-
- return coeff;
-}
-
-__inline int32 clip_2047(int32 q_value, int32 tmp)
-{
- OSCL_UNUSED_ARG(tmp);
-
- if (q_value < -2048)
- {
- q_value = -2048;
- }
- else if (q_value > 2047)
- {
- q_value = 2047;
- }
-
- return q_value;
-}
-
-__inline int32 coeff_dequant_mpeg(int32 q_value, int32 stepsize, int32 QP, int32 tmp)
-{
- int32 coeff;
-
- OSCL_UNUSED_ARG(tmp);
-
- coeff = q_value << 1;
- stepsize *= QP;
- if (coeff > 0)
- {
- q_value = (coeff + 1) * stepsize;
- q_value >>= 4;
- if (q_value > 2047) q_value = 2047;
- }
- else
- {
- q_value = (coeff - 1) * stepsize;
- q_value += 15;
- q_value >>= 4;
- if (q_value < -2048) q_value = -2048;
- }
-
- return q_value;
-}
-
-__inline int32 coeff_dequant_mpeg_intra(int32 q_value, int32 tmp)
-{
- OSCL_UNUSED_ARG(tmp);
-
- q_value <<= 1;
- if (q_value > 0)
- {
- q_value >>= 4;
- if (q_value > 2047) q_value = 2047;
- }
- else
- {
- q_value += 15;
- q_value >>= 4;
- if (q_value < -2048) q_value = -2048;
- }
-
- return q_value;
-}
-
-#elif defined(__CC_ARM) /* only work with arm v5 */
-
-#if defined(__TARGET_ARCH_5TE)
-
-__inline int32 aan_scale(int32 q_value, int32 coeff,
- int32 round, int32 QPdiv2)
-{
- __asm
- {
- smlabb q_value, coeff, q_value, round
- movs coeff, q_value, asr #16
- addle coeff, coeff, QPdiv2
- subgt coeff, coeff, QPdiv2
- }
-
- return coeff;
-}
-
-__inline int32 coeff_quant(int32 coeff, int32 q_scale, int32 shift)
-{
- int32 q_value;
-
- __asm
- {
- smulbb q_value, q_scale, coeff /*mov coeff, coeff, lsl #14*/
- mov coeff, q_value, asr shift /*smull tmp, coeff, q_scale, coeff*/
- add q_value, coeff, coeff, lsr #31
- }
-
-
- return q_value;
-}
-
-__inline int32 coeff_dequant(int32 q_value, int32 QPx2, int32 Addition, int32 tmp)
-{
- int32 coeff;
-
- __asm
- {
- cmp q_value, #0
- smulbb coeff, q_value, QPx2
- sublt coeff, coeff, Addition
- addge coeff, coeff, Addition
- add q_value, coeff, tmp
- subs q_value, q_value, #3840
- subcss q_value, q_value, #254
- eorhi coeff, tmp, coeff, asr #31
- }
-
- return coeff;
-}
-
-__inline int32 smlabb(int32 q_value, int32 coeff, int32 round)
-{
- __asm
- {
- smlabb q_value, coeff, q_value, round
- }
-
- return q_value;
-}
-
-__inline int32 smulbb(int32 q_scale, int32 coeff)
-{
- int32 q_value;
-
- __asm
- {
- smulbb q_value, q_scale, coeff
- }
-
- return q_value;
-}
-
-__inline int32 coeff_dequant_mpeg(int32 q_value, int32 stepsize, int32 QP, int32 tmp)
-{
- /* tmp must have value of 2047 */
- int32 coeff;
- __asm
- {
- movs coeff, q_value, lsl #1
- smulbb stepsize, stepsize, QP
- addgt coeff, coeff, #1
- sublt coeff, coeff, #1
- smulbb q_value, coeff, stepsize
- addlt q_value, q_value, #15
- mov q_value, q_value, asr #4
- add coeff, q_value, tmp
- subs coeff, coeff, #0xf00
- subcss coeff, coeff, #0xfe
- eorhi q_value, tmp, q_value, asr #31
- }
-
- return q_value;
-}
-
-
-#else // not ARMV5TE
-
-__inline int32 aan_scale(int32 q_value, int32 coeff,
- int32 round, int32 QPdiv2)
-{
- __asm
- {
- mla q_value, coeff, q_value, round
- movs coeff, q_value, asr #16
- addle coeff, coeff, QPdiv2
- subgt coeff, coeff, QPdiv2
- }
-
- return coeff;
-}
-
-__inline int32 coeff_quant(int32 coeff, int32 q_scale, int32 shift)
-{
- int32 q_value;
-
- __asm
- {
- mul q_value, q_scale, coeff /*mov coeff, coeff, lsl #14*/
- mov coeff, q_value, asr shift /*smull tmp, coeff, q_scale, coeff*/
- add q_value, coeff, coeff, lsr #31
- }
-
-
- return q_value;
-}
-
-
-__inline int32 coeff_dequant(int32 q_value, int32 QPx2, int32 Addition, int32 tmp)
-{
- int32 coeff;
-
- __asm
- {
- cmp q_value, #0
- mul coeff, q_value, QPx2
- sublt coeff, coeff, Addition
- addge coeff, coeff, Addition
- add q_value, coeff, tmp
- subs q_value, q_value, #3840
- subcss q_value, q_value, #254
- eorhi coeff, tmp, coeff, asr #31
- }
-
- return coeff;
-}
-
-__inline int32 smlabb(int32 q_value, int32 coeff, int32 round)
-{
- __asm
- {
- mla q_value, coeff, q_value, round
- }
-
- return q_value;
-}
-
-__inline int32 smulbb(int32 q_scale, int32 coeff)
-{
- int32 q_value;
-
- __asm
- {
- mul q_value, q_scale, coeff
- }
-
- return q_value;
-}
-
-
-__inline int32 coeff_dequant_mpeg(int32 q_value, int32 stepsize, int32 QP, int32 tmp)
-{
- /* tmp must have value of 2047 */
- int32 coeff;
- __asm
- {
- movs coeff, q_value, lsl #1
- mul stepsize, stepsize, QP
- addgt coeff, coeff, #1
- sublt coeff, coeff, #1
- mul q_value, coeff, stepsize
- addlt q_value, q_value, #15
- mov q_value, q_value, asr #4
- add coeff, q_value, tmp
- subs coeff, coeff, #0xf00
- subcss coeff, coeff, #0xfe
- eorhi q_value, tmp, q_value, asr #31
- }
-
- return q_value;
-}
-
-
-#endif
-
-__inline int32 coeff_clip(int32 q_value, int32 ac_clip)
-{
- int32 coeff;
-
- __asm
- {
- add coeff, q_value, ac_clip
- subs coeff, coeff, ac_clip, lsl #1
- eorhi q_value, ac_clip, q_value, asr #31
- }
-
- return q_value;
-}
-
-__inline int32 aan_dc_scale(int32 coeff, int32 QP)
-{
-
- __asm
- {
- cmp coeff, #0
- addle coeff, coeff, QP, asr #1
- subgt coeff, coeff, QP, asr #1
- }
-
- return coeff;
-}
-
-__inline int32 clip_2047(int32 q_value, int32 tmp)
-{
- /* tmp must have value of 2047 */
- int32 coeff;
-
- __asm
- {
- add coeff, q_value, tmp
- subs coeff, coeff, #0xf00
- subcss coeff, coeff, #0xfe
- eorhi q_value, tmp, q_value, asr #31
- }
-
- return q_value;
-}
-
-__inline int32 coeff_dequant_mpeg_intra(int32 q_value, int32 tmp)
-{
- int32 coeff;
-
- __asm
- {
- movs q_value, q_value, lsl #1
- addlt q_value, q_value, #15
- mov q_value, q_value, asr #4
- add coeff, q_value, tmp
- subs coeff, coeff, #0xf00
- subcss coeff, coeff, #0xfe
- eorhi q_value, tmp, q_value, asr #31
- }
-
- return q_value;
-}
-
-#elif (defined(PV_ARM_GCC_V5)) /* ARM GNU COMPILER */
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* ARM GNU COMPILER */
__inline int32 aan_scale(int32 q_value, int32 coeff,
int32 round, int32 QPdiv2)
return out;
}
+#else/*#else for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT)) */
+/*C Equivalent Code*/
+__inline int32 aan_scale(int32 q_value, int32 coeff, int32 round, int32 QPdiv2)
+{
+ q_value = coeff * q_value + round;
+ coeff = q_value >> 16;
+ if (coeff < 0) coeff += QPdiv2;
+ else coeff -= QPdiv2;
+
+ return coeff;
+}
-#endif // Platform
+__inline int32 coeff_quant(int32 coeff, int32 q_scale, int32 shift)
+{
+ int32 q_value;
-#endif //_FASTQUANT_INLINE_H_
+ q_value = coeff * q_scale; //q_value = -((-(coeff + QPdiv2)*q_scale)>>LSL);
+ q_value >>= shift; //q_value = (((coeff - QPdiv2)*q_scale)>>LSL );
+ q_value += ((UInt)q_value >> 31); /* add one if negative */
+
+ return q_value;
+}
+
+__inline int32 coeff_clip(int32 q_value, int32 ac_clip)
+{
+ int32 coeff = q_value + ac_clip;
+
+ if ((UInt)coeff > (UInt)(ac_clip << 1))
+ q_value = ac_clip ^(q_value >> 31);
+
+ return q_value;
+}
+
+__inline int32 coeff_dequant(int32 q_value, int32 QPx2, int32 Addition, int32 tmp)
+{
+ int32 coeff;
+
+ OSCL_UNUSED_ARG(tmp);
+
+ if (q_value < 0)
+ {
+ coeff = q_value * QPx2 - Addition;
+ if (coeff < -2048)
+ coeff = -2048;
+ }
+ else
+ {
+ coeff = q_value * QPx2 + Addition;
+ if (coeff > 2047)
+ coeff = 2047;
+ }
+ return coeff;
+}
+__inline int32 smlabb(int32 q_value, int32 coeff, int32 round)
+{
+ q_value = coeff * q_value + round;
+ return q_value;
+}
+
+__inline int32 smulbb(int32 q_scale, int32 coeff)
+{
+ int32 q_value;
+
+ q_value = coeff * q_scale;
+
+ return q_value;
+}
+
+__inline int32 aan_dc_scale(int32 coeff, int32 QP)
+{
+
+ if (coeff < 0) coeff += (QP >> 1);
+ else coeff -= (QP >> 1);
+
+ return coeff;
+}
+
+__inline int32 clip_2047(int32 q_value, int32 tmp)
+{
+ OSCL_UNUSED_ARG(tmp);
+
+ if (q_value < -2048)
+ {
+ q_value = -2048;
+ }
+ else if (q_value > 2047)
+ {
+ q_value = 2047;
+ }
+
+ return q_value;
+}
+
+__inline int32 coeff_dequant_mpeg(int32 q_value, int32 stepsize, int32 QP, int32 tmp)
+{
+ int32 coeff;
+
+ OSCL_UNUSED_ARG(tmp);
+
+ coeff = q_value << 1;
+ stepsize *= QP;
+ if (coeff > 0)
+ {
+ q_value = (coeff + 1) * stepsize;
+ q_value >>= 4;
+ if (q_value > 2047) q_value = 2047;
+ }
+ else
+ {
+ q_value = (coeff - 1) * stepsize;
+ q_value += 15;
+ q_value >>= 4;
+ if (q_value < -2048) q_value = -2048;
+ }
+
+ return q_value;
+}
+
+__inline int32 coeff_dequant_mpeg_intra(int32 q_value, int32 tmp)
+{
+ OSCL_UNUSED_ARG(tmp);
+
+ q_value <<= 1;
+ if (q_value > 0)
+ {
+ q_value >>= 4;
+ if (q_value > 2047) q_value = 2047;
+ }
+ else
+ {
+ q_value += 15;
+ q_value >>= 4;
+ if (q_value < -2048) q_value = -2048;
+ }
+
+ return q_value;
+}
+#endif /*#endif for((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT))*/
+
+#endif //_FASTQUANT_INLINE_H_
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef _SAD_HALFPEL_INLINE_H_
#define _SAD_HALFPEL_INLINE_H_
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
+
#ifdef __cplusplus
extern "C"
{
#endif
-#if !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) /* ARM GNU COMPILER */
-
- __inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
- {
- tmp = (tmp2 >> 1) - tmp;
- if (tmp > 0) sad += tmp;
- else sad -= tmp;
-
- return sad;
- }
-
- __inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
- {
- tmp = (tmp >> 2) - tmp2;
- if (tmp > 0) sad += tmp;
- else sad -= tmp;
-
- return sad;
- }
-
-#elif defined(__CC_ARM) /* only work with arm v5 */
-
- __inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
- {
- __asm
- {
- rsbs tmp, tmp, tmp2, asr #1 ;
- rsbmi tmp, tmp, #0 ;
- add sad, sad, tmp ;
- }
-
- return sad;
- }
-
- __inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
- {
- __asm
- {
- rsbs tmp, tmp2, tmp, asr #2 ;
- rsbmi tmp, tmp, #0 ;
- add sad, sad, tmp ;
- }
-
- return sad;
- }
-
-#elif ( defined(PV_ARM_GCC_V5) || defined(PV_ARM_GCC_V4) ) /* ARM GNU COMPILER */
+#if ((PV_CPU_ARCH_VERSION >=4) && (PV_COMPILER == EPV_ARM_GNUC)) /* ARM GNU COMPILER */
__inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
}
-#endif // Diff OS
+#else/*#else for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT))*/
+ /*C equivalent code*/
+ __inline int32 INTERP1_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+ {
+ tmp = (tmp2 >> 1) - tmp;
+ if (tmp > 0) sad += tmp;
+ else sad -= tmp;
+
+ return sad;
+ }
+
+ __inline int32 INTERP2_SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
+ {
+ tmp = (tmp >> 2) - tmp2;
+ if (tmp > 0) sad += tmp;
+ else sad -= tmp;
+
+ return sad;
+ }
+
+
+#endif /*#endif for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT))*/
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef _SAD_INLINE_H_
#define _SAD_INLINE_H_
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
+
#ifdef __cplusplus
extern "C"
{
#endif
-#if !defined(PV_ARM_GCC_V5) && !defined(PV_ARM_GCC_V4) /* ARM GNU COMPILER */
+#if ((PV_CPU_ARCH_VERSION >=4) && (PV_COMPILER == EPV_ARM_GNUC))/* ARM GNU COMPILER */
__inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
{
- tmp = tmp - tmp2;
- if (tmp > 0) sad += tmp;
- else sad -= tmp;
+ register int32 out;
+ register int32 temp1;
+ register int32 ss = sad;
+ register int32 tt = tmp;
+ register int32 uu = tmp2;
- return sad;
+ asm volatile("rsbs %1, %4, %3\n\t"
+ "rsbmi %1, %1, #0\n\t"
+ "add %0, %2, %1"
+ : "=&r"(out),
+ "=&r"(temp1)
+ : "r"(ss),
+ "r"(tt),
+ "r"(uu));
+ return out;
}
__inline int32 sad_4pixel(int32 src1, int32 src2, int32 mask)
- {
- int32 x7;
+{
+ register int32 out;
+ register int32 temp1;
+ register int32 s1 = src1;
+ register int32 s2 = src2;
+ register int32 mm = mask;
- x7 = src2 ^ src1; /* check odd/even combination */
- if ((uint32)src2 >= (uint32)src1)
- {
- src1 = src2 - src1; /* subs */
- }
- else
- {
- src1 = src1 - src2;
- }
- x7 = x7 ^ src1; /* only odd bytes need to add carry */
- x7 = mask & ((uint32)x7 >> 1);
- x7 = (x7 << 8) - x7;
- src1 = src1 + (x7 >> 7); /* add 0xFF to the negative byte, add back carry */
- src1 = src1 ^(x7 >> 7); /* take absolute value of negative byte */
+ asm volatile("eor %0, %3, %2\n\t"
+ "subs %1, %3, %2\n\t"
+ "eor %0, %0, %1\n\t"
+ "and %0, %4, %0, lsr #1\n\t"
+ "orrcc %0, %0, #0x80000000\n\t"
+ "rsb %0, %0, %0, lsl #8\n\t"
+ "add %1, %1, %0, asr #7\n\t"
+ "eor %1, %1, %0, asr #7"
+ : "=&r"(out),
+ "=&r"(temp1)
+ : "r"(s1),
+ "r"(s2),
+ "r"(mm));
- return src1;
+ return temp1;
+ }
+
+ __inline int32 sad_4pixelN(int32 src1, int32 src2, int32 mask)
+{
+ register int32 out;
+ register int32 temp1;
+ register int32 s1 = src1;
+ register int32 s2 = src2;
+ register int32 mm = mask;
+
+ asm volatile("eor %1, %3, %2\n\t"
+ "adds %0, %3, %2\n\t"
+ "eor %1, %1, %0\n\t"
+ "ands %1, %4, %1,rrx\n\t"
+ "rsb %1, %1, %1, lsl #8\n\t"
+ "sub %0, %0, %1, asr #7\n\t"
+ "eor %0, %0, %1, asr #7"
+ : "=&r"(out),
+ "=&r"(temp1)
+ : "r"(s1),
+ "r"(s2),
+ "r"(mm));
+
+ return (out);
}
+#define sum_accumulate asm volatile("sbc %0, %0, %1\n\t" \
+ "bic %1, %4, %1\n\t" \
+ "add %2, %2, %1, lsr #8\n\t" \
+ "sbc %0, %0, %3\n\t" \
+ "bic %3, %4, %3\n\t" \
+ "add %2, %2, %3, lsr #8" \
+ :"+r"(x5), "+r"(x10), "+r"(x4), "+r"(x11) \
+ :"r"(x6));
+
#define NUMBER 3
#define SHIFT 24
+#define INC_X8 0x08000001
#include "sad_mb_offset.h"
#define NUMBER 2
#undef SHIFT
#define SHIFT 16
+#undef INC_X8
+#define INC_X8 0x10000001
#include "sad_mb_offset.h"
#undef NUMBER
#define NUMBER 1
#undef SHIFT
#define SHIFT 8
+#undef INC_X8
+#define INC_X8 0x08000001
#include "sad_mb_offset.h"
__inline int32 simd_sad_mb(UChar *ref, UChar *blk, Int dmin, Int lx)
- {
+{
int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
x9 = 0x80808080; /* const. */
+ x4 = x5 = 0;
x8 = (uint32)ref & 0x3;
if (x8 == 3)
if (x8 == 1)
goto SadMBOffset1;
-// x5 = (x4<<8)-x4; /* x5 = x4*255; */
- x4 = x5 = 0;
-
- x6 = 0xFFFF00FF;
-
- ref -= lx;
- blk -= 16;
-
- x8 = 16;
+asm volatile("mvn %0, #0xFF00": "=r"(x6));
LOOP_SAD0:
/****** process 8 pixels ******/
- x10 = *((uint32*)(ref += lx));
- x11 = *((uint32*)(ref + 4));
- x12 = *((uint32*)(blk += 16));
- x14 = *((uint32*)(blk + 4));
+ x11 = *((int32*)(ref + 12));
+ x10 = *((int32*)(ref + 8));
+ x14 = *((int32*)(blk + 12));
+ x12 = *((int32*)(blk + 8));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
/* process x12 & x10 */
x10 = sad_4pixel(x10, x12, x9);
- x5 = x5 + x10; /* accumulate low bytes */
+ x5 = x5 + x10; /* accumulate low bytes */
x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+ x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
x5 = x5 + x11; /* accumulate low bytes */
x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
- /****** process 8 pixels ******/
- x10 = *((uint32*)(ref + 8));
- x11 = *((uint32*)(ref + 12));
- x12 = *((uint32*)(blk + 8));
- x14 = *((uint32*)(blk + 12));
+ asm volatile("ldr %0, [%4, #4]\n\t"
+ "ldr %1, [%4], %6\n\t"
+ "ldr %2, [%5, #4]\n\t"
+ "ldr %3, [%5], #16"
+ : "=r"(x11), "=r"(x10), "=r"(x14), "=r"(x12), "+r"(ref), "+r"(blk)
+ : "r"(lx));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
SadMBOffset1:
return sad_mb_offset1(ref, blk, lx, dmin);
-
}
-#elif defined(__CC_ARM) /* only work with arm v5 */
+#else/*#else for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT))*/
+ /*C Equaivalenc Code*/
__inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
{
- __asm
- {
- rsbs tmp, tmp, tmp2 ;
- rsbmi tmp, tmp, #0 ;
- add sad, sad, tmp ;
- }
+ tmp = tmp - tmp2;
+ if (tmp > 0) sad += tmp;
+ else sad -= tmp;
return sad;
}
{
int32 x7;
- __asm
+ x7 = src2 ^ src1; /* check odd/even combination */
+ if ((uint32)src2 >= (uint32)src1)
{
- EOR x7, src2, src1; /* check odd/even combination */
- SUBS src1, src2, src1;
- EOR x7, x7, src1;
- AND x7, mask, x7, lsr #1;
- ORRCC x7, x7, #0x80000000;
- RSB x7, x7, x7, lsl #8;
- ADD src1, src1, x7, asr #7; /* add 0xFF to the negative byte, add back carry */
- EOR src1, src1, x7, asr #7; /* take absolute value of negative byte */
+ src1 = src2 - src1; /* subs */
}
-
- return src1;
- }
-
- __inline int32 sad_4pixelN(int32 src1, int32 src2, int32 mask)
- {
- int32 x7;
-
- __asm
+ else
{
- EOR x7, src2, src1; /* check odd/even combination */
- ADDS src1, src2, src1;
- EOR x7, x7, src1; /* only odd bytes need to add carry */
- ANDS x7, mask, x7, rrx;
- RSB x7, x7, x7, lsl #8;
- SUB src1, src1, x7, asr #7; /* add 0xFF to the negative byte, add back carry */
- EOR src1, src1, x7, asr #7; /* take absolute value of negative byte */
+ src1 = src1 - src2;
}
+ x7 = x7 ^ src1; /* only odd bytes need to add carry */
+ x7 = mask & ((uint32)x7 >> 1);
+ x7 = (x7 << 8) - x7;
+ src1 = src1 + (x7 >> 7); /* add 0xFF to the negative byte, add back carry */
+ src1 = src1 ^(x7 >> 7); /* take absolute value of negative byte */
return src1;
}
-#define sum_accumulate __asm{ SBC x5, x5, x10; /* accumulate low bytes */ \
- BIC x10, x6, x10; /* x10 & 0xFF00FF00 */ \
- ADD x4, x4, x10,lsr #8; /* accumulate high bytes */ \
- SBC x5, x5, x11; /* accumulate low bytes */ \
- BIC x11, x6, x11; /* x11 & 0xFF00FF00 */ \
- ADD x4, x4, x11,lsr #8; } /* accumulate high bytes */
-
-
#define NUMBER 3
#define SHIFT 24
-#define INC_X8 0x08000001
#include "sad_mb_offset.h"
#define NUMBER 2
#undef SHIFT
#define SHIFT 16
-#undef INC_X8
-#define INC_X8 0x10000001
#include "sad_mb_offset.h"
#undef NUMBER
#define NUMBER 1
#undef SHIFT
#define SHIFT 8
-#undef INC_X8
-#define INC_X8 0x08000001
#include "sad_mb_offset.h"
int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
x9 = 0x80808080; /* const. */
- x4 = x5 = 0;
-
- __asm
- {
- MOVS x8, ref, lsl #31 ;
- BHI SadMBOffset3;
- BCS SadMBOffset2;
- BMI SadMBOffset1;
-
- MVN x6, #0xFF00;
- }
-LOOP_SAD0:
- /****** process 8 pixels ******/
- x11 = *((int32*)(ref + 12));
- x10 = *((int32*)(ref + 8));
- x14 = *((int32*)(blk + 12));
- x12 = *((int32*)(blk + 8));
-
- /* process x11 & x14 */
- x11 = sad_4pixel(x11, x14, x9);
-
- /* process x12 & x10 */
- x10 = sad_4pixel(x10, x12, x9);
-
- x5 = x5 + x10; /* accumulate low bytes */
- x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
- x5 = x5 + x11; /* accumulate low bytes */
- x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
-
- __asm
- {
- /****** process 8 pixels ******/
- LDR x11, [ref, #4];
- LDR x10, [ref], lx ;
- LDR x14, [blk, #4];
- LDR x12, [blk], #16 ;
- }
-
- /* process x11 & x14 */
- x11 = sad_4pixel(x11, x14, x9);
-
- /* process x12 & x10 */
- x10 = sad_4pixel(x10, x12, x9);
-
- x5 = x5 + x10; /* accumulate low bytes */
- x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
- x5 = x5 + x11; /* accumulate low bytes */
- x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
-
- /****************/
- x10 = x5 - (x4 << 8); /* extract low bytes */
- x10 = x10 + x4; /* add with high bytes */
- x10 = x10 + (x10 << 16); /* add with lower half word */
-
- __asm
- {
- /****************/
- RSBS x11, dmin, x10, lsr #16;
- ADDLSS x8, x8, #0x10000001;
- BLS LOOP_SAD0;
- }
-
- return ((uint32)x10 >> 16);
-
-SadMBOffset3:
-
- return sad_mb_offset3(ref, blk, lx, dmin, x8);
-
-SadMBOffset2:
-
- return sad_mb_offset2(ref, blk, lx, dmin, x8);
-
-SadMBOffset1:
-
- return sad_mb_offset1(ref, blk, lx, dmin, x8);
- }
-
-
-#elif ( defined(PV_ARM_GCC_V5) || defined(PV_ARM_GCC_V4) ) /* ARM GNU COMPILER */
-
- __inline int32 SUB_SAD(int32 sad, int32 tmp, int32 tmp2)
- {
- register int32 out;
- register int32 temp1;
- register int32 ss = sad;
- register int32 tt = tmp;
- register int32 uu = tmp2;
-
- asm volatile("rsbs %1, %4, %3\n\t"
- "rsbmi %1, %1, #0\n\t"
- "add %0, %2, %1"
- : "=&r"(out),
- "=&r"(temp1)
- : "r"(ss),
- "r"(tt),
- "r"(uu));
- return out;
- }
-
- __inline int32 sad_4pixel(int32 src1, int32 src2, int32 mask)
-{
- register int32 out;
- register int32 temp1;
- register int32 s1 = src1;
- register int32 s2 = src2;
- register int32 mm = mask;
-
- asm volatile("eor %0, %3, %2\n\t"
- "subs %1, %3, %2\n\t"
- "eor %0, %0, %1\n\t"
- "and %0, %4, %0, lsr #1\n\t"
- "orrcc %0, %0, #0x80000000\n\t"
- "rsb %0, %0, %0, lsl #8\n\t"
- "add %1, %1, %0, asr #7\n\t"
- "eor %1, %1, %0, asr #7"
- : "=&r"(out),
- "=&r"(temp1)
- : "r"(s1),
- "r"(s2),
- "r"(mm));
-
- return temp1;
- }
-
- __inline int32 sad_4pixelN(int32 src1, int32 src2, int32 mask)
-{
- register int32 out;
- register int32 temp1;
- register int32 s1 = src1;
- register int32 s2 = src2;
- register int32 mm = mask;
-
- asm volatile("eor %1, %3, %2\n\t"
- "adds %0, %3, %2\n\t"
- "eor %1, %1, %0\n\t"
- "ands %1, %4, %1,rrx\n\t"
- "rsb %1, %1, %1, lsl #8\n\t"
- "sub %0, %0, %1, asr #7\n\t"
- "eor %0, %0, %1, asr #7"
- : "=&r"(out),
- "=&r"(temp1)
- : "r"(s1),
- "r"(s2),
- "r"(mm));
-
- return (out);
- }
-
-#define sum_accumulate asm volatile("sbc %0, %0, %1\n\t" \
- "bic %1, %4, %1\n\t" \
- "add %2, %2, %1, lsr #8\n\t" \
- "sbc %0, %0, %3\n\t" \
- "bic %3, %4, %3\n\t" \
- "add %2, %2, %3, lsr #8" \
- :"+r"(x5), "+r"(x10), "+r"(x4), "+r"(x11) \
- :"r"(x6));
-
-#define NUMBER 3
-#define SHIFT 24
-#define INC_X8 0x08000001
-
-#include "sad_mb_offset.h"
-
-#undef NUMBER
-#define NUMBER 2
-#undef SHIFT
-#define SHIFT 16
-#undef INC_X8
-#define INC_X8 0x10000001
-#include "sad_mb_offset.h"
-
-#undef NUMBER
-#define NUMBER 1
-#undef SHIFT
-#define SHIFT 8
-#undef INC_X8
-#define INC_X8 0x08000001
-#include "sad_mb_offset.h"
-
-
- __inline int32 simd_sad_mb(UChar *ref, UChar *blk, Int dmin, Int lx)
-{
- int32 x4, x5, x6, x8, x9, x10, x11, x12, x14;
-
- x9 = 0x80808080; /* const. */
- x4 = x5 = 0;
x8 = (uint32)ref & 0x3;
if (x8 == 3)
if (x8 == 1)
goto SadMBOffset1;
-asm volatile("mvn %0, #0xFF00": "=r"(x6));
+// x5 = (x4<<8)-x4; /* x5 = x4*255; */
+ x4 = x5 = 0;
+
+ x6 = 0xFFFF00FF;
+
+ ref -= lx;
+ blk -= 16;
+
+ x8 = 16;
LOOP_SAD0:
/****** process 8 pixels ******/
- x11 = *((int32*)(ref + 12));
- x10 = *((int32*)(ref + 8));
- x14 = *((int32*)(blk + 12));
- x12 = *((int32*)(blk + 8));
+ x10 = *((uint32*)(ref += lx));
+ x11 = *((uint32*)(ref + 4));
+ x12 = *((uint32*)(blk += 16));
+ x14 = *((uint32*)(blk + 4));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
/* process x12 & x10 */
x10 = sad_4pixel(x10, x12, x9);
- x5 = x5 + x10; /* accumulate low bytes */
+ x5 = x5 + x10; /* accumulate low bytes */
x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+ x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
x5 = x5 + x11; /* accumulate low bytes */
x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
- asm volatile("ldr %0, [%4, #4]\n\t"
- "ldr %1, [%4], %6\n\t"
- "ldr %2, [%5, #4]\n\t"
- "ldr %3, [%5], #16"
- : "=r"(x11), "=r"(x10), "=r"(x14), "=r"(x12), "+r"(ref), "+r"(blk)
- : "r"(lx));
+ /****** process 8 pixels ******/
+ x10 = *((uint32*)(ref + 8));
+ x11 = *((uint32*)(ref + 12));
+ x12 = *((uint32*)(blk + 8));
+ x14 = *((uint32*)(blk + 12));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
SadMBOffset1:
return sad_mb_offset1(ref, blk, lx, dmin);
- }
-#endif // OS
+ }
+#endif /*#endif for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT))*/
#ifdef __cplusplus
}
#endif
#endif // _SAD_INLINE_H_
-
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/* Modified: */
/*********************************************************************************/
-#if !defined(PV_ARM_GCC_V4) && !defined(PV_ARM_GCC_V5) /* ARM GNU COMPILER */
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
+
+/* ARM GNU COMPILER */
+#if ((PV_CPU_ARCH_VERSION >=4) && (PV_COMPILER == EPV_ARM_GNUC))/* ARM GNU COMPILER */
#if (NUMBER==3)
__inline int32 sad_mb_offset3(UChar *ref, UChar *blk, Int lx, Int dmin)
x9 = 0x80808080; /* const. */
ref -= NUMBER; /* bic ref, ref, #3 */
ref -= lx;
- blk -= 16;
x8 = 16;
#if (NUMBER==3)
x11 = *((uint32*)(ref + 4)); /* H G F E */
x12 = *((uint32*)(ref + 8)); /* L K J I */
- x10 = ((uint32)x10 >> SHIFT); /* 0 0 0 D */
- x10 = x10 | (x11 << (32 - SHIFT)); /* G F E D */
- x11 = ((uint32)x11 >> SHIFT); /* 0 0 0 H */
- x11 = x11 | (x12 << (32 - SHIFT)); /* K J I H */
-
- x12 = *((uint32*)(blk += 16));
- x14 = *((uint32*)(blk + 4));
+ int32 shift = SHIFT;
+ int32 shift2 = 32 - SHIFT;
+ asm volatile("ldr %3, [%4, #4]\n\t"
+ "mvn %0, %0, lsr %5\n\t"
+ "bic %0, %0, %1, lsl %6\n\t"
+ "mvn %1, %1, lsr %5\n\t"
+ "bic %1, %1, %2, lsl %6\n\t"
+ "ldr %2, [%4, #8]"
+ : "+r"(x10), "+r"(x11), "+r"(x12), "=r"(x14)
+ : "r"(blk), "r"(shift), "r"(shift2));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
/* process x12 & x10 */
x10 = sad_4pixel(x10, x12, x9);
- x5 = x5 + x10; /* accumulate low bytes */
- x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
- x5 = x5 + x11; /* accumulate low bytes */
- x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
+ sum_accumulate;
/****** process 8 pixels ******/
x10 = *((uint32*)(ref + 8)); /* D C B A */
x11 = *((uint32*)(ref + 12)); /* H G F E */
x12 = *((uint32*)(ref + 16)); /* L K J I */
- x10 = ((uint32)x10 >> SHIFT); /* mvn x10, x10, lsr #24 = 0xFF 0xFF 0xFF ~D */
- x10 = x10 | (x11 << (32 - SHIFT)); /* bic x10, x10, x11, lsl #8 = ~G ~F ~E ~D */
- x11 = ((uint32)x11 >> SHIFT); /* 0xFF 0xFF 0xFF ~H */
- x11 = x11 | (x12 << (32 - SHIFT)); /* ~K ~J ~I ~H */
-
- x12 = *((uint32*)(blk + 8));
- x14 = *((uint32*)(blk + 12));
+ asm volatile("ldr %3, [%4, #4]\n\t"
+ "mvn %0, %0, lsr %5\n\t"
+ "bic %0, %0, %1, lsl %6\n\t"
+ "mvn %1, %1, lsr %5\n\t"
+ "bic %1, %1, %2, lsl %6\n\t"
+ "ldr %2, [%4, #8]"
+ : "+r"(x10), "+r"(x11), "+r"(x12), "=r"(x14)
+ : "r"(blk), "r"(shift), "r"(shift2));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
/* process x12 & x10 */
x10 = sad_4pixel(x10, x12, x9);
- x5 = x5 + x10; /* accumulate low bytes */
- x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
- x5 = x5 + x11; /* accumulate low bytes */
- x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
- x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
+ sum_accumulate;
/****************/
x10 = x5 - (x4 << 8); /* extract low bytes */
return ((uint32)x10 >> 16);
}
-#elif defined(__CC_ARM) /* only work with arm v5 */
-
-#if (NUMBER==3)
-__inline int32 sad_mb_offset3(UChar *ref, UChar *blk, Int lx, Int dmin, int32 x8)
-#elif (NUMBER==2)
-__inline int32 sad_mb_offset2(UChar *ref, UChar *blk, Int lx, Int dmin, int32 x8)
-#elif (NUMBER==1)
-__inline int32 sad_mb_offset1(UChar *ref, UChar *blk, Int lx, Int dmin, int32 x8)
-#endif
-{
- int32 x4, x5, x6, x9, x10, x11, x12, x14;
-
- x9 = 0x80808080; /* const. */
- x4 = x5 = 0;
-
- __asm{
- MVN x6, #0xff0000;
- BIC ref, ref, #3;
-
-#if (NUMBER==3)
-LOOP_SAD3:
-#elif (NUMBER==2)
-LOOP_SAD2:
-#elif (NUMBER==1)
-LOOP_SAD1:
-#endif
- }
- /****** process 8 pixels ******/
- x11 = *((int32*)(ref + 12));
- x12 = *((int32*)(ref + 16));
- x10 = *((int32*)(ref + 8));
- x14 = *((int32*)(blk + 12));
-
- __asm{
- MVN x10, x10, lsr #SHIFT;
- BIC x10, x10, x11, lsl #(32-SHIFT);
- MVN x11, x11, lsr #SHIFT;
- BIC x11, x11, x12, lsl #(32-SHIFT);
-
- LDR x12, [blk, #8];
- }
-
- /* process x11 & x14 */
- x11 = sad_4pixelN(x11, x14, x9);
-
- /* process x12 & x10 */
- x10 = sad_4pixelN(x10, x12, x9);
-
- sum_accumulate;
-
- __asm{
- /****** process 8 pixels ******/
- LDR x11, [ref, #4];
- LDR x12, [ref, #8];
- LDR x10, [ref], lx ;
- LDR x14, [blk, #4];
-
- MVN x10, x10, lsr #SHIFT;
- BIC x10, x10, x11, lsl #(32-SHIFT);
- MVN x11, x11, lsr #SHIFT;
- BIC x11, x11, x12, lsl #(32-SHIFT);
-
- LDR x12, [blk], #16;
- }
-
- /* process x11 & x14 */
- x11 = sad_4pixelN(x11, x14, x9);
-
- /* process x12 & x10 */
- x10 = sad_4pixelN(x10, x12, x9);
-
- sum_accumulate;
-
- /****************/
- x10 = x5 - (x4 << 8); /* extract low bytes */
- x10 = x10 + x4; /* add with high bytes */
- x10 = x10 + (x10 << 16); /* add with lower half word */
-
- __asm{
- RSBS x11, dmin, x10, lsr #16
- ADDLSS x8, x8, #INC_X8
-#if (NUMBER==3)
- BLS LOOP_SAD3;
-#elif (NUMBER==2)
-BLS LOOP_SAD2;
-#elif (NUMBER==1)
-BLS LOOP_SAD1;
-#endif
- }
-
- return ((uint32)x10 >> 16);
-}
-
-#elif ( defined(PV_ARM_GCC_V5) || defined(PV_ARM_GCC_V4) ) /* ARM GNU COMPILER */
+#else/*#else for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT))*/
+/*C Equivalent code*/
#if (NUMBER==3)
__inline int32 sad_mb_offset3(UChar *ref, UChar *blk, Int lx, Int dmin)
#elif (NUMBER==2)
x9 = 0x80808080; /* const. */
ref -= NUMBER; /* bic ref, ref, #3 */
ref -= lx;
+ blk -= 16;
x8 = 16;
#if (NUMBER==3)
x11 = *((uint32*)(ref + 4)); /* H G F E */
x12 = *((uint32*)(ref + 8)); /* L K J I */
- int32 shift = SHIFT;
- int32 shift2 = 32 - SHIFT;
- asm volatile("ldr %3, [%4, #4]\n\t"
- "mvn %0, %0, lsr %5\n\t"
- "bic %0, %0, %1, lsl %6\n\t"
- "mvn %1, %1, lsr %5\n\t"
- "bic %1, %1, %2, lsl %6\n\t"
- "ldr %2, [%4, #8]"
- : "+r"(x10), "+r"(x11), "+r"(x12), "=r"(x14)
- : "r"(blk), "r"(shift), "r"(shift2));
+ x10 = ((uint32)x10 >> SHIFT); /* 0 0 0 D */
+ x10 = x10 | (x11 << (32 - SHIFT)); /* G F E D */
+ x11 = ((uint32)x11 >> SHIFT); /* 0 0 0 H */
+ x11 = x11 | (x12 << (32 - SHIFT)); /* K J I H */
+
+ x12 = *((uint32*)(blk += 16));
+ x14 = *((uint32*)(blk + 4));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
/* process x12 & x10 */
x10 = sad_4pixel(x10, x12, x9);
- sum_accumulate;
+ x5 = x5 + x10; /* accumulate low bytes */
+ x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+ x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+ x5 = x5 + x11; /* accumulate low bytes */
+ x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+ x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
/****** process 8 pixels ******/
x10 = *((uint32*)(ref + 8)); /* D C B A */
x11 = *((uint32*)(ref + 12)); /* H G F E */
x12 = *((uint32*)(ref + 16)); /* L K J I */
- asm volatile("ldr %3, [%4, #4]\n\t"
- "mvn %0, %0, lsr %5\n\t"
- "bic %0, %0, %1, lsl %6\n\t"
- "mvn %1, %1, lsr %5\n\t"
- "bic %1, %1, %2, lsl %6\n\t"
- "ldr %2, [%4, #8]"
- : "+r"(x10), "+r"(x11), "+r"(x12), "=r"(x14)
- : "r"(blk), "r"(shift), "r"(shift2));
+ x10 = ((uint32)x10 >> SHIFT); /* mvn x10, x10, lsr #24 = 0xFF 0xFF 0xFF ~D */
+ x10 = x10 | (x11 << (32 - SHIFT)); /* bic x10, x10, x11, lsl #8 = ~G ~F ~E ~D */
+ x11 = ((uint32)x11 >> SHIFT); /* 0xFF 0xFF 0xFF ~H */
+ x11 = x11 | (x12 << (32 - SHIFT)); /* ~K ~J ~I ~H */
+
+ x12 = *((uint32*)(blk + 8));
+ x14 = *((uint32*)(blk + 12));
/* process x11 & x14 */
x11 = sad_4pixel(x11, x14, x9);
/* process x12 & x10 */
x10 = sad_4pixel(x10, x12, x9);
- sum_accumulate;
+ x5 = x5 + x10; /* accumulate low bytes */
+ x10 = x10 & (x6 << 8); /* x10 & 0xFF00FF00 */
+ x4 = x4 + ((uint32)x10 >> 8); /* accumulate high bytes */
+ x5 = x5 + x11; /* accumulate low bytes */
+ x11 = x11 & (x6 << 8); /* x11 & 0xFF00FF00 */
+ x4 = x4 + ((uint32)x11 >> 8); /* accumulate high bytes */
/****************/
x10 = x5 - (x4 << 8); /* extract low bytes */
return ((uint32)x10 >> 16);
}
-
-#endif
-
+#endif/*#endif for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT))*/
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef _VLC_ENCODE_INLINE_H_
#define _VLC_ENCODE_INLINE_H_
-#if !defined(PV_ARM_GCC_V5)
+#include "oscl_base_macros.h"// has integer values of PV_COMPILER
-__inline Int zero_run_search(UInt *bitmapzz, Short *dataBlock, RunLevelBlock *RLB, Int nc)
-{
- Int idx, run, level, j;
- UInt end, match;
-
- idx = 0;
- j = 0;
- run = 0;
- match = 1 << 31;
- if (nc > 32)
- end = 1;
- else
- end = 1 << (32 - nc);
-
- while (match >= end)
- {
- if ((match&bitmapzz[0]) == 0)
- {
- run++;
- j++;
- match >>= 1;
- }
- else
- {
- match >>= 1;
- level = dataBlock[j];
- dataBlock[j] = 0; /* reset output */
- j++;
- if (level < 0)
- {
- RLB->level[idx] = -level;
- RLB->s[idx] = 1;
- RLB->run[idx] = run;
- run = 0;
- idx++;
- }
- else
- {
- RLB->level[idx] = level;
- RLB->s[idx] = 0;
- RLB->run[idx] = run;
- run = 0;
- idx++;
- }
- }
- }
- nc -= 32;
- if (nc > 0)
- {
- match = 1 << 31;
- end = 1 << (32 - nc);
- while (match >= end)
- {
- if ((match&bitmapzz[1]) == 0)
- {
- run++;
- j++;
- match >>= 1;
- }
- else
- {
- match >>= 1;
- level = dataBlock[j];
- dataBlock[j] = 0; /* reset output */
- j++;
- if (level < 0)
- {
- RLB->level[idx] = -level;
- RLB->s[idx] = 1;
- RLB->run[idx] = run;
- run = 0;
- idx++;
- }
- else
- {
- RLB->level[idx] = level;
- RLB->s[idx] = 0;
- RLB->run[idx] = run;
- run = 0;
- idx++;
- }
- }
- }
- }
-
- return idx;
-}
-
-#elif defined(__CC_ARM) /* only work with arm v5 */
-
-__inline Int zero_run_search(UInt *bitmapzz, Short *dataBlock, RunLevelBlock *RLB, Int nc)
-{
- OSCL_UNUSED_ARG(nc);
- Int idx, run, level, j;
- UInt end, match;
- Int zzorder;
-
- idx = 0;
- run = 0;
- j = -1;
- __asm
- {
- ldr match, [bitmapzz]
- clz run, match
- }
-
- zzorder = 0;
-
- while (run < 32)
- {
- __asm
- {
- mov end, #0x80000000
- mov end, end, lsr run /* mask*/
- bic match, match, end /* remove it from bitmap */
- mov run, run, lsl #1 /* 05/09/02 */
- ldrsh level, [dataBlock, run] /* load data */
- strh zzorder, [dataBlock, run] /* reset output */
- add j, j, #1
- rsb run, j, run, lsr #1 /* delta run */
- add j, j, run /* current position */
- }
- if (level < 0)
- {
- RLB->level[idx] = -level;
- RLB->s[idx] = 1;
- RLB->run[idx] = run;
- run = 0;
- idx++;
- }
- else
- {
- RLB->level[idx] = level;
- RLB->s[idx] = 0;
- RLB->run[idx] = run;
- run = 0;
- idx++;
- }
- __asm
- {
- clz run, match
- }
- }
- __asm
- {
- ldr match, [bitmapzz, #4]
- clz run, match
- }
-
- while (run < 32)
- {
- __asm
- {
- mov end, #0x80000000
- mov end, end, lsr run /* mask*/
- bic match, match, end /* remove it from bitmap */
- add run, run, #32 /* current position */
- mov run, run, lsl #1 /* 09/02/05 */
- ldrsh level, [dataBlock, run] /* load data */
- strh zzorder, [dataBlock, run] /* reset output */
- add j, j, #1
- rsb run, j, run, lsr #1 /* delta run */
- add j, j, run /* current position */
- }
- if (level < 0)
- {
- RLB->level[idx] = -level;
- RLB->s[idx] = 1;
- RLB->run[idx] = run;
- run = 0;
- idx++;
- }
- else
- {
- RLB->level[idx] = level;
- RLB->s[idx] = 0;
- RLB->run[idx] = run;
- run = 0;
- idx++;
- }
- __asm
- {
- clz run, match
- }
- }
-
- return idx;
-}
-
-#elif (defined(PV_ARM_GCC_V5) ) /* ARM GNU COMPILER */
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))/* ARM GNU COMPILER */
__inline Int m4v_enc_clz(UInt temp)
{
return idx;
}
-#endif
+#else/*#else for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT))*/
+/*C Equivalent code*/
+__inline Int zero_run_search(UInt *bitmapzz, Short *dataBlock, RunLevelBlock *RLB, Int nc)
+{
+ Int idx, run, level, j;
+ UInt end, match;
+
+ idx = 0;
+ j = 0;
+ run = 0;
+ match = 1 << 31;
+ if (nc > 32)
+ end = 1;
+ else
+ end = 1 << (32 - nc);
+
+ while (match >= end)
+ {
+ if ((match&bitmapzz[0]) == 0)
+ {
+ run++;
+ j++;
+ match >>= 1;
+ }
+ else
+ {
+ match >>= 1;
+ level = dataBlock[j];
+ dataBlock[j] = 0; /* reset output */
+ j++;
+ if (level < 0)
+ {
+ RLB->level[idx] = -level;
+ RLB->s[idx] = 1;
+ RLB->run[idx] = run;
+ run = 0;
+ idx++;
+ }
+ else
+ {
+ RLB->level[idx] = level;
+ RLB->s[idx] = 0;
+ RLB->run[idx] = run;
+ run = 0;
+ idx++;
+ }
+ }
+ }
+ nc -= 32;
+ if (nc > 0)
+ {
+ match = 1 << 31;
+ end = 1 << (32 - nc);
+ while (match >= end)
+ {
+ if ((match&bitmapzz[1]) == 0)
+ {
+ run++;
+ j++;
+ match >>= 1;
+ }
+ else
+ {
+ match >>= 1;
+ level = dataBlock[j];
+ dataBlock[j] = 0; /* reset output */
+ j++;
+ if (level < 0)
+ {
+ RLB->level[idx] = -level;
+ RLB->s[idx] = 1;
+ RLB->run[idx] = run;
+ run = 0;
+ idx++;
+ }
+ else
+ {
+ RLB->level[idx] = level;
+ RLB->s[idx] = 0;
+ RLB->run[idx] = run;
+ run = 0;
+ idx++;
+ }
+ }
+ }
+ }
+
+ return idx;
+}
+
+
+#endif/*#endif for ((PV_CPU_ARCH_VERSION>=4) && (PV_COMPILER==EPV_ARM_RVCT))*/
#endif // _VLC_ENCODE_INLINE_H_
LOCAL_MODULE := libpv2wayengine
-LOCAL_CFLAGS := -DSIP_VOIP_PROJECT=1 -DPV2WAY_USE_OMX $(PV_CFLAGS)
+LOCAL_CFLAGS := -DSIP_VOIP_PROJECT=1 -DPV2WAY_USE_OMX -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpv2waysample
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PV2WAY_ENGINE_SDKINFO_LABEL "CORE_8.508.1.1"
-#define PV2WAY_ENGINE_SDKINFO_DATE 0x20100401
+#define PV2WAY_ENGINE_SDKINFO_LABEL "1359188"
+#define PV2WAY_ENGINE_SDKINFO_DATE 0x20100405
#endif //PV_2WAY_SDKINFO_H_INCLUDED
LOCAL_MODULE := libpvframemetadatautility
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvauthorengine
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PVAUTHOR_ENGINE_SDKINFO_LABEL "CORE_8.508.1.1"
-#define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100401
+#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1359188"
+#define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100405
#endif //PV_AUTHOR_SDKINFO_H_INCLUDED
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvplayer_engine
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PVPLAYER_ENGINE_SDKINFO_LABEL "CORE_8.508.1.1"
-#define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100401
+#define PVPLAYER_ENGINE_SDKINFO_LABEL "1359188"
+#define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100405
#endif //PV_PLAYER_SDKINFO_H_INCLUDED
LOCAL_MODULE := libpvmetadata_engine
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvavifileparser
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvfileparserutils
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvid3parcom
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmp3ff
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmp4ffcomposer
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmp4ff
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libmp4recognizer_utility
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvpvxparser
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvaacparser
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvgsmamrparser
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libscsp
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvwav
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvoma1passthruplugininterface
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvdownloadinterface
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvdownloadreginterface
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmp4interface
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmp4reginterface
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvsminterface
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvsmreginterface
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvsmrtsptstreamingplugin
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvsmrtsptstreamingpluginreg
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvrtspsmplugininterface
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvrtspsmpluginreginterface
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvaacffparsernode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvamrffparsernode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvclientserversocketnode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvcommsionode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvdownloadmanagernode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvfileoutputnode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmediainputnode
-LOCAL_CFLAGS := -DTEXT_TRACK_DESC_INFO -D_TEST_AE_ERROR_HANDLING $(PV_CFLAGS)
+LOCAL_CFLAGS := -DTEXT_TRACK_DESC_INFO -D_TEST_AE_ERROR_HANDLING -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmediaoutputnode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmp3ffparsernode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmp4ffcomposernode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmp4ffparsernode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvomxaudiodecnode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvomxbasedecnode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvomxencnode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvomxvideodecnode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libprotocolenginenode_base
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libprotocolenginenode_download_common
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libprotocolenginenode_pdl
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libprotocolenginenode_ps
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libprotocolenginenode_shoutcast
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libprotocolenginenode_common
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvsocketnode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvwavffparsernode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvjitterbuffernode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvjitterbuffer
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvjitterbufferrtp
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvstreamingmanagernode
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvsmfspcommon
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvrtsptunicaststreamingmanager
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvrtspunicaststreamingmanager
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libosclbase
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#endif
+/* The following macros enumerate the possible values of the build flag PV_COMPILER */
+
+#define EPV_ARM_GNUC 1 /* for GNU compiler */
+#define EPV_ARM_RVCT 2 /* for RVCT compiler from ARM */
+#define EPV_ARM_MSEVC 3 /* for MS Embedded VC compiler */
+
+/* PV_COMPILER value must be set to build command.
+ In addition, PV_CPU_ARCH_VERSION must be defined to take on an integer value that specifies the version of target
+ ARM architecture. */
+
+
/*! @} */
#endif // OSCL_BASE_MACROS_H_INCLUDED
LOCAL_MODULE := libosclerror
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libosclio
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := liboscllib
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libosclmemory
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libosclproc
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libosclregcli
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libosclregserv
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libosclutil
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvlogger
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libunit_test
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpv_http_parcom
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := librtprtcp
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := librtppayloadparser
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvlatmpayloadparser
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvrtsp_cli_eng_node
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpv_rtsp_parcom
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvsdpparser
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpv324m
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvgeneraltools
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libcpm
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvoma1passthruplugin
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmioaviwavfileinput
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmiofileinput
-LOCAL_CFLAGS := -DTEXT_TRACK_DESC_INFO $(PV_CFLAGS)
+LOCAL_CFLAGS := -DTEXT_TRACK_DESC_INFO -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmio_comm_loopback
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmiofileoutput
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmf
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmfrecognizer
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvaacffrecognizer
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvamrffrecognizer
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmp3ffrecognizer
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvmp4ffrecognizer
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvplsffrecognizer
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
LOCAL_MODULE := libpvwavffrecognizer
-LOCAL_CFLAGS := $(PV_CFLAGS)
+LOCAL_CFLAGS := -DPV_CPU_ARCH_VERSION=0 $(PV_CFLAGS)
LOCAL_STATIC_LIBRARIES :=
CAPABILITIES :=
ARMCC_MACROS :=
ARMCC_SRC_PATH :=
-ARMCC_SRC :=
\ No newline at end of file
+ARMCC_SRC :=
+LIB_CPU_ARCH_VERSION :=
+TARGET_ARMCC :=
$(TARGET)_libtype ?= $(DEFAULT_LIBTYPE)
$(TARGET)_asm_flags ?= $(DEFAULT_CPP_ASM_FLAGS)
-XCPPFLAGS += $($(TARGET)_asm_flags)
+XCPPFLAGS += $($(TARGET)_asm_flags)
# $(info target = $(TARGET), libtype = $($(TARGET)_libtype))
XCPPFLAGS+=$(RELEASE_CPPFLAGS)
endif
+#Checking the availability of CPU_ARCH_VESION at local.mk or toolset.mk
+ifeq ($(LIB_CPU_ARCH_VERSION),)
+ PV_CPU_ARCH_VERSION := $(GLOBAL_CPU_ARCH_VERSION)
+else
+ PV_CPU_ARCH_VERSION := $(LIB_CPU_ARCH_VERSION)
+endif
+XCPPFLAGS+= -D"PV_CPU_ARCH_VERSION=$(PV_CPU_ARCH_VERSION)"
+
+#Specify Target Architecture for Symbian Compiler
+ifeq ($(PV_CPU_ARCH_VERSION),4)
+ TARGET_ARMCC := OPTION ARMCC --cpu 5T
+else ifeq ($(PV_CPU_ARCH_VERSION),5)
+ TARGET_ARMCC := OPTION ARMCC --cpu 5TE
+else ifeq ($(PV_CPU_ARCH_VERSION),6)
+ TARGET_ARMCC := OPTION ARMCC --cpu 6
+endif
+
ifneq ($(strip $(LOCAL_EXPORT_ALL_SYMBOLS)),true)
XCXXFLAGS += $(HIDE_INTERNAL_SYMBOLS_FLAG)
XCFLAGS += $(HIDE_INTERNAL_SYMBOLS_FLAG)
XCPPFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-
+CPPFLAGS += -DPV_COMPILER=1
+ifeq ($(GLOBAL_CPU_ARCH_VERSION), )
+GLOBAL_CPU_ARCH_VERSION :=0
+endif
INSTALL := install
INSTALL_OPTS := -c -D -m 444
-
SED := sed
MV := mv
RM := rm -f