Mercurial > libavcodec.hg
comparison utils.c @ 814:8f31ed5bacd1 libavcodec
dont call emms_c() for each MB
| author | michaelni |
|---|---|
| date | Thu, 31 Oct 2002 12:11:53 +0000 |
| parents | 5da504c8c90e |
| children | a25aed263097 |
comparison
equal
deleted
inserted
replaced
| 813:dfaa1c45bd27 | 814:8f31ed5bacd1 |
|---|---|
| 118 const AVPicture *pict) | 118 const AVPicture *pict) |
| 119 { | 119 { |
| 120 int ret; | 120 int ret; |
| 121 | 121 |
| 122 ret = avctx->codec->encode(avctx, buf, buf_size, (void *)pict); | 122 ret = avctx->codec->encode(avctx, buf, buf_size, (void *)pict); |
| 123 | |
| 124 emms_c(); //needed to avoid a emms_c() call before every return; | |
| 125 | |
| 123 avctx->frame_number++; | 126 avctx->frame_number++; |
| 124 return ret; | 127 return ret; |
| 125 } | 128 } |
| 126 | 129 |
| 127 /* decode a frame. return -1 if error, otherwise return the number of | 130 /* decode a frame. return -1 if error, otherwise return the number of |
| 133 { | 136 { |
| 134 int ret; | 137 int ret; |
| 135 | 138 |
| 136 ret = avctx->codec->decode(avctx, picture, got_picture_ptr, | 139 ret = avctx->codec->decode(avctx, picture, got_picture_ptr, |
| 137 buf, buf_size); | 140 buf, buf_size); |
| 141 | |
| 142 emms_c(); //needed to avoid a emms_c() call before every return; | |
| 143 | |
| 138 if (*got_picture_ptr) | 144 if (*got_picture_ptr) |
| 139 avctx->frame_number++; | 145 avctx->frame_number++; |
| 140 return ret; | 146 return ret; |
| 141 } | 147 } |
| 142 | 148 |
