History

Add casts when converting from float to int

Martin Storsjö committed 11 years ago

Commit af938a61 parent ef82e181 file · +2 −2Browse files

Showing the changes to test/api/encode_decode_api_test.cpp (1 of 1 file). Show all

Unified · Split

test/api/encode_decode_api_test.cpp+2−2
@@ -815,7 +815,7 @@ TEST_P (EncodeDecodeTestAPI, GetOptionLTR_ALLIDR) { · 814 unmodified lines
815815 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);
816816 int32_t iSpsPpsIdAddition = 1;
817817 encoder_->SetOption (ENCODER_OPTION_ENABLE_SPS_PPS_ID_ADDITION, &iSpsPpsIdAddition);
818− int32_t iIDRPeriod = pow (2.0f, (param_.iTemporalLayerNum - 1)) * ((rand() % 5) + 1);
818+ int32_t iIDRPeriod = (int32_t) pow (2.0f, (param_.iTemporalLayerNum - 1)) * ((rand() % 5) + 1);
819819 encoder_->SetOption (ENCODER_OPTION_IDR_INTERVAL, &iIDRPeriod);
820820 SLTRConfig sLtrConfigVal;
821821 sLtrConfigVal.bEnableLongTermReference = 1;
@@ -1955,7 +1955,7 @@ TEST_F (EncodeDecodeTestAPI, Engine_SVC_Switch_I) { · 1133 unmodified lines
19551955 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);
19561956 int32_t iSpsPpsIdAddition = 1;
19571957 encoder_->SetOption (ENCODER_OPTION_ENABLE_SPS_PPS_ID_ADDITION, &iSpsPpsIdAddition);
1958− int32_t iIDRPeriod = pow (2.0f, (param_.iTemporalLayerNum - 1)) * ((rand() % 5) + 1);
1958+ int32_t iIDRPeriod = (int32_t) pow (2.0f, (param_.iTemporalLayerNum - 1)) * ((rand() % 5) + 1);
19591959 encoder_->SetOption (ENCODER_OPTION_IDR_INTERVAL, &iIDRPeriod);
19601960 SLTRConfig sLtrConfigVal;
19611961 sLtrConfigVal.bEnableLongTermReference = 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