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