Mercurial > libavcodec.hg
diff mpegvideo.c @ 1580:628bf341e099 libavcodec
XvMC speedup by removing one memcpy and doing MB packing
author | iive |
---|---|
date | Mon, 27 Oct 2003 23:22:43 +0000 |
parents | 039cb2296de2 |
children | 3d1d0490e5a6 |
line wrap: on
line diff
--- a/mpegvideo.c Mon Oct 27 14:37:30 2003 +0000 +++ b/mpegvideo.c Mon Oct 27 23:22:43 2003 +0000 @@ -56,7 +56,7 @@ #ifdef HAVE_XVMC extern int XVMC_field_start(MpegEncContext*s, AVCodecContext *avctx); extern void XVMC_field_end(MpegEncContext *s); -extern void XVMC_decode_mb(MpegEncContext *s, DCTELEM block[6][64]); +extern void XVMC_decode_mb(MpegEncContext *s); #endif void (*draw_edges)(uint8_t *buf, int wrap, int width, int height, int w)= draw_edges_c; @@ -519,6 +519,10 @@ s->block= s->blocks[0]; + for(i=0;i<12;i++){ + s->pblocks[i] = (short *)(&s->block[i]); + } + s->parse_context.state= -1; s->context_initialized = 1; @@ -2485,7 +2489,7 @@ const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; #ifdef HAVE_XVMC if(s->avctx->xvmc_acceleration){ - XVMC_decode_mb(s,block); + XVMC_decode_mb(s);//xvmc uses pblocks return; } #endif