示例#1
0
 SIMD_INLINE void StretchGray2x2(const uint8_t * src, Storer<align> & even, Storer<align> & odd)
 {
     v128_u8 value = Load<align>(src);
     v128_u8 lo = (v128_u8)UnpackLoU8(value, value);
     v128_u8 hi = (v128_u8)UnpackHiU8(value, value);
     Store<align, first>(even, lo);
     Store<align, false>(even, hi);
     Store<align, first>(odd, lo);
     Store<align, false>(odd, hi);
 }
示例#2
0
 SIMD_INLINE void InterferenceChangeMasked(const Loader<align> & statisticSrc, v128_s16 value, v128_s16 saturation, 
     const Loader<align> & maskSrc, v128_u8 index, v128_u8 tailMask, Storer<align> & statisticDst)
 {
     v128_u8 mask = vec_and(vec_cmpeq(Load<align, first>(maskSrc), index), tailMask);
     InterferenceChange<align, first, increment>(statisticSrc, vec_and(value, (v128_s16)UnpackLoU8(mask, mask)), saturation, statisticDst);
     InterferenceChange<align, false, increment>(statisticSrc, vec_and(value, (v128_s16)UnpackHiU8(mask, mask)), saturation, statisticDst);
 }
示例#3
0
 template<bool align> SIMD_INLINE void BlurCol(v128_u8 a[3], uint16_t * b)
 {
     Store<align>(b, BinomialSum(UnpackLoU8(a[0]), UnpackLoU8(a[1]), UnpackLoU8(a[2])));
     Store<align>(b + HA, BinomialSum(UnpackHiU8(a[0]), UnpackHiU8(a[1]), UnpackHiU8(a[2])));
 }
 SIMD_INLINE void LoadBlock(const uint8_t * src, v128_u16 & lo, v128_u16 & hi)
 {
     const v128_u8 t = Load<false>(src);
     lo = UnpackLoU8(t);
     hi = UnpackHiU8(t);
 }