History

fix ubsan warning about *2 overflow and -infinite

huili2 committed 8 years ago

Commit 14ca6e31 parent 23e96832 files · +4 −2Browse files

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

Unified · Split

test/encoder/EncUT_EncoderExt.cpp+2−2
@@ -728,8 +728,8 @@ TEST_F (EncoderInterfaceTest, ForceIntraFrameWithTemporal) { · 727 unmodified lines
728 SEncParamExt sEncParamExt;728 SEncParamExt sEncParamExt;
729 pPtrEnc->GetDefaultParams (&sEncParamExt);729 pPtrEnc->GetDefaultParams (&sEncParamExt);
730 sEncParamExt.iUsageType = CAMERA_VIDEO_REAL_TIME;730 sEncParamExt.iUsageType = CAMERA_VIDEO_REAL_TIME;
731 sEncParamExt.iPicWidth = MB_SIZE + abs ((rand() * 2) % (MAX_WIDTH - MB_SIZE));731 sEncParamExt.iPicWidth = MB_SIZE + abs ((rand() / 2 * 2) % (MAX_WIDTH - MB_SIZE));
732 sEncParamExt.iPicHeight = MB_SIZE + abs ((rand() * 2) % (MAX_HEIGHT - MB_SIZE));732 sEncParamExt.iPicHeight = MB_SIZE + abs ((rand() / 2 * 2) % (MAX_HEIGHT - MB_SIZE));
733 sEncParamExt.iTargetBitrate = rand() + 1; //!=0733 sEncParamExt.iTargetBitrate = rand() + 1; //!=0
734 // Force a bitrate of at least w*h/50, otherwise we will only get skipped frames734 // Force a bitrate of at least w*h/50, otherwise we will only get skipped frames
735 sEncParamExt.iTargetBitrate = WELS_CLIP3 (sEncParamExt.iTargetBitrate,735 sEncParamExt.iTargetBitrate = WELS_CLIP3 (sEncParamExt.iTargetBitrate,

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