Showing the changes to test/api/encode_options_test.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2150,6 +2150,11 @@ TEST_F (EncodeDecodeTestAPI, UnsupportedVideoSizeInput) { · 2149 unmodified lines | |||
| 2150 | 2150 | ||
| 2151 | ASSERT_TRUE (InitialEncDec (iSrcWidth, iSrcHeight)); | 2151 | ASSERT_TRUE (InitialEncDec (iSrcWidth, iSrcHeight)); |
| 2152 | 2152 | ||
| 2153 | int frameSize = EncPic.iPicWidth * EncPic.iPicHeight * 3 / 2; | ||
| 2154 | int lumaSize = EncPic.iPicWidth * EncPic.iPicHeight; | ||
| 2155 | memset (buf_.data(), iRandValue, lumaSize); | ||
| 2156 | memset (buf_.data() + lumaSize, rand() % 256, (frameSize - lumaSize)); | ||
| 2157 | |||
| 2153 | iRet = encoder_->EncodeFrame (&EncPic, &info); | 2158 | iRet = encoder_->EncodeFrame (&EncPic, &info); |
| 2154 | 2159 | ||
| 2155 | ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet; | 2160 | ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet; |