| 120 | } |
| 121 | |
| 122 | class DecoderParseSyntaxTest : public ::testing::Test { |
| 123 | public: |
| 124 | virtual void SetUp() { |
| 125 | |
| 126 | int rv = WelsCreateDecoder (&m_pDec); |
| 127 | ASSERT_EQ (0, rv); |
| 128 | ASSERT_TRUE (m_pDec != NULL); |
| 129 | } |
| 130 | |
| 131 | virtual void TearDown() { |
| 132 | if (m_pDec) { |
| 133 | WelsDestroyDecoder (m_pDec); |
| 134 | } |
| 135 | } |
| 136 | //Init members |
| 137 | int32_t Init(); |
| 138 | //Uninit members |
| 139 | void Uninit(); |
| 140 | //Decoder real bitstream |
| 141 | bool DecodeBs (const char* sFileName, EDecCase eDecCase); |
| 142 | //Parse real bitstream |
| 143 | bool ParseBs (const char* sFileName, EDecCase eDecCase); |
| 144 | //Scalinglist |
| 145 | void TestScalingList(); |
| 146 | //specific bitstream test |
| 147 | void TestSpecificBs(); |
| 148 | void TestSpecificBsError(); |
| 149 | //Do whole tests here |
| 150 | void DecoderParseSyntaxTestAll(); |
| 151 | |
| 152 | |
| 153 | public: |
| 154 | ISVCDecoder* m_pDec; |
| 155 | SDecodingParam m_sDecParam; |
| 156 | SBufferInfo m_sBufferInfo; |
| 157 | SParserBsInfo m_sParserBsInfo; |
| 158 | SWelsDecoderSpsPpsCTX m_sDecoderSpsPpsCTX; |
| 159 | SWelsLastDecPicInfo m_sLastDecPicInfo; |
| 160 | SDecoderStatistics m_sDecoderStatistics; |
| 161 | SVlcTable m_sVlcTable; |
| 162 | |
| 163 | uint8_t* m_pData[3]; |
| 164 | unsigned char m_szBuffer[BUF_SIZE]; //for mocking packet |
| 165 | int m_iBufLength; //record the valid data in m_szBuffer |
| 166 | PWelsDecoderContext m_pCtx; |
| 167 | welsCodecTrace* m_pWelsTrace; |
| 168 | |
| 169 | }; |
| 170 | |
| 171 | //Init members |
| 172 | int32_t DecoderParseSyntaxTest::Init() { |
nothing calls this directly
no outgoing calls
no test coverage detected