Showing the changes to test/api/encode_decode_api_test.cpp (1 of 1 file). Show all
Unified · Split
| @@ -90,7 +90,6 @@ class EncodeDecodeTestBase : public ::testing::TestWithParam<EncodeDecodeFilePar · 89 unmodified lines | ||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | virtual void prepareParam (int iLayers, int iSlices, int width, int height, float framerate, SEncParamExt* pParam) { |
| 93 | − memset (pParam, 0, sizeof (SEncParamExt)); | |
| 94 | 93 | pParam->iUsageType = CAMERA_VIDEO_REAL_TIME; |
| 95 | 94 | pParam->iPicWidth = width; |
| 96 | 95 | pParam->iPicHeight = height; |
| @@ -180,7 +179,14 @@ class EncodeDecodeTestAPI : public EncodeDecodeTestBase { · 83 unmodified lines | ||
| 180 | 179 | EncodeDecodeTestBase::TearDown(); |
| 181 | 180 | } |
| 182 | 181 | |
| 183 | − void prepareParam (int iLayers, int iSlices, int width, int height, float framerate, SEncParamExt* pParam) { | |
| 182 | + void prepareParam0 (int iLayers, int iSlices, int width, int height, float framerate, SEncParamExt* pParam) { | |
| 183 | + memset (pParam, 0, sizeof (SEncParamExt)); | |
| 184 | + EncodeDecodeTestBase::prepareParam (iLayers, iSlices, width, height, framerate, pParam); | |
| 185 | + } | |
| 186 | + | |
| 187 | + void prepareParamDefault (int iLayers, int iSlices, int width, int height, float framerate, SEncParamExt* pParam) { | |
| 188 | + memset (pParam, 0, sizeof (SEncParamExt)); | |
| 189 | + encoder_->GetDefaultParams (pParam); | |
| 184 | 190 | EncodeDecodeTestBase::prepareParam (iLayers, iSlices, width, height, framerate, pParam); |
| 185 | 191 | } |
| 186 | 192 | |
| @@ -509,7 +515,7 @@ static const EncodeDecodeFileParamBase kFileParamArray[] = { · 322 unmodified lines | ||
| 509 | 515 | |
| 510 | 516 | TEST_P (EncodeDecodeTestAPI, DecoderVclNal) { |
| 511 | 517 | EncodeDecodeFileParamBase p = GetParam(); |
| 512 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 518 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 513 | 519 | encoder_->Uninitialize(); |
| 514 | 520 | int rv = encoder_->InitializeExt (¶m_); |
| 515 | 521 | ASSERT_TRUE (rv == cmResultSuccess); |
| @@ -545,7 +551,7 @@ TEST_P (EncodeDecodeTestAPI, DecoderVclNal) { · 29 unmodified lines | ||
| 545 | 551 | |
| 546 | 552 | TEST_P (EncodeDecodeTestAPI, GetOptionFramenum) { |
| 547 | 553 | EncodeDecodeFileParamBase p = GetParam(); |
| 548 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 554 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 549 | 555 | encoder_->Uninitialize(); |
| 550 | 556 | int rv = encoder_->InitializeExt (¶m_); |
| 551 | 557 | ASSERT_TRUE (rv == cmResultSuccess); |
| @@ -582,7 +588,7 @@ TEST_P (EncodeDecodeTestAPI, GetOptionFramenum) { · 30 unmodified lines | ||
| 582 | 588 | |
| 583 | 589 | TEST_P (EncodeDecodeTestAPI, GetOptionIDR) { |
| 584 | 590 | EncodeDecodeFileParamBase p = GetParam(); |
| 585 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 591 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 586 | 592 | encoder_->Uninitialize(); |
| 587 | 593 | int rv = encoder_->InitializeExt (¶m_); |
| 588 | 594 | ASSERT_TRUE (rv == cmResultSuccess); |
| @@ -824,7 +830,7 @@ int SimulateNALLoss (const unsigned char* pSrc, int& iSrcLen, std::vector<SLost · 235 unmodified lines | ||
| 824 | 830 | |
| 825 | 831 | TEST_P (EncodeDecodeTestAPI, GetOptionLTR_ALLIDR) { |
| 826 | 832 | EncodeDecodeFileParamBase p = GetParam(); |
| 827 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 833 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 828 | 834 | encoder_->Uninitialize(); |
| 829 | 835 | int rv = encoder_->InitializeExt (¶m_); |
| 830 | 836 | ASSERT_TRUE (rv == cmResultSuccess); |
| @@ -857,7 +863,7 @@ TEST_P (EncodeDecodeTestAPI, GetOptionLTR_ALLLTR) { · 26 unmodified lines | ||
| 857 | 863 | SLTRMarkingFeedback m_LTR_Marking_Feedback; |
| 858 | 864 | SLTRRecoverRequest m_LTR_Recover_Request; |
| 859 | 865 | EncodeDecodeFileParamBase p = GetParam(); |
| 860 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 866 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 861 | 867 | encoder_->Uninitialize(); |
| 862 | 868 | int rv = encoder_->InitializeExt (¶m_); |
| 863 | 869 | ASSERT_TRUE (rv == cmResultSuccess); |
| @@ -916,7 +922,7 @@ TEST_P (EncodeDecodeTestAPI, GetOptionLTR_Engine) { · 52 unmodified lines | ||
| 916 | 922 | SLTRRecoverRequest m_LTR_Recover_Request; |
| 917 | 923 | m_LTR_Recover_Request.uiIDRPicId = 0; |
| 918 | 924 | EncodeDecodeFileParamBase p = GetParam(); |
| 919 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 925 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 920 | 926 | encoder_->Uninitialize(); |
| 921 | 927 | int rv = encoder_->InitializeExt (¶m_); |
| 922 | 928 | ASSERT_TRUE (rv == cmResultSuccess); |
| @@ -966,7 +972,7 @@ TEST_P (EncodeDecodeTestAPI, SetOptionECFlag_ERROR_CON_DISABLE) { · 43 unmodified lines | ||
| 966 | 972 | SLTRRecoverRequest m_LTR_Recover_Request; |
| 967 | 973 | m_LTR_Recover_Request.uiIDRPicId = 0; |
| 968 | 974 | EncodeDecodeFileParamBase p = GetParam(); |
| 969 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 975 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 970 | 976 | param_.bEnableLongTermReference = true; |
| 971 | 977 | param_.iLTRRefNum = 1; |
| 972 | 978 | encoder_->Uninitialize(); |
| @@ -1033,7 +1039,7 @@ TEST_P (EncodeDecodeTestAPI, SetOptionECFlag_ERROR_CON_SLICE_COPY) { · 60 unmodified lines | ||
| 1033 | 1039 | SLTRRecoverRequest m_LTR_Recover_Request; |
| 1034 | 1040 | m_LTR_Recover_Request.uiIDRPicId = 0; |
| 1035 | 1041 | EncodeDecodeFileParamBase p = GetParam(); |
| 1036 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1042 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1037 | 1043 | encoder_->Uninitialize(); |
| 1038 | 1044 | int rv = encoder_->InitializeExt (¶m_); |
| 1039 | 1045 | ASSERT_TRUE (rv == cmResultSuccess); |
| @@ -1084,7 +1090,7 @@ TEST_P (EncodeDecodeTestAPI, SetOptionECFlag_ERROR_CON_SLICE_COPY) { · 44 unmodified lines | ||
| 1084 | 1090 | |
| 1085 | 1091 | TEST_P (EncodeDecodeTestAPI, InOutTimeStamp) { |
| 1086 | 1092 | EncodeDecodeFileParamBase p = GetParam(); |
| 1087 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1093 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1088 | 1094 | encoder_->Uninitialize(); |
| 1089 | 1095 | int rv = encoder_->InitializeExt (¶m_); |
| 1090 | 1096 | ASSERT_TRUE (rv == cmResultSuccess); |
| @@ -1134,7 +1140,7 @@ TEST_P (EncodeDecodeTestAPI, GetOptionTid_AVC_NOPREFIX) { · 43 unmodified lines | ||
| 1134 | 1140 | SLTRRecoverRequest m_LTR_Recover_Request; |
| 1135 | 1141 | m_LTR_Recover_Request.uiIDRPicId = 0; |
| 1136 | 1142 | EncodeDecodeFileParamBase p = GetParam(); |
| 1137 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1143 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1138 | 1144 | param_.bPrefixNalAddingCtrl = false; |
| 1139 | 1145 | param_.iTemporalLayerNum = (rand() % 4) + 1; |
| 1140 | 1146 | encoder_->Uninitialize(); |
| @@ -1203,7 +1209,7 @@ TEST_P (EncodeDecodeTestAPI, GetOptionTid_AVC_WITH_PREFIX_NOLOSS) { · 62 unmodified lines | ||
| 1203 | 1209 | SLTRRecoverRequest m_LTR_Recover_Request; |
| 1204 | 1210 | m_LTR_Recover_Request.uiIDRPicId = 0; |
| 1205 | 1211 | EncodeDecodeFileParamBase p = GetParam(); |
| 1206 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1212 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1207 | 1213 | param_.bPrefixNalAddingCtrl = true; |
| 1208 | 1214 | param_.iTemporalLayerNum = (rand() % 4) + 1; |
| 1209 | 1215 | param_.iSpatialLayerNum = 1; |
| @@ -1258,7 +1264,7 @@ TEST_P (EncodeDecodeTestAPI, GetOptionTid_SVC_L1_NOLOSS) { · 48 unmodified lines | ||
| 1258 | 1264 | SLTRRecoverRequest m_LTR_Recover_Request; |
| 1259 | 1265 | m_LTR_Recover_Request.uiIDRPicId = 0; |
| 1260 | 1266 | EncodeDecodeFileParamBase p = GetParam(); |
| 1261 | − prepareParam (2, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1267 | + prepareParamDefault (2, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1262 | 1268 | param_.iTemporalLayerNum = (rand() % 4) + 1; |
| 1263 | 1269 | param_.iSpatialLayerNum = 2; |
| 1264 | 1270 | encoder_->Uninitialize(); |
| @@ -1314,7 +1320,7 @@ TEST_P (EncodeDecodeTestAPI, SetOption_Trace) { · 49 unmodified lines | ||
| 1314 | 1320 | SLTRRecoverRequest m_LTR_Recover_Request; |
| 1315 | 1321 | m_LTR_Recover_Request.uiIDRPicId = 0; |
| 1316 | 1322 | EncodeDecodeFileParamBase p = GetParam(); |
| 1317 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1323 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1318 | 1324 | param_.iSpatialLayerNum = 1; |
| 1319 | 1325 | |
| 1320 | 1326 | int rv = encoder_->InitializeExt (¶m_); |
| @@ -1378,7 +1384,7 @@ TEST_P (EncodeDecodeTestAPI, SetOption_Trace_NULL) { · 57 unmodified lines | ||
| 1378 | 1384 | SLTRRecoverRequest m_LTR_Recover_Request; |
| 1379 | 1385 | m_LTR_Recover_Request.uiIDRPicId = 0; |
| 1380 | 1386 | EncodeDecodeFileParamBase p = GetParam(); |
| 1381 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1387 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1382 | 1388 | param_.iSpatialLayerNum = 1; |
| 1383 | 1389 | int rv = encoder_->InitializeExt (¶m_); |
| 1384 | 1390 | ASSERT_TRUE (rv == cmResultSuccess); |
| @@ -1441,7 +1447,7 @@ TEST_P (EncodeDecodeTestAPI, SetOptionECIDC_GeneralSliceChange) { · 56 unmodified lines | ||
| 1441 | 1447 | uint32_t uiEcIdc; |
| 1442 | 1448 | uint32_t uiGet; |
| 1443 | 1449 | EncodeDecodeFileParamBase p = GetParam(); |
| 1444 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1450 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1445 | 1451 | param_.iSpatialLayerNum = 1; |
| 1446 | 1452 | encoder_->Uninitialize(); |
| 1447 | 1453 | int rv = encoder_->InitializeExt (¶m_); |
| @@ -1521,7 +1527,7 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificFrameChange) { · 73 unmodified lines | ||
| 1521 | 1527 | uint32_t uiEcIdc; |
| 1522 | 1528 | uint32_t uiGet; |
| 1523 | 1529 | EncodeDecodeFileParamBase p = kFileParamArray[0]; |
| 1524 | − prepareParam (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1530 | + prepareParamDefault (1, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1525 | 1531 | param_.iSpatialLayerNum = 1; |
| 1526 | 1532 | encoder_->Uninitialize(); |
| 1527 | 1533 | int rv = encoder_->InitializeExt (¶m_); |
| @@ -1660,7 +1666,7 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRLoss) { · 132 unmodified lines | ||
| 1660 | 1666 | uint32_t uiEcIdc = 2; //default set as SLICE_COPY |
| 1661 | 1667 | uint32_t uiGet; |
| 1662 | 1668 | EncodeDecodeFileParamBase p = kFileParamArray[0]; |
| 1663 | − prepareParam (1, 2, p.width, p.height, p.frameRate, ¶m_); | |
| 1669 | + prepareParamDefault (1, 2, p.width, p.height, p.frameRate, ¶m_); | |
| 1664 | 1670 | param_.iSpatialLayerNum = 1; |
| 1665 | 1671 | encoder_->Uninitialize(); |
| 1666 | 1672 | int rv = encoder_->InitializeExt (¶m_); |
| @@ -1793,7 +1799,7 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRNoLoss) { · 126 unmodified lines | ||
| 1793 | 1799 | uint32_t uiEcIdc; |
| 1794 | 1800 | uint32_t uiGet; |
| 1795 | 1801 | EncodeDecodeFileParamBase p = kFileParamArray[0]; |
| 1796 | − prepareParam (1, 2, p.width, p.height, p.frameRate, ¶m_); | |
| 1802 | + prepareParamDefault (1, 2, p.width, p.height, p.frameRate, ¶m_); | |
| 1797 | 1803 | param_.iSpatialLayerNum = 1; |
| 1798 | 1804 | encoder_->Uninitialize(); |
| 1799 | 1805 | int rv = encoder_->InitializeExt (¶m_); |
| @@ -1962,7 +1968,7 @@ TEST_F (EncodeDecodeTestAPI, Engine_SVC_Switch_I) { · 162 unmodified lines | ||
| 1962 | 1968 | EncodeDecodeFileParamBase p = kSVCSwitch[0]; |
| 1963 | 1969 | p.width = p.width << 2; |
| 1964 | 1970 | p.height = p.height << 2; |
| 1965 | − prepareParam (4, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1971 | + prepareParamDefault (4, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 1966 | 1972 | param_.iTemporalLayerNum = (rand() % 4) + 1; |
| 1967 | 1973 | param_.iSpatialLayerNum = 4; |
| 1968 | 1974 | encoder_->Uninitialize(); |
| @@ -2027,7 +2033,7 @@ TEST_F (EncodeDecodeTestAPI, Engine_SVC_Switch_P) { · 58 unmodified lines | ||
| 2027 | 2033 | int iLastDid = 0; |
| 2028 | 2034 | p.width = p.width << 2; |
| 2029 | 2035 | p.height = p.height << 2; |
| 2030 | − prepareParam (4, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 2036 | + prepareParamDefault (4, p.slicenum, p.width, p.height, p.frameRate, ¶m_); | |
| 2031 | 2037 | param_.iTemporalLayerNum = (rand() % 4) + 1; |
| 2032 | 2038 | param_.iSpatialLayerNum = 4; |
| 2033 | 2039 | encoder_->Uninitialize(); |
| @@ -2113,7 +2119,7 @@ TEST_F (EncodeDecodeTestAPI, SetOptionEncParamExt) { · 79 unmodified lines | ||
| 2113 | 2119 | int iEncFrameNum = WelsClip3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM); |
| 2114 | 2120 | int iSliceNum = 1; |
| 2115 | 2121 | encoder_->GetDefaultParams (¶m_); |
| 2116 | − prepareParam (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, ¶m_); | |
| 2122 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, ¶m_); | |
| 2117 | 2123 | |
| 2118 | 2124 | int rv = encoder_->InitializeExt (¶m_); |
| 2119 | 2125 | ASSERT_TRUE (rv == cmResultSuccess); |
| @@ -2177,6 +2183,7 @@ class DecodeCrashTestAPI : public EncodeDecodeTestBase { · 57 unmodified lines | ||
| 2177 | 2183 | } |
| 2178 | 2184 | |
| 2179 | 2185 | void prepareParam (int iLayerNum, int iSliceNum, int width, int height, float framerate, SEncParamExt* pParam) { |
| 2186 | + memset (pParam, 0, sizeof (SEncParamExt)); | |
| 2180 | 2187 | EncodeDecodeTestBase::prepareParam (iLayerNum, iSliceNum, width, height, framerate, pParam); |
| 2181 | 2188 | } |
| 2182 | 2189 | |
| @@ -2431,6 +2438,11 @@ class DecodeParseAPI : public EncodeDecodeTestBase { · 248 unmodified lines | ||
| 2431 | 2438 | ASSERT_TRUE (rv == cmResultSuccess || rv == cmUnkonwReason); |
| 2432 | 2439 | } |
| 2433 | 2440 | |
| 2441 | + void prepareParam (int iLayerNum, int iSliceNum, int width, int height, float framerate, SEncParamExt* pParam) { | |
| 2442 | + memset (pParam, 0, sizeof (SEncParamExt)); | |
| 2443 | + EncodeDecodeTestBase::prepareParam (iLayerNum, iSliceNum, width, height, framerate, pParam); | |
| 2444 | + } | |
| 2445 | + | |
| 2434 | 2446 | protected: |
| 2435 | 2447 | SParserBsInfo BsInfo_; |
| 2436 | 2448 | FILE* fYuv_; |
| @@ -2588,21 +2600,21 @@ TEST_F (EncodeDecodeTestAPI, ParameterSetStrategy_SPS_LISTING_AND_PPS_INCREASING · 151 unmodified lines | ||
| 2588 | 2600 | SEncParamExt sParam2; |
| 2589 | 2601 | SEncParamExt sParam3; |
| 2590 | 2602 | encoder_->GetDefaultParams (&sParam1); |
| 2591 | − prepareParam (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2603 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2592 | 2604 | sParam1.eSpsPpsIdStrategy = SPS_LISTING_AND_PPS_INCREASING; |
| 2593 | 2605 | //prepare param2 |
| 2594 | 2606 | memcpy (&sParam2, &sParam1, sizeof (SEncParamExt)); |
| 2595 | 2607 | while (GET_MB_WIDTH (sParam2.iPicWidth) == GET_MB_WIDTH (sParam1.iPicWidth)) { |
| 2596 | 2608 | sParam2.iPicWidth = GetRandWidth(); |
| 2597 | 2609 | } |
| 2598 | − prepareParam (iSpatialLayerNum, iSliceNum, sParam2.iPicWidth, sParam2.iPicHeight, fFrameRate, &sParam2); | |
| 2610 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, sParam2.iPicWidth, sParam2.iPicHeight, fFrameRate, &sParam2); | |
| 2599 | 2611 | sParam2.eSpsPpsIdStrategy = SPS_LISTING_AND_PPS_INCREASING; |
| 2600 | 2612 | //prepare param3 |
| 2601 | 2613 | memcpy (&sParam3, &sParam1, sizeof (SEncParamExt)); |
| 2602 | 2614 | while (GET_MB_WIDTH (sParam3.iPicHeight) == GET_MB_WIDTH (sParam1.iPicHeight)) { |
| 2603 | 2615 | sParam3.iPicHeight = GetRandHeight(); |
| 2604 | 2616 | } |
| 2605 | − prepareParam (iSpatialLayerNum, iSliceNum, sParam3.iPicWidth, sParam3.iPicHeight, fFrameRate, &sParam3); | |
| 2617 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, sParam3.iPicWidth, sParam3.iPicHeight, fFrameRate, &sParam3); | |
| 2606 | 2618 | sParam3.eSpsPpsIdStrategy = SPS_LISTING_AND_PPS_INCREASING; |
| 2607 | 2619 | |
| 2608 | 2620 | //prepare output if needed |
| @@ -2699,12 +2711,12 @@ TEST_F (EncodeDecodeTestAPI, ParameterSetStrategy_SPS_LISTING_AND_PPS_INCREASING · 90 unmodified lines | ||
| 2699 | 2711 | SEncParamExt sParam1; |
| 2700 | 2712 | SEncParamExt sParam2; |
| 2701 | 2713 | encoder_->GetDefaultParams (&sParam1); |
| 2702 | − prepareParam (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2714 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2703 | 2715 | sParam1.eSpsPpsIdStrategy = SPS_LISTING_AND_PPS_INCREASING; |
| 2704 | 2716 | sParam1.iTemporalLayerNum = 1; |
| 2705 | 2717 | //prepare param2 |
| 2706 | 2718 | memcpy (&sParam2, &sParam1, sizeof (SEncParamExt)); |
| 2707 | − prepareParam (iSpatialLayerNum, iSliceNum, sParam2.iPicWidth, sParam2.iPicHeight, fFrameRate, &sParam2); | |
| 2719 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, sParam2.iPicWidth, sParam2.iPicHeight, fFrameRate, &sParam2); | |
| 2708 | 2720 | sParam2.eSpsPpsIdStrategy = SPS_LISTING_AND_PPS_INCREASING; |
| 2709 | 2721 | sParam2.iTemporalLayerNum = 3; |
| 2710 | 2722 | |
| @@ -2754,7 +2766,7 @@ TEST_F (EncodeDecodeTestAPI, ParameterSetStrategy_SPS_LISTING_AND_PPS_INCREASING · 43 unmodified lines | ||
| 2754 | 2766 | SEncParamExt sParam1; |
| 2755 | 2767 | SEncParamExt sParam2; |
| 2756 | 2768 | encoder_->GetDefaultParams (&sParam1); |
| 2757 | − prepareParam (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2769 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2758 | 2770 | sParam1.eSpsPpsIdStrategy = SPS_LISTING_AND_PPS_INCREASING; |
| 2759 | 2771 | |
| 2760 | 2772 | //prepare output if needed |
| @@ -2780,7 +2792,7 @@ TEST_F (EncodeDecodeTestAPI, ParameterSetStrategy_SPS_LISTING_AND_PPS_INCREASING · 19 unmodified lines | ||
| 2780 | 2792 | vWidthTableIt = std::find (vWidthTable.begin(), vWidthTable.end(), GET_MB_WIDTH (sParam2.iPicWidth)); |
| 2781 | 2793 | } while (vWidthTableIt != vWidthTable.end()); |
| 2782 | 2794 | vWidthTable.push_back (GET_MB_WIDTH (sParam2.iPicWidth)); |
| 2783 | − prepareParam (iSpatialLayerNum, iSliceNum, sParam2.iPicWidth, sParam2.iPicHeight, fFrameRate, &sParam2); | |
| 2795 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, sParam2.iPicWidth, sParam2.iPicHeight, fFrameRate, &sParam2); | |
| 2784 | 2796 | sParam2.eSpsPpsIdStrategy = SPS_LISTING_AND_PPS_INCREASING; |
| 2785 | 2797 | |
| 2786 | 2798 | rv = encoder_->SetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, &sParam2); |
| @@ -2821,7 +2833,7 @@ TEST_F (EncodeDecodeTestAPI, ParameterSetStrategy_SPS_PPS_LISTING1) { · 34 unmodified lines | ||
| 2821 | 2833 | // prepare params |
| 2822 | 2834 | SEncParamExt sParam1; |
| 2823 | 2835 | encoder_->GetDefaultParams (&sParam1); |
| 2824 | − prepareParam (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2836 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2825 | 2837 | sParam1.eSpsPpsIdStrategy = SPS_PPS_LISTING; |
| 2826 | 2838 | |
| 2827 | 2839 | //prepare output if needed |
| @@ -2886,14 +2898,14 @@ TEST_F (EncodeDecodeTestAPI, ParameterSetStrategy_SPS_PPS_LISTING2) { · 58 unmodified lines | ||
| 2886 | 2898 | SEncParamExt sParam1; |
| 2887 | 2899 | SEncParamExt sParam2; |
| 2888 | 2900 | encoder_->GetDefaultParams (&sParam1); |
| 2889 | − prepareParam (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2901 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2890 | 2902 | sParam1.eSpsPpsIdStrategy = SPS_PPS_LISTING; |
| 2891 | 2903 | //prepare param2 |
| 2892 | 2904 | memcpy (&sParam2, &sParam1, sizeof (SEncParamExt)); |
| 2893 | 2905 | while (GET_MB_WIDTH (sParam2.iPicWidth) == GET_MB_WIDTH (sParam1.iPicWidth)) { |
| 2894 | 2906 | sParam2.iPicWidth = GetRandWidth(); |
| 2895 | 2907 | } |
| 2896 | − prepareParam (iSpatialLayerNum, iSliceNum, sParam2.iPicWidth, sParam2.iPicHeight, fFrameRate, &sParam2); | |
| 2908 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, sParam2.iPicWidth, sParam2.iPicHeight, fFrameRate, &sParam2); | |
| 2897 | 2909 | sParam2.eSpsPpsIdStrategy = SPS_PPS_LISTING; |
| 2898 | 2910 | |
| 2899 | 2911 | //prepare output if needed |
| @@ -2945,14 +2957,14 @@ TEST_F (EncodeDecodeTestAPI, ParameterSetStrategy_SPS_PPS_LISTING3) { · 45 unmodified lines | ||
| 2945 | 2957 | SEncParamExt sParam2; |
| 2946 | 2958 | SEncParamExt sParam3; |
| 2947 | 2959 | encoder_->GetDefaultParams (&sParam1); |
| 2948 | − prepareParam (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2960 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, iWidth, iHeight, fFrameRate, &sParam1); | |
| 2949 | 2961 | sParam1.eSpsPpsIdStrategy = SPS_PPS_LISTING; |
| 2950 | 2962 | //prepare param2 |
| 2951 | 2963 | memcpy (&sParam2, &sParam1, sizeof (SEncParamExt)); |
| 2952 | 2964 | while (GET_MB_WIDTH (sParam2.iPicWidth) == GET_MB_WIDTH (sParam1.iPicWidth)) { |
| 2953 | 2965 | sParam2.iPicWidth = GetRandWidth(); |
| 2954 | 2966 | } |
| 2955 | − prepareParam (iSpatialLayerNum, iSliceNum, sParam2.iPicWidth, sParam2.iPicHeight, fFrameRate, &sParam2); | |
| 2967 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, sParam2.iPicWidth, sParam2.iPicHeight, fFrameRate, &sParam2); | |
| 2956 | 2968 | sParam2.eSpsPpsIdStrategy = SPS_PPS_LISTING; |
| 2957 | 2969 | //prepare param3 |
| 2958 | 2970 | memcpy (&sParam3, &sParam1, sizeof (SEncParamExt)); |
| @@ -2960,7 +2972,7 @@ TEST_F (EncodeDecodeTestAPI, ParameterSetStrategy_SPS_PPS_LISTING3) { · 1 unmodified line | ||
| 2960 | 2972 | GET_MB_WIDTH (sParam3.iPicWidth) == GET_MB_WIDTH (sParam2.iPicWidth)) { |
| 2961 | 2973 | sParam3.iPicWidth = GetRandWidth(); |
| 2962 | 2974 | } |
| 2963 | − prepareParam (iSpatialLayerNum, iSliceNum, sParam3.iPicWidth, sParam3.iPicHeight, fFrameRate, &sParam3); | |
| 2975 | + prepareParamDefault (iSpatialLayerNum, iSliceNum, sParam3.iPicWidth, sParam3.iPicHeight, fFrameRate, &sParam3); | |
| 2964 | 2976 | sParam3.eSpsPpsIdStrategy = SPS_PPS_LISTING; |
| 2965 | 2977 | |
| 2966 | 2978 | //prepare output if needed |