[x265] [PATCH] add 64-byte alignment macro, align NR buffer & Encoder class to cache line of 64-byte

Steve Borho steve at borho.org
Tue Oct 6 15:42:48 CEST 2015


On 10/06, dnyaneshwar at multicorewareinc.com wrote:
> # HG changeset patch
> # User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
> # Date 1444107449 -19800
> #      Tue Oct 06 10:27:29 2015 +0530
> # Node ID 93525c471023575d500c912284a3853ee8df8991
> # Parent  f8b8ebdc54578e6735216d8b9abce5ba80c05bd8
> add 64-byte alignment macro, align NR buffer & Encoder class to cache line of 64-byte

what does this fix or improve?

> diff -r f8b8ebdc5457 -r 93525c471023 source/common/common.h
> --- a/source/common/common.h	Mon Sep 28 14:34:41 2015 +0530
> +++ b/source/common/common.h	Tue Oct 06 10:27:29 2015 +0530
> @@ -74,6 +74,7 @@
>  #define ALIGN_VAR_8(T, var)  T var __attribute__((aligned(8)))
>  #define ALIGN_VAR_16(T, var) T var __attribute__((aligned(16)))
>  #define ALIGN_VAR_32(T, var) T var __attribute__((aligned(32)))
> +#define ALIGN_VAR_64(T, var) T var __attribute__((aligned(64)))
>  
>  #if defined(__MINGW32__)
>  #define fseeko fseeko64
> @@ -84,6 +85,7 @@
>  #define ALIGN_VAR_8(T, var)  __declspec(align(8)) T var
>  #define ALIGN_VAR_16(T, var) __declspec(align(16)) T var
>  #define ALIGN_VAR_32(T, var) __declspec(align(32)) T var
> +#define ALIGN_VAR_64(T, var) __declspec(align(64)) T var
>  #define fseeko _fseeki64
>  
>  #endif // if defined(__GNUC__)
> diff -r f8b8ebdc5457 -r 93525c471023 source/encoder/encoder.h
> --- a/source/encoder/encoder.h	Mon Sep 28 14:34:41 2015 +0530
> +++ b/source/encoder/encoder.h	Tue Oct 06 10:27:29 2015 +0530
> @@ -79,7 +79,7 @@
>  {
>  public:
>  
> -    ALIGN_VAR_16(uint32_t, m_residualSumEmergency[MAX_NUM_TR_CATEGORIES][MAX_NUM_TR_COEFFS]);
> +    ALIGN_VAR_64(uint32_t, m_residualSumEmergency[MAX_NUM_TR_CATEGORIES][MAX_NUM_TR_COEFFS]);
>      uint32_t           m_countEmergency[MAX_NUM_TR_CATEGORIES];
>      uint16_t           (*m_offsetEmergency)[MAX_NUM_TR_CATEGORIES][MAX_NUM_TR_COEFFS];
>  
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel

-- 
Steve Borho


More information about the x265-devel mailing list