Showing the changes to test/api/DataGenerator.cpp (1 of 8 files). Show all
Unified · Split
| @@ -44,9 +44,10 @@ bool YUVPixelDataGenerator( uint8_t* pPointer, int32_t iWidth, int32_t iHeight, · 43 unmodified lines | ||
| 44 | 44 | return false; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | −void RandomPixelDataGenerator( uint8_t* pPointer, int32_t iWidth, int32_t iHeight, int32_t iStride ) | |
| 47 | +void RandomPixelDataGenerator( uint8_t* pPointer, int32_t iWidth, int32_t iHeight, int32_t iStride, int32_t iIdx ) | |
| 48 | 48 | { |
| 49 | 49 | uint8_t* pLocalPointer = pPointer; |
| 50 | + srand((uint32_t)(time(NULL)+iIdx)); | |
| 50 | 51 | for (int32_t j=0;j<iHeight;j++) { |
| 51 | 52 | for (int32_t i=0;i<iWidth;i++) { |
| 52 | 53 | pLocalPointer[i] = rand()%256; |