void dct_quantize_row(uint8_t *in_data, uint8_t *prediction, int w, int h, int16_t *out_data, uint8_t *quantization) { int x; int16_t block[8*8]; /* Perform the DCT and quantization */ for(x = 0; x < w; x += 8) { int i,j; for (i=0; i<8; ++i) for (j=0; j<8; ++j) block[i*8+j] = ((int16_t)in_data[i*w+j+x] - prediction[i*w+j+x]); /* Store MBs linear in memory, i.e. the 64 coefficients are stored continous. * This allows us to ignore stride in DCT/iDCT and other functions. */ dct_quant_block_8x8(block, out_data+(x*8), quantization); // DEBUG static int first = 1; if (first) { // print_block_ble(out_data); print_common(block); first = 0; } // DEBUG } }
static void dct_quantize_row(uint8_t *in_data, uint8_t *prediction, int w, int16_t *out_data, float *quantization) { int x; int16_t block[8 * 8]; /* Perform the DCT and quantization */ for (x = 0; x < w; x += 8) { int i, j; for (i = 0; i < 8; ++i) { for (j = 0; j < 8; ++j) { block[i * 8 + j] = ((int16_t) in_data[i * w + j + x] - prediction[i * w + j + x]); } } /* Store MBs linear in memory, i.e. the 64 coefficients are stored continous. This allows us to ignore stride in DCT/iDCT and other functions. */ dct_quant_block_8x8(block, out_data + (x * 8), quantization); } }