Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 6 files). Show all
Unified · Split
| @@ -573,11 +573,28 @@ TEST_F (EncoderInterfaceTest, BasicInitializeTestFalse) { · 572 unmodified lines | |||
| 573 | iResult = pPtrEnc->Initialize (&sEncParamBase); | 573 | iResult = pPtrEnc->Initialize (&sEncParamBase); |
| 574 | EXPECT_EQ (iResult, static_cast<int> (cmInitParaError)); | 574 | EXPECT_EQ (iResult, static_cast<int> (cmInitParaError)); |
| 575 | 575 | ||
| 576 | //TODO: add checking max in interface and then enable this checking | 576 | //iPicWidth * iPicHeight <= 36864 * 16 * 16, from Level 5.2 constraint |
| 577 | //GetValidEncParamBase(&sEncParamBase); | 577 | //Initialize test: FALSE |
| 578 | //sEncParamBase.iPicWidth = rand()+(MAX_HEIGHT+1); | 578 | GetValidEncParamBase (&sEncParamBase); |
| 579 | //iResult = pPtrEnc->Initialize (&sEncParamBase); | 579 | sEncParamBase.iPicWidth = 5000; |
| 580 | //EXPECT_EQ (iResult, static_cast<int> (cmInitParaError)); | 580 | sEncParamBase.iPicHeight = 5000; |
| 581 | iResult = pPtrEnc->Initialize (&sEncParamBase); | ||
| 582 | EXPECT_EQ (iResult, static_cast<int> (cmInitParaError)); | ||
| 583 | //Initialize test: TRUE, with SetOption test following | ||
| 584 | GetValidEncParamBase (&sEncParamBase); | ||
| 585 | sEncParamBase.iPicWidth = 36864; | ||
| 586 | sEncParamBase.iPicHeight = 256; | ||
| 587 | iResult = pPtrEnc->Initialize (&sEncParamBase); | ||
| 588 | EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess)); | ||
| 589 | sEncParamBase.iPicWidth = 256; | ||
| 590 | sEncParamBase.iPicHeight = 36864; | ||
| 591 | iResult = pPtrEnc->SetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_BASE, &sEncParamBase); | ||
| 592 | EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess)); | ||
| 593 | sEncParamBase.iPicWidth = 5000; | ||
| 594 | sEncParamBase.iPicHeight = 5000; | ||
| 595 | iResult = pPtrEnc->SetOption (ENCODER_OPTION_SVC_ENCODE_PARAM_BASE, &sEncParamBase); | ||
| 596 | EXPECT_EQ (iResult, static_cast<int> (cmInitParaError)); | ||
| 597 | pPtrEnc->Uninitialize(); | ||
| 581 | 598 | ||
| 582 | //iTargetBitrate | 599 | //iTargetBitrate |
| 583 | GetValidEncParamBase (&sEncParamBase); | 600 | GetValidEncParamBase (&sEncParamBase); |