6 void dump_field(short *field, int size, const char *name) {
8 printf("======== %s : START ========\n", name);
9 for(i = 0; i < size; i++){
10 printf("data[%i] = %i\n", i, field[i]);
12 printf("======== %s : END ========\n", name);
15 void dequant_h263_inter_c(short *data, const short *coeff, const unsigned int quant) {
16 const unsigned short quant_m_2 = quant << 1;
17 const unsigned short quant_add = (quant & 1 ? quant : quant - 1);
20 for (i = 0; i < MAX_CALC; i++) {
21 short acLevel = coeff[i];
25 } else if (acLevel < 0) {
26 acLevel = acLevel * quant_m_2 - quant_add;
27 data[i] = (acLevel > 2048 ? acLevel : 2048);
29 acLevel = acLevel * quant_m_2 + quant_add;
30 data[i] = (acLevel <= 2047 ? acLevel : 2047);
41 for (i = 0; i < numofruns; i++){
42 /* Reset cache. Alles andere ist unrealistisch. */
43 for(ii = 0; ii < MAX_CALC; ii++){
45 ref[ii] = (ii + i + 3) & 0xff;
48 if (i == 0 && argc == 1)
49 dump_field(ref, MAX_CALC, "ref");
51 dequant_h263_inter_c(cur, ref, 1024 * (i & 0x3));
55 dump_field(cur, MAX_CALC, "cur");