diff options
author | Hamsalekha S <hamsalekha.s@ittiam.com> | 2015-05-07 16:38:07 +0530 |
---|---|---|
committer | Hamsalekha S <hamsalekha.s@ittiam.com> | 2015-05-19 17:38:02 +0530 |
commit | caab4fe0688e7c4b023d979b617fb16a275614f2 (patch) | |
tree | 79da99e029f5c41581f6878f49d025ecfccc32b9 /common/arm | |
parent | 25e8adb631df325607216ad6f3d6638442d9f453 (diff) | |
download | android_external_libavc-caab4fe0688e7c4b023d979b617fb16a275614f2.tar.gz android_external_libavc-caab4fe0688e7c4b023d979b617fb16a275614f2.tar.bz2 android_external_libavc-caab4fe0688e7c4b023d979b617fb16a275614f2.zip |
Multithreading changes and better error resilience
Fixed the following bugs
Issue 21145276
Issue 21144884
Issue 21181133
Issue 21181134
Decoder now returns error if the level in stream is higher than level at init
Change-Id: I8892c62bd98f7854d046510330c05a1e9ca826b2
Diffstat (limited to 'common/arm')
-rw-r--r-- | common/arm/ih264_platform_macros.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/common/arm/ih264_platform_macros.h b/common/arm/ih264_platform_macros.h index 1f67403..438e240 100644 --- a/common/arm/ih264_platform_macros.h +++ b/common/arm/ih264_platform_macros.h @@ -33,13 +33,11 @@ * ******************************************************************************* */ -#ifndef _IHEVC_PLATFORM_MACROS_H_ -#define _IHEVC_PLATFORM_MACROS_H_ +#ifndef _IH264_PLATFORM_MACROS_H_ +#define _IH264_PLATFORM_MACROS_H_ #ifndef ARMV8 -void ih264_arm_dsb(void); -#define DATA_SYNC() ih264_arm_dsb() static __inline WORD32 CLIP_U8(WORD32 x) { asm("usat %0, #8, %1" : "=r"(x) : "r"(x)); @@ -93,8 +91,9 @@ static __inline UWORD32 ITT_BIG_ENDIAN(UWORD32 x) asm("rev %0, %1" : "=r"(x) : "r"(x)); return x; } +#define NOP(nop_cnt) {UWORD32 nop_i; for (nop_i = 0; nop_i < nop_cnt; nop_i++) asm("nop");} + #else -#define DATA_SYNC() ; #define CLIP_U8(x) CLIP3(0, 255, (x)) #define CLIP_S8(x) CLIP3(-128, 127, (x)) @@ -108,12 +107,19 @@ static __inline UWORD32 ITT_BIG_ENDIAN(UWORD32 x) #define CLIP_U16(x) CLIP3(0, 65535, (x)) #define CLIP_S16(x) CLIP3(-32768, 32767, (x)) -#define ITT_BIG_ENDIAN(x) ((x & 0x000000ff) << 24) | \ - ((x & 0x0000ff00) << 8) | \ - ((x & 0x00ff0000) >> 8) | \ - ((UWORD32)x >> 24); +#define ITT_BIG_ENDIAN(x) __asm__("rev %0, %1" : "=r"(x) : "r"(x)); + +#define NOP(nop_cnt) \ +{ \ + UWORD32 nop_i; \ + for (nop_i = 0; nop_i < nop_cnt; nop_i++) \ + __asm__ __volatile__("mov x0, x0"); \ +} + #endif +#define DATA_SYNC() __sync_synchronize() + #define SHL(x,y) (((y) < 32) ? ((x) << (y)) : 0) #define SHR(x,y) (((y) < 32) ? ((x) >> (y)) : 0) @@ -141,12 +147,8 @@ static INLINE UWORD32 CTZ(UWORD32 u4_word) } } - -#define NOP(nop_cnt) {UWORD32 nop_i; for (nop_i = 0; nop_i < nop_cnt; nop_i++);} - - #define MEM_ALIGN8 __attribute__ ((aligned (8))) #define MEM_ALIGN16 __attribute__ ((aligned (16))) #define MEM_ALIGN32 __attribute__ ((aligned (32))) -#endif /* _IHEVC_PLATFORM_MACROS_H_ */ +#endif /* _IH264_PLATFORM_MACROS_H_ */ |