diff options
author | Mans Rullgard <mans@mansr.com> | 2011-12-12 23:21:39 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-12-13 12:05:34 +0000 |
commit | 40901fc14e1ae1a1074a70931a133b2bc2604a1c (patch) | |
tree | 0b750e2a3314cb1454a1909ab497ce0a37926230 /libavcodec/rv34dsp.c | |
parent | 5cd56e193fd3c9f04075ef95be2d4eade87ca870 (diff) | |
download | ffmpeg-40901fc14e1ae1a1074a70931a133b2bc2604a1c.tar.gz |
rv34: move 4x4 dequant to RV34DSPContext
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/rv34dsp.c')
-rw-r--r-- | libavcodec/rv34dsp.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavcodec/rv34dsp.c b/libavcodec/rv34dsp.c index 1f4cea8544..974bf9ec16 100644 --- a/libavcodec/rv34dsp.c +++ b/libavcodec/rv34dsp.c @@ -100,10 +100,26 @@ static void rv34_inv_transform_noround_c(DCTELEM *block){ /** @} */ // transform +/** + * Dequantize ordinary 4x4 block. + */ +void ff_rv34_dequant4x4_neon(DCTELEM *block, int Qdc, int Q); +static void rv34_dequant4x4_c(DCTELEM *block, int Qdc, int Q) +{ + int i, j; + + block[0] = (block[0] * Qdc + 8) >> 4; + for (i = 0; i < 4; i++) + for (j = !i; j < 4; j++) + block[j + i*8] = (block[j + i*8] * Q + 8) >> 4; +} + av_cold void ff_rv34dsp_init(RV34DSPContext *c, DSPContext* dsp) { c->rv34_inv_transform_tab[0] = rv34_inv_transform_c; c->rv34_inv_transform_tab[1] = rv34_inv_transform_noround_c; + c->rv34_dequant4x4 = rv34_dequant4x4_c; + if (HAVE_NEON) ff_rv34dsp_init_neon(c, dsp); } |