Showing the changes to test/decoder/DecUT_DecExt.cpp (1 of 11 files). Show all
Unified · Split
| @@ -63,6 +63,8 @@ class DecoderInterfaceTest : public ::testing::Test { · 62 unmodified lines | ||
| 63 | 63 | void TestTraceCallbackContext(); |
| 64 | 64 | //DECODER_OPTION_GET_DECODER_STATICTIS |
| 65 | 65 | void TestGetDecStatistics(); |
| 66 | + //DECODER_OPTION_GET_SAR_INFO | |
| 67 | + void TestGetDecSarInfo(); | |
| 66 | 68 | //Do whole tests here |
| 67 | 69 | void DecoderInterfaceAll(); |
| 68 | 70 | |
| @@ -607,6 +609,33 @@ void DecoderInterfaceTest::TestGetDecStatistics() { · 538 unmodified lines | ||
| 607 | 609 | Uninit(); |
| 608 | 610 | |
| 609 | 611 | } |
| 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 | + | |
| 610 | 639 | //TEST here for whole tests |
| 611 | 640 | TEST_F (DecoderInterfaceTest, DecoderInterfaceAll) { |
| 612 | 641 | |
| @@ -636,6 +665,8 @@ TEST_F (DecoderInterfaceTest, DecoderInterfaceAll) { · 23 unmodified lines | ||
| 636 | 665 | TestTraceCallbackContext(); |
| 637 | 666 | //DECODER_OPTION_GET_STATISTICS |
| 638 | 667 | TestGetDecStatistics(); |
| 668 | + //DECODER_OPTION_GET_SAR_INFO | |
| 669 | + TestGetDecSarInfo(); | |
| 639 | 670 | } |
| 640 | 671 | |
| 641 | 672 | |