History

fix low memory crash issue

huili2 committed 9 years ago

Commit d1c0a931 parent 48c2fe116 files · +401 −386Browse files

Showing the changes to test/api/decoder_ec_test.cpp (1 of 16 files). Show all

Unified · Split

test/api/decoder_ec_test.cpp+8−8
@@ -35,7 +35,7 @@ TEST_P (EncodeDecodeTestAPI, SetOptionECFlag_ERROR_CON_DISABLE) { · 34 unmodified lines
35 ASSERT_EQ (0, rv);35 ASSERT_EQ (0, rv);
36 m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;36 m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
37 37
38 InitialEncDec (p.width, p.height);38 ASSERT_TRUE (InitialEncDec (p.width, p.height));
39 int32_t iTraceLevel = WELS_LOG_QUIET;39 int32_t iTraceLevel = WELS_LOG_QUIET;
40 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);40 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);
41 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);41 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);
@@ -91,7 +91,7 @@ TEST_P (EncodeDecodeTestAPI, SetOptionECFlag_ERROR_CON_SLICE_COPY) { · 49 unmodified lines
91 ASSERT_TRUE (rv == cmResultSuccess);91 ASSERT_TRUE (rv == cmResultSuccess);
92 m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;92 m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
93 93
94 InitialEncDec (p.width, p.height);94 ASSERT_TRUE (InitialEncDec (p.width, p.height));
95 int32_t iTraceLevel = WELS_LOG_QUIET;95 int32_t iTraceLevel = WELS_LOG_QUIET;
96 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);96 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);
97 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);97 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);
@@ -162,7 +162,7 @@ TEST_P (EncodeDecodeTestAPI, SetOptionECIDC_GeneralSliceChange) { · 64 unmodified lines
162 162
163 //Start for enc/dec163 //Start for enc/dec
164 164
165 InitialEncDec (p.width, p.height);165 ASSERT_TRUE (InitialEncDec (p.width, p.height));
166 int32_t iTraceLevel = WELS_LOG_QUIET;166 int32_t iTraceLevel = WELS_LOG_QUIET;
167 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);167 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);
168 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);168 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);
@@ -249,7 +249,7 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificFrameChange) { · 80 unmodified lines
249 int iIdx = 0;249 int iIdx = 0;
250 int len = 0;250 int len = 0;
251 unsigned char* pData[3] = { NULL };251 unsigned char* pData[3] = { NULL };
252 InitialEncDec (p.width, p.height);252 ASSERT_TRUE (InitialEncDec (p.width, p.height));
253 //Frame 0: IDR, EC_IDC=DISABLE, loss = 0253 //Frame 0: IDR, EC_IDC=DISABLE, loss = 0
254 EncodeOneFrame (1);254 EncodeOneFrame (1);
255 encToDecData (info, len);255 encToDecData (info, len);
@@ -383,7 +383,7 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRLoss) { · 127 unmodified lines
383 unsigned char* pData[3] = { NULL };383 unsigned char* pData[3] = { NULL };
384 int iTotalSliceSize = 0;384 int iTotalSliceSize = 0;
385 385
386 InitialEncDec (p.width, p.height);386 ASSERT_TRUE (InitialEncDec (p.width, p.height));
387 387
388 //Frame 0: IDR, EC_IDC=2, loss = 2388 //Frame 0: IDR, EC_IDC=2, loss = 2
389 EncodeOneFrame (1);389 EncodeOneFrame (1);
@@ -515,7 +515,7 @@ TEST_F (EncodeDecodeTestAPI, SetOptionECIDC_SpecificSliceChange_IDRNoLoss) { · 125 unmodified lines
515 unsigned char* pData[3] = { NULL };515 unsigned char* pData[3] = { NULL };
516 int iTotalSliceSize = 0;516 int iTotalSliceSize = 0;
517 517
518 InitialEncDec (p.width, p.height);518 ASSERT_TRUE (InitialEncDec (p.width, p.height));
519 519
520 //set EC=DISABLE520 //set EC=DISABLE
521 uiEcIdc = (uint32_t) (ERROR_CON_DISABLE);521 uiEcIdc = (uint32_t) (ERROR_CON_DISABLE);
@@ -677,7 +677,7 @@ TEST_F (EncodeDecodeTestAPI, Engine_SVC_Switch_I) { · 155 unmodified lines
677 ASSERT_TRUE (rv == cmResultSuccess);677 ASSERT_TRUE (rv == cmResultSuccess);
678 m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;678 m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
679 679
680 InitialEncDec (p.width, p.height);680 ASSERT_TRUE (InitialEncDec (p.width, p.height));
681 int32_t iTraceLevel = WELS_LOG_QUIET;681 int32_t iTraceLevel = WELS_LOG_QUIET;
682 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);682 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);
683 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);683 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);
@@ -744,7 +744,7 @@ TEST_F (EncodeDecodeTestAPI, Engine_SVC_Switch_P) { · 60 unmodified lines
744 ASSERT_TRUE (rv == cmResultSuccess);744 ASSERT_TRUE (rv == cmResultSuccess);
745 m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;745 m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
746 746
747 InitialEncDec (p.width, p.height);747 ASSERT_TRUE (InitialEncDec (p.width, p.height));
748 int32_t iTraceLevel = WELS_LOG_QUIET;748 int32_t iTraceLevel = WELS_LOG_QUIET;
749 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);749 encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);
750 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);750 decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);

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