History

refine the UT case for checking IDR request

lyao2 committed 11 years ago

Commit 2e85e3c1 parent 5ff55a61 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
@@ -122,7 +122,7 @@ void EncoderInterfaceTest::EncodeOneIDRandP (ISVCEncoder* pPtrEnc) { · 121 unmodified lines
122122 int iResult;
123123 iResult = pPtrEnc->EncodeFrame (pSrcPic, &sFbi);
124124 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));
126126
127127 pSrcPic->uiTimeStamp += 30;
128128 iResult = pPtrEnc->EncodeFrame (pSrcPic, &sFbi);
@@ -619,7 +619,13 @@ TEST_F (EncoderInterfaceTest, ForceIntraFrame) { · 490 unmodified lines
619619
620620 //call next frame to be IDR
621621 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));
623629
624630 pPtrEnc->Uninitialize();
625631 EXPECT_EQ (iResult, static_cast<int> (cmResultSuccess));
@@ -659,7 +665,13 @@ TEST_F (EncoderInterfaceTest, ForceIntraFrameWithTemporal) { · 33 unmodified lines
659665
660666 //call next frame to be IDR
661667 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));
663675
664676 pPtrEnc->Uninitialize();
665677 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