History

Add clean CAVLC B-Frame decoder support without whitespace change and general fix.

xiaotianshicomcast committed 7 years ago

Commit d8682891 parent 9a815399 files · +1057 −82Browse files

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

Unified · Split

test/api/encode_options_test.cpp+12−3
@@ -1033,6 +1033,13 @@ TEST_F (EncodeDecodeTestAPI, SimulcastSVC) { · 1032 unmodified lines
10331033 EXPECT_TRUE (iResult == cmResultSuccess) << "iResult=" << iResult << "LayerIdx=" << iIdx;
10341034 iResult = decoder[iIdx]->DecodeFrame2 (NULL, 0, pData, &dstBufInfo_);
10351035 EXPECT_TRUE (iResult == cmResultSuccess) << "iResult=" << iResult << "LayerIdx=" << iIdx;
1036+ if (dstBufInfo_.iBufferStatus == 0) {
1037+ int32_t num_of_frames_in_buffer = 0;
1038+ decoder[iIdx]->GetOption (DECODER_OPTION_NUM_OF_FRAMES_REMAINING_IN_BUFFER, &num_of_frames_in_buffer);
1039+ for (int32_t i = 0; i < num_of_frames_in_buffer; ++i) {
1040+ decoder[iIdx]->FlushFrame (pData, &dstBufInfo_);
1041+ }
1042+ }
10361043 EXPECT_EQ (dstBufInfo_.iBufferStatus, 1) << "LayerIdx=" << iIdx;
10371044 }
10381045 }
@@ -2299,7 +2306,7 @@ TEST_F (EncodeDecodeTestAPI, TemporalLayerChangeDuringEncoding_Specific) { · 1260 unmodified lines
22992306
23002307 while (fileStream.read (buf_.data(), frameSize) == frameSize) {
23012308
2302− if ( (iStepIdx < 3) && (iFrameNum == ((iTotalFrame / 3) * (iStepIdx + 1)))) {
2309+ if ((iStepIdx < 3) && (iFrameNum == ((iTotalFrame / 3) * (iStepIdx + 1)))) {
23032310 sParam.iTemporalLayerNum = originalTemporalLayerNum * iSteps[iStepIdx];
23042311 sParam.iTargetBitrate = sParam.sSpatialLayers[0].iSpatialBitrate = originalBR * iSteps[iStepIdx];
23052312 sParam.fMaxFrameRate = sParam.sSpatialLayers[0].fFrameRate = originalFR * pow (2.0f, iSteps[iStepIdx]);
@@ -2314,9 +2321,11 @@ TEST_F (EncodeDecodeTestAPI, TemporalLayerChangeDuringEncoding_Specific) { · 8 unmodified lines
23142321
23152322 if (bSetOption) {
23162323 if ((iStepIdx == 1) || (iStepIdx == 3)) {
2317− EXPECT_TRUE (info.eFrameType == videoFrameTypeIDR) << "iStepIdx=" << iStepIdx << "iFrameNum=" << iFrameNum << "iTotalFrame=" << iTotalFrame;
2324+ EXPECT_TRUE (info.eFrameType == videoFrameTypeIDR) << "iStepIdx=" << iStepIdx << "iFrameNum=" << iFrameNum <<
2325+ "iTotalFrame=" << iTotalFrame;
23182326 } else {
2319− EXPECT_TRUE (info.eFrameType != videoFrameTypeIDR) << "iStepIdx=" << iStepIdx << "iFrameNum=" << iFrameNum << "iTotalFrame=" << iTotalFrame;
2327+ EXPECT_TRUE (info.eFrameType != videoFrameTypeIDR) << "iStepIdx=" << iStepIdx << "iFrameNum=" << iFrameNum <<
2328+ "iTotalFrame=" << iTotalFrame;
23202329 }
23212330
23222331 bSetOption = false;

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