modify EC init position
Showing the changes to test/decoder/DecUT_DecExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -81,7 +81,7 @@ void DecoderInterfaceTest::Init() { · 80 unmodified lines | |||
| 81 | m_sDecParam.eOutputColorFormat = (EVideoFormatType) (rand() % 100); | 81 | m_sDecParam.eOutputColorFormat = (EVideoFormatType) (rand() % 100); |
| 82 | m_sDecParam.uiCpuLoad = rand() % 100; | 82 | m_sDecParam.uiCpuLoad = rand() % 100; |
| 83 | m_sDecParam.uiTargetDqLayer = rand() % 100; | 83 | m_sDecParam.uiTargetDqLayer = rand() % 100; |
| 84 | m_sDecParam.eEcActiveIdc = (ERROR_CON_IDC) (rand() & 3); | 84 | m_sDecParam.eEcActiveIdc = (ERROR_CON_IDC) (rand() & 7); |
| 85 | m_sDecParam.sVideoProperty.size = sizeof (SVideoProperty); | 85 | m_sDecParam.sVideoProperty.size = sizeof (SVideoProperty); |
| 86 | m_sDecParam.sVideoProperty.eVideoBsType = (VIDEO_BITSTREAM_TYPE) (rand() % 3); | 86 | m_sDecParam.sVideoProperty.eVideoBsType = (VIDEO_BITSTREAM_TYPE) (rand() % 3); |
| 87 | 87 | ||
| @@ -379,7 +379,33 @@ void DecoderInterfaceTest::TestLtrMarkedFrameNum() { · 291 unmodified lines | |||
| 379 | 379 | ||
| 380 | //DECODER_OPTION_ERROR_CON_IDC | 380 | //DECODER_OPTION_ERROR_CON_IDC |
| 381 | void DecoderInterfaceTest::TestErrorConIdc() { | 381 | void DecoderInterfaceTest::TestErrorConIdc() { |
| 382 | //TODO | 382 | int iTmp, iOut; |
| 383 | CM_RETURN eRet; | ||
| 384 | |||
| 385 | Init(); | ||
| 386 | |||
| 387 | //Test GetOption | ||
| 388 | //invalid input | ||
| 389 | eRet = (CM_RETURN) m_pDec->GetOption (DECODER_OPTION_ERROR_CON_IDC, NULL); | ||
| 390 | EXPECT_EQ (eRet, cmInitParaError); | ||
| 391 | |||
| 392 | //Test GetOption | ||
| 393 | //valid input | ||
| 394 | eRet = (CM_RETURN) m_pDec->GetOption (DECODER_OPTION_ERROR_CON_IDC, &iOut); | ||
| 395 | EXPECT_EQ (eRet, cmResultSuccess); | ||
| 396 | |||
| 397 | //Test SetOption | ||
| 398 | iTmp = rand() & 7; | ||
| 399 | eRet = (CM_RETURN) m_pDec->SetOption (DECODER_OPTION_ERROR_CON_IDC, &iTmp); | ||
| 400 | EXPECT_EQ (eRet, cmResultSuccess); | ||
| 401 | |||
| 402 | //Test GetOption | ||
| 403 | eRet = (CM_RETURN) m_pDec->GetOption (DECODER_OPTION_ERROR_CON_IDC, &iOut); | ||
| 404 | EXPECT_EQ (eRet, cmResultSuccess); | ||
| 405 | EXPECT_EQ (iTmp, iOut); | ||
| 406 | |||
| 407 | Uninit(); | ||
| 408 | |||
| 383 | } | 409 | } |
| 384 | 410 | ||
| 385 | //DECODER_OPTION_TRACE_LEVEL | 411 | //DECODER_OPTION_TRACE_LEVEL |