Lines Matching refs:sn
56 OPJ_INT32 sn;
67 OPJ_INT32 sn ;
92 static void opj_dwt_deinterleave_h(OPJ_INT32 *a, OPJ_INT32 *b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas);
96 static void opj_dwt_deinterleave_v(OPJ_INT32 *a, OPJ_INT32 *b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 x, OPJ_INT32 cas);
108 static void opj_dwt_encode_1(OPJ_INT32 *a, OPJ_SIZE_T a_count, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas);
113 static void opj_dwt_decode_1_(OPJ_INT32 *a, OPJ_SIZE_T a_count, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas);
117 static void opj_dwt_encode_1_real(OPJ_INT32 *a, OPJ_SIZE_T a_count, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas);
159 #define UNDERFLOW_SN(i) ((i) >= sn&&sn>0)
166 #define OPJ_S_(i) ((i)<0 ? OPJ_S(0) : (UNDERFLOW_SN(i) ? OPJ_S(sn - 1) : OVERFLOW_S(i) ? OPJ_S(i - 1) : OPJ_S(i)))
170 #define OPJ_DD_(i) ((i)<0 ? OPJ_D(0) : (UNDERFLOW_SN(i) ? OPJ_D(sn - 1) : OVERFLOW_D(i) ? OPJ_D(i - 1) : OPJ_D(i)))
201 static void opj_dwt_deinterleave_h(OPJ_INT32 *a, OPJ_INT32 *b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas) {
206 for (i=0; i<sn; ++i) {
211 l_dest = b + sn;
223 static void opj_dwt_deinterleave_v(OPJ_INT32 *a, OPJ_INT32 *b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 x, OPJ_INT32 cas) {
224 OPJ_INT32 i = sn;
234 l_dest = b + sn * x;
242 } /*b[(sn+i)*x]=a[(2*i+1-cas)];*/
251 OPJ_INT32 i = h->sn;
256 ai = a + h->sn;
271 OPJ_INT32 i = v->sn;
277 ai = a + (v->sn * x);
291 static void opj_dwt_encode_1(OPJ_INT32 *a, OPJ_SIZE_T a_count, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas) {
295 if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */
297 for (i = 0; i < sn; i++) OPJ_S(i) += (OPJ_D_(i - 1) + OPJ_D_(i) + 2) >> 2;
300 if (!sn && dn == 1) /* NEW : CASE ONE ELEMENT */
304 for (i = 0; i < sn; i++) OPJ_D(i) += (OPJ_SS_(i) + OPJ_SS_(i + 1) + 2) >> 2;
312 static void opj_dwt_decode_1_(OPJ_INT32 *a, OPJ_SIZE_T a_count, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas) {
316 if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */
317 for (i = 0; i < sn; i++) OPJ_S(i) -= (OPJ_D_(i - 1) + OPJ_D_(i) + 2) >> 2;
321 if (!sn && dn == 1) /* NEW : CASE ONE ELEMENT */
324 for (i = 0; i < sn; i++) OPJ_D(i) -= (OPJ_SS_(i) + OPJ_SS_(i + 1) + 2) >> 2;
334 opj_dwt_decode_1_(v->mem, v->mem_count, v->dn, v->sn, v->cas);
340 static void opj_dwt_encode_1_real(OPJ_INT32 *a, OPJ_SIZE_T a_count, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 cas) {
343 if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */
346 for (i = 0; i < sn; i++)
350 for (i = 0; i < sn; i++)
354 for (i = 0; i < sn; i++)
358 if ((sn > 0) || (dn > 1)) { /* NEW : CASE ONE ELEMENT */
361 for (i = 0; i < sn; i++)
365 for (i = 0; i < sn; i++)
369 for (i = 0; i < sn; i++)
429 OPJ_INT32 dn, sn;
439 sn = rh1;
447 (*p_function) (bj, l_data_count, dn, sn, cas_col);
449 opj_dwt_deinterleave_v(bj, aj, dn, sn, w, cas_col);
452 sn = rw1;
458 (*p_function) (bj, l_data_count, dn, sn, cas_row);
459 opj_dwt_deinterleave_h(bj, aj, dn, sn, cas_row);
593 h.sn = (OPJ_INT32)rw;
594 v.sn = (OPJ_INT32)rh;
599 h.dn = (OPJ_INT32)(rw - (OPJ_UINT32)h.sn);
608 v.dn = (OPJ_INT32)(rh - (OPJ_UINT32)v.sn);
626 OPJ_INT32 count = w->sn;
661 a += w->sn;
662 size -= w->sn;
671 for(i = 0; i < v->sn; ++i){
675 a += v->sn * x;
808 if(!((dwt->dn > 0) || (dwt->sn > 1))){
814 if(!((dwt->sn > 0) || (dwt->dn > 1))) {
821 opj_v4dwt_decode_step1_sse(dwt->wavelet+a, dwt->sn, _mm_set1_ps(opj_K));
823 opj_v4dwt_decode_step2_sse(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, opj_int_min(dwt->sn, dwt->dn-a), _mm_set1_ps(opj_dwt_delta));
824 opj_v4dwt_decode_step2_sse(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, opj_int_min(dwt->dn, dwt->sn-b), _mm_set1_ps(opj_dwt_gamma));
825 opj_v4dwt_decode_step2_sse(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, opj_int_min(dwt->sn, dwt->dn-a), _mm_set1_ps(opj_dwt_beta));
826 opj_v4dwt_decode_step2_sse(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, opj_int_min(dwt->dn, dwt->sn-b), _mm_set1_ps(opj_dwt_alpha));
828 opj_v4dwt_decode_step1(dwt->wavelet+a, dwt->sn, opj_K);
830 opj_v4dwt_decode_step2(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, opj_int_min(dwt->sn, dwt->dn-a), opj_dwt_delta);
831 opj_v4dwt_decode_step2(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, opj_int_min(dwt->dn, dwt->sn-b), opj_dwt_gamma);
832 opj_v4dwt_decode_step2(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, opj_int_min(dwt->sn, dwt->dn-a), opj_dwt_beta);
833 opj_v4dwt_decode_step2(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, opj_int_min(dwt->dn, dwt->sn-b), opj_dwt_alpha);
865 h.sn = (OPJ_INT32)rw;
866 v.sn = (OPJ_INT32)rh;
873 h.dn = (OPJ_INT32)(rw - (OPJ_UINT32)h.sn);
906 v.dn = (OPJ_INT32)(rh - (OPJ_UINT32)v.sn);