Showing the changes to test/api/encode_decode_api_test.cpp (1 of 3 files). Show all
Unified · Split
| @@ -3474,6 +3474,8 @@ static const EncodeOptionParam kOptionParamArray[] = { · 3473 unmodified lines | |||
| 3474 | {false, true, false, 30, 104, 416, 44, SM_DYN_SLICE, 500, 7.5, 2, ""}, | 3474 | {false, true, false, 30, 104, 416, 44, SM_DYN_SLICE, 500, 7.5, 2, ""}, |
| 3475 | {false, true, false, 30, 16, 16, 2, SM_DYN_SLICE, 500, 7.5, 3, ""}, | 3475 | {false, true, false, 30, 16, 16, 2, SM_DYN_SLICE, 500, 7.5, 3, ""}, |
| 3476 | {false, true, false, 30, 32, 16, 2, SM_DYN_SLICE, 500, 7.5, 3, ""}, | 3476 | {false, true, false, 30, 32, 16, 2, SM_DYN_SLICE, 500, 7.5, 3, ""}, |
| 3477 | {false, false, true, 30, 600, 460, 1, SM_FIXEDSLCNUM_SLICE, 0, 15.0, 4, ""}, | ||
| 3478 | {false, false, true, 30, 600, 460, 1, SM_AUTO_SLICE, 0, 15.0, 4, ""}, | ||
| 3477 | }; | 3479 | }; |
| 3478 | 3480 | ||
| 3479 | class EncodeTestAPI : public ::testing::TestWithParam<EncodeOptionParam>, public ::EncodeDecodeTestAPIBase { | 3481 | class EncodeTestAPI : public ::testing::TestWithParam<EncodeOptionParam>, public ::EncodeDecodeTestAPIBase { |
| @@ -3494,9 +3496,9 @@ class EncodeTestAPI : public ::testing::TestWithParam<EncodeOptionParam>, public · 14 unmodified lines | |||
| 3494 | } | 3496 | } |
| 3495 | int rv = encoder_->EncodeFrame (&EncPic, &info); | 3497 | int rv = encoder_->EncodeFrame (&EncPic, &info); |
| 3496 | if (0 == iCheckTypeIndex) | 3498 | if (0 == iCheckTypeIndex) |
| 3497 | ASSERT_TRUE (rv == cmResultSuccess); | 3499 | ASSERT_TRUE (rv == cmResultSuccess) << "rv=" << rv; |
| 3498 | else if (1 == iCheckTypeIndex) | 3500 | else if (1 == iCheckTypeIndex) |
| 3499 | ASSERT_TRUE (rv == cmResultSuccess || rv == cmUnkonwReason); | 3501 | ASSERT_TRUE (rv == cmResultSuccess || rv == cmUnkonwReason) << "rv=" << rv; |
| 3500 | } | 3502 | } |
| 3501 | }; | 3503 | }; |
| 3502 | 3504 | ||
| @@ -3525,6 +3527,9 @@ TEST_P (EncodeTestAPI, SetEncOptionSize) { · 22 unmodified lines | |||
| 3525 | param_.sSpatialLayers[0].iVideoHeight = p.iHeight; | 3527 | param_.sSpatialLayers[0].iVideoHeight = p.iHeight; |
| 3526 | param_.sSpatialLayers[0].fFrameRate = p.fFramerate; | 3528 | param_.sSpatialLayers[0].fFrameRate = p.fFramerate; |
| 3527 | param_.sSpatialLayers[0].sSliceCfg.uiSliceMode = p.eSliceMode; | 3529 | param_.sSpatialLayers[0].sSliceCfg.uiSliceMode = p.eSliceMode; |
| 3530 | if (SM_AUTO_SLICE == p.eSliceMode || SM_FIXEDSLCNUM_SLICE == p.eSliceMode ) { | ||
| 3531 | param_.sSpatialLayers[0].sSliceCfg.sSliceArgument.uiSliceNum = 8; | ||
| 3532 | } | ||
| 3528 | 3533 | ||
| 3529 | encoder_->Uninitialize(); | 3534 | encoder_->Uninitialize(); |
| 3530 | int rv = encoder_->InitializeExt (¶m_); | 3535 | int rv = encoder_->InitializeExt (¶m_); |