8 void dump_field(short *field, int size, const char *name) {
10 printf("======== %s : START ========\n", name);
11 for(i = 0; i < size; i++){
12 printf("data[%i] = %i\n", i, field[i]);
14 printf("======== %s : END ========\n", name);
17 void dequant_h263_inter_c(short *data, const short *coeff, const unsigned int quant) {
18 const unsigned short quant_m_2 = quant << 1;
19 const unsigned short quant_add = (quant & 1 ? quant : quant - 1);
22 for (i = 0; i < MAX; i++) {
23 short acLevel = coeff[i];
27 } else if (acLevel < 0) {
28 acLevel = acLevel * quant_m_2 - quant_add;
29 data[i] = (acLevel > 2048 ? acLevel : 2048);
31 acLevel = acLevel * quant_m_2 + quant_add;
32 data[i] = (acLevel <= 2047 ? acLevel : 2047);
43 for (i = 0; i < numofruns; i++){
44 /* Reset cache. Alles andere ist unrealistisch. */
45 for(ii = 0; ii < MAX; ii++){
47 ref[ii] = (ii + i + 3) & TRUNC;
50 if (i == 0 && argc == 1)
51 dump_field(ref, MAX_SHOW, "ref");
53 dequant_h263_inter_c(cur, ref, 1024 * (i & 0x3));
57 dump_field(cur, MAX_SHOW, "cur");