tests/cuda4.1sdk/tests/dct8x8/DCT8x8_Gold.cpp
void SubroutineIDCTvector(float *FirstIn, int StepIn, float *FirstOut, int StepOut)
{
	float Y04P   = FirstIn[0*StepIn] + FirstIn[4*StepIn];
	float Y2b6eP = C_b * FirstIn[2*StepIn] + C_e * FirstIn[6*StepIn];

	float Y04P2b6ePP = Y04P + Y2b6eP;
	float Y04P2b6ePM = Y04P - Y2b6eP;
	float Y7f1aP3c5dPP = C_f * FirstIn[7*StepIn] + C_a * FirstIn[1*StepIn] + C_c * FirstIn[3*StepIn] + C_d * FirstIn[5*StepIn];
	float Y7a1fM3d5cMP = C_a * FirstIn[7*StepIn] - C_f * FirstIn[1*StepIn] + C_d * FirstIn[3*StepIn] - C_c * FirstIn[5*StepIn];

	float Y04M   = FirstIn[0*StepIn] - FirstIn[4*StepIn];
	float Y2e6bM = C_e * FirstIn[2*StepIn] - C_b * FirstIn[6*StepIn];

	float Y04M2e6bMP = Y04M + Y2e6bM;
	float Y04M2e6bMM = Y04M - Y2e6bM;
	float Y1c7dM3f5aPM = C_c * FirstIn[1*StepIn] - C_d * FirstIn[7*StepIn] - C_f * FirstIn[3*StepIn] - C_a * FirstIn[5*StepIn];
	float Y1d7cP3a5fMM = C_d * FirstIn[1*StepIn] + C_c * FirstIn[7*StepIn] - C_a * FirstIn[3*StepIn] + C_f * FirstIn[5*StepIn];

	FirstOut[0*StepOut] = C_norm * (Y04P2b6ePP + Y7f1aP3c5dPP);
	FirstOut[7*StepOut] = C_norm * (Y04P2b6ePP - Y7f1aP3c5dPP);
	FirstOut[4*StepOut] = C_norm * (Y04P2b6ePM + Y7a1fM3d5cMP);
	FirstOut[3*StepOut] = C_norm * (Y04P2b6ePM - Y7a1fM3d5cMP);

	FirstOut[1*StepOut] = C_norm * (Y04M2e6bMP + Y1c7dM3f5aPM);
	FirstOut[5*StepOut] = C_norm * (Y04M2e6bMM - Y1d7cP3a5fMM);
	FirstOut[2*StepOut] = C_norm * (Y04M2e6bMM + Y1d7cP3a5fMM);
	FirstOut[6*StepOut] = C_norm * (Y04M2e6bMP - Y1c7dM3f5aPM);
}
/**
**************************************************************************
*  Performs IDCT of vector of 8 elements.
*
* \param FirstIn		[IN] - Pointer to the first element of input vector
* \param StepIn			[IN] - Value to add to ptr to access other input elements 
* \param FirstOut		[OUT] - Pointer to the first element of output vector
* \param StepOut		[IN] - Value to add to ptr to access other output elements 
*  
* \return None
*/
Performs IDCT of vector of 8 elements.
\param FirstIn         [IN] - Pointer to the first element of input vector
\param StepIn                  [IN] - Value to add to ptr to access other input elements
\param FirstOut                [OUT] - Pointer to the first element of output vector
\param StepOut         [IN] - Value to add to ptr to access other output elements

