diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2010-01-16 18:39:06 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2010-01-16 18:39:06 +0000 |
commit | 0cc854e377d00d0f60d2c01feeffeefb8593ffb2 (patch) | |
tree | b5ab56d3e9edb862805debeaccd5d909f64d3eb8 /libswscale/swscale.c | |
parent | d95c863850d4660575bdc26c7a57bf43312da763 (diff) | |
download | ffmpeg-0cc854e377d00d0f60d2c01feeffeefb8593ffb2.tar.gz |
Reuse h{lum,chr}Filter{,Pos} variables for MMX2 fast_bilinear horizontal scaler.
Originally committed as revision 30327 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r-- | libswscale/swscale.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 9f1b9fd24c..612b250c72 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2690,13 +2690,13 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d c->chrMmx2FilterCode = av_malloc(c->chrMmx2FilterCodeSize); #endif - FF_ALLOCZ_OR_GOTO(c, c->lumMmx2Filter , (dstW /8+8)*sizeof(int16_t), fail); - FF_ALLOCZ_OR_GOTO(c, c->chrMmx2Filter , (c->chrDstW /4+8)*sizeof(int16_t), fail); - FF_ALLOCZ_OR_GOTO(c, c->lumMmx2FilterPos, (dstW /2/8+8)*sizeof(int32_t), fail); - FF_ALLOCZ_OR_GOTO(c, c->chrMmx2FilterPos, (c->chrDstW/2/4+8)*sizeof(int32_t), fail); + FF_ALLOCZ_OR_GOTO(c, c->hLumFilter , (dstW /8+8)*sizeof(int16_t), fail); + FF_ALLOCZ_OR_GOTO(c, c->hChrFilter , (c->chrDstW /4+8)*sizeof(int16_t), fail); + FF_ALLOCZ_OR_GOTO(c, c->hLumFilterPos, (dstW /2/8+8)*sizeof(int32_t), fail); + FF_ALLOCZ_OR_GOTO(c, c->hChrFilterPos, (c->chrDstW/2/4+8)*sizeof(int32_t), fail); - initMMX2HScaler( dstW, c->lumXInc, c->lumMmx2FilterCode, c->lumMmx2Filter, c->lumMmx2FilterPos, 8); - initMMX2HScaler(c->chrDstW, c->chrXInc, c->chrMmx2FilterCode, c->chrMmx2Filter, c->chrMmx2FilterPos, 4); + initMMX2HScaler( dstW, c->lumXInc, c->lumMmx2FilterCode, c->hLumFilter, c->hLumFilterPos, 8); + initMMX2HScaler(c->chrDstW, c->chrXInc, c->chrMmx2FilterCode, c->hChrFilter, c->hChrFilterPos, 4); #ifdef MAP_ANONYMOUS mprotect(c->lumMmx2FilterCode, c->lumMmx2FilterCodeSize, PROT_EXEC | PROT_READ); @@ -3423,10 +3423,6 @@ void sws_freeContext(SwsContext *c) c->chrMmx2FilterCode=NULL; #endif /* ARCH_X86 && CONFIG_GPL */ - av_freep(&c->lumMmx2Filter); - av_freep(&c->chrMmx2Filter); - av_freep(&c->lumMmx2FilterPos); - av_freep(&c->chrMmx2FilterPos); av_freep(&c->yuvTable); av_free(c); |