Mercurial > libavcodec.hg
comparison ivi_common.c @ 11799:25ce7aff1e1d libavcodec
Make dequantization equation use less registers on some CPUs.
author | maxim |
---|---|
date | Sun, 30 May 2010 23:57:51 +0000 |
parents | 31dae9841fe1 |
children | 1547c744b8d4 |
comparison
equal
deleted
inserted
replaced
11798:46a7546ad744 | 11799:25ce7aff1e1d |
---|---|
414 if (IVI_DEBUG && !val) | 414 if (IVI_DEBUG && !val) |
415 av_log(NULL, AV_LOG_ERROR, "Val = 0 encountered!\n"); | 415 av_log(NULL, AV_LOG_ERROR, "Val = 0 encountered!\n"); |
416 | 416 |
417 q = (base_tab[pos] * scale_tab[quant]) >> 8; | 417 q = (base_tab[pos] * scale_tab[quant]) >> 8; |
418 if (q > 1) | 418 if (q > 1) |
419 val = val * q + FFSIGN(val) * ((q >> 1) - (q & 1)); | 419 val = val * q + FFSIGN(val) * (((q ^ 1) - 1) >> 1); |
420 trvec[pos] = val; | 420 trvec[pos] = val; |
421 col_flags[pos & col_mask] |= !!val; /* track columns containing non-zero coeffs */ | 421 col_flags[pos & col_mask] |= !!val; /* track columns containing non-zero coeffs */ |
422 }// while | 422 }// while |
423 | 423 |
424 if (scan_pos >= num_coeffs && sym != rvmap->eob_sym) | 424 if (scan_pos >= num_coeffs && sym != rvmap->eob_sym) |