Mercurial > libavcodec.hg
diff i386/h264dsp_mmx.c @ 3001:b52d8ee430f6 libavcodec
fix some potential arithmetic overflows in pred_direct_motion() and
ff_h264_weight_WxH_mmx2().
author | lorenm |
---|---|
date | Fri, 30 Dec 2005 23:47:41 +0000 |
parents | bfabfdf9ce55 |
children | 7a92269a3ccd |
line wrap: on
line diff
--- a/i386/h264dsp_mmx.c Fri Dec 30 22:41:32 2005 +0000 +++ b/i386/h264dsp_mmx.c Fri Dec 30 23:47:41 2005 +0000 @@ -518,9 +518,9 @@ "psraw $2, %%mm0 \n\t"/*(a-b)/4 */\ "psubw %%mm1, %%mm0 \n\t"/*(a-b)/4-b */\ "paddsw %%mm2, %%mm0 \n\t"\ - "psraw $2, %%mm0 \n\t"/*((a-b)/4-b)/4 */\ + "psraw $2, %%mm0 \n\t"/*((a-b)/4-b+c)/4 */\ "paddw %%mm6, %%mm2 \n\t"\ - "paddw %%mm2, %%mm0 \n\t"\ + "paddw %%mm2, %%mm0 \n\t"/*(a-5*b+20*c)/16 +32 */\ "psraw $6, %%mm0 \n\t"\ "packuswb %%mm0, %%mm0 \n\t"\ OP(%%mm0, (%1),%%mm7, d)\ @@ -955,8 +955,8 @@ "punpcklbw %%mm7, %%mm1 \n\t" "pmullw %%mm4, %%mm0 \n\t" "pmullw %%mm4, %%mm1 \n\t" - "paddw %%mm5, %%mm0 \n\t" - "paddw %%mm5, %%mm1 \n\t" + "paddsw %%mm5, %%mm0 \n\t" + "paddsw %%mm5, %%mm1 \n\t" "psraw %%mm6, %%mm0 \n\t" "psraw %%mm6, %%mm1 \n\t" "packuswb %%mm7, %%mm0 \n\t" @@ -995,8 +995,8 @@ "punpcklbw %%mm7, %%mm1 \n\t" "pmullw %%mm3, %%mm0 \n\t" "pmullw %%mm4, %%mm1 \n\t" - "paddw %%mm5, %%mm0 \n\t" - "paddw %%mm1, %%mm0 \n\t" + "paddsw %%mm1, %%mm0 \n\t" + "paddsw %%mm5, %%mm0 \n\t" "psraw %%mm6, %%mm0 \n\t" "packuswb %%mm0, %%mm0 \n\t" "movd %%mm0, %0 \n\t"