History

fix the filling of testing data

sijchen@cisco.com committed 9 years ago

Commit be060e21 parent 47aedcf1 file · +3 −2Browse files

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

Unified · Split

test/api/encode_decode_api_test.cpp+3−2
@@ -82,8 +82,9 @@ void EncodeDecodeTestAPIBase::prepareParamDefault (int iLayers, int iSlices, int · 81 unmodified lines
82 82
83void EncodeDecodeTestAPIBase::EncodeOneFrame (int iCheckTypeIndex) {83void EncodeDecodeTestAPIBase::EncodeOneFrame (int iCheckTypeIndex) {
84 int frameSize = EncPic.iPicWidth * EncPic.iPicHeight * 3 / 2;84 int frameSize = EncPic.iPicWidth * EncPic.iPicHeight * 3 / 2;
85 memset (buf_.data(), iRandValue, (frameSize >> 2));85 int lumaSize = EncPic.iPicWidth * EncPic.iPicHeight;
86 memset (buf_.data() + (frameSize >> 2), rand() % 256, (frameSize - (frameSize >> 2)));86 memset (buf_.data(), iRandValue, lumaSize);
87 memset (buf_.data() + lumaSize, rand() % 256, (frameSize - lumaSize));
87 int rv = encoder_->EncodeFrame (&EncPic, &info);88 int rv = encoder_->EncodeFrame (&EncPic, &info);
88 if (0 == iCheckTypeIndex)89 if (0 == iCheckTypeIndex)
89 ASSERT_TRUE (rv == cmResultSuccess);90 ASSERT_TRUE (rv == cmResultSuccess);

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