| 90 | |
| 91 | |
| 92 | void EncodeDecodeTestAPIBase::EncodeOneFrame (int iCheckTypeIndex) { |
| 93 | int frameSize = EncPic.iPicWidth * EncPic.iPicHeight * 3 / 2; |
| 94 | int lumaSize = EncPic.iPicWidth * EncPic.iPicHeight; |
| 95 | memset (buf_.data(), iRandValue, lumaSize); |
| 96 | memset (buf_.data() + lumaSize, rand() % 256, (frameSize - lumaSize)); |
| 97 | int rv = encoder_->EncodeFrame (&EncPic, &info); |
| 98 | if (0 == iCheckTypeIndex) { |
| 99 | ASSERT_TRUE (rv == cmResultSuccess) << rv; |
| 100 | } else if (1 == iCheckTypeIndex) { |
| 101 | ASSERT_TRUE (rv == cmResultSuccess || rv == cmUnknownReason); |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | bool EncodeDecodeTestAPIBase::EncDecOneFrame (const int iWidth, const int iHeight, const int iFrame, FILE* pfEnc) { |
| 106 | int iLen = 0, rv; |
nothing calls this directly
no test coverage detected