diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2016-09-08 10:30:09 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2016-09-08 10:30:09 +0200 |
| commit | 48c16b2c199210a3c20b306a737eac5fc2c8f6c9 (patch) | |
| tree | 35cefb1c82b55cc19cfac9ef04db410565338b5a /src/lib/openjp2/dwt.c | |
| parent | ab22c5bad55fccdc440847c896baaf4bf89365a0 (diff) | |
| parent | ef01f18dfc6780b776d0674ed3e7415c6ef54d24 (diff) | |
Merge branch 'master' of https://github.com/uclouvain/openjpeg into tier1_optimizations_multithreading_2
Conflicts:
src/lib/openjp2/t1.c
Diffstat (limited to 'src/lib/openjp2/dwt.c')
| -rw-r--r-- | src/lib/openjp2/dwt.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/lib/openjp2/dwt.c b/src/lib/openjp2/dwt.c index 18f8d9c3..2e28effc 100644 --- a/src/lib/openjp2/dwt.c +++ b/src/lib/openjp2/dwt.c @@ -129,16 +129,16 @@ static OPJ_BOOL opj_dwt_decode_tile(opj_thread_pool_t* tp, opj_tcd_tilecomp_t* t static OPJ_BOOL opj_dwt_encode_procedure( opj_tcd_tilecomp_t * tilec, void (*p_function)(OPJ_INT32 *, OPJ_INT32,OPJ_INT32,OPJ_INT32) ); -static OPJ_UINT32 opj_dwt_max_resolution(opj_tcd_resolution_t* restrict r, OPJ_UINT32 i); +static OPJ_UINT32 opj_dwt_max_resolution(opj_tcd_resolution_t* OPJ_RESTRICT r, OPJ_UINT32 i); /* <summary> */ /* Inverse 9-7 wavelet transform in 1-D. */ /* </summary> */ -static void opj_v4dwt_decode(opj_v4dwt_t* restrict dwt); +static void opj_v4dwt_decode(opj_v4dwt_t* OPJ_RESTRICT dwt); -static void opj_v4dwt_interleave_h(opj_v4dwt_t* restrict w, OPJ_FLOAT32* restrict a, OPJ_INT32 x, OPJ_INT32 size); +static void opj_v4dwt_interleave_h(opj_v4dwt_t* OPJ_RESTRICT w, OPJ_FLOAT32* OPJ_RESTRICT a, OPJ_INT32 x, OPJ_INT32 size); -static void opj_v4dwt_interleave_v(opj_v4dwt_t* restrict v , OPJ_FLOAT32* restrict a , OPJ_INT32 x, OPJ_INT32 nb_elts_read); +static void opj_v4dwt_interleave_v(opj_v4dwt_t* OPJ_RESTRICT v , OPJ_FLOAT32* OPJ_RESTRICT a , OPJ_INT32 x, OPJ_INT32 nb_elts_read); #ifdef __SSE__ static void opj_v4dwt_decode_step1_sse(opj_v4_t* w, OPJ_INT32 count, const __m128 c); @@ -543,7 +543,7 @@ void opj_dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, OPJ_UINT32 prec) { /* <summary> */ /* Determine maximum computed resolution level for inverse wavelet transform */ /* </summary> */ -static OPJ_UINT32 opj_dwt_max_resolution(opj_tcd_resolution_t* restrict r, OPJ_UINT32 i) { +static OPJ_UINT32 opj_dwt_max_resolution(opj_tcd_resolution_t* OPJ_RESTRICT r, OPJ_UINT32 i) { OPJ_UINT32 mr = 0; OPJ_UINT32 w; while( --i ) { @@ -562,7 +562,7 @@ typedef struct DWT1DFN dwt_1D; OPJ_UINT32 rw; OPJ_UINT32 w; - OPJ_INT32 * restrict tiledp; + OPJ_INT32 * OPJ_RESTRICT tiledp; int min_j; int max_j; } opj_dwd_decode_h_job_t; @@ -591,7 +591,7 @@ typedef struct DWT1DFN dwt_1D; OPJ_UINT32 rh; OPJ_UINT32 w; - OPJ_INT32 * restrict tiledp; + OPJ_INT32 * OPJ_RESTRICT tiledp; int min_j; int max_j; } opj_dwd_decode_v_job_t; @@ -648,7 +648,7 @@ static OPJ_BOOL opj_dwt_decode_tile(opj_thread_pool_t* tp, opj_tcd_tilecomp_t* t v.mem = h.mem; while( --numres) { - OPJ_INT32 * restrict tiledp = tilec->data; + OPJ_INT32 * OPJ_RESTRICT tiledp = tilec->data; OPJ_UINT32 j; ++tr; @@ -773,8 +773,8 @@ static OPJ_BOOL opj_dwt_decode_tile(opj_thread_pool_t* tp, opj_tcd_tilecomp_t* t return OPJ_TRUE; } -static void opj_v4dwt_interleave_h(opj_v4dwt_t* restrict w, OPJ_FLOAT32* restrict a, OPJ_INT32 x, OPJ_INT32 size){ - OPJ_FLOAT32* restrict bi = (OPJ_FLOAT32*) (w->wavelet + w->cas); +static void opj_v4dwt_interleave_h(opj_v4dwt_t* OPJ_RESTRICT w, OPJ_FLOAT32* OPJ_RESTRICT a, OPJ_INT32 x, OPJ_INT32 size){ + OPJ_FLOAT32* OPJ_RESTRICT bi = (OPJ_FLOAT32*) (w->wavelet + w->cas); OPJ_INT32 count = w->sn; OPJ_INT32 i, k; @@ -816,8 +816,8 @@ static void opj_v4dwt_interleave_h(opj_v4dwt_t* restrict w, OPJ_FLOAT32* restric } } -static void opj_v4dwt_interleave_v(opj_v4dwt_t* restrict v , OPJ_FLOAT32* restrict a , OPJ_INT32 x, OPJ_INT32 nb_elts_read){ - opj_v4_t* restrict bi = v->wavelet + v->cas; +static void opj_v4dwt_interleave_v(opj_v4dwt_t* OPJ_RESTRICT v , OPJ_FLOAT32* OPJ_RESTRICT a , OPJ_INT32 x, OPJ_INT32 nb_elts_read){ + opj_v4_t* OPJ_RESTRICT bi = v->wavelet + v->cas; OPJ_INT32 i; for(i = 0; i < v->sn; ++i){ @@ -835,7 +835,7 @@ static void opj_v4dwt_interleave_v(opj_v4dwt_t* restrict v , OPJ_FLOAT32* restri #ifdef __SSE__ static void opj_v4dwt_decode_step1_sse(opj_v4_t* w, OPJ_INT32 count, const __m128 c){ - __m128* restrict vw = (__m128*) w; + __m128* OPJ_RESTRICT vw = (__m128*) w; OPJ_INT32 i; /* 4x unrolled loop */ for(i = 0; i < count >> 2; ++i){ @@ -856,8 +856,8 @@ static void opj_v4dwt_decode_step1_sse(opj_v4_t* w, OPJ_INT32 count, const __m12 } void opj_v4dwt_decode_step2_sse(opj_v4_t* l, opj_v4_t* w, OPJ_INT32 k, OPJ_INT32 m, __m128 c){ - __m128* restrict vl = (__m128*) l; - __m128* restrict vw = (__m128*) w; + __m128* OPJ_RESTRICT vl = (__m128*) l; + __m128* OPJ_RESTRICT vw = (__m128*) w; OPJ_INT32 i; __m128 tmp1, tmp2, tmp3; tmp1 = vl[0]; @@ -885,7 +885,7 @@ void opj_v4dwt_decode_step2_sse(opj_v4_t* l, opj_v4_t* w, OPJ_INT32 k, OPJ_INT32 static void opj_v4dwt_decode_step1(opj_v4_t* w, OPJ_INT32 count, const OPJ_FLOAT32 c) { - OPJ_FLOAT32* restrict fw = (OPJ_FLOAT32*) w; + OPJ_FLOAT32* OPJ_RESTRICT fw = (OPJ_FLOAT32*) w; OPJ_INT32 i; for(i = 0; i < count; ++i){ OPJ_FLOAT32 tmp1 = fw[i*8 ]; @@ -953,7 +953,7 @@ static void opj_v4dwt_decode_step2(opj_v4_t* l, opj_v4_t* w, OPJ_INT32 k, OPJ_IN /* <summary> */ /* Inverse 9-7 wavelet transform in 1-D. */ /* </summary> */ -static void opj_v4dwt_decode(opj_v4dwt_t* restrict dwt) +static void opj_v4dwt_decode(opj_v4dwt_t* OPJ_RESTRICT dwt) { OPJ_INT32 a, b; if(dwt->cas == 0) { @@ -990,7 +990,7 @@ static void opj_v4dwt_decode(opj_v4dwt_t* restrict dwt) /* <summary> */ /* Inverse 9-7 wavelet transform in 2-D. */ /* </summary> */ -OPJ_BOOL opj_dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numres) +OPJ_BOOL opj_dwt_decode_real(opj_tcd_tilecomp_t* OPJ_RESTRICT tilec, OPJ_UINT32 numres) { opj_v4dwt_t h; opj_v4dwt_t v; @@ -1010,7 +1010,7 @@ OPJ_BOOL opj_dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numr v.wavelet = h.wavelet; while( --numres) { - OPJ_FLOAT32 * restrict aj = (OPJ_FLOAT32*) tilec->data; + OPJ_FLOAT32 * OPJ_RESTRICT aj = (OPJ_FLOAT32*) tilec->data; OPJ_UINT32 bufsize = (OPJ_UINT32)((tilec->x1 - tilec->x0) * (tilec->y1 - tilec->y0)); OPJ_INT32 j; |
