Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 1 file). Show all
Unified · Split
| @@ -220,7 +220,7 @@ TEST_F (EncoderInterfaceTest, EncoderOptionSetTest) { · 219 unmodified lines | |||
| 220 | sInfo.iLayer = SPATIAL_LAYER_0; | 220 | sInfo.iLayer = SPATIAL_LAYER_0; |
| 221 | iResult = pPtrEnc->SetOption (eOptionId, &sInfo); | 221 | iResult = pPtrEnc->SetOption (eOptionId, &sInfo); |
| 222 | pPtrEnc->GetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, pParamExt); | 222 | pPtrEnc->GetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, pParamExt); |
| 223 | if (sInfo.iBitrate <= 0 || pParamExt->sSpatialLayers[sInfo.iLayer].iSpatialBitrate <= (int) (fFrameRate + 0.5f)) | 223 | if (sInfo.iBitrate <= 0 || (static_cast<float> (pParamExt->sSpatialLayers[sInfo.iLayer].iSpatialBitrate) <= fFrameRate)) |
| 224 | EXPECT_EQ (iResult, static_cast<int> (cmInitParaError)); | 224 | EXPECT_EQ (iResult, static_cast<int> (cmInitParaError)); |
| 225 | else if (pParamExt->sSpatialLayers[sInfo.iLayer].iSpatialBitrate > | 225 | else if (pParamExt->sSpatialLayers[sInfo.iLayer].iSpatialBitrate > |
| 226 | pParamExt->sSpatialLayers[sInfo.iLayer].iMaxSpatialBitrate) { | 226 | pParamExt->sSpatialLayers[sInfo.iLayer].iMaxSpatialBitrate) { |
| @@ -242,7 +242,7 @@ TEST_F (EncoderInterfaceTest, EncoderOptionSetTest) { · 15 unmodified lines | |||
| 242 | sInfo.iLayer = SPATIAL_LAYER_0; | 242 | sInfo.iLayer = SPATIAL_LAYER_0; |
| 243 | iResult = pPtrEnc->SetOption (eOptionId, &sInfo); | 243 | iResult = pPtrEnc->SetOption (eOptionId, &sInfo); |
| 244 | pPtrEnc->GetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, pParamExt); | 244 | pPtrEnc->GetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, pParamExt); |
| 245 | if (sInfo.iBitrate <= 0 || pParamExt->sSpatialLayers[sInfo.iLayer].iSpatialBitrate <= (int) (fFrameRate + 0.5f)) | 245 | if (sInfo.iBitrate <= 0 || (static_cast<float> (pParamExt->sSpatialLayers[sInfo.iLayer].iSpatialBitrate) <= fFrameRate)) |
| 246 | EXPECT_EQ (iResult, static_cast<int> (cmInitParaError)); | 246 | EXPECT_EQ (iResult, static_cast<int> (cmInitParaError)); |
| 247 | else if (pParamExt->sSpatialLayers[sInfo.iLayer].iSpatialBitrate > | 247 | else if (pParamExt->sSpatialLayers[sInfo.iLayer].iSpatialBitrate > |
| 248 | pParamExt->sSpatialLayers[sInfo.iLayer].iMaxSpatialBitrate) { | 248 | pParamExt->sSpatialLayers[sInfo.iLayer].iMaxSpatialBitrate) { |