[FFmpeg-devel] [PATCH 5/5] sws/output: benchmark code for yuv2rgb_2_c_template

Michael Niedermayer michaelni at gmx.at
Sun Apr 14 12:17:22 CEST 2013


Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libswscale/output.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libswscale/output.c b/libswscale/output.c
index 3d7c0e1..9569293 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -1224,7 +1224,7 @@ yuv2rgb_2_c_template(SwsContext *c, const int16_t *buf[2],
     int  yalpha1 = 4096 - yalpha;
     int uvalpha1 = 4096 - uvalpha;
     int i;
-
+START_TIMER
     for (i = 0; i < ((dstW + 1) >> 1); i++) {
         int Y1 = (buf0[i * 2]     * yalpha1  + buf1[i * 2]     * yalpha)  >> 10;
         int Y2 = (buf0[i * 2 + 1] * yalpha1  + buf1[i * 2 + 1] * yalpha)  >> 10;
@@ -1261,6 +1261,7 @@ yuv2rgb_2_c_template(SwsContext *c, const int16_t *buf[2],
             }
         }
     }
+    STOP_TIMER("yuv2rgb_2_c_template")
 }
 
 static av_always_inline void
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list