question: public void fwdDctInPlaceNxN ( double [ ] [ ] coeffs ) { int u = 0 ; int v = 0 ; double two_over_sqrtncolsnrows = 2.0 / Math . sqrt ( ( double ) this . N * this . M ) ; for ( u = 0 ; u <= this . M - 1 ; u ++ ) { fctNoScale ( coeffs [ u ] ) ; } for ( v = 0 ; v <= this . N - 1 ; v ++ ) { for ( u = 0 ; u <= this . M - 1 ; u ++ ) { this . nxnTmp [ u ] = coeffs [ u ] [ v ] ; } fctNoScale ( this . nxnTmp ) ; for ( u = 0 ; u <= this . M - 1 ; u ++ ) { coeffs [ u ] [ v ] = this . nxnTmp [ u ] * two_over_sqrtncolsnrows ; } } }
target:  Perform forward DCT in place for N x N matrix