biasvB = vec_ld((idx1), bias); \
mskA = vec_cmplt(temp1v, zero_s16v); \
mskB = vec_cmplt(temp2v, zero_s16v); \
- coefvA = (vec_u16_t)vec_max(vec_sub(zero_s16v, temp1v), temp1v);\
- coefvB = (vec_u16_t)vec_max(vec_sub(zero_s16v, temp2v), temp2v);\
+ coefvA = (vec_u16_t)vec_abs( temp1v ); \
+ coefvB = (vec_u16_t)vec_abs( temp2v ); \
coefvA = vec_adds(coefvA, biasvA); \
coefvB = vec_adds(coefvB, biasvB); \
multEvenvA = vec_mule(coefvA, mfvA); \
multOddvA = vec_sr(multOddvA, i_qbitsv); \
multEvenvB = vec_sr(multEvenvB, i_qbitsv); \
multOddvB = vec_sr(multOddvB, i_qbitsv); \
- temp1v = (vec_s16_t) vec_packs(vec_mergeh(multEvenvA, multOddvA), vec_mergel(multEvenvA, multOddvA)); \
- temp2v = (vec_s16_t) vec_packs(vec_mergeh(multEvenvB, multOddvB), vec_mergel(multEvenvB, multOddvB)); \
+ temp1v = (vec_s16_t) vec_packs( multEvenvA, multOddvA ); \
+ tmpv = xxpermdi( temp1v, temp1v, 2 ); \
+ temp1v = vec_mergeh( temp1v, tmpv ); \
+ temp2v = (vec_s16_t) vec_packs( multEvenvB, multOddvB ); \
+ tmpv = xxpermdi( temp2v, temp2v, 2 ); \
+ temp2v = vec_mergeh( temp2v, tmpv ); \
temp1v = vec_xor(temp1v, mskA); \
temp2v = vec_xor(temp2v, mskB); \
temp1v = vec_adds(temp1v, vec_and(mskA, one)); \
vec_u16_t mfvB;
vec_u16_t biasvB;
- vec_s16_t temp1v, temp2v;
+ vec_s16_t temp1v, temp2v, tmpv;
vec_u32_u qbits_u;
qbits_u.s[0]=16;
vec_u16_t mfv;
vec_u16_t biasv;
- vec_u16_u mf_u;
- mf_u.s[0]=mf;
- mfv = vec_splat( mf_u.v, 0 );
-
- vec_u32_u qbits_u;
- qbits_u.s[0]=16;
- i_qbitsv = vec_splat(qbits_u.v, 0);
-
- vec_u16_u bias_u;
- bias_u.s[0]=bias;
- biasv = vec_splat(bias_u.v, 0);
+ mfv = vec_splats( (uint16_t)mf );
+ i_qbitsv = vec_splats( (uint32_t) 16 );
+ biasv = vec_splats( (uint16_t)bias );
QUANT_16_U_DC( 0, 16 );
return vec_any_ne(nz, zero_s16v);
vec_u16_t mfv;
vec_u16_t biasv;
- vec_u16_u mf_u;
- mf_u.s[0]=mf;
- mfv = vec_splat( mf_u.v, 0 );
-
- vec_u32_u qbits_u;
- qbits_u.s[0]=16;
- i_qbitsv = vec_splat(qbits_u.v, 0);
-
- vec_u16_u bias_u;
- bias_u.s[0]=bias;
- biasv = vec_splat(bias_u.v, 0);
+ mfv = vec_splats( (uint16_t)mf );
+ i_qbitsv = vec_splats( (uint32_t) 16 );
+ biasv = vec_splats( (uint16_t)bias );
static const vec_s16_t mask2 = CV(-1, -1, -1, -1, 0, 0, 0, 0);
QUANT_4_U_DC(0);
vec_u16_t mfvB;
vec_u16_t biasvB;
- vec_s16_t temp1v, temp2v;
+ vec_s16_t temp1v, temp2v, tmpv;
vec_u32_u qbits_u;
qbits_u.s[0]=16;
multOddvA = vec_mulo(dctv, mfv); \
dctv = (vec_s16_t) vec_packs(vec_mergeh(multEvenvA, multOddvA), \
vec_mergel(multEvenvA, multOddvA)); \
+ dctv = (vec_s16_t) vec_packs( multEvenvA, multOddvA ); \
+ tmpv = xxpermdi( dctv, dctv, 2 ); \
+ dctv = vec_mergeh( dctv, tmpv ); \
dctv = vec_sl(dctv, i_qbitsv); \
vec_st(dctv, 8*y, dct); \
}
int i_mf = i_qp%6;
int i_qbits = i_qp/6 - 4;
- vec_s16_t dctv;
+ vec_s16_t dctv, tmpv;
vec_s16_t dct1v, dct2v;
vec_s32_t mf1v, mf2v;
vec_s16_t mfv;
if( i_qbits >= 0 )
{
vec_u16_t i_qbitsv;
- vec_u16_u qbits_u;
- qbits_u.s[0]=i_qbits;
- i_qbitsv = vec_splat(qbits_u.v, 0);
+ i_qbitsv = vec_splats( (uint16_t) i_qbits );
for( int y = 0; y < 4; y+=2 )
DEQUANT_SHL();
const int f = 1 << (-i_qbits-1);
vec_s32_t fv;
- vec_u32_u f_u;
- f_u.s[0]=f;
- fv = (vec_s32_t)vec_splat(f_u.v, 0);
+ fv = vec_splats( f );
vec_u32_t i_qbitsv;
- vec_u32_u qbits_u;
- qbits_u.s[0]=-i_qbits;
- i_qbitsv = vec_splat(qbits_u.v, 0);
+ i_qbitsv = vec_splats( (uint32_t)-i_qbits );
vec_u32_t sixteenv;
- vec_u32_u sixteen_u;
- sixteen_u.s[0]=16;
- sixteenv = vec_splat(sixteen_u.v, 0);
+ sixteenv = vec_splats( (uint32_t)16 );
for( int y = 0; y < 4; y+=2 )
DEQUANT_SHR();
int i_mf = i_qp%6;
int i_qbits = i_qp/6 - 6;
- vec_s16_t dctv;
+ vec_s16_t dctv, tmpv;
vec_s16_t dct1v, dct2v;
vec_s32_t mf1v, mf2v;
vec_s16_t mfv;
if( i_qbits >= 0 )
{
vec_u16_t i_qbitsv;
- vec_u16_u qbits_u;
- qbits_u.s[0]=i_qbits;
- i_qbitsv = vec_splat(qbits_u.v, 0);
+ i_qbitsv = vec_splats((uint16_t)i_qbits );
for( int y = 0; y < 16; y+=2 )
DEQUANT_SHL();
const int f = 1 << (-i_qbits-1);
vec_s32_t fv;
- vec_u32_u f_u;
- f_u.s[0]=f;
- fv = (vec_s32_t)vec_splat(f_u.v, 0);
+ fv = vec_splats( f );
vec_u32_t i_qbitsv;
- vec_u32_u qbits_u;
- qbits_u.s[0]=-i_qbits;
- i_qbitsv = vec_splat(qbits_u.v, 0);
+ i_qbitsv = vec_splats( (uint32_t)-i_qbits );
vec_u32_t sixteenv;
- vec_u32_u sixteen_u;
- sixteen_u.s[0]=16;
- sixteenv = vec_splat(sixteen_u.v, 0);
+ sixteenv = vec_splats( (uint32_t)16 );
for( int y = 0; y < 16; y+=2 )
DEQUANT_SHR();