refine the UT case for checking IDR request
Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 1 file). Show all
Unified · Split
| @@ -125,7 +125,7 @@ void EncoderInterfaceTest::EncodeOneIDRandP (ISVCEncoder* pPtrEnc) { · 124 unmodified lines | |||
| 125 | int iResult; | 125 | int iResult; |
| 126 | iResult = pPtrEnc->EncodeFrame (pSrcPic, &sFbi); | 126 | iResult = pPtrEnc->EncodeFrame (pSrcPic, &sFbi); |
| 127 | EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess)); | 127 | EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess)); |
| 128 | //EXPECT_EQ (sFbi.eFrameType, static_cast<int> (videoFrameTypeIDR)); | 128 | EXPECT_EQ (sFbi.eFrameType, static_cast<int> (videoFrameTypeIDR)); |
| 129 | 129 | ||
| 130 | pSrcPic->uiTimeStamp += 30; | 130 | pSrcPic->uiTimeStamp += 30; |
| 131 | iResult = pPtrEnc->EncodeFrame (pSrcPic, &sFbi); | 131 | iResult = pPtrEnc->EncodeFrame (pSrcPic, &sFbi); |
| @@ -622,7 +622,13 @@ TEST_F (EncoderInterfaceTest, ForceIntraFrame) { · 490 unmodified lines | |||
| 622 | 622 | ||
| 623 | //call next frame to be IDR | 623 | //call next frame to be IDR |
| 624 | pPtrEnc->ForceIntraFrame (bIDR); | 624 | pPtrEnc->ForceIntraFrame (bIDR); |
| 625 | EncodeOneIDRandP (pPtrEnc); | 625 | int iCount = 0; |
| 626 | do { | ||
| 627 | iResult = pPtrEnc->EncodeFrame (pSrcPic, &sFbi); | ||
| 628 | EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess)); | ||
| 629 | pSrcPic->uiTimeStamp += 30; | ||
| 630 | } while ((sFbi.eFrameType == static_cast<int> (videoFrameTypeSkip)) && (iCount ++ < 100)); | ||
| 631 | EXPECT_EQ (sFbi.eFrameType, static_cast<int> (videoFrameTypeIDR)); | ||
| 626 | 632 | ||
| 627 | pPtrEnc->Uninitialize(); | 633 | pPtrEnc->Uninitialize(); |
| 628 | EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess)); | 634 | EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess)); |
| @@ -662,7 +668,13 @@ TEST_F (EncoderInterfaceTest, ForceIntraFrameWithTemporal) { · 33 unmodified lines | |||
| 662 | 668 | ||
| 663 | //call next frame to be IDR | 669 | //call next frame to be IDR |
| 664 | pPtrEnc->ForceIntraFrame (bIDR); | 670 | pPtrEnc->ForceIntraFrame (bIDR); |
| 665 | EncodeOneIDRandP (pPtrEnc); | 671 | int iCount = 0; |
| 672 | do { | ||
| 673 | iResult = pPtrEnc->EncodeFrame (pSrcPic, &sFbi); | ||
| 674 | EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess)); | ||
| 675 | pSrcPic->uiTimeStamp += 30; | ||
| 676 | } while ((sFbi.eFrameType == static_cast<int> (videoFrameTypeSkip)) && (iCount ++ < 100)); | ||
| 677 | EXPECT_EQ (sFbi.eFrameType, static_cast<int> (videoFrameTypeIDR)); | ||
| 666 | 678 | ||
| 667 | pPtrEnc->Uninitialize(); | 679 | pPtrEnc->Uninitialize(); |
| 668 | EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess)); | 680 | EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess)); |