\return None
Performs IDCT of vector of 8 elements . \ param FirstIn [ IN ] - Pointer to the first element of input vector \ param StepIn [ IN ] - Value to add to ptr to access other input elements \ param FirstOut [ OUT ] - Pointer to the first element of output vector \ param StepOut [ IN ] - Value to add to ptr to access other output elements \ return None
void SubroutineIDCTvector(float *FirstIn, int StepIn, float *FirstOut, int StepOut)
{
	float Y04P   = FirstIn[0*StepIn] + FirstIn[4*StepIn];
	float Y2b6eP = C_b * FirstIn[2*StepIn] + C_e * FirstIn[6*StepIn];
	float Y04P2b6ePP = Y04P + Y2b6eP;
	float Y04P2b6ePM = Y04P - Y2b6eP;
	float Y7f1aP3c5dPP = C_f * FirstIn[7*StepIn] + C_a * FirstIn[1*StepIn] + C_c * FirstIn[3*StepIn] + C_d * FirstIn[5*StepIn];
	float Y7a1fM3d5cMP = C_a * FirstIn[7*StepIn] - C_f * FirstIn[1*StepIn] + C_d * FirstIn[3*StepIn] - C_c * FirstIn[5*StepIn];
	float Y04M   = FirstIn[0*StepIn] - FirstIn[4*StepIn];
	float Y2e6bM = C_e * FirstIn[2*StepIn] - C_b * FirstIn[6*StepIn];
	float Y04M2e6bMP = Y04M + Y2e6bM;
	float Y04M2e6bMM = Y04M - Y2e6bM;
	float Y1c7dM3f5aPM = C_c * FirstIn[1*StepIn] - C_d * FirstIn[7*StepIn] - C_f * FirstIn[3*StepIn] - C_a * FirstIn[5*StepIn];
	float Y1d7cP3a5fMM = C_d * FirstIn[1*StepIn] + C_c * FirstIn[7*StepIn] - C_a * FirstIn[3*StepIn] + C_f * FirstIn[5*StepIn];
	FirstOut[0*StepOut] = C_norm * (Y04P2b6ePP + Y7f1aP3c5dPP);
	FirstOut[7*StepOut] = C_norm * (Y04P2b6ePP - Y7f1aP3c5dPP);
	FirstOut[4*StepOut] = C_norm * (Y04P2b6ePM + Y7a1fM3d5cMP);
	FirstOut[3*StepOut] = C_norm * (Y04P2b6ePM - Y7a1fM3d5cMP);
	FirstOut[1*StepOut] = C_norm * (Y04M2e6bMP + Y1c7dM3f5aPM);
	FirstOut[5*StepOut] = C_norm * (Y04M2e6bMM - Y1d7cP3a5fMM);
	FirstOut[2*StepOut] = C_norm * (Y04M2e6bMM + Y1d7cP3a5fMM);
	FirstOut[6*StepOut] = C_norm * (Y04M2e6bMP - Y1c7dM3f5aPM);
}
void SubroutineIDCTvector ( float * FirstIn , int StepIn , float * FirstOut , int StepOut ) { float Y04P = FirstIn [ 0 * StepIn ] + FirstIn [ 4 * StepIn ] ; float Y2b6eP = C_b * FirstIn [ 2 * StepIn ] + C_e * FirstIn [ 6 * StepIn ] ; float Y04P2b6ePP = Y04P + Y2b6eP ; float Y04P2b6ePM = Y04P - Y2b6eP ; float Y7f1aP3c5dPP = C_f * FirstIn [ 7 * StepIn ] + C_a * FirstIn [ 1 * StepIn ] + C_c * FirstIn [ 3 * StepIn ] + C_d * FirstIn [ 5 * StepIn ] ; float Y7a1fM3d5cMP = C_a * FirstIn [ 7 * StepIn ] - C_f * FirstIn [ 1 * StepIn ] + C_d * FirstIn [ 3 * StepIn ] - C_c * FirstIn [ 5 * StepIn ] ; float Y04M = FirstIn [ 0 * StepIn ] - FirstIn [ 4 * StepIn ] ; float Y2e6bM = C_e * FirstIn [ 2 * StepIn ] - C_b * FirstIn [ 6 * StepIn ] ; float Y04M2e6bMP = Y04M + Y2e6bM ; float Y04M2e6bMM = Y04M - Y2e6bM ; float Y1c7dM3f5aPM = C_c * FirstIn [ 1 * StepIn ] - C_d * FirstIn [ 7 * StepIn ] - C_f * FirstIn [ 3 * StepIn ] - C_a * FirstIn [ 5 * StepIn ] ; float Y1d7cP3a5fMM = C_d * FirstIn [ 1 * StepIn ] + C_c * FirstIn [ 7 * StepIn ] - C_a * FirstIn [ 3 * StepIn ] + C_f * FirstIn [ 5 * StepIn ] ; FirstOut [ 0 * StepOut ] = C_norm * ( Y04P2b6ePP + Y7f1aP3c5dPP ) ; FirstOut [ 7 * StepOut ] = C_norm * ( Y04P2b6ePP - Y7f1aP3c5dPP ) ; FirstOut [ 4 * StepOut ] = C_norm * ( Y04P2b6ePM + Y7a1fM3d5cMP ) ; FirstOut [ 3 * StepOut ] = C_norm * ( Y04P2b6ePM - Y7a1fM3d5cMP ) ; FirstOut [ 1 * StepOut ] = C_norm * ( Y04M2e6bMP + Y1c7dM3f5aPM ) ; FirstOut [ 5 * StepOut ] = C_norm * ( Y04M2e6bMM - Y1d7cP3a5fMM ) ; FirstOut [ 2 * StepOut ] = C_norm * ( Y04M2e6bMM + Y1d7cP3a5fMM ) ; FirstOut [ 6 * StepOut ] = C_norm * ( Y04M2e6bMP - Y1c7dM3f5aPM ) ; }
Performs IDCT of vector of 8 elements.
Performs IDCT of vector of 8 elements .