dont call emms_c() for each MB

Originally committed as revision 1127 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2002-10-31 12:11:53 +00:00
parent 0aa7875a73
commit 6bb925f47d
2 changed files with 10 additions and 5 deletions

View File

@ -120,6 +120,9 @@ int avcodec_encode_video(AVCodecContext *avctx, UINT8 *buf, int buf_size,
int ret;
ret = avctx->codec->encode(avctx, buf, buf_size, (void *)pict);
emms_c(); //needed to avoid a emms_c() call before every return;
avctx->frame_number++;
return ret;
}
@ -135,6 +138,9 @@ int avcodec_decode_video(AVCodecContext *avctx, AVPicture *picture,
ret = avctx->codec->decode(avctx, picture, got_picture_ptr,
buf, buf_size);
emms_c(); //needed to avoid a emms_c() call before every return;
if (*got_picture_ptr)
avctx->frame_number++;
return ret;