     out6 = even3 - even_diff * 0.707106781f;
     out7 = odd_diff1 - odd_diff4;
 }
+
+/** Constant memory copy of transposed quantization table pre-divided with DCT output weights. */
+__constant__ float gpujpeg_dct_gpu_quantization_table_const[64];
 
 /**
  * Performs 8x8 block-wise Forward Discrete Cosine Transform of the given

                    dct0, dct1, dct2, dct3, dct4, dct5, dct6, dct7);
    
    // apply quantization to the row of coefficients (quantization table is actually transposed in global memory for coalesced memory acceses)
    const float * const quantization_row = quant_table + dct_idx;
    const int out0 = rintf(dct0 * quantization_row[0 * 8]);
    const int out1 = rintf(dct1 * quantization_row[1 * 8]);
    const int out2 = rintf(dct2 * quantization_row[2 * 8]);

            d_quantization_table
        );
        cudaThreadSynchronize();
        gpujpeg_cuda_check_error("Forward DCT failed");
    }
}

