[x265] [PATCH] ipfilter : extendCURowColBorder() performance tuning
Gopu Govindaswamy
gopu at multicorewareinc.com
Tue Sep 3 13:37:01 CEST 2013
# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1378208206 -19800
# Node ID bba9aca5c360a3faf62507f4c95b784fc2adbecc
# Parent 9a2eaa27b17476c798c831a15af019a7148c6735
ipfilter : extendCURowColBorder() performance tuning
diff -r 9a2eaa27b174 -r bba9aca5c360 source/common/ipfilter.cpp
--- a/source/common/ipfilter.cpp Tue Sep 03 14:36:20 2013 +0530
+++ b/source/common/ipfilter.cpp Tue Sep 03 17:06:46 2013 +0530
@@ -459,15 +459,18 @@
void extendCURowColBorder(pixel* txt, intptr_t stride, int width, int height, int marginX)
{
- int x, y;
-
- for (y = 0; y < height; y++)
+ for (int y = 0; y < height; y++)
{
- for (x = 0; x < marginX; x++)
+#if HIGH_BIT_DEPTH
+ for (int x = 0; x < marginX; x++)
{
txt[-marginX + x] = txt[0];
txt[width + x] = txt[width - 1];
}
+#else
+ ::memset(txt - marginX, txt[0], marginX);
+ ::memset(txt + width, txt[width - 1], marginX);
+#endif
txt += stride;
}
More information about the x265-devel
mailing list