diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-16 00:50:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-16 00:50:33 +0200 |
commit | 05bea443935a64c720b9de845b3dd9717bce618e (patch) | |
tree | 5aec50686921d5a3ed75ae0024544ccace4e132b | |
parent | d5c31403aa13a1300fa97daba307675e2107fcfa (diff) | |
parent | 5941978e71d2c3a8e2a7e87951e081e0b2e77da9 (diff) | |
download | ffmpeg-05bea443935a64c720b9de845b3dd9717bce618e.tar.gz |
Merge commit '5941978e71d2c3a8e2a7e87951e081e0b2e77da9'
* commit '5941978e71d2c3a8e2a7e87951e081e0b2e77da9':
vp3: bfin: Transpose the IDCTs
Conflicts:
libavcodec/bfin/vp3_bfin.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/bfin/vp3_bfin.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/libavcodec/bfin/vp3_bfin.c b/libavcodec/bfin/vp3_bfin.c index db6a691283..5cd9a97259 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,18 +45,22 @@ 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); } av_cold void ff_vp3dsp_init_bfin(VP3DSPContext *c, int flags) { - // FIXME: these functions are disabled because they expect unpermutated - // IDCT coefficients as input, but the coefficients are transposed -// if (!(flags & CODEC_FLAG_BITEXACT)) { -// c->idct_add = bfin_vp3_idct_add; -// c->idct_put = bfin_vp3_idct_put; -// } + 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; + } } |