aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2010-05-28 07:01:34 +0000
committerDavid Conrad <lessen42@gmail.com>2010-05-28 07:01:34 +0000
commit179655b6c6f27cca2089844046bc5f280bb83814 (patch)
tree5c5ea24eeda3a6fd829c307b30b593df142c7ed9
parent173bb37f8239cd2ea27d7e2bf1bcfc21485df598 (diff)
downloadffmpeg-179655b6c6f27cca2089844046bc5f280bb83814.tar.gz
vp3: The DC-only IDCT is surprisingly not supposed to be bitexact to the
full IDCT. Fix this. Originally committed as revision 23358 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/x86/vp3dsp_mmx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/x86/vp3dsp_mmx.c b/libavcodec/x86/vp3dsp_mmx.c
index 44a8477a89..188240dd08 100644
--- a/libavcodec/x86/vp3dsp_mmx.c
+++ b/libavcodec/x86/vp3dsp_mmx.c
@@ -398,9 +398,7 @@ void ff_vp3_idct_add_mmx(uint8_t *dest, int line_size, DCTELEM *block)
void ff_vp3_idct_dc_add_mmx2(uint8_t *dest, int linesize, const DCTELEM *block)
{
- int dc = block[0];
- dc = (46341*dc)>>16;
- dc = (46341*dc + (8<<16))>>20;
+ int dc = (block[0] + 15) >> 5;
__asm__ volatile(
"movd %3, %%mm0 \n\t"