From 179655b6c6f27cca2089844046bc5f280bb83814 Mon Sep 17 00:00:00 2001 From: David Conrad Date: Fri, 28 May 2010 07:01:34 +0000 Subject: [PATCH] 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 --- libavcodec/x86/vp3dsp_mmx.c | 4 +--- 1 file changed, 1 insertion(+), 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"