History

Fix errors and warnings when building with msvc and for android with stlport

This fixes the following two kinds of errors and warnings: encode_options_test.cpp(2305) : error C2668: 'pow' : ambiguous call to overloaded function math.h(583): could be 'long double pow(long double,int)' math.h(535): or 'float pow(float,int)' math.h(497): or 'double pow(double,int)' while trying to match the argument list '(int, int)' encode_options_test.cpp(2305) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data

Martin Storsjö committed 8 years ago

Commit 3f290e71 parent 5542dda1 file · +1 −1Browse files

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

Unified · Split

test/api/encode_options_test.cpp+1−1
@@ -2302,7 +2302,7 @@ TEST_F (EncodeDecodeTestAPI, TemporalLayerChangeDuringEncoding_Specific) { · 2301 unmodified lines
2302 if ( (iStepIdx < 3) && (iFrameNum == ((iTotalFrame / 3) * (iStepIdx + 1)))) {2302 if ( (iStepIdx < 3) && (iFrameNum == ((iTotalFrame / 3) * (iStepIdx + 1)))) {
2303 sParam.iTemporalLayerNum = originalTemporalLayerNum * iSteps[iStepIdx];2303 sParam.iTemporalLayerNum = originalTemporalLayerNum * iSteps[iStepIdx];
2304 sParam.iTargetBitrate = sParam.sSpatialLayers[0].iSpatialBitrate = originalBR * iSteps[iStepIdx];2304 sParam.iTargetBitrate = sParam.sSpatialLayers[0].iSpatialBitrate = originalBR * iSteps[iStepIdx];
2305 sParam.fMaxFrameRate = sParam.sSpatialLayers[0].fFrameRate = originalFR * pow (2, iSteps[iStepIdx]);2305 sParam.fMaxFrameRate = sParam.sSpatialLayers[0].fFrameRate = originalFR * pow (2.0f, iSteps[iStepIdx]);
2306 encoder_->SetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, &sParam);2306 encoder_->SetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, &sParam);
2307 2307
2308 bSetOption = true;2308 bSetOption = true;

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