aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rv34dsp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-13 23:21:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-13 23:21:37 +0100
commit3ba0bfe71fb18e955ca0110e5a65105d84932fbc (patch)
treeb308d41d170483c23c31c87d8dcb19fc169e2eb6 /libavcodec/rv34dsp.c
parent36be045ed7942e07742c3cf3d3012b1d2a9ec344 (diff)
parenta99273ebf328658c183c2d267f1c2b8bfac58bb3 (diff)
downloadffmpeg-3ba0bfe71fb18e955ca0110e5a65105d84932fbc.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: ulti: Fix invalid reads lavf: dealloc private options in av_write_trailer yadif: support 10bit YUV vc1: mark with ER_MB_ERROR bits overconsumption lavc: introduce ER_MB_END and ER_MB_ERROR error_resilience: use the ER_ namespace build: move inclusion of subdir.mak to main subdir loop rv34: NEON optimised 4x4 dequant rv34: move 4x4 dequant to RV34DSPContext aacdec: Use intfloat.h rather than local punning union. Conflicts: libavcodec/h264.c libavcodec/vc1dec.c libavfilter/vf_yadif.c libavformat/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv34dsp.c')
-rw-r--r--libavcodec/rv34dsp.c16
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);
}