vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sat Oct 13 14:51:48 2012 +0300| [18d7c9713c4b42368789961af6bc6345ce1fc6f9] | committer: Rémi Denis-Courmont
avcodec: avoid duplicate vlc_CPU() call > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=18d7c9713c4b42368789961af6bc6345ce1fc6f9 --- modules/codec/avcodec/copy.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/modules/codec/avcodec/copy.c b/modules/codec/avcodec/copy.c index 827892d..65f2982 100644 --- a/modules/codec/avcodec/copy.c +++ b/modules/codec/avcodec/copy.c @@ -314,11 +314,8 @@ static void SSE_SplitPlanes(uint8_t *dstu, size_t dstu_pitch, static void SSE_CopyFromNv12(picture_t *dst, uint8_t *src[2], size_t src_pitch[2], unsigned width, unsigned height, - copy_cache_t *cache) + copy_cache_t *cache, unsigned cpu) { - const unsigned cpu = vlc_CPU(); - - /* */ SSE_CopyPlane(dst->p[0].p_pixels, dst->p[0].i_pitch, src[0], src_pitch[0], cache->buffer, cache->size, @@ -334,11 +331,8 @@ static void SSE_CopyFromNv12(picture_t *dst, static void SSE_CopyFromYv12(picture_t *dst, uint8_t *src[3], size_t src_pitch[3], unsigned width, unsigned height, - copy_cache_t *cache) + copy_cache_t *cache, unsigned cpu) { - const unsigned cpu = vlc_CPU(); - - /* */ for (unsigned n = 0; n < 3; n++) { const unsigned d = n > 0 ? 2 : 1; SSE_CopyPlane(dst->p[n].p_pixels, dst->p[n].i_pitch, @@ -385,7 +379,8 @@ void CopyFromNv12(picture_t *dst, uint8_t *src[2], size_t src_pitch[2], #ifdef CAN_COMPILE_SSE2 unsigned cpu = vlc_CPU(); if (vlc_CPU_SSE2()) - return SSE_CopyFromNv12(dst, src, src_pitch, width, height, cache); + return SSE_CopyFromNv12(dst, src, src_pitch, width, height, + cache, cpu); #else (void) cache; #endif @@ -406,7 +401,8 @@ void CopyFromYv12(picture_t *dst, uint8_t *src[3], size_t src_pitch[3], #ifdef CAN_COMPILE_SSE2 unsigned cpu = vlc_CPU(); if (vlc_CPU_SSE2()) - return SSE_CopyFromYv12(dst, src, src_pitch, width, height, cache); + return SSE_CopyFromYv12(dst, src, src_pitch, width, height, + cache, cpu); #else (void) cache; #endif _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
