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

Function TEST_P

test/api/encoder_test.cpp:83–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83TEST_P (EncoderOutputTest, CompareOutput) {
84 EncodeFileParam p = GetParam();
85 SEncParamExt EnxParamExt;
86
87 EncFileParamToParamExt (&p, &EnxParamExt);
88
89#if defined(ANDROID_NDK)
90 std::string filename = std::string ("/sdcard/") + p.pkcFileName;
91 EncodeFile (p.pkcFileName, &EnxParamExt, this);
92#else
93 EncodeFile (p.pkcFileName, &EnxParamExt, this);
94#endif
95 //will remove this after screen content algorithms are ready,
96 //because the bitstream output will vary when the different algorithms are added.
97 unsigned char digest[SHA_DIGEST_LENGTH];
98 SHA1Result (&ctx_, digest);
99 if (!HasFatalFailure()) {
100 CompareHashAnyOf (digest, p.pkcHashStr, sizeof p.pkcHashStr / sizeof *p.pkcHashStr);
101 }
102}
103static const EncodeFileParam kFileParamArray[] = {
104 {
105 "res/CiscoVT2people_320x192_12fps.yuv",

Callers

nothing calls this directly

Calls 3

EncFileParamToParamExtFunction · 0.85
SHA1ResultFunction · 0.85
CompareHashAnyOfFunction · 0.85

Tested by

no test coverage detected