private void dct(double[][] a, double[][] b, double[][] c, int n) {
		double x;
		double[][] af = new double[n][n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				x = 0.0;
				for (int k = 0; k < n; k++) {
					x += a[i][k] * b[k][j];
				}
				af[i][j] = x;
			}
		}

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				x = 0.0;
				for (int k = 0; k < n; k++) {
					x += c[i][k] * af[k][j];
				}
				a[i][j] = 2.0 * x / ((double) n);
			}
		}
	}