History

1, refactor to remove similar function (WriteSliceToFrameBs is removed) 2, use slice-level variable in child-thread function so there can be a better independency in child-thread function 3, add two more test cases

Sijia Chen committed 11 years ago

Commit 9aafb771 parent 6b503843 files · +54 −80Browse files

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

Unified · Split

test/api/encode_decode_api_test.cpp+7−2
@@ -3474,6 +3474,8 @@ static const EncodeOptionParam kOptionParamArray[] = { · 3473 unmodified lines
34743474 {false, true, false, 30, 104, 416, 44, SM_DYN_SLICE, 500, 7.5, 2, ""},
34753475 {false, true, false, 30, 16, 16, 2, SM_DYN_SLICE, 500, 7.5, 3, ""},
34763476 {false, true, false, 30, 32, 16, 2, SM_DYN_SLICE, 500, 7.5, 3, ""},
3477+ {false, false, true, 30, 600, 460, 1, SM_FIXEDSLCNUM_SLICE, 0, 15.0, 4, ""},
3478+ {false, false, true, 30, 600, 460, 1, SM_AUTO_SLICE, 0, 15.0, 4, ""},
34773479 };
34783480
34793481 class EncodeTestAPI : public ::testing::TestWithParam<EncodeOptionParam>, public ::EncodeDecodeTestAPIBase {
@@ -3494,9 +3496,9 @@ class EncodeTestAPI : public ::testing::TestWithParam<EncodeOptionParam>, public · 14 unmodified lines
34943496 }
34953497 int rv = encoder_->EncodeFrame (&EncPic, &info);
34963498 if (0 == iCheckTypeIndex)
3497− ASSERT_TRUE (rv == cmResultSuccess);
3499+ ASSERT_TRUE (rv == cmResultSuccess) << "rv=" << rv;
34983500 else if (1 == iCheckTypeIndex)
3499− ASSERT_TRUE (rv == cmResultSuccess || rv == cmUnkonwReason);
3501+ ASSERT_TRUE (rv == cmResultSuccess || rv == cmUnkonwReason) << "rv=" << rv;
35003502 }
35013503 };
35023504
@@ -3525,6 +3527,9 @@ TEST_P (EncodeTestAPI, SetEncOptionSize) { · 22 unmodified lines
35253527 param_.sSpatialLayers[0].iVideoHeight = p.iHeight;
35263528 param_.sSpatialLayers[0].fFrameRate = p.fFramerate;
35273529 param_.sSpatialLayers[0].sSliceCfg.uiSliceMode = p.eSliceMode;
3530+ if (SM_AUTO_SLICE == p.eSliceMode || SM_FIXEDSLCNUM_SLICE == p.eSliceMode ) {
3531+ param_.sSpatialLayers[0].sSliceCfg.sSliceArgument.uiSliceNum = 8;
3532+ }
35283533
35293534 encoder_->Uninitialize();
35303535 int rv = encoder_->InitializeExt (&param_);

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