Use WelsClip3 instead of WELS_CLIP3 for random values
Since WELS_CLIP3 is a macro, using it will cause the arguments to be evalated multiple times, which means that the clip will not work as intended. If using a rand() argument, always use WelsClip3 instead, which is an inline function.
This commit is contained in:
parent
fcae7fd300
commit
c1aa2a1edb
@ -149,11 +149,11 @@ class EncodeDecodeTestBase : public ::testing::TestWithParam<EncodeDecodeFilePar
|
||||
|
||||
|
||||
virtual int GetRandWidth() {
|
||||
return (WELS_CLIP3 ((((rand() % MAX_WIDTH) >> 1) + 1) << 1, 2, MAX_WIDTH));
|
||||
return WelsClip3 ((((rand() % MAX_WIDTH) >> 1) + 1) << 1, 2, MAX_WIDTH);
|
||||
}
|
||||
|
||||
virtual int GetRandHeight() {
|
||||
return (WELS_CLIP3 ((((rand() % MAX_HEIGHT) >> 1) + 1) << 1, 2, MAX_HEIGHT));
|
||||
return WelsClip3 ((((rand() % MAX_HEIGHT) >> 1) + 1) << 1, 2, MAX_HEIGHT);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
Loading…
x
Reference in New Issue
Block a user