dct/dct8x8_simd.cpp
//Plonka, Gerlind, and Manfred Tasche. "Fast and numerically stable algorithms for discrete cosine transforms." Linear algebra and its applications 394 (2005) : 309 - 345.
Plonka, Gerlind, and Manfred Tasche. "Fast and numerically stable algorithms for discrete cosine transforms." Linear algebra and its applications 394 (2005) : 309 - 345.
Plonka Gerlind and Manfred Tasche . " Fast and numerically stable algorithms for discrete cosine transforms . " Linear algebra and its applications 394 ( 2005 ) : 309 - 345 .
static void fdct81d_GT(const float *src, float *dst)
{
	for (int i = 0; i < 8; i++)
	{
		const float mx00 = src[0] + src[7];
		const float mx01 = src[1] + src[6];
		const float mx02 = src[2] + src[5];
		const float mx03 = src[3] + src[4];
		const float mx04 = src[0] - src[7];
		const float mx05 = src[1] - src[6];
		const float mx06 = src[2] - src[5];
		const float mx07 = src[3] - src[4];
		const float mx08 = mx00 + mx03;
		const float mx09 = mx01 + mx02;
		const float mx0a = mx00 - mx03;
		const float mx0b = mx01 - mx02;
		const float mx0c = 1.38703984532215f*mx04 + 0.275899379282943f*mx07;
		const float mx0d = 1.17587560241936f*mx05 + 0.785694958387102f*mx06;
		const float mx0e = -0.785694958387102f*mx05 + 1.17587560241936f*mx06;
		const float mx0f = 0.275899379282943f*mx04 - 1.38703984532215f*mx07;
		const float mx10 = 0.353553390593274f * (mx0c - mx0d);
		const float mx11 = 0.353553390593274f * (mx0e - mx0f);
		dst[0] = 0.353553390593274f * (mx08 + mx09);
		dst[1] = 0.353553390593274f * (mx0c + mx0d);
		dst[2] = 0.461939766255643f*mx0a + 0.191341716182545f*mx0b;
		dst[3] = 0.707106781186547f * (mx10 - mx11);
		dst[4] = 0.353553390593274f * (mx08 - mx09);
		dst[5] = 0.707106781186547f * (mx10 + mx11);
		dst[6] = 0.191341716182545f*mx0a - 0.461939766255643f*mx0b;
		dst[7] = 0.353553390593274f * (mx0e + mx0f);
		dst += 8;
		src += 8;
	}
}
static void fdct81d_GT ( const float * src , float * dst ) { for ( int i = 0 ; i < 8 ; i ++ ) { const float mx00 = src [ 0 ] + src [ 7 ] ; const float mx01 = src [ 1 ] + src [ 6 ] ; const float mx02 = src [ 2 ] + src [ 5 ] ; const float mx03 = src [ 3 ] + src [ 4 ] ; const float mx04 = src [ 0 ] - src [ 7 ] ; const float mx05 = src [ 1 ] - src [ 6 ] ; const float mx06 = src [ 2 ] - src [ 5 ] ; const float mx07 = src [ 3 ] - src [ 4 ] ; const float mx08 = mx00 + mx03 ; const float mx09 = mx01 + mx02 ; const float mx0a = mx00 - mx03 ; const float mx0b = mx01 - mx02 ; const float mx0c = 1.38703984532215f * mx04 + 0.275899379282943f * mx07 ; const float mx0d = 1.17587560241936f * mx05 + 0.785694958387102f * mx06 ; const float mx0e = -0.785694958387102f * mx05 + 1.17587560241936f * mx06 ; const float mx0f = 0.275899379282943f * mx04 - 1.38703984532215f * mx07 ; const float mx10 = 0.353553390593274f * ( mx0c - mx0d ) ; const float mx11 = 0.353553390593274f * ( mx0e - mx0f ) ; dst [ 0 ] = 0.353553390593274f * ( mx08 + mx09 ) ; dst [ 1 ] = 0.353553390593274f * ( mx0c + mx0d ) ; dst [ 2 ] = 0.461939766255643f * mx0a + 0.191341716182545f * mx0b ; dst [ 3 ] = 0.707106781186547f * ( mx10 - mx11 ) ; dst [ 4 ] = 0.353553390593274f * ( mx08 - mx09 ) ; dst [ 5 ] = 0.707106781186547f * ( mx10 + mx11 ) ; dst [ 6 ] = 0.191341716182545f * mx0a - 0.461939766255643f * mx0b ; dst [ 7 ] = 0.353553390593274f * ( mx0e + mx0f ) ; dst += 8 ; src += 8 ; } }
Plonka, Gerlind, and Manfred Tasche.
Plonka Gerlind and Manfred Tasche .