Speedup for xtrans demosaic

This commit is contained in:
heckflosse
2016-03-09 23:57:37 +01:00
parent 1d64c651cf
commit dadbd71e58
3 changed files with 354 additions and 238 deletions

View File

@@ -1388,5 +1388,12 @@ static INLINE vfloat vadivapb (vfloat a, vfloat b) {
return a / (a+b);
}
static INLINE void vconvertrgbrgbrgbrgb2rrrrggggbbbb (const float * src, vfloat &rv, vfloat &gv, vfloat &bv) { // cool function name, isn't it ? :P
// converts a sequence of 4 float RGB triplets to 3 red, green and blue quadruples
rv = _mm_setr_ps(src[0],src[3],src[6],src[9]);
gv = _mm_setr_ps(src[1],src[4],src[7],src[10]);
bv = _mm_setr_ps(src[2],src[5],src[8],src[11]);
}
#endif // __SSE2__
#endif // SLEEFSSEAVX