Showing the changes to test/api/encode_decode_api_test.cpp (1 of 12 files). Show all
Unified · Split
| @@ -500,7 +500,7 @@ void EncodeDecodeTestAPIBase::ValidateParamExtCombination() { · 499 unmodified lines | ||
| 500 | 500 | |
| 501 | 501 | //for slice mode = SM_RASTER_SLICE |
| 502 | 502 | if (SM_RASTER_SLICE == pSpatialLayer->sSliceArgument.uiSliceMode) { |
| 503 | − if (0!=pSpatialLayer->sSliceArgument.uiSliceMbNum[0]) { | |
| 503 | + if (0 != pSpatialLayer->sSliceArgument.uiSliceMbNum[0]) { | |
| 504 | 504 | SliceParamValidationForMode2 (iSpatialIdx); |
| 505 | 505 | } else { |
| 506 | 506 | SliceParamValidationForMode3 (iSpatialIdx); |
| @@ -1069,7 +1069,6 @@ TEST_P (EncodeDecodeTestAPI, SetOptionECFlag_ERROR_CON_DISABLE) { · 562 unmodified lines | ||
| 1069 | 1069 | } |
| 1070 | 1070 | SDecodingParam decParam; |
| 1071 | 1071 | memset (&decParam, 0, sizeof (SDecodingParam)); |
| 1072 | − decParam.eOutputColorFormat = videoFormatI420; | |
| 1073 | 1072 | decParam.uiTargetDqLayer = UCHAR_MAX; |
| 1074 | 1073 | decParam.eEcActiveIdc = ERROR_CON_DISABLE; |
| 1075 | 1074 | decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT; |
| @@ -2422,7 +2421,6 @@ TEST_F (DecodeCrashTestAPI, DecoderCrashTest) { · 1346 unmodified lines | ||
| 2422 | 2421 | |
| 2423 | 2422 | SDecodingParam decParam; |
| 2424 | 2423 | memset (&decParam, 0, sizeof (SDecodingParam)); |
| 2425 | − decParam.eOutputColorFormat = videoFormatI420; | |
| 2426 | 2424 | decParam.uiTargetDqLayer = UCHAR_MAX; |
| 2427 | 2425 | decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY; |
| 2428 | 2426 | decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT; |
| @@ -2526,7 +2524,6 @@ class DecodeParseAPI : public ::testing::TestWithParam<EncodeDecodeFileParamBase · 97 unmodified lines | ||
| 2526 | 2524 | decoder_->Uninitialize(); |
| 2527 | 2525 | SDecodingParam decParam; |
| 2528 | 2526 | memset (&decParam, 0, sizeof (SDecodingParam)); |
| 2529 | − decParam.eOutputColorFormat = videoFormatRGB; | |
| 2530 | 2527 | decParam.uiTargetDqLayer = UCHAR_MAX; |
| 2531 | 2528 | decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY; |
| 2532 | 2529 | decParam.bParseOnly = true; |
| @@ -3182,7 +3179,6 @@ TEST_F (EncodeDecodeTestAPI, SimulcastSVC) { · 649 unmodified lines | ||
| 3182 | 3179 | |
| 3183 | 3180 | SDecodingParam decParam; |
| 3184 | 3181 | memset (&decParam, 0, sizeof (SDecodingParam)); |
| 3185 | − decParam.eOutputColorFormat = videoFormatI420; | |
| 3186 | 3182 | decParam.uiTargetDqLayer = UCHAR_MAX; |
| 3187 | 3183 | decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY; |
| 3188 | 3184 | decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT; |
| @@ -3300,7 +3296,6 @@ TEST_F (EncodeDecodeTestAPI, SimulcastAVC) { · 111 unmodified lines | ||
| 3300 | 3296 | |
| 3301 | 3297 | SDecodingParam decParam; |
| 3302 | 3298 | memset (&decParam, 0, sizeof (SDecodingParam)); |
| 3303 | − decParam.eOutputColorFormat = videoFormatI420; | |
| 3304 | 3299 | decParam.uiTargetDqLayer = UCHAR_MAX; |
| 3305 | 3300 | decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY; |
| 3306 | 3301 | decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT; |
| @@ -3377,8 +3372,8 @@ TEST_F (EncodeDecodeTestAPI, SimulcastAVC_SPS_PPS_LISTING) { · 70 unmodified lines | ||
| 3377 | 3372 | float fFrameRate = rand() + 0.5f; |
| 3378 | 3373 | int iEncFrameNum = WelsClip3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM); |
| 3379 | 3374 | int iSliceNum = 1; |
| 3380 | − iWidth = VALID_SIZE(iWidth); | |
| 3381 | − iHeight = VALID_SIZE(iHeight); | |
| 3375 | + iWidth = VALID_SIZE (iWidth); | |
| 3376 | + iHeight = VALID_SIZE (iHeight); | |
| 3382 | 3377 | // prepare params |
| 3383 | 3378 | SEncParamExt sParam1; |
| 3384 | 3379 | SEncParamExt sParam2; |
| @@ -3414,7 +3409,6 @@ TEST_F (EncodeDecodeTestAPI, SimulcastAVC_SPS_PPS_LISTING) { · 29 unmodified lines | ||
| 3414 | 3409 | |
| 3415 | 3410 | SDecodingParam decParam; |
| 3416 | 3411 | memset (&decParam, 0, sizeof (SDecodingParam)); |
| 3417 | − decParam.eOutputColorFormat = videoFormatI420; | |
| 3418 | 3412 | decParam.uiTargetDqLayer = UCHAR_MAX; |
| 3419 | 3413 | decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY; |
| 3420 | 3414 | decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT; |
| @@ -3533,7 +3527,7 @@ TEST_P (EncodeTestAPI, SetEncOptionSize) { · 112 unmodified lines | ||
| 3533 | 3527 | param_.sSpatialLayers[0].iVideoHeight = p.iHeight; |
| 3534 | 3528 | param_.sSpatialLayers[0].fFrameRate = p.fFramerate; |
| 3535 | 3529 | param_.sSpatialLayers[0].sSliceArgument.uiSliceMode = p.eSliceMode; |
| 3536 | − if ( SM_FIXEDSLCNUM_SLICE == p.eSliceMode ) { | |
| 3530 | + if (SM_FIXEDSLCNUM_SLICE == p.eSliceMode) { | |
| 3537 | 3531 | param_.sSpatialLayers[0].sSliceArgument.uiSliceNum = 8; |
| 3538 | 3532 | } |
| 3539 | 3533 | |
| @@ -3554,7 +3548,7 @@ TEST_P (EncodeTestAPI, SetEncOptionSize) { · 14 unmodified lines | ||
| 3554 | 3548 | unsigned char* pData[3] = { NULL }; |
| 3555 | 3549 | |
| 3556 | 3550 | //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) { | |
| 3558 | 3552 | p.bAllRandom = false; |
| 3559 | 3553 | } |
| 3560 | 3554 | |
| @@ -3635,7 +3629,6 @@ TEST_F (EncodeDecodeTestAPI, SimulcastAVCDiffFps) { · 74 unmodified lines | ||
| 3635 | 3629 | |
| 3636 | 3630 | SDecodingParam decParam; |
| 3637 | 3631 | memset (&decParam, 0, sizeof (SDecodingParam)); |
| 3638 | − decParam.eOutputColorFormat = videoFormatI420; | |
| 3639 | 3632 | decParam.uiTargetDqLayer = UCHAR_MAX; |
| 3640 | 3633 | decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY; |
| 3641 | 3634 | decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT; |
| @@ -3729,7 +3722,8 @@ TEST_F (EncodeDecodeTestAPI, SimulcastAVCDiffFps) { · 87 unmodified lines | ||
| 3729 | 3722 | TEST_F (EncodeDecodeTestAPI, DiffSlicingInDlayer) { |
| 3730 | 3723 | int iSpatialLayerNum = 3; |
| 3731 | 3724 | 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 | |
| 3733 | 3727 | float fFrameRate = rand() + 0.5f; |
| 3734 | 3728 | int iEncFrameNum = WelsClip3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM); |
| 3735 | 3729 | |
| @@ -3774,7 +3768,6 @@ TEST_F (EncodeDecodeTestAPI, DiffSlicingInDlayer) { · 38 unmodified lines | ||
| 3774 | 3768 | |
| 3775 | 3769 | SDecodingParam decParam; |
| 3776 | 3770 | memset (&decParam, 0, sizeof (SDecodingParam)); |
| 3777 | − decParam.eOutputColorFormat = videoFormatI420; | |
| 3778 | 3771 | decParam.uiTargetDqLayer = UCHAR_MAX; |
| 3779 | 3772 | decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY; |
| 3780 | 3773 | decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT; |
| @@ -3838,7 +3831,6 @@ TEST_F (EncodeDecodeTestAPI, DiffSlicingInDlayerMixed) { · 57 unmodified lines | ||
| 3838 | 3831 | |
| 3839 | 3832 | SDecodingParam decParam; |
| 3840 | 3833 | memset (&decParam, 0, sizeof (SDecodingParam)); |
| 3841 | − decParam.eOutputColorFormat = videoFormatI420; | |
| 3842 | 3834 | decParam.uiTargetDqLayer = UCHAR_MAX; |
| 3843 | 3835 | decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY; |
| 3844 | 3836 | decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT; |
| @@ -3899,7 +3891,6 @@ TEST_F (EncodeDecodeTestAPI, ThreadNumAndSliceNum) { · 54 unmodified lines | ||
| 3899 | 3891 | |
| 3900 | 3892 | SDecodingParam decParam; |
| 3901 | 3893 | memset (&decParam, 0, sizeof (SDecodingParam)); |
| 3902 | − decParam.eOutputColorFormat = videoFormatI420; | |
| 3903 | 3894 | decParam.uiTargetDqLayer = UCHAR_MAX; |
| 3904 | 3895 | decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY; |
| 3905 | 3896 | decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT; |
| @@ -3961,7 +3952,6 @@ TEST_F (EncodeDecodeTestAPI, TriggerLoadBalancing) { · 55 unmodified lines | ||
| 3961 | 3952 | |
| 3962 | 3953 | SDecodingParam decParam; |
| 3963 | 3954 | memset (&decParam, 0, sizeof (SDecodingParam)); |
| 3964 | − decParam.eOutputColorFormat = videoFormatI420; | |
| 3965 | 3955 | decParam.uiTargetDqLayer = UCHAR_MAX; |
| 3966 | 3956 | decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY; |
| 3967 | 3957 | decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT; |