History

add part of VUI parse in sps, and add SAR option in GetOption()

huili2 committed 10 years ago

Commit 4ebaba81 parent 5b5134e11 files · +201 −10Browse files

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

Unified · Split

test/decoder/DecUT_DecExt.cpp+31−0
@@ -63,6 +63,8 @@ class DecoderInterfaceTest : public ::testing::Test { · 62 unmodified lines
6363 void TestTraceCallbackContext();
6464 //DECODER_OPTION_GET_DECODER_STATICTIS
6565 void TestGetDecStatistics();
66+ //DECODER_OPTION_GET_SAR_INFO
67+ void TestGetDecSarInfo();
6668 //Do whole tests here
6769 void DecoderInterfaceAll();
6870
@@ -607,6 +609,33 @@ void DecoderInterfaceTest::TestGetDecStatistics() { · 538 unmodified lines
607609 Uninit();
608610
609611 }
612+
613+//DECODER_OPTION_GET_SAR_INFO
614+void DecoderInterfaceTest::TestGetDecSarInfo() {
615+ CM_RETURN eRet;
616+ int32_t iRet;
617+ SVuiSarInfo sVuiSarInfo;
618+
619+ iRet = ValidInit();
620+ ASSERT_EQ (iRet, ERR_NONE);
621+ //GetOption before decoding
622+ m_pDec->GetOption (DECODER_OPTION_GET_SAR_INFO, &sVuiSarInfo);
623+ EXPECT_EQ (0u, sVuiSarInfo.uiSarWidth);
624+ EXPECT_EQ (0u, sVuiSarInfo.uiSarHeight);
625+ EXPECT_EQ (0u, sVuiSarInfo.bOverscanAppropriateFlag);
626+ // setoption not support,
627+ eRet = (CM_RETURN)m_pDec->SetOption (DECODER_OPTION_GET_SAR_INFO, NULL);
628+ EXPECT_EQ (eRet, cmInitParaError);
629+
630+ //Decoder specific bs
631+ DecoderBs ("res/SarVui.264");
632+ m_pDec->GetOption (DECODER_OPTION_GET_SAR_INFO, &sVuiSarInfo);
633+ EXPECT_EQ (80u, sVuiSarInfo.uiSarWidth); //DO NOT MODIFY the data value
634+ EXPECT_EQ (33u, sVuiSarInfo.uiSarHeight); //DO NOT MODIFY the data value
635+ EXPECT_EQ (1u, sVuiSarInfo.bOverscanAppropriateFlag); //DO NOT MODIFY the data value
636+ Uninit();
637+}
638+
610639 //TEST here for whole tests
611640 TEST_F (DecoderInterfaceTest, DecoderInterfaceAll) {
612641
@@ -636,6 +665,8 @@ TEST_F (DecoderInterfaceTest, DecoderInterfaceAll) { · 23 unmodified lines
636665 TestTraceCallbackContext();
637666 //DECODER_OPTION_GET_STATISTICS
638667 TestGetDecStatistics();
668+ //DECODER_OPTION_GET_SAR_INFO
669+ TestGetDecSarInfo();
639670 }
640671
641672

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