shithub: openh264

Download patch

ref: deefdcee10876296872f752e9e239226189b4f97
parent: 45c322a8aec3e5498461a784f243bd5587bc0e55
author: Martin Storsjö <martin@martin.st>
date: Fri Nov 14 05:39:34 EST 2014

Use & 0xff instead of WELS_CLIP3(, 0, 255)

This speeds up the whole EncoderInterfaceTest to about double
the speed from before.

--- a/test/encoder/EncUT_EncoderExt.cpp
+++ b/test/encoder/EncUT_EncoderExt.cpp
@@ -90,7 +90,7 @@
     if ((i % 256) == 0)
       pYUV[i] = rand() % 256;
     else
-      pYUV[i] = WELS_CLIP3 (pYUV[i - 1] + (rand() % 3) - 1, 0, 255);
+      pYUV[i] = (pYUV[i - 1] + (rand() % 3) - 1) & 0xff;
   }
   pSrcPic->iStride[0] = m_iWidth;
   pSrcPic->iStride[1] = pSrcPic->iStride[2] = pSrcPic->iStride[0] >> 1;