MCPcopy Create free account
hub / github.com/cisco/openh264 / EncodeOneFrame

Method EncodeOneFrame

test/api/encode_decode_api_test.cpp:92–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91
92void 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
105bool EncodeDecodeTestAPIBase::EncDecOneFrame (const int iWidth, const int iHeight, const int iFrame, FILE* pfEnc) {
106 int iLen = 0, rv;

Callers

nothing calls this directly

Calls 2

dataMethod · 0.80
EncodeFrameMethod · 0.45

Tested by

no test coverage detected