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
Showing the changes to test/api/encode_options_test.cpp (1 of 1 file). Show all
Unified · Split
| @@ -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; |