History

remove parseonly in decoder ctx

huili2 committed 10 years ago

Commit 926fc671 parent 60aaf4811 files · +128 −86Browse files

Showing the changes to test/decoder/DecUT_DecExt.cpp (1 of 11 files). Show all

Unified · Split

test/decoder/DecUT_DecExt.cpp+26−6
@@ -26,6 +26,8 @@ class DecoderInterfaceTest : public ::testing::Test { · 25 unmodified lines
2626 }
2727 //Init members
2828 void Init();
29+ //Init valid members
30+ void ValidInit();
2931 //Uninit members
3032 void Uninit();
3133 //Mock input data for test
@@ -94,6 +96,24 @@ void DecoderInterfaceTest::Init() { · 62 unmodified lines
9496 ASSERT_EQ (eRet, cmResultSuccess);
9597 }
9698
99+void DecoderInterfaceTest::ValidInit() {
100+ memset (&m_sBufferInfo, 0, sizeof (SBufferInfo));
101+ memset (&m_sDecParam, 0, sizeof (SDecodingParam));
102+ m_sDecParam.pFileNameRestructed = NULL;
103+ m_sDecParam.uiCpuLoad = 1;
104+ m_sDecParam.uiTargetDqLayer = 1;
105+ m_sDecParam.eEcActiveIdc = (ERROR_CON_IDC) (rand() & 7);
106+ m_sDecParam.sVideoProperty.size = sizeof (SVideoProperty);
107+ m_sDecParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
108+
109+ m_pData[0] = m_pData[1] = m_pData[2] = NULL;
110+ m_szBuffer[0] = m_szBuffer[1] = m_szBuffer[2] = 0;
111+ m_szBuffer[3] = 1;
112+ m_iBufLength = 4;
113+ CM_RETURN eRet = (CM_RETURN) m_pDec->Initialize (&m_sDecParam);
114+ ASSERT_EQ (eRet, cmResultSuccess);
115+}
116+
97117 void DecoderInterfaceTest::Uninit() {
98118 if (m_pDec) {
99119 CM_RETURN eRet = (CM_RETURN) m_pDec->Uninitialize();
@@ -310,7 +330,7 @@ void DecoderInterfaceTest::TestEndOfStream() { · 210 unmodified lines
310330 int iTmp, iOut;
311331 CM_RETURN eRet;
312332
313− Init();
333+ ValidInit();
314334
315335 //invalid input
316336 eRet = (CM_RETURN) m_pDec->SetOption (DECODER_OPTION_END_OF_STREAM, NULL);
@@ -372,7 +392,7 @@ void DecoderInterfaceTest::TestVclNal() { · 55 unmodified lines
372392 int iTmp, iOut;
373393 CM_RETURN eRet;
374394
375− Init();
395+ ValidInit();
376396
377397 //Test SetOption
378398 //VclNal never supports SetOption
@@ -481,7 +501,7 @@ void DecoderInterfaceTest::TestGetDecStatistics() { · 102 unmodified lines
481501 SDecoderStatistics sDecStatic;
482502 int32_t iError = 0;
483503
484− Init();
504+ ValidInit();
485505 // setoption not support,
486506 eRet = (CM_RETURN)m_pDec->SetOption (DECODER_OPTION_GET_STATISTICS, NULL);
487507 EXPECT_EQ (eRet, cmInitParaError);
@@ -504,7 +524,7 @@ void DecoderInterfaceTest::TestGetDecStatistics() { · 16 unmodified lines
504524 Uninit();
505525
506526 //Decoder error bs when the first IDR lost
507− Init();
527+ ValidInit();
508528 iError = 2;
509529 m_pDec->SetOption (DECODER_OPTION_ERROR_CON_IDC, &iError);
510530 DecoderBs ("res/BA_MW_D_IDR_LOST.264");
@@ -522,7 +542,7 @@ void DecoderInterfaceTest::TestGetDecStatistics() { · 11 unmodified lines
522542 Uninit();
523543
524544 //ecoder error bs when the first P lost
525− Init();
545+ ValidInit();
526546 iError = 2;
527547 m_pDec->SetOption (DECODER_OPTION_ERROR_CON_IDC, &iError);
528548
@@ -543,7 +563,7 @@ void DecoderInterfaceTest::TestGetDecStatistics() { · 14 unmodified lines
543563 //EC enable
544564
545565 //EC Off UT just correc bitstream
546− Init();
566+ ValidInit();
547567 iError = 0;
548568 m_pDec->SetOption (DECODER_OPTION_ERROR_CON_IDC, &iError);
549569 DecoderBs ("res/test_vd_1d.264");

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