Mercurial > libavcodec.hg
comparison x86/vp3dsp_mmx.c @ 11788:b2c0b7034aab libavcodec
vp3: The DC-only IDCT is surprisingly not supposed to be bitexact to the
full IDCT. Fix this.
author | conrad |
---|---|
date | Fri, 28 May 2010 07:01:34 +0000 |
parents | 7dd2a45249a9 |
children | fe78a4548d12 |
comparison
equal
deleted
inserted
replaced
11787:c3ca752c24ef | 11788:b2c0b7034aab |
---|---|
396 add_pixels_clamped_mmx(block, dest, line_size); | 396 add_pixels_clamped_mmx(block, dest, line_size); |
397 } | 397 } |
398 | 398 |
399 void ff_vp3_idct_dc_add_mmx2(uint8_t *dest, int linesize, const DCTELEM *block) | 399 void ff_vp3_idct_dc_add_mmx2(uint8_t *dest, int linesize, const DCTELEM *block) |
400 { | 400 { |
401 int dc = block[0]; | 401 int dc = (block[0] + 15) >> 5; |
402 dc = (46341*dc)>>16; | |
403 dc = (46341*dc + (8<<16))>>20; | |
404 | 402 |
405 __asm__ volatile( | 403 __asm__ volatile( |
406 "movd %3, %%mm0 \n\t" | 404 "movd %3, %%mm0 \n\t" |
407 "pshufw $0, %%mm0, %%mm0 \n\t" | 405 "pshufw $0, %%mm0, %%mm0 \n\t" |
408 "pxor %%mm1, %%mm1 \n\t" | 406 "pxor %%mm1, %%mm1 \n\t" |