This speeds up the whole EncoderInterfaceTest to about double the speed from before.
Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 1 file). Show all
Unified · Split
| @@ -90,7 +90,7 @@ void EncoderInterfaceTest::PrepareOneSrcFrame() { · 89 unmodified lines | |||
| 90 | if ((i % 256) == 0) | 90 | if ((i % 256) == 0) |
| 91 | pYUV[i] = rand() % 256; | 91 | pYUV[i] = rand() % 256; |
| 92 | else | 92 | else |
| 93 | pYUV[i] = WELS_CLIP3 (pYUV[i - 1] + (rand() % 3) - 1, 0, 255); | 93 | pYUV[i] = (pYUV[i - 1] + (rand() % 3) - 1) & 0xff; |
| 94 | } | 94 | } |
| 95 | pSrcPic->iStride[0] = m_iWidth; | 95 | pSrcPic->iStride[0] = m_iWidth; |
| 96 | pSrcPic->iStride[1] = pSrcPic->iStride[2] = pSrcPic->iStride[0] >> 1; | 96 | pSrcPic->iStride[1] = pSrcPic->iStride[2] = pSrcPic->iStride[0] >> 1; |