History

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

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

Martin Storsjö committed 12 years ago

Commit deefdce1 parent 45c322a1 file · +1 −1Browse files

Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 1 file). Show all

Unified · Split

test/encoder/EncUT_EncoderExt.cpp+1−1
@@ -90,7 +90,7 @@ void EncoderInterfaceTest::PrepareOneSrcFrame() { · 89 unmodified lines
9090 if ((i % 256) == 0)
9191 pYUV[i] = rand() % 256;
9292 else
93− pYUV[i] = WELS_CLIP3 (pYUV[i - 1] + (rand() % 3) - 1, 0, 255);
93+ pYUV[i] = (pYUV[i - 1] + (rand() % 3) - 1) & 0xff;
9494 }
9595 pSrcPic->iStride[0] = m_iWidth;
9696 pSrcPic->iStride[1] = pSrcPic->iStride[2] = pSrcPic->iStride[0] >> 1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t