History

Merge pull request #1615 from lyao2/ut_idr3

refine the UT case for checking IDR request

ruil2 committed 11 years ago

Commit 41339f32 parents 0ff1eb4 2e85e3c1 file · +15 −3Browse files

Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 1 file). Show all

Unified · Split

test/encoder/EncUT_EncoderExt.cpp+15−3
@@ -125,7 +125,7 @@ void EncoderInterfaceTest::EncodeOneIDRandP (ISVCEncoder* pPtrEnc) { · 124 unmodified lines
125125 int iResult;
126126 iResult = pPtrEnc->EncodeFrame (pSrcPic, &sFbi);
127127 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));
129129
130130 pSrcPic->uiTimeStamp += 30;
131131 iResult = pPtrEnc->EncodeFrame (pSrcPic, &sFbi);
@@ -622,7 +622,13 @@ TEST_F (EncoderInterfaceTest, ForceIntraFrame) { · 490 unmodified lines
622622
623623 //call next frame to be IDR
624624 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));
626632
627633 pPtrEnc->Uninitialize();
628634 EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess));
@@ -662,7 +668,13 @@ TEST_F (EncoderInterfaceTest, ForceIntraFrameWithTemporal) { · 33 unmodified lines
662668
663669 //call next frame to be IDR
664670 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));
666678
667679 pPtrEnc->Uninitialize();
668680 EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t