aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/bfin
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-04-03 05:03:17 -0700
committerMartin Storsjö <martin@martin.st>2013-04-15 12:31:52 +0300
commit5941978e71d2c3a8e2a7e87951e081e0b2e77da9 (patch)
tree93b37167614c313dd7b148d9700b5868074947b1 /libavcodec/bfin
parentc46819f2299c73cd1bfa8ef04d08b0153a5699d3 (diff)
downloadffmpeg-5941978e71d2c3a8e2a7e87951e081e0b2e77da9.tar.gz
vp3: bfin: Transpose the IDCTs
While this change isn't bitexact, the IDCTs weren't bitexact to start with either. This simplifies decoupling vp3 from dsputil. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/bfin')
-rw-r--r--libavcodec/bfin/vp3_bfin.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/bfin/vp3_bfin.c b/libavcodec/bfin/vp3_bfin.c
index ce8b0336fd..86c4b23b41 100644
--- a/libavcodec/bfin/vp3_bfin.c
+++ b/libavcodec/bfin/vp3_bfin.c
@@ -37,7 +37,7 @@ static void bfin_vp3_idct_put(uint8_t *dest, int line_size, int16_t *block)
for (i=0;i<8;i++)
for (j=0;j<8;j++)
- dest[line_size*i+j]=cm[block[i*8+j]];
+ dest[line_size*i + j] = cm[block[j*8 + i]];
memset(block, 0, 128);
}
@@ -45,8 +45,13 @@ static void bfin_vp3_idct_put(uint8_t *dest, int line_size, int16_t *block)
/* Inter iDCT */
static void bfin_vp3_idct_add(uint8_t *dest, int line_size, int16_t *block)
{
+ const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
+ int i, j;
+
ff_bfin_vp3_idct (block);
- ff_bfin_add_pixels_clamped (block, dest, line_size);
+ for (i = 0; i < 8; i++)
+ for (j = 0; j < 8; j++)
+ dest[line_size*i + j] = cm[dest[line_size*i + j] + block[j*8 + i]];
memset(block, 0, 128);
}
@@ -56,5 +61,6 @@ av_cold void ff_vp3dsp_init_bfin(VP3DSPContext *c, int flags)
if (!(flags & CODEC_FLAG_BITEXACT)) {
c->idct_add = bfin_vp3_idct_add;
c->idct_put = bfin_vp3_idct_put;
+ c->idct_perm = FF_TRANSPOSE_IDCT_PERM;
}
}