History

remove API data format in decoder in 1.6

huili2 committed 11 years ago

Commit dc2cbe41 parent 991b05f12 files · +12 −132Browse files

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

Unified · Split

test/api/encode_decode_api_test.cpp+7−17
@@ -500,7 +500,7 @@ void EncodeDecodeTestAPIBase::ValidateParamExtCombination() { · 499 unmodified lines
500500
501501 //for slice mode = SM_RASTER_SLICE
502502 if (SM_RASTER_SLICE == pSpatialLayer->sSliceArgument.uiSliceMode) {
503− if (0!=pSpatialLayer->sSliceArgument.uiSliceMbNum[0]) {
503+ if (0 != pSpatialLayer->sSliceArgument.uiSliceMbNum[0]) {
504504 SliceParamValidationForMode2 (iSpatialIdx);
505505 } else {
506506 SliceParamValidationForMode3 (iSpatialIdx);
@@ -1069,7 +1069,6 @@ TEST_P (EncodeDecodeTestAPI, SetOptionECFlag_ERROR_CON_DISABLE) { · 562 unmodified lines
10691069 }
10701070 SDecodingParam decParam;
10711071 memset (&decParam, 0, sizeof (SDecodingParam));
1072− decParam.eOutputColorFormat = videoFormatI420;
10731072 decParam.uiTargetDqLayer = UCHAR_MAX;
10741073 decParam.eEcActiveIdc = ERROR_CON_DISABLE;
10751074 decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
@@ -2422,7 +2421,6 @@ TEST_F (DecodeCrashTestAPI, DecoderCrashTest) { · 1346 unmodified lines
24222421
24232422 SDecodingParam decParam;
24242423 memset (&decParam, 0, sizeof (SDecodingParam));
2425− decParam.eOutputColorFormat = videoFormatI420;
24262424 decParam.uiTargetDqLayer = UCHAR_MAX;
24272425 decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
24282426 decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
@@ -2526,7 +2524,6 @@ class DecodeParseAPI : public ::testing::TestWithParam<EncodeDecodeFileParamBase · 97 unmodified lines
25262524 decoder_->Uninitialize();
25272525 SDecodingParam decParam;
25282526 memset (&decParam, 0, sizeof (SDecodingParam));
2529− decParam.eOutputColorFormat = videoFormatRGB;
25302527 decParam.uiTargetDqLayer = UCHAR_MAX;
25312528 decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
25322529 decParam.bParseOnly = true;
@@ -3182,7 +3179,6 @@ TEST_F (EncodeDecodeTestAPI, SimulcastSVC) { · 649 unmodified lines
31823179
31833180 SDecodingParam decParam;
31843181 memset (&decParam, 0, sizeof (SDecodingParam));
3185− decParam.eOutputColorFormat = videoFormatI420;
31863182 decParam.uiTargetDqLayer = UCHAR_MAX;
31873183 decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
31883184 decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
@@ -3300,7 +3296,6 @@ TEST_F (EncodeDecodeTestAPI, SimulcastAVC) { · 111 unmodified lines
33003296
33013297 SDecodingParam decParam;
33023298 memset (&decParam, 0, sizeof (SDecodingParam));
3303− decParam.eOutputColorFormat = videoFormatI420;
33043299 decParam.uiTargetDqLayer = UCHAR_MAX;
33053300 decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
33063301 decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
@@ -3377,8 +3372,8 @@ TEST_F (EncodeDecodeTestAPI, SimulcastAVC_SPS_PPS_LISTING) { · 70 unmodified lines
33773372 float fFrameRate = rand() + 0.5f;
33783373 int iEncFrameNum = WelsClip3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM);
33793374 int iSliceNum = 1;
3380− iWidth = VALID_SIZE(iWidth);
3381− iHeight = VALID_SIZE(iHeight);
3375+ iWidth = VALID_SIZE (iWidth);
3376+ iHeight = VALID_SIZE (iHeight);
33823377 // prepare params
33833378 SEncParamExt sParam1;
33843379 SEncParamExt sParam2;
@@ -3414,7 +3409,6 @@ TEST_F (EncodeDecodeTestAPI, SimulcastAVC_SPS_PPS_LISTING) { · 29 unmodified lines
34143409
34153410 SDecodingParam decParam;
34163411 memset (&decParam, 0, sizeof (SDecodingParam));
3417− decParam.eOutputColorFormat = videoFormatI420;
34183412 decParam.uiTargetDqLayer = UCHAR_MAX;
34193413 decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
34203414 decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
@@ -3533,7 +3527,7 @@ TEST_P (EncodeTestAPI, SetEncOptionSize) { · 112 unmodified lines
35333527 param_.sSpatialLayers[0].iVideoHeight = p.iHeight;
35343528 param_.sSpatialLayers[0].fFrameRate = p.fFramerate;
35353529 param_.sSpatialLayers[0].sSliceArgument.uiSliceMode = p.eSliceMode;
3536− if ( SM_FIXEDSLCNUM_SLICE == p.eSliceMode ) {
3530+ if (SM_FIXEDSLCNUM_SLICE == p.eSliceMode) {
35373531 param_.sSpatialLayers[0].sSliceArgument.uiSliceNum = 8;
35383532 }
35393533
@@ -3554,7 +3548,7 @@ TEST_P (EncodeTestAPI, SetEncOptionSize) { · 14 unmodified lines
35543548 unsigned char* pData[3] = { NULL };
35553549
35563550 //FIXME: remove this after the multi-thread case is correctly handled in encoder
3557− if (p.iThreads>1 && SM_SIZELIMITED_SLICE == p.eSliceMode) {
3551+ if (p.iThreads > 1 && SM_SIZELIMITED_SLICE == p.eSliceMode) {
35583552 p.bAllRandom = false;
35593553 }
35603554
@@ -3635,7 +3629,6 @@ TEST_F (EncodeDecodeTestAPI, SimulcastAVCDiffFps) { · 74 unmodified lines
36353629
36363630 SDecodingParam decParam;
36373631 memset (&decParam, 0, sizeof (SDecodingParam));
3638− decParam.eOutputColorFormat = videoFormatI420;
36393632 decParam.uiTargetDqLayer = UCHAR_MAX;
36403633 decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
36413634 decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
@@ -3729,7 +3722,8 @@ TEST_F (EncodeDecodeTestAPI, SimulcastAVCDiffFps) { · 87 unmodified lines
37293722 TEST_F (EncodeDecodeTestAPI, DiffSlicingInDlayer) {
37303723 int iSpatialLayerNum = 3;
37313724 int iWidth = WelsClip3 ((((rand() % MAX_WIDTH) >> 1) + 1) << 1, (64 << 2), MAX_WIDTH);
3732− int iHeight = WelsClip3 ((((rand() % MAX_HEIGHT) >> 1) + 1) << 1, (64 << 2), 2240);//TODO: use MAX_HEIGHT after the limit is removed
3725+ int iHeight = WelsClip3 ((((rand() % MAX_HEIGHT) >> 1) + 1) << 1, (64 << 2),
3726+ 2240);//TODO: use MAX_HEIGHT after the limit is removed
37333727 float fFrameRate = rand() + 0.5f;
37343728 int iEncFrameNum = WelsClip3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM);
37353729
@@ -3774,7 +3768,6 @@ TEST_F (EncodeDecodeTestAPI, DiffSlicingInDlayer) { · 38 unmodified lines
37743768
37753769 SDecodingParam decParam;
37763770 memset (&decParam, 0, sizeof (SDecodingParam));
3777− decParam.eOutputColorFormat = videoFormatI420;
37783771 decParam.uiTargetDqLayer = UCHAR_MAX;
37793772 decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
37803773 decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
@@ -3838,7 +3831,6 @@ TEST_F (EncodeDecodeTestAPI, DiffSlicingInDlayerMixed) { · 57 unmodified lines
38383831
38393832 SDecodingParam decParam;
38403833 memset (&decParam, 0, sizeof (SDecodingParam));
3841− decParam.eOutputColorFormat = videoFormatI420;
38423834 decParam.uiTargetDqLayer = UCHAR_MAX;
38433835 decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
38443836 decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
@@ -3899,7 +3891,6 @@ TEST_F (EncodeDecodeTestAPI, ThreadNumAndSliceNum) { · 54 unmodified lines
38993891
39003892 SDecodingParam decParam;
39013893 memset (&decParam, 0, sizeof (SDecodingParam));
3902− decParam.eOutputColorFormat = videoFormatI420;
39033894 decParam.uiTargetDqLayer = UCHAR_MAX;
39043895 decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
39053896 decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
@@ -3961,7 +3952,6 @@ TEST_F (EncodeDecodeTestAPI, TriggerLoadBalancing) { · 55 unmodified lines
39613952
39623953 SDecodingParam decParam;
39633954 memset (&decParam, 0, sizeof (SDecodingParam));
3964− decParam.eOutputColorFormat = videoFormatI420;
39653955 decParam.uiTargetDqLayer = UCHAR_MAX;
39663956 decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
39673957 decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;

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