提交 8bdbae01 编写于 作者: M Michael Niedermayer

(commit by michael)

memset() in MMX

Originally committed as revision 263 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 162c9c2e
...@@ -162,7 +162,27 @@ static int h263_decode_frame(AVCodecContext *avctx, ...@@ -162,7 +162,27 @@ static int h263_decode_frame(AVCodecContext *avctx,
s->c_dc_scale = 8; s->c_dc_scale = 8;
} }
#ifdef HAVE_MMX
if (mm_flags & MM_MMX) {
asm volatile(
"pxor %%mm7, %%mm7 \n\t"
"movl $-128*6, %%eax \n\t"
"1: \n\t"
"movq %%mm7, (%0, %%eax) \n\t"
"movq %%mm7, 8(%0, %%eax) \n\t"
"movq %%mm7, 16(%0, %%eax) \n\t"
"movq %%mm7, 24(%0, %%eax) \n\t"
"addl $32, %%eax \n\t"
" js 1b \n\t"
: : "r" (((int)s->block)+128*6)
: "%eax"
);
}else{
memset(s->block, 0, sizeof(s->block));
}
#else
memset(s->block, 0, sizeof(s->block)); memset(s->block, 0, sizeof(s->block));
#endif
s->mv_dir = MV_DIR_FORWARD; s->mv_dir = MV_DIR_FORWARD;
s->mv_type = MV_TYPE_16X16; s->mv_type = MV_TYPE_16X16;
if (s->h263_msmpeg4) { if (s->h263_msmpeg4) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册