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

Function TEST_P

test/api/decode_encode_test.cpp:114–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112
113}
114TEST_P (DecodeEncodeTest, CompareOutput) {
115 DecodeEncodeFileParam p = GetParam();
116 SEncParamExt EnxParamExt;
117 DecEncFileParamToParamExt (&p, &EnxParamExt);
118
119#if defined(ANDROID_NDK)
120 std::string filename = std::string ("/sdcard/") + p.fileName;
121 ASSERT_TRUE (Open (filename.c_str()));
122#else
123 ASSERT_TRUE (Open (p.fileName));
124#endif
125 EncodeStream (this, &EnxParamExt, this);
126 unsigned char digest[SHA_DIGEST_LENGTH];
127 SHA1Result (&ctx_, digest);
128 if (!HasFatalFailure()) {
129 CompareHash (digest, p.hashStr);
130 }
131}
132static const DecodeEncodeFileParam kFileParamArray[] = {
133 {"res/test_vd_1d.264", "34fc3aee85cc0b0223c2701d810a536fe3818a00", 320, 192, 12.0f},
134 {"res/test_vd_rc.264", "9f15b0677b5f7daa922079ec4fa49e3f457fc998", 320, 192, 12.0f},

Callers

nothing calls this directly

Calls 3

SHA1ResultFunction · 0.85
CompareHashFunction · 0.85

Tested by

no test coverage detected