Merge "Omx vts tests." into oc-dev am: 1d619f743d

am: 640d3f330a

Change-Id: Ie96f6792c8db9c22f84979d1d6f355ea15e1abdc
This commit is contained in:
Zhuoyao Zhang
2017-05-16 01:54:38 +00:00
committed by android-build-merger
29 changed files with 2902 additions and 123 deletions

View File

@@ -130,6 +130,7 @@ static ComponentTestEnvironment* gEnv = nullptr;
class AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
disableTest = false;
android::hardware::media::omx::V1_0::Status status;
omx = ::testing::VtsHalHidlTargetTestBase::getService<IOmx>(
gEnv->getInstance());
@@ -137,8 +138,8 @@ class AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
observer =
new CodecObserver([this](Message msg) { handleMessage(msg); });
ASSERT_NE(observer, nullptr);
ASSERT_EQ(strncmp(gEnv->getComponent().c_str(), "OMX.", 4), 0)
<< "Invalid Component Name";
if (strncmp(gEnv->getComponent().c_str(), "OMX.", 4) != 0)
disableTest = true;
EXPECT_TRUE(omx->allocateNode(
gEnv->getComponent(), observer,
[&](android::hardware::media::omx::V1_0::Status _s,
@@ -154,9 +155,10 @@ class AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
standardComp CompName;
};
const StringToName kStringToName[] = {
{"mp3", mp3}, {"amrnb", amrnb}, {"amrwb", amrwb},
{"aac", aac}, {"vorbis", vorbis}, {"opus", opus},
{"pcm", pcm},
{"mp3", mp3}, {"amrnb", amrnb}, {"amrwb", amrwb},
{"aac", aac}, {"vorbis", vorbis}, {"opus", opus},
{"pcm", pcm}, {"g711alaw", g711alaw}, {"g711mlaw", g711mlaw},
{"gsm", gsm}, {"raw", raw},
};
const size_t kNumStringToName =
sizeof(kStringToName) / sizeof(kStringToName[0]);
@@ -172,7 +174,7 @@ class AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
break;
}
}
ASSERT_NE(compName, unknown_comp);
if (compName == unknown_comp) disableTest = true;
struct CompToCoding {
standardComp CompName;
OMX_AUDIO_CODINGTYPE eEncoding;
@@ -185,6 +187,10 @@ class AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
{vorbis, OMX_AUDIO_CodingVORBIS},
{pcm, OMX_AUDIO_CodingPCM},
{opus, (OMX_AUDIO_CODINGTYPE)OMX_AUDIO_CodingAndroidOPUS},
{g711alaw, OMX_AUDIO_CodingG711},
{g711mlaw, OMX_AUDIO_CodingG711},
{gsm, OMX_AUDIO_CodingGSMFR},
{raw, OMX_AUDIO_CodingPCM},
};
static const size_t kNumCompToCoding =
sizeof(kCompToCoding) / sizeof(kCompToCoding[0]);
@@ -195,11 +201,12 @@ class AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
break;
}
}
ASSERT_NE(i, kNumCompToCoding);
if (i == kNumCompToCoding) disableTest = true;
eosFlag = false;
framesReceived = 0;
timestampUs = 0;
timestampDevTest = false;
if (disableTest) std::cerr << "[ ] Warning ! Test Disabled\n";
}
virtual void TearDown() override {
@@ -262,6 +269,10 @@ class AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
vorbis,
opus,
pcm,
g711alaw,
g711mlaw,
gsm,
raw,
unknown_comp,
};
@@ -270,6 +281,7 @@ class AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
sp<IOmxNode> omxNode;
standardComp compName;
OMX_AUDIO_CODINGTYPE eEncoding;
bool disableTest;
bool eosFlag;
uint32_t framesReceived;
uint64_t timestampUs;
@@ -324,6 +336,7 @@ void AudioDecHidlTest::testEOS(android::Vector<BufferInfo>* iBuffer,
void setDefaultPortParam(
sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_AUDIO_CODINGTYPE eEncoding,
int32_t nChannels = 2, int32_t nSampleRate = 44100,
OMX_AUDIO_PCMMODETYPE ePCMMode = OMX_AUDIO_PCMModeLinear,
OMX_NUMERICALDATATYPE eNumData = OMX_NumericalDataSigned,
int32_t nBitPerSample = 16) {
android::hardware::media::omx::V1_0::Status status;
@@ -342,11 +355,11 @@ void setDefaultPortParam(
switch ((int)eEncoding) {
case OMX_AUDIO_CodingPCM:
setupPCMPort(omxNode, portIndex, nChannels, eNumData, nBitPerSample,
nSampleRate);
nSampleRate, ePCMMode);
break;
case OMX_AUDIO_CodingAAC:
setupAACPort(omxNode, portIndex, OMX_AUDIO_AACObjectNull,
OMX_AUDIO_AACStreamFormatMP4ADTS, nChannels, 0,
OMX_AUDIO_AACStreamFormatMP4FF, nChannels, 0,
nSampleRate);
default:
break;
@@ -365,6 +378,8 @@ void getInputChannelInfo(sp<IOmxNode> omxNode, OMX_U32 kPortIndexInput,
*nSampleRate = 0;
switch ((int)eEncoding) {
case OMX_AUDIO_CodingGSMFR:
case OMX_AUDIO_CodingG711:
case OMX_AUDIO_CodingPCM: {
OMX_AUDIO_PARAM_PCMMODETYPE param;
status = getPortParam(omxNode, OMX_IndexParamAudioPcm,
@@ -451,14 +466,22 @@ void GetURLForComponent(AudioDecHidlTest::standardComp comp, char* mURL,
"sine_amrnb_1ch_12kbps_8000hz.amrnb",
"sine_amrnb_1ch_12kbps_8000hz.info"},
{AudioDecHidlTest::standardComp::amrwb,
"sine_amrwb_1ch_24kbps_16000hz.amrwb",
"sine_amrwb_1ch_24kbps_16000hz.info"},
"bbb_amrwb_1ch_14kbps_16000hz.amrwb",
"bbb_amrwb_1ch_14kbps_16000hz.info"},
{AudioDecHidlTest::standardComp::vorbis,
"bbb_vorbis_stereo_128kbps_48000hz.vorbis",
"bbb_vorbis_stereo_128kbps_48000hz.info"},
{AudioDecHidlTest::standardComp::opus,
"bbb_opus_stereo_128kbps_48000hz.opus",
"bbb_opus_stereo_128kbps_48000hz.info"},
{AudioDecHidlTest::standardComp::g711alaw, "bbb_g711alaw_1ch_8khz.raw",
"bbb_g711alaw_1ch_8khz.info"},
{AudioDecHidlTest::standardComp::g711mlaw, "bbb_g711mulaw_1ch_8khz.raw",
"bbb_g711mulaw_1ch_8khz.info"},
{AudioDecHidlTest::standardComp::gsm, "bbb_gsm_1ch_8khz_13kbps.raw",
"bbb_gsm_1ch_8khz_13kbps.info"},
{AudioDecHidlTest::standardComp::raw, "bbb_raw_1ch_8khz_s32le.raw",
"bbb_raw_1ch_8khz_s32le.info"},
};
for (size_t i = 0; i < sizeof(kCompToURL) / sizeof(kCompToURL[0]); ++i) {
@@ -659,6 +682,7 @@ void decodeNFrames(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
// set component role
TEST_F(AudioDecHidlTest, SetRole) {
description("Test Set Component Role");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
status = setRole(omxNode, gEnv->getRole().c_str());
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
@@ -667,6 +691,7 @@ TEST_F(AudioDecHidlTest, SetRole) {
// port format enumeration
TEST_F(AudioDecHidlTest, EnumeratePortFormat) {
description("Test Component on Mandatory Port Parameters (Port Format)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
@@ -688,6 +713,7 @@ TEST_F(AudioDecHidlTest, EnumeratePortFormat) {
// deviation
TEST_F(AudioDecHidlTest, DecodeTest) {
description("Tests Port Reconfiguration, Decode and timestamp deviation");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
@@ -726,6 +752,10 @@ TEST_F(AudioDecHidlTest, DecodeTest) {
int32_t nChannels, nSampleRate;
// Configure input port
setDefaultPortParam(omxNode, kPortIndexInput, eEncoding);
if (compName == raw)
setDefaultPortParam(omxNode, kPortIndexInput, eEncoding, 1, 8000,
OMX_AUDIO_PCMModeLinear, OMX_NumericalDataSigned,
32);
getInputChannelInfo(omxNode, kPortIndexInput, eEncoding, &nChannels,
&nSampleRate);
// Configure output port
@@ -758,8 +788,61 @@ TEST_F(AudioDecHidlTest, DecodeTest) {
}
// end of sequence test
TEST_F(AudioDecHidlTest, EOSTest) {
description("Test end of stream");
TEST_F(AudioDecHidlTest, EOSTest_M) {
description("Test end of stream monkeying");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
OMX_PORT_PARAM_TYPE params;
status = getParam(omxNode, OMX_IndexParamAudioInit, &params);
if (status == ::android::hardware::media::omx::V1_0::Status::OK) {
ASSERT_EQ(params.nPorts, 2U);
kPortIndexInput = params.nStartPortNumber;
kPortIndexOutput = kPortIndexInput + 1;
}
int32_t nChannels, nSampleRate;
// Configure input port
setDefaultPortParam(omxNode, kPortIndexInput, eEncoding);
if (compName == raw)
setDefaultPortParam(omxNode, kPortIndexInput, eEncoding, 1, 8000,
OMX_AUDIO_PCMModeLinear, OMX_NumericalDataSigned,
32);
getInputChannelInfo(omxNode, kPortIndexInput, eEncoding, &nChannels,
&nSampleRate);
// Configure output port
setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
nChannels, nSampleRate);
android::Vector<BufferInfo> iBuffer, oBuffer;
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
kPortIndexInput, kPortIndexOutput);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
// request EOS at the start
testEOS(&iBuffer, &oBuffer, true);
flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
kPortIndexOutput);
EXPECT_GE(framesReceived, 0U);
framesReceived = 0;
timestampUs = 0;
// set state to idle
changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
// set state to executing
changeStateIdletoLoaded(omxNode, observer, &iBuffer, &oBuffer,
kPortIndexInput, kPortIndexOutput);
}
// end of sequence test
TEST_F(AudioDecHidlTest, ThumbnailTest) {
description("Test Request for thumbnail");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
@@ -795,6 +878,10 @@ TEST_F(AudioDecHidlTest, EOSTest) {
int32_t nChannels, nSampleRate;
// Configure input port
setDefaultPortParam(omxNode, kPortIndexInput, eEncoding);
if (compName == raw)
setDefaultPortParam(omxNode, kPortIndexInput, eEncoding, 1, 8000,
OMX_AUDIO_PCMModeLinear, OMX_NumericalDataSigned,
32);
getInputChannelInfo(omxNode, kPortIndexInput, eEncoding, &nChannels,
&nSampleRate);
// Configure output port
@@ -809,14 +896,6 @@ TEST_F(AudioDecHidlTest, EOSTest) {
// set state to executing
changeStateIdletoExecute(omxNode, observer);
// request EOS at the start
testEOS(&iBuffer, &oBuffer, true);
flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
kPortIndexOutput);
EXPECT_GE(framesReceived, 0U);
framesReceived = 0;
timestampUs = 0;
// request EOS for thumbnail
// signal EOS flag with last frame
size_t i = 0;
@@ -852,21 +931,6 @@ TEST_F(AudioDecHidlTest, EOSTest) {
framesReceived = 0;
timestampUs = 0;
// request EOS at the end
eleStream.open(mURL, std::ifstream::binary);
ASSERT_EQ(eleStream.is_open(), true);
decodeNFrames(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput, eleStream, &Info, 0,
(int)Info.size());
eleStream.close();
waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput);
testEOS(&iBuffer, &oBuffer);
flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
kPortIndexOutput);
framesReceived = 0;
timestampUs = 0;
// set state to idle
changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
// set state to executing
@@ -874,9 +938,10 @@ TEST_F(AudioDecHidlTest, EOSTest) {
kPortIndexInput, kPortIndexOutput);
}
// test input/output port flush
TEST_F(AudioDecHidlTest, FlushTest) {
description("Test Flush");
// end of sequence test
TEST_F(AudioDecHidlTest, SimpleEOSTest) {
description("Test end of stream");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
@@ -912,6 +977,89 @@ TEST_F(AudioDecHidlTest, FlushTest) {
int32_t nChannels, nSampleRate;
// Configure input port
setDefaultPortParam(omxNode, kPortIndexInput, eEncoding);
if (compName == raw)
setDefaultPortParam(omxNode, kPortIndexInput, eEncoding, 1, 8000,
OMX_AUDIO_PCMModeLinear, OMX_NumericalDataSigned,
32);
getInputChannelInfo(omxNode, kPortIndexInput, eEncoding, &nChannels,
&nSampleRate);
// Configure output port
setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
nChannels, nSampleRate);
android::Vector<BufferInfo> iBuffer, oBuffer;
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
kPortIndexInput, kPortIndexOutput);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
// request EOS at the end
eleStream.open(mURL, std::ifstream::binary);
ASSERT_EQ(eleStream.is_open(), true);
decodeNFrames(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput, eleStream, &Info, 0,
(int)Info.size());
eleStream.close();
waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput);
testEOS(&iBuffer, &oBuffer);
flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
kPortIndexOutput);
framesReceived = 0;
timestampUs = 0;
// set state to idle
changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
// set state to executing
changeStateIdletoLoaded(omxNode, observer, &iBuffer, &oBuffer,
kPortIndexInput, kPortIndexOutput);
}
// test input/output port flush
TEST_F(AudioDecHidlTest, FlushTest) {
description("Test Flush");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
OMX_PORT_PARAM_TYPE params;
status = getParam(omxNode, OMX_IndexParamAudioInit, &params);
if (status == ::android::hardware::media::omx::V1_0::Status::OK) {
ASSERT_EQ(params.nPorts, 2U);
kPortIndexInput = params.nStartPortNumber;
kPortIndexOutput = kPortIndexInput + 1;
}
char mURL[512], info[512];
strcpy(mURL, gEnv->getRes().c_str());
strcpy(info, gEnv->getRes().c_str());
GetURLForComponent(compName, mURL, info);
std::ifstream eleStream, eleInfo;
eleInfo.open(info);
ASSERT_EQ(eleInfo.is_open(), true);
android::Vector<FrameData> Info;
int bytesCount = 0;
uint32_t flags = 0;
uint32_t timestamp = 0;
while (1) {
if (!(eleInfo >> bytesCount)) break;
eleInfo >> flags;
eleInfo >> timestamp;
Info.push_back({bytesCount, flags, timestamp});
}
eleInfo.close();
int32_t nChannels, nSampleRate;
// Configure input port
setDefaultPortParam(omxNode, kPortIndexInput, eEncoding);
if (compName == raw)
setDefaultPortParam(omxNode, kPortIndexInput, eEncoding, 1, 8000,
OMX_AUDIO_PCMModeLinear, OMX_NumericalDataSigned,
32);
getInputChannelInfo(omxNode, kPortIndexInput, eEncoding, &nChannels,
&nSampleRate);
// Configure output port

View File

@@ -130,14 +130,15 @@ static ComponentTestEnvironment* gEnv = nullptr;
class AudioEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
disableTest = false;
android::hardware::media::omx::V1_0::Status status;
omx = ::testing::VtsHalHidlTargetTestBase::getService<IOmx>(
gEnv->getInstance());
ASSERT_NE(omx, nullptr);
observer = new CodecObserver([this](Message msg) { (void)msg; });
ASSERT_NE(observer, nullptr);
ASSERT_EQ(strncmp(gEnv->getComponent().c_str(), "OMX.", 4), 0)
<< "Invalid Component Name";
if (strncmp(gEnv->getComponent().c_str(), "OMX.", 4) != 0)
disableTest = true;
EXPECT_TRUE(omx->allocateNode(
gEnv->getComponent(), observer,
[&](android::hardware::media::omx::V1_0::Status _s,
@@ -169,7 +170,7 @@ class AudioEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
break;
}
}
ASSERT_NE(compName, unknown_comp);
if (compName == unknown_comp) disableTest = true;
struct CompToCoding {
standardComp CompName;
OMX_AUDIO_CODINGTYPE eEncoding;
@@ -189,7 +190,8 @@ class AudioEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
break;
}
}
ASSERT_NE(i, kNumCompToCoding);
if (i == kNumCompToCoding) disableTest = true;
if (disableTest) std::cerr << "[ ] Warning ! Test Disabled\n";
}
virtual void TearDown() override {
@@ -212,6 +214,7 @@ class AudioEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
sp<IOmxNode> omxNode;
standardComp compName;
OMX_AUDIO_CODINGTYPE eEncoding;
bool disableTest;
protected:
static void description(const std::string& description) {
@@ -237,6 +240,14 @@ void setDefaultPortParam(sp<IOmxNode> omxNode, OMX_U32 portIndex,
&portDef);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
std::vector<int32_t> arrProfile;
int32_t profile;
if ((int)eEncoding == OMX_AUDIO_CodingAAC) {
enumerateProfile(omxNode, portIndex, &arrProfile);
if (arrProfile.empty() == true) ASSERT_TRUE(false);
profile = arrProfile[0];
}
switch ((int)eEncoding) {
case OMX_AUDIO_CodingFLAC:
setupFLACPort(omxNode, portIndex, nChannels, nSampleRate,
@@ -247,7 +258,8 @@ void setDefaultPortParam(sp<IOmxNode> omxNode, OMX_U32 portIndex,
(comp == AudioEncHidlTest::standardComp::amrwb));
break;
case OMX_AUDIO_CodingAAC:
setupAACPort(omxNode, portIndex, OMX_AUDIO_AACObjectNull,
setupAACPort(omxNode, portIndex,
static_cast<OMX_AUDIO_AACPROFILETYPE>(profile),
OMX_AUDIO_AACStreamFormatMP4FF, nChannels, nBitRate,
nSampleRate);
break;
@@ -340,6 +352,7 @@ void encodeNFrames(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
// set component role
TEST_F(AudioEncHidlTest, SetRole) {
description("Test Set Component Role");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
status = setRole(omxNode, gEnv->getRole().c_str());
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
@@ -348,6 +361,7 @@ TEST_F(AudioEncHidlTest, SetRole) {
// port format enumeration
TEST_F(AudioEncHidlTest, EnumeratePortFormat) {
description("Test Component on Mandatory Port Parameters (Port Format)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
@@ -368,6 +382,7 @@ TEST_F(AudioEncHidlTest, EnumeratePortFormat) {
// test raw stream encode
TEST_F(AudioEncHidlTest, EncodeTest) {
description("Tests Encode");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
@@ -421,7 +436,7 @@ TEST_F(AudioEncHidlTest, EncodeTest) {
ASSERT_TRUE(false);
}
setupPCMPort(omxNode, kPortIndexInput, nChannels, OMX_NumericalDataSigned,
16, nSampleRate);
16, nSampleRate, OMX_AUDIO_PCMModeLinear);
// Configure output port
setDefaultPortParam(omxNode, kPortIndexOutput, eEncoding, compName,
nChannels, nSampleRate, nBitRate);

View File

@@ -346,7 +346,7 @@ Return<android::hardware::media::omx::V1_0::Status> setAudioPortFormat(
}
}
if (index == arrEncoding.size()) {
ALOGI("setting default Port format");
ALOGE("setting default Port format %x", (int)arrEncoding[0]);
portFormat.eEncoding = arrEncoding[0];
}
// In setParam call nIndex shall be ignored as per omx-il specification.
@@ -364,9 +364,31 @@ Return<android::hardware::media::omx::V1_0::Status> setRole(
return setParam(omxNode, OMX_IndexParamStandardComponentRole, &params);
}
void enumerateProfile(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile) {
android::hardware::media::omx::V1_0::Status status;
OMX_AUDIO_PARAM_ANDROID_PROFILETYPE param;
param.nProfileIndex = 0;
arrProfile->clear();
while (1) {
status = getPortParam(
omxNode, (OMX_INDEXTYPE)OMX_IndexParamAudioProfileQuerySupported,
portIndex, &param);
if (status != ::android::hardware::media::omx::V1_0::Status::OK) break;
arrProfile->push_back(static_cast<int32_t>(param.eProfile));
param.nProfileIndex++;
if (param.nProfileIndex == 512) {
// enumerated way too many, highly unusual for this to happen.
EXPECT_LE(param.nProfileIndex, 512U)
<< "Expecting OMX_ErrorNoMore but not received";
break;
}
}
}
void setupPCMPort(sp<IOmxNode> omxNode, OMX_U32 portIndex, int32_t nChannels,
OMX_NUMERICALDATATYPE eNumData, int32_t nBitPerSample,
int32_t nSamplingRate) {
int32_t nSamplingRate, OMX_AUDIO_PCMMODETYPE ePCMMode) {
OMX_AUDIO_PARAM_PCMMODETYPE param;
android::hardware::media::omx::V1_0::Status status;
status = getPortParam(omxNode, OMX_IndexParamAudioPcm, portIndex, &param);
@@ -377,7 +399,7 @@ void setupPCMPort(sp<IOmxNode> omxNode, OMX_U32 portIndex, int32_t nChannels,
param.bInterleaved = OMX_TRUE;
param.nBitPerSample = nBitPerSample;
param.nSamplingRate = nSamplingRate;
param.ePCMMode = OMX_AUDIO_PCMModeLinear;
param.ePCMMode = ePCMMode;
switch (nChannels) {
case 1:
param.eChannelMapping[0] = OMX_AUDIO_ChannelCF;

View File

@@ -68,9 +68,12 @@ Return<android::hardware::media::omx::V1_0::Status> setAudioPortFormat(
Return<android::hardware::media::omx::V1_0::Status> setRole(
sp<IOmxNode> omxNode, const char* role);
void enumerateProfile(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile);
void setupPCMPort(sp<IOmxNode> omxNode, OMX_U32 portIndex, int32_t nChannels,
OMX_NUMERICALDATATYPE eNumData, int32_t nBitPerSample,
int32_t nSamplingRate);
int32_t nSamplingRate, OMX_AUDIO_PCMMODETYPE ePCMMode);
void setupMP3Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
OMX_AUDIO_MP3STREAMFORMATTYPE eFormat, int32_t nChannels,

View File

@@ -17,6 +17,10 @@
#ifndef MEDIA_HIDL_TEST_COMMON_H
#define MEDIA_HIDL_TEST_COMMON_H
#ifdef __LP64__
#define OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS
#endif
#include <media/stagefright/foundation/ALooper.h>
#include <utils/Condition.h>
#include <utils/List.h>
@@ -215,4 +219,30 @@ Return<android::hardware::media::omx::V1_0::Status> setPortParam(
inHidlBytes(params, sizeof(*params)));
}
template <class T>
Return<android::hardware::media::omx::V1_0::Status> getPortConfig(
sp<IOmxNode> omxNode, OMX_INDEXTYPE omxIdx, OMX_U32 nPortIndex, T* params) {
android::hardware::media::omx::V1_0::Status status;
InitOMXParams(params);
params->nPortIndex = nPortIndex;
omxNode->getConfig(
toRawIndexType(omxIdx), inHidlBytes(params, sizeof(*params)),
[&status, &params](android::hardware::media::omx::V1_0::Status _s,
hidl_vec<uint8_t> const& outParams) {
status = _s;
std::copy(outParams.data(), outParams.data() + outParams.size(),
static_cast<uint8_t*>(static_cast<void*>(params)));
});
return status;
}
template <class T>
Return<android::hardware::media::omx::V1_0::Status> setPortConfig(
sp<IOmxNode> omxNode, OMX_INDEXTYPE omxIdx, OMX_U32 nPortIndex, T* params) {
InitOMXParams(params);
params->nPortIndex = nPortIndex;
return omxNode->setConfig(toRawIndexType(omxIdx),
inHidlBytes(params, sizeof(*params)));
}
#endif // MEDIA_HIDL_TEST_COMMON_H

View File

@@ -118,14 +118,15 @@ static ComponentTestEnvironment* gEnv = nullptr;
class ComponentHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
disableTest = false;
android::hardware::media::omx::V1_0::Status status;
omx = ::testing::VtsHalHidlTargetTestBase::getService<IOmx>(
gEnv->getInstance());
ASSERT_NE(omx, nullptr);
observer = new CodecObserver(nullptr);
ASSERT_NE(observer, nullptr);
ASSERT_EQ(strncmp(gEnv->getComponent().c_str(), "OMX.", 4), 0)
<< "Invalid Component Name";
if (strncmp(gEnv->getComponent().c_str(), "OMX.", 4) != 0)
disableTest = true;
EXPECT_TRUE(omx->allocateNode(
gEnv->getComponent(), observer,
[&](android::hardware::media::omx::V1_0::Status _s,
@@ -161,7 +162,8 @@ class ComponentHidlTest : public ::testing::VtsHalHidlTargetTestBase {
break;
}
}
ASSERT_NE(compClass, unknown_class) << "Invalid Component Class";
if (compClass == unknown_class) disableTest = true;
if (disableTest) std::cerr << "[ ] Warning ! Test Disabled\n";
}
virtual void TearDown() override {
@@ -183,6 +185,7 @@ class ComponentHidlTest : public ::testing::VtsHalHidlTargetTestBase {
sp<CodecObserver> observer;
sp<IOmxNode> omxNode;
standardCompClass compClass;
bool disableTest;
protected:
static void description(const std::string& description) {
@@ -493,7 +496,7 @@ Return<android::hardware::media::omx::V1_0::Status> setVideoPortFormat(
}
}
if (index == arrColorFormat.size()) {
ALOGI("setting default color format");
ALOGE("setting default color format %x", (int)arrColorFormat[0]);
portFormat.eColorFormat = arrColorFormat[0];
}
portFormat.eCompressionFormat = OMX_VIDEO_CodingUnused;
@@ -505,7 +508,8 @@ Return<android::hardware::media::omx::V1_0::Status> setVideoPortFormat(
}
}
if (index == arrCompressionFormat.size()) {
ALOGI("setting default compression format");
ALOGE("setting default compression format %x",
(int)arrCompressionFormat[0]);
portFormat.eCompressionFormat = arrCompressionFormat[0];
}
portFormat.eColorFormat = OMX_COLOR_FormatUnused;
@@ -550,7 +554,7 @@ Return<android::hardware::media::omx::V1_0::Status> setAudioPortFormat(
}
}
if (index == arrEncoding.size()) {
ALOGI("setting default Port format");
ALOGE("setting default Port format %x", (int)arrEncoding[0]);
portFormat.eEncoding = arrEncoding[0];
}
// In setParam call nIndex shall be ignored as per omx-il specification.
@@ -569,9 +573,48 @@ Return<android::hardware::media::omx::V1_0::Status> setRole(
return setParam(omxNode, OMX_IndexParamStandardComponentRole, &params);
}
// test dispatch message API call
TEST_F(ComponentHidlTest, dispatchMsg) {
description("test dispatch message API call");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
Message msgin, msgout;
msgin.type = Message::Type::EVENT;
// dispatch EOS event, normally this is by component when it receives a
// EOS flag
msgin.data.eventData.event = OMX_EventBufferFlag;
msgin.data.eventData.data1 = 0U;
msgin.data.eventData.data2 = (uint32_t)OMX_BUFFERFLAG_EOS;
status = omxNode->dispatchMessage(msgin);
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
status = observer->dequeueMessage(&msgout, DEFAULT_TIMEOUT);
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
ASSERT_EQ(msgout.type, msgin.type);
ASSERT_EQ(msgout.data.eventData.event, msgin.data.eventData.event);
ASSERT_EQ(msgout.data.eventData.data1, msgin.data.eventData.data1);
ASSERT_EQ(msgout.data.eventData.data2, msgin.data.eventData.data2);
// dispatch dataspace changed event
msgin.data.eventData.event = OMX_EventDataSpaceChanged;
msgin.data.eventData.data1 = 281149440U; // V0_BT601_625;
msgin.data.eventData.data2 = 0x1111;
msgin.data.eventData.data3 = 0x24; // RAW_OPAQUE
status = omxNode->dispatchMessage(msgin);
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
status = observer->dequeueMessage(&msgout, DEFAULT_TIMEOUT);
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
ASSERT_EQ(msgout.type, msgin.type);
ASSERT_EQ(msgout.data.eventData.event, msgin.data.eventData.event);
ASSERT_EQ(msgout.data.eventData.data1, msgin.data.eventData.data1);
ASSERT_EQ(msgout.data.eventData.data2, msgin.data.eventData.data2);
}
// set component role
TEST_F(ComponentHidlTest, SetRole) {
description("Test Set Component Role");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
status = setRole(omxNode, gEnv->getRole().c_str());
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
@@ -580,6 +623,7 @@ TEST_F(ComponentHidlTest, SetRole) {
// port indices enumeration
TEST_F(ComponentHidlTest, GetPortIndices) {
description("Test Component on Mandatory Port Parameters (Port Indices)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
OMX_PORT_PARAM_TYPE params;
@@ -602,6 +646,7 @@ TEST_F(ComponentHidlTest, GetPortIndices) {
// port format enumeration
TEST_F(ComponentHidlTest, EnumeratePortFormat) {
description("Test Component on Mandatory Port Parameters (Port Format)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
@@ -662,6 +707,7 @@ TEST_F(ComponentHidlTest, EnumeratePortFormat) {
TEST_F(ComponentHidlTest, SetDefaultPortParams) {
description(
"Test Component on Mandatory Port Parameters (Port Definition)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
@@ -788,6 +834,7 @@ TEST_F(ComponentHidlTest, SetDefaultPortParams) {
// populate port test
TEST_F(ComponentHidlTest, PopulatePort) {
description("Verify bPopulated field of a component port");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
OMX_U32 portBase = 0;
@@ -857,6 +904,7 @@ TEST_F(ComponentHidlTest, PopulatePort) {
// Flush test
TEST_F(ComponentHidlTest, Flush) {
description("Test Flush");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
Message msg;
@@ -906,6 +954,7 @@ TEST_F(ComponentHidlTest, Flush) {
// state transitions test
TEST_F(ComponentHidlTest, StateTransitions) {
description("Test State Transitions Loaded<->Idle<->Execute");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
Message msg;
@@ -953,6 +1002,7 @@ TEST_F(ComponentHidlTest, StateTransitions) {
// state transitions test - monkeying
TEST_F(ComponentHidlTest, StateTransitions_M) {
description("Test State Transitions monkeying");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
Message msg;
@@ -1016,6 +1066,7 @@ TEST_F(ComponentHidlTest, StateTransitions_M) {
// port enable disable test
TEST_F(ComponentHidlTest, PortEnableDisable_Loaded) {
description("Test Port Enable and Disable (Component State :: Loaded)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
OMX_U32 portBase = 0;
Message msg;
@@ -1053,7 +1104,7 @@ TEST_F(ComponentHidlTest, PortEnableDisable_Loaded) {
ASSERT_EQ(msg.data.eventData.data1, OMX_CommandPortEnable);
ASSERT_EQ(msg.data.eventData.data2, i);
} else if (msg.data.eventData.event == OMX_EventError) {
ALOGI("Port %d Disabling failed with error %d", (int)i,
ALOGE("Port %d Disabling failed with error %d", (int)i,
(int)msg.data.eventData.event);
} else {
// something unexpected happened
@@ -1065,6 +1116,7 @@ TEST_F(ComponentHidlTest, PortEnableDisable_Loaded) {
// port enable disable test
TEST_F(ComponentHidlTest, PortEnableDisable_Idle) {
description("Test Port Enable and Disable (Component State :: Idle)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
OMX_U32 portBase = 0;
@@ -1104,7 +1156,7 @@ TEST_F(ComponentHidlTest, PortEnableDisable_Idle) {
// do not disable the port until all the buffers are freed
ASSERT_TRUE(false);
} else if (msg.data.eventData.event == OMX_EventError) {
ALOGI("Port %d Disabling failed with error %d", (int)i,
ALOGE("Port %d Disabling failed with error %d", (int)i,
(int)msg.data.eventData.event);
} else {
// something unexpected happened
@@ -1159,6 +1211,7 @@ TEST_F(ComponentHidlTest, PortEnableDisable_Idle) {
// port enable disable test
TEST_F(ComponentHidlTest, PortEnableDisable_Execute) {
description("Test Port Enable and Disable (Component State :: Execute)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
OMX_U32 portBase = 0;
@@ -1206,7 +1259,7 @@ TEST_F(ComponentHidlTest, PortEnableDisable_Execute) {
// do not disable the port until all the buffers are freed
ASSERT_TRUE(false);
} else if (msg.data.eventData.event == OMX_EventError) {
ALOGI("Port %d Disabling failed with error %d", (int)i,
ALOGE("Port %d Disabling failed with error %d", (int)i,
(int)msg.data.eventData.event);
} else {
// something unexpected happened
@@ -1268,6 +1321,7 @@ TEST_F(ComponentHidlTest, PortEnableDisable_Execute) {
TEST_F(ComponentHidlTest, PortEnableDisable_M) {
description(
"Test Port Enable and Disable Monkeying (Component State :: Loaded)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
OMX_U32 portBase = 0;
Message msg;
@@ -1308,7 +1362,7 @@ TEST_F(ComponentHidlTest, PortEnableDisable_M) {
msg.data.eventData.data2 != portBase + 1)
EXPECT_TRUE(false);
} else if (msg.data.eventData.event == OMX_EventError) {
ALOGI("Port %d Disabling failed with error %d", (int)i,
ALOGE("Port %d Disabling failed with error %d", (int)i,
(int)msg.data.eventData.event);
} else {
// something unexpected happened
@@ -1330,7 +1384,7 @@ TEST_F(ComponentHidlTest, PortEnableDisable_M) {
msg.data.eventData.data2 != portBase + 1)
EXPECT_TRUE(false);
} else if (msg.data.eventData.event == OMX_EventError) {
ALOGI("Port %d Enabling failed with error %d", (int)i,
ALOGE("Port %d Enabling failed with error %d", (int)i,
(int)msg.data.eventData.event);
} else {
// something unexpected happened

View File

@@ -17,12 +17,14 @@
#define LOG_TAG "media_omx_hidl_master_test"
#include <android-base/logging.h>
#include <VtsHalHidlTargetTestBase.h>
#include <android/hardware/media/omx/1.0/IOmx.h>
#include <android/hardware/media/omx/1.0/IOmxStore.h>
#include <android/hardware/media/omx/1.0/types.h>
#include <getopt.h>
#include <log/log.h>
#include <VtsHalHidlTargetTestBase.h>
using ::android::hardware::media::omx::V1_0::IOmxStore;
using ::android::hardware::media::omx::V1_0::IOmx;
using ::android::hardware::Return;
using ::android::hardware::Void;
@@ -83,18 +85,76 @@ static ComponentTestEnvironment* gEnv = nullptr;
class MasterHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
omx = ::testing::VtsHalHidlTargetTestBase::getService<IOmx>(
gEnv->getInstance());
omxStore = nullptr;
omxStore = ::testing::VtsHalHidlTargetTestBase::getService<IOmxStore>();
ASSERT_NE(omxStore, nullptr);
omx = nullptr;
omx = omxStore->getOmx(gEnv->getInstance());
ASSERT_NE(omx, nullptr);
}
virtual void TearDown() override {}
sp<IOmxStore> omxStore;
sp<IOmx> omx;
protected:
static void description(const std::string& description) {
RecordProperty("description", description);
}
};
// enumerate list of components and roles
void displayComponentInfo(hidl_vec<IOmx::ComponentInfo>& nodeList) {
for (size_t i = 0; i < nodeList.size(); i++) {
printf("%s | ", nodeList[i].mName.c_str());
for (size_t j = 0; j < ((nodeList[i]).mRoles).size(); j++) {
printf("%s ", nodeList[i].mRoles[j].c_str());
}
printf("\n");
}
}
// list service attributes
TEST_F(MasterHidlTest, ListServiceAttr) {
description("list service attributes");
android::hardware::media::omx::V1_0::Status status;
hidl_vec<IOmxStore::Attribute> attributes;
EXPECT_TRUE(omxStore
->listServiceAttributes([&status, &attributes](
android::hardware::media::omx::V1_0::Status _s,
hidl_vec<IOmxStore::Attribute> const& _nl) {
status = _s;
attributes = _nl;
})
.isOk());
if (attributes.size() == 0)
std::cerr << "[ ] Warning ! Attribute list empty \n";
}
// get node prefix
TEST_F(MasterHidlTest, getNodePrefix) {
description("get node prefix");
hidl_string prefix;
omxStore->getNodePrefix(
[&prefix](hidl_string const& _nl) { prefix = _nl; });
if (prefix.empty())
std::cerr << "[ ] Warning ! Node Prefix empty \n";
}
// list roles
TEST_F(MasterHidlTest, ListRoles) {
description("list roles");
hidl_vec<IOmxStore::RoleInfo> roleList;
omxStore->listRoles([&roleList](hidl_vec<IOmxStore::RoleInfo> const& _nl) {
roleList = _nl;
});
if (roleList.size() == 0)
std::cerr << "[ ] Warning ! RoleInfo list empty \n";
}
// list components and roles
TEST_F(MasterHidlTest, ListNodes) {
description("enumerate component and roles");
android::hardware::media::omx::V1_0::Status status;
hidl_vec<IOmx::ComponentInfo> nodeList;
EXPECT_TRUE(
@@ -105,13 +165,10 @@ TEST_F(MasterHidlTest, ListNodes) {
nodeList = _nl;
})
.isOk());
for (size_t i = 0; i < nodeList.size(); i++) {
printf("%s", nodeList[i].mName.c_str());
for (size_t j = 0; j < ((nodeList[i]).mRoles).size(); j++) {
printf("\t %s", nodeList[i].mRoles[j].c_str());
}
printf("\n");
}
if (nodeList.size() == 0)
std::cerr << "[ ] Warning ! ComponentInfo list empty \n";
else
displayComponentInfo(nodeList);
}
int main(int argc, char** argv) {

View File

@@ -130,6 +130,7 @@ static ComponentTestEnvironment* gEnv = nullptr;
class VideoDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
disableTest = false;
android::hardware::media::omx::V1_0::Status status;
omx = ::testing::VtsHalHidlTargetTestBase::getService<IOmx>(
gEnv->getInstance());
@@ -137,8 +138,8 @@ class VideoDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
observer =
new CodecObserver([this](Message msg) { handleMessage(msg); });
ASSERT_NE(observer, nullptr);
ASSERT_EQ(strncmp(gEnv->getComponent().c_str(), "OMX.", 4), 0)
<< "Invalid Component Name";
if (strncmp(gEnv->getComponent().c_str(), "OMX.", 4) != 0)
disableTest = true;
EXPECT_TRUE(omx->allocateNode(
gEnv->getComponent(), observer,
[&](android::hardware::media::omx::V1_0::Status _s,
@@ -171,7 +172,7 @@ class VideoDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
break;
}
}
ASSERT_NE(compName, unknown_comp);
if (compName == unknown_comp) disableTest = true;
struct CompToCompression {
standardComp CompName;
OMX_VIDEO_CODINGTYPE eCompressionFormat;
@@ -191,11 +192,12 @@ class VideoDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
break;
}
}
ASSERT_NE(i, kNumCompToCompression);
if (i == kNumCompToCompression) disableTest = true;
eosFlag = false;
framesReceived = 0;
timestampUs = 0;
timestampDevTest = false;
if (disableTest) std::cerr << "[ ] Warning ! Test Disabled\n";
}
virtual void TearDown() override {
@@ -266,6 +268,7 @@ class VideoDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
sp<IOmxNode> omxNode;
standardComp compName;
OMX_VIDEO_CODINGTYPE eCompressionFormat;
bool disableTest;
bool eosFlag;
uint32_t framesReceived;
uint64_t timestampUs;
@@ -600,6 +603,7 @@ void decodeNFrames(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
// set component role
TEST_F(VideoDecHidlTest, SetRole) {
description("Test Set Component Role");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
status = setRole(omxNode, gEnv->getRole().c_str());
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
@@ -608,6 +612,7 @@ TEST_F(VideoDecHidlTest, SetRole) {
// port format enumeration
TEST_F(VideoDecHidlTest, EnumeratePortFormat) {
description("Test Component on Mandatory Port Parameters (Port Format)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
OMX_COLOR_FORMATTYPE eColorFormat = OMX_COLOR_FormatYUV420Planar;
@@ -634,6 +639,7 @@ TEST_F(VideoDecHidlTest, EnumeratePortFormat) {
// deviation
TEST_F(VideoDecHidlTest, DecodeTest) {
description("Tests Port Reconfiguration, Decode and timestamp deviation");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
@@ -702,8 +708,57 @@ TEST_F(VideoDecHidlTest, DecodeTest) {
}
// end of sequence test
TEST_F(VideoDecHidlTest, EOSTest) {
description("Test End of stream");
TEST_F(VideoDecHidlTest, EOSTest_M) {
description("Test End of stream monkeying");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
OMX_PORT_PARAM_TYPE params;
status = getParam(omxNode, OMX_IndexParamVideoInit, &params);
if (status == ::android::hardware::media::omx::V1_0::Status::OK) {
ASSERT_EQ(params.nPorts, 2U);
kPortIndexInput = params.nStartPortNumber;
kPortIndexOutput = kPortIndexInput + 1;
}
// set Port Params
uint32_t nFrameWidth, nFrameHeight, xFramerate;
OMX_COLOR_FORMATTYPE eColorFormat = OMX_COLOR_FormatYUV420Planar;
getInputChannelInfo(omxNode, kPortIndexInput, &nFrameWidth, &nFrameHeight,
&xFramerate);
setDefaultPortParam(omxNode, kPortIndexOutput, OMX_VIDEO_CodingUnused,
eColorFormat, nFrameWidth, nFrameHeight, 0, xFramerate);
omxNode->prepareForAdaptivePlayback(kPortIndexOutput, false, 1920, 1080);
android::Vector<BufferInfo> iBuffer, oBuffer;
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
kPortIndexInput, kPortIndexOutput);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
// request EOS at the start
testEOS(&iBuffer, &oBuffer, true);
flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
kPortIndexOutput);
EXPECT_GE(framesReceived, 0U);
framesReceived = 0;
timestampUs = 0;
// set state to idle
changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
// set state to executing
changeStateIdletoLoaded(omxNode, observer, &iBuffer, &oBuffer,
kPortIndexInput, kPortIndexOutput);
}
// end of sequence test
TEST_F(VideoDecHidlTest, ThumbnailTest) {
description("Test Request for thumbnail");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
@@ -743,6 +798,7 @@ TEST_F(VideoDecHidlTest, EOSTest) {
&xFramerate);
setDefaultPortParam(omxNode, kPortIndexOutput, OMX_VIDEO_CodingUnused,
eColorFormat, nFrameWidth, nFrameHeight, 0, xFramerate);
omxNode->prepareForAdaptivePlayback(kPortIndexOutput, false, 1920, 1080);
android::Vector<BufferInfo> iBuffer, oBuffer;
@@ -752,14 +808,6 @@ TEST_F(VideoDecHidlTest, EOSTest) {
// set state to executing
changeStateIdletoExecute(omxNode, observer);
// request EOS at the start
testEOS(&iBuffer, &oBuffer, true);
flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
kPortIndexOutput);
EXPECT_GE(framesReceived, 0U);
framesReceived = 0;
timestampUs = 0;
// request EOS for thumbnail
size_t i = 0;
while (!(Info[i].flags & OMX_BUFFERFLAG_SYNCFRAME)) i++;
@@ -791,6 +839,66 @@ TEST_F(VideoDecHidlTest, EOSTest) {
framesReceived = 0;
timestampUs = 0;
// set state to idle
changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
// set state to executing
changeStateIdletoLoaded(omxNode, observer, &iBuffer, &oBuffer,
kPortIndexInput, kPortIndexOutput);
}
// end of sequence test
TEST_F(VideoDecHidlTest, SimpleEOSTest) {
description("Test End of stream");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
OMX_PORT_PARAM_TYPE params;
status = getParam(omxNode, OMX_IndexParamVideoInit, &params);
if (status == ::android::hardware::media::omx::V1_0::Status::OK) {
ASSERT_EQ(params.nPorts, 2U);
kPortIndexInput = params.nStartPortNumber;
kPortIndexOutput = kPortIndexInput + 1;
}
char mURL[512], info[512];
strcpy(mURL, gEnv->getRes().c_str());
strcpy(info, gEnv->getRes().c_str());
GetURLForComponent(compName, mURL, info);
std::ifstream eleStream, eleInfo;
eleInfo.open(info);
ASSERT_EQ(eleInfo.is_open(), true);
android::Vector<FrameData> Info;
int bytesCount = 0;
uint32_t flags = 0;
uint32_t timestamp = 0;
while (1) {
if (!(eleInfo >> bytesCount)) break;
eleInfo >> flags;
eleInfo >> timestamp;
Info.push_back({bytesCount, flags, timestamp});
}
eleInfo.close();
// set Port Params
uint32_t nFrameWidth, nFrameHeight, xFramerate;
OMX_COLOR_FORMATTYPE eColorFormat = OMX_COLOR_FormatYUV420Planar;
getInputChannelInfo(omxNode, kPortIndexInput, &nFrameWidth, &nFrameHeight,
&xFramerate);
setDefaultPortParam(omxNode, kPortIndexOutput, OMX_VIDEO_CodingUnused,
eColorFormat, nFrameWidth, nFrameHeight, 0, xFramerate);
omxNode->prepareForAdaptivePlayback(kPortIndexOutput, false, 1920, 1080);
android::Vector<BufferInfo> iBuffer, oBuffer;
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
kPortIndexInput, kPortIndexOutput);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
// request EOS at the end
eleStream.open(mURL, std::ifstream::binary);
ASSERT_EQ(eleStream.is_open(), true);
@@ -815,6 +923,7 @@ TEST_F(VideoDecHidlTest, EOSTest) {
// test input/output port flush
TEST_F(VideoDecHidlTest, FlushTest) {
description("Test Flush");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());

View File

@@ -15,6 +15,10 @@
*/
#define LOG_TAG "media_omx_hidl_video_enc_test"
#ifdef __LP64__
#define OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS
#endif
#include <android-base/logging.h>
#include <android/hardware/media/omx/1.0/IOmx.h>
@@ -41,6 +45,7 @@ using ::android::sp;
#include <VtsHalHidlTargetTestBase.h>
#include <getopt.h>
#include <media/hardware/HardwareAPI.h>
#include <media_hidl_test_common.h>
#include <media_video_hidl_test_common.h>
#include <fstream>
@@ -130,14 +135,15 @@ static ComponentTestEnvironment* gEnv = nullptr;
class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
disableTest = false;
android::hardware::media::omx::V1_0::Status status;
omx = ::testing::VtsHalHidlTargetTestBase::getService<IOmx>(
gEnv->getInstance());
ASSERT_NE(omx, nullptr);
observer = new CodecObserver([this](Message msg) { (void)msg; });
ASSERT_NE(observer, nullptr);
ASSERT_EQ(strncmp(gEnv->getComponent().c_str(), "OMX.", 4), 0)
<< "Invalid Component Name";
if (strncmp(gEnv->getComponent().c_str(), "OMX.", 4) != 0)
disableTest = true;
EXPECT_TRUE(omx->allocateNode(
gEnv->getComponent(), observer,
[&](android::hardware::media::omx::V1_0::Status _s,
@@ -153,7 +159,7 @@ class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
standardComp CompName;
};
const StringToName kStringToName[] = {
{"h263", h263}, {"avc", avc}, {"mpeg2", mpeg2}, {"mpeg4", mpeg4},
{"h263", h263}, {"avc", avc}, {"mpeg4", mpeg4},
{"hevc", hevc}, {"vp8", vp8}, {"vp9", vp9},
};
const size_t kNumStringToName =
@@ -170,16 +176,15 @@ class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
break;
}
}
ASSERT_NE(compName, unknown_comp);
if (compName == unknown_comp) disableTest = true;
struct CompToCompression {
standardComp CompName;
OMX_VIDEO_CODINGTYPE eCompressionFormat;
};
static const CompToCompression kCompToCompression[] = {
{h263, OMX_VIDEO_CodingH263}, {avc, OMX_VIDEO_CodingAVC},
{mpeg2, OMX_VIDEO_CodingMPEG2}, {mpeg4, OMX_VIDEO_CodingMPEG4},
{hevc, OMX_VIDEO_CodingHEVC}, {vp8, OMX_VIDEO_CodingVP8},
{vp9, OMX_VIDEO_CodingVP9},
{mpeg4, OMX_VIDEO_CodingMPEG4}, {hevc, OMX_VIDEO_CodingHEVC},
{vp8, OMX_VIDEO_CodingVP8}, {vp9, OMX_VIDEO_CodingVP9},
};
static const size_t kNumCompToCompression =
sizeof(kCompToCompression) / sizeof(kCompToCompression[0]);
@@ -190,7 +195,8 @@ class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
break;
}
}
ASSERT_NE(i, kNumCompToCompression);
if (i == kNumCompToCompression) disableTest = true;
if (disableTest) std::cerr << "[ ] Warning ! Test Disabled\n";
}
virtual void TearDown() override {
@@ -203,7 +209,6 @@ class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
enum standardComp {
h263,
avc,
mpeg2,
mpeg4,
hevc,
vp8,
@@ -216,6 +221,7 @@ class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
sp<IOmxNode> omxNode;
standardComp compName;
OMX_VIDEO_CODINGTYPE eCompressionFormat;
bool disableTest;
protected:
static void description(const std::string& description) {
@@ -223,6 +229,80 @@ class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
}
};
// request VOP refresh
void requestIDR(sp<IOmxNode> omxNode, OMX_U32 portIndex) {
android::hardware::media::omx::V1_0::Status status;
OMX_CONFIG_INTRAREFRESHVOPTYPE param;
param.IntraRefreshVOP = OMX_TRUE;
status = setPortConfig(omxNode, OMX_IndexConfigVideoIntraVOPRefresh,
portIndex, &param);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
std::cerr << "[ ] Warning ! unable to request IDR \n";
}
// modify bitrate
void changeBitrate(sp<IOmxNode> omxNode, OMX_U32 portIndex, uint32_t nBitrate) {
android::hardware::media::omx::V1_0::Status status;
OMX_VIDEO_CONFIG_BITRATETYPE param;
param.nEncodeBitrate = nBitrate;
status =
setPortConfig(omxNode, OMX_IndexConfigVideoBitrate, portIndex, &param);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
std::cerr << "[ ] Warning ! unable to change Bitrate \n";
}
// modify framerate
Return<android::hardware::media::omx::V1_0::Status> changeFrameRate(
sp<IOmxNode> omxNode, OMX_U32 portIndex, uint32_t xFramerate) {
android::hardware::media::omx::V1_0::Status status;
OMX_CONFIG_FRAMERATETYPE param;
param.xEncodeFramerate = xFramerate;
status = setPortConfig(omxNode, OMX_IndexConfigVideoFramerate, portIndex,
&param);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
std::cerr << "[ ] Warning ! unable to change Framerate \n";
return status;
}
// modify intra refresh interval
void changeRefreshPeriod(sp<IOmxNode> omxNode, OMX_U32 portIndex,
uint32_t nRefreshPeriod) {
android::hardware::media::omx::V1_0::Status status;
OMX_VIDEO_CONFIG_ANDROID_INTRAREFRESHTYPE param;
param.nRefreshPeriod = nRefreshPeriod;
status = setPortConfig(omxNode,
(OMX_INDEXTYPE)OMX_IndexConfigAndroidIntraRefresh,
portIndex, &param);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
std::cerr << "[ ] Warning ! unable to change Refresh Period\n";
}
// set intra refresh interval
void setRefreshPeriod(sp<IOmxNode> omxNode, OMX_U32 portIndex,
uint32_t nRefreshPeriod) {
android::hardware::media::omx::V1_0::Status status;
OMX_VIDEO_PARAM_INTRAREFRESHTYPE param;
param.eRefreshMode = OMX_VIDEO_IntraRefreshCyclic;
param.nCirMBs = 0;
if (nRefreshPeriod == 0)
param.nCirMBs = 0;
else {
OMX_PARAM_PORTDEFINITIONTYPE portDef;
status = getPortParam(omxNode, OMX_IndexParamPortDefinition, portIndex,
&portDef);
if (status == ::android::hardware::media::omx::V1_0::Status::OK) {
param.nCirMBs =
((portDef.format.video.nFrameWidth + 15) >>
4 * (portDef.format.video.nFrameHeight + 15) >> 4) /
nRefreshPeriod;
}
}
status = setPortParam(omxNode, OMX_IndexParamVideoIntraRefresh, portIndex,
&param);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
std::cerr << "[ ] Warning ! unable to set Refresh Period \n";
}
// Set Default port param.
void setDefaultPortParam(sp<IOmxNode> omxNode, OMX_U32 portIndex,
OMX_VIDEO_CODINGTYPE eCompressionFormat,
@@ -241,10 +321,49 @@ void setDefaultPortParam(sp<IOmxNode> omxNode, OMX_U32 portIndex,
&portDef);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
std::vector<int32_t> arrProfile;
std::vector<int32_t> arrLevel;
enumerateProfileAndLevel(omxNode, portIndex, &arrProfile, &arrLevel);
if (arrProfile.empty() == true || arrLevel.empty() == true)
ASSERT_TRUE(false);
int32_t profile = arrProfile[0];
int32_t level = arrLevel[0];
switch ((int)eCompressionFormat) {
case OMX_VIDEO_CodingAVC:
setupAVCPort(omxNode, portIndex, OMX_VIDEO_AVCProfileBaseline,
OMX_VIDEO_AVCLevel31, xFramerate);
setupAVCPort(omxNode, portIndex,
static_cast<OMX_VIDEO_AVCPROFILETYPE>(profile),
static_cast<OMX_VIDEO_AVCLEVELTYPE>(level),
xFramerate);
break;
case OMX_VIDEO_CodingHEVC:
setupHEVCPort(omxNode, portIndex,
static_cast<OMX_VIDEO_HEVCPROFILETYPE>(profile),
static_cast<OMX_VIDEO_HEVCLEVELTYPE>(level));
break;
case OMX_VIDEO_CodingH263:
setupH263Port(omxNode, portIndex,
static_cast<OMX_VIDEO_H263PROFILETYPE>(profile),
static_cast<OMX_VIDEO_H263LEVELTYPE>(level),
xFramerate);
break;
case OMX_VIDEO_CodingMPEG4:
setupMPEG4Port(omxNode, portIndex,
static_cast<OMX_VIDEO_MPEG4PROFILETYPE>(profile),
static_cast<OMX_VIDEO_MPEG4LEVELTYPE>(level),
xFramerate);
break;
case OMX_VIDEO_CodingVP8:
setupVPXPort(omxNode, portIndex, xFramerate);
setupVP8Port(omxNode, portIndex,
static_cast<OMX_VIDEO_VP8PROFILETYPE>(profile),
static_cast<OMX_VIDEO_VP8LEVELTYPE>(level));
break;
case OMX_VIDEO_CodingVP9:
setupVPXPort(omxNode, portIndex, xFramerate);
setupVP9Port(omxNode, portIndex,
static_cast<OMX_VIDEO_VP9PROFILETYPE>(profile),
static_cast<OMX_VIDEO_VP9LEVELTYPE>(level));
break;
default:
break;
@@ -252,32 +371,27 @@ void setDefaultPortParam(sp<IOmxNode> omxNode, OMX_U32 portIndex,
}
// LookUpTable of clips and metadata for component testing
void GetURLForComponent(VideoEncHidlTest::standardComp comp, char* mURL) {
struct CompToURL {
VideoEncHidlTest::standardComp comp;
const char* mURL;
};
static const CompToURL kCompToURL[] = {
{VideoEncHidlTest::standardComp::avc,
"bbb_480x360_420p_30fps_32frames.yuv"},
};
for (size_t i = 0; i < sizeof(kCompToURL) / sizeof(kCompToURL[0]); ++i) {
if (kCompToURL[i].comp == comp) {
strcat(mURL, kCompToURL[i].mURL);
return;
}
}
void GetURLForComponent(char* URL) {
strcat(URL, "bbb_352x288_420p_30fps_32frames.yuv");
}
// Encode N Frames
void encodeNFrames(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
OMX_U32 portIndexOutput,
android::Vector<BufferInfo>* iBuffer,
android::Vector<BufferInfo>* oBuffer, uint32_t nFrames,
uint32_t xFramerate, int bytesCount,
std::ifstream& eleStream) {
android::hardware::media::omx::V1_0::Status status;
Message msg;
uint32_t ipCount = 0;
if (ipCount == 0) {
status = changeFrameRate(omxNode, portIndexOutput, (24U << 16));
if (status == ::android::hardware::media::omx::V1_0::Status::OK)
xFramerate = (24U << 16);
}
// dispatch output buffers
for (size_t i = 0; i < oBuffer->size(); i++) {
dispatchOutputBuffer(omxNode, oBuffer, i);
@@ -295,14 +409,23 @@ void encodeNFrames(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
dispatchInputBuffer(omxNode, iBuffer, i, bytesCount, 0, timestamp);
timestamp += timestampIncr;
nFrames--;
ipCount++;
}
while (1) {
status =
observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
if (status == android::hardware::media::omx::V1_0::Status::OK)
ASSERT_TRUE(false);
if (status == android::hardware::media::omx::V1_0::Status::OK) {
ASSERT_EQ(msg.type, Message::Type::EVENT);
if (msg.data.eventData.event == OMX_EventPortSettingsChanged) {
ASSERT_EQ(msg.data.eventData.data1, portIndexOutput);
ASSERT_EQ(msg.data.eventData.data2,
OMX_IndexConfigAndroidIntraRefresh);
} else {
ASSERT_TRUE(false);
}
}
if (nFrames == 0) break;
@@ -319,16 +442,23 @@ void encodeNFrames(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
timestamp);
timestamp += timestampIncr;
nFrames--;
ipCount++;
}
if ((index = getEmptyBufferID(oBuffer)) < oBuffer->size()) {
dispatchOutputBuffer(omxNode, oBuffer, index);
}
if (ipCount == 15) {
changeBitrate(omxNode, portIndexOutput, 768000);
requestIDR(omxNode, portIndexOutput);
changeRefreshPeriod(omxNode, portIndexOutput, 15);
}
}
}
// set component role
TEST_F(VideoEncHidlTest, SetRole) {
description("Test Set Component Role");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
status = setRole(omxNode, gEnv->getRole().c_str());
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
@@ -337,6 +467,7 @@ TEST_F(VideoEncHidlTest, SetRole) {
// port format enumeration
TEST_F(VideoEncHidlTest, EnumeratePortFormat) {
description("Test Component on Mandatory Port Parameters (Port Format)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
OMX_COLOR_FORMATTYPE eColorFormat = OMX_COLOR_FormatYUV420Planar;
@@ -363,6 +494,7 @@ TEST_F(VideoEncHidlTest, EnumeratePortFormat) {
// test raw stream encode
TEST_F(VideoEncHidlTest, EncodeTest) {
description("Test Encode");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
status = setRole(omxNode, gEnv->getRole().c_str());
@@ -376,23 +508,40 @@ TEST_F(VideoEncHidlTest, EncodeTest) {
}
char mURL[512];
strcpy(mURL, gEnv->getRes().c_str());
GetURLForComponent(compName, mURL);
GetURLForComponent(mURL);
std::ifstream eleStream;
eleStream.open(mURL, std::ifstream::binary);
ASSERT_EQ(eleStream.is_open(), true);
// Configure input port
uint32_t nFrameWidth = 480;
uint32_t nFrameHeight = 360;
uint32_t nFrameWidth = 352;
uint32_t nFrameHeight = 288;
uint32_t xFramerate = (30U << 16);
OMX_COLOR_FORMATTYPE eColorFormat = OMX_COLOR_FormatYUV420Planar;
setupRAWPort(omxNode, kPortIndexInput, nFrameWidth, nFrameHeight, 0,
xFramerate, eColorFormat);
// Configure output port
uint32_t nBitRate = 768000;
uint32_t nBitRate = 512000;
setDefaultPortParam(omxNode, kPortIndexOutput, eCompressionFormat, nBitRate,
xFramerate);
setRefreshPeriod(omxNode, kPortIndexOutput, 0);
unsigned int index;
omxNode->getExtensionIndex(
"OMX.google.android.index.prependSPSPPSToIDRFrames",
[&status, &index](android::hardware::media::omx::V1_0::Status _s,
unsigned int _nl) {
status = _s;
index = _nl;
});
if (status == ::android::hardware::media::omx::V1_0::Status::OK) {
android::PrependSPSPPSToIDRFramesParams param;
param.bEnable = OMX_TRUE;
status = setParam(omxNode, static_cast<OMX_INDEXTYPE>(index), &param);
}
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
std::cerr
<< "[ ] Warning ! unable to prependSPSPPSToIDRFrames\n";
android::Vector<BufferInfo> iBuffer, oBuffer;
@@ -402,8 +551,8 @@ TEST_F(VideoEncHidlTest, EncodeTest) {
// set state to executing
changeStateIdletoExecute(omxNode, observer);
encodeNFrames(omxNode, observer, &iBuffer, &oBuffer, 1024, xFramerate,
(nFrameWidth * nFrameHeight * 3) >> 1, eleStream);
encodeNFrames(omxNode, observer, kPortIndexOutput, &iBuffer, &oBuffer, 1024,
xFramerate, (nFrameWidth * nFrameHeight * 3) >> 1, eleStream);
// set state to idle
changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
// set state to executing

View File

@@ -353,7 +353,7 @@ Return<android::hardware::media::omx::V1_0::Status> setVideoPortFormat(
}
}
if (index == arrColorFormat.size()) {
ALOGI("setting default color format");
ALOGE("setting default color format %x", (int)arrColorFormat[0]);
portFormat.eColorFormat = arrColorFormat[0];
}
portFormat.eCompressionFormat = OMX_VIDEO_CodingUnused;
@@ -365,7 +365,8 @@ Return<android::hardware::media::omx::V1_0::Status> setVideoPortFormat(
}
}
if (index == arrCompressionFormat.size()) {
ALOGI("setting default compression format");
ALOGE("setting default compression format %x",
(int)arrCompressionFormat[0]);
portFormat.eCompressionFormat = arrCompressionFormat[0];
}
portFormat.eColorFormat = OMX_COLOR_FormatUnused;
@@ -384,6 +385,31 @@ Return<android::hardware::media::omx::V1_0::Status> setRole(
return setParam(omxNode, OMX_IndexParamStandardComponentRole, &params);
}
void enumerateProfileAndLevel(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile,
std::vector<int32_t>* arrLevel) {
android::hardware::media::omx::V1_0::Status status;
OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
param.nProfileIndex = 0;
arrProfile->clear();
arrLevel->clear();
while (1) {
status =
getPortParam(omxNode, OMX_IndexParamVideoProfileLevelQuerySupported,
portIndex, &param);
if (status != ::android::hardware::media::omx::V1_0::Status::OK) break;
arrProfile->push_back(static_cast<int32_t>(param.eProfile));
arrLevel->push_back(static_cast<int32_t>(param.eLevel));
param.nProfileIndex++;
if (param.nProfileIndex == 512) {
// enumerated way too many, highly unusual for this to happen.
EXPECT_LE(param.nProfileIndex, 512U)
<< "Expecting OMX_ErrorNoMore but not received";
break;
}
}
}
void setupRAWPort(sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_U32 nFrameWidth,
OMX_U32 nFrameHeight, OMX_U32 nBitrate, OMX_U32 xFramerate,
OMX_COLOR_FORMATTYPE eColorFormat) {
@@ -449,3 +475,115 @@ void setupHEVCPort(sp<IOmxNode> omxNode, OMX_U32 portIndex,
portIndex, &param);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
}
void setupMPEG4Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
OMX_VIDEO_MPEG4PROFILETYPE eProfile,
OMX_VIDEO_MPEG4LEVELTYPE eLevel, OMX_U32 xFramerate) {
android::hardware::media::omx::V1_0::Status status;
OMX_VIDEO_PARAM_MPEG4TYPE param;
(void)xFramerate; // necessary for intra frame spacing
status = getPortParam(omxNode, OMX_IndexParamVideoMpeg4, portIndex, &param);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
param.nSliceHeaderSpacing = 0;
param.bSVH = OMX_FALSE;
param.bGov = OMX_FALSE;
param.nPFrames = 0xFFFFFFFE;
param.nBFrames = 0;
param.nIDCVLCThreshold = 0;
param.bACPred = OMX_TRUE;
param.nMaxPacketSize = 256;
param.eProfile = eProfile;
param.eLevel = eLevel;
param.nAllowedPictureTypes =
OMX_VIDEO_PictureTypeI | OMX_VIDEO_PictureTypeP;
param.nHeaderExtension = 0;
param.bReversibleVLC = OMX_FALSE;
status = setPortParam(omxNode, OMX_IndexParamVideoMpeg4, portIndex, &param);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
}
void setupH263Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
OMX_VIDEO_H263PROFILETYPE eProfile,
OMX_VIDEO_H263LEVELTYPE eLevel, OMX_U32 xFramerate) {
android::hardware::media::omx::V1_0::Status status;
OMX_VIDEO_PARAM_H263TYPE param;
(void)xFramerate; // necessary for intra frame spacing
status = getPortParam(omxNode, OMX_IndexParamVideoH263, portIndex, &param);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
param.nPFrames = 0xFFFFFFFE;
param.nBFrames = 0;
param.eProfile = eProfile;
param.eLevel = eLevel;
param.nAllowedPictureTypes =
OMX_VIDEO_PictureTypeI | OMX_VIDEO_PictureTypeP;
param.bPLUSPTYPEAllowed = OMX_FALSE;
param.bForceRoundingTypeToZero = OMX_FALSE;
param.nPictureHeaderRepetition = 0;
param.nGOBHeaderInterval = 0;
status = setPortParam(omxNode, OMX_IndexParamVideoH263, portIndex, &param);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
}
void setupVPXPort(sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_U32 xFramerate) {
android::hardware::media::omx::V1_0::Status status;
OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE param;
(void)xFramerate; // necessary for intra frame spacing
status = getPortParam(omxNode,
(OMX_INDEXTYPE)OMX_IndexParamVideoAndroidVp8Encoder,
portIndex, &param);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
param.nKeyFrameInterval = 0xFFFFFFFE;
param.eTemporalPattern = OMX_VIDEO_VPXTemporalLayerPatternNone;
param.nMinQuantizer = 2;
param.nMaxQuantizer = 63;
status = setPortParam(omxNode,
(OMX_INDEXTYPE)OMX_IndexParamVideoAndroidVp8Encoder,
portIndex, &param);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
}
void setupVP8Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
OMX_VIDEO_VP8PROFILETYPE eProfile,
OMX_VIDEO_VP8LEVELTYPE eLevel) {
android::hardware::media::omx::V1_0::Status status;
OMX_VIDEO_PARAM_VP8TYPE param;
status = getPortParam(omxNode, (OMX_INDEXTYPE)OMX_IndexParamVideoVp8,
portIndex, &param);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
param.eProfile = eProfile;
param.eLevel = eLevel;
param.bErrorResilientMode = OMX_TRUE;
param.nDCTPartitions = 1;
status = setPortParam(omxNode, (OMX_INDEXTYPE)OMX_IndexParamVideoVp8,
portIndex, &param);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
}
void setupVP9Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
OMX_VIDEO_VP9PROFILETYPE eProfile,
OMX_VIDEO_VP9LEVELTYPE eLevel) {
android::hardware::media::omx::V1_0::Status status;
OMX_VIDEO_PARAM_VP9TYPE param;
status = getPortParam(omxNode, (OMX_INDEXTYPE)OMX_IndexParamVideoVp9,
portIndex, &param);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
param.eProfile = eProfile;
param.eLevel = eLevel;
param.bErrorResilientMode = OMX_TRUE;
param.nTileRows = 1;
param.nTileColumns = 1;
param.bEnableFrameParallelDecoding = OMX_TRUE;
status = setPortParam(omxNode, (OMX_INDEXTYPE)OMX_IndexParamVideoVp9,
portIndex, &param);
EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
}

View File

@@ -69,6 +69,10 @@ Return<android::hardware::media::omx::V1_0::Status> setVideoPortFormat(
Return<android::hardware::media::omx::V1_0::Status> setRole(
sp<IOmxNode> omxNode, const char* role);
void enumerateProfileAndLevel(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile,
std::vector<int32_t>* arrLevel);
void setupRAWPort(sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_U32 nFrameWidth,
OMX_U32 nFrameHeight, OMX_U32 nBitrate, OMX_U32 xFramerate,
OMX_COLOR_FORMATTYPE eColorFormat);
@@ -81,4 +85,22 @@ void setupHEVCPort(sp<IOmxNode> omxNode, OMX_U32 portIndex,
OMX_VIDEO_HEVCPROFILETYPE eProfile,
OMX_VIDEO_HEVCLEVELTYPE eLevel);
void setupMPEG4Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
OMX_VIDEO_MPEG4PROFILETYPE eProfile,
OMX_VIDEO_MPEG4LEVELTYPE eLevel, OMX_U32 xFramerate);
void setupH263Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
OMX_VIDEO_H263PROFILETYPE eProfile,
OMX_VIDEO_H263LEVELTYPE eLevel, OMX_U32 xFramerate);
void setupVPXPort(sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_U32 xFramerate);
void setupVP8Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
OMX_VIDEO_VP8PROFILETYPE eProfile,
OMX_VIDEO_VP8LEVELTYPE eLevel);
void setupVP9Port(sp<IOmxNode> omxNode, OMX_U32 portIndex,
OMX_VIDEO_VP9PROFILETYPE eProfile,
OMX_VIDEO_VP9LEVELTYPE eLevel);
#endif // MEDIA_VIDEO_HIDL_TEST_COMMON_H

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1,469 @@
5 128 0
5 128 0
337 32 0
322 32 21333
279 32 42666
280 32 64000
283 32 85333
317 32 106666
318 32 128000
321 32 149333
313 32 170666
312 32 192000
317 32 213333
330 32 234666
350 32 256000
355 32 277333
333 32 298666
325 32 320000
376 32 341333
335 32 362666
351 32 384000
350 32 405333
339 32 426666
329 32 448000
350 32 469333
330 32 490666
359 32 512000
316 32 533333
345 32 554666
357 32 576000
325 32 597333
336 32 618666
339 32 640000
312 32 661333
350 32 682666
338 32 704000
353 32 725333
340 32 746666
332 32 768000
340 32 789333
339 32 810666
333 32 832000
333 32 853333
345 32 874666
340 32 896000
343 32 917333
335 32 938666
339 32 960000
342 32 981333
348 32 1002666
350 32 1024000
351 32 1045333
342 32 1066666
366 32 1088000
340 32 1109333
354 32 1130666
340 32 1152000
334 32 1173333
338 32 1194666
340 32 1216000
351 32 1237333
346 32 1258666
331 32 1280000
321 32 1301333
343 32 1322666
342 32 1344000
345 32 1365333
326 32 1386666
342 32 1408000
356 32 1429333
351 32 1450666
343 32 1472000
347 32 1493333
349 32 1514666
350 32 1536000
330 32 1557333
341 32 1578666
340 32 1600000
330 32 1621333
340 32 1642666
335 32 1664000
344 32 1685333
359 32 1706666
337 32 1728000
346 32 1749333
330 32 1770666
351 32 1792000
355 32 1813333
352 32 1834666
325 32 1856000
342 32 1877333
327 32 1898666
349 32 1920000
326 32 1941333
337 32 1962666
378 32 1984000
321 32 2005333
319 32 2026666
346 32 2048000
352 32 2069333
349 32 2090666
331 32 2112000
330 32 2133333
329 32 2154666
333 32 2176000
367 32 2197333
362 32 2218666
337 32 2240000
337 32 2261333
360 32 2282666
333 32 2304000
317 32 2325333
344 32 2346666
335 32 2368000
337 32 2389333
349 32 2410666
336 32 2432000
348 32 2453333
349 32 2474666
342 32 2496000
359 32 2517333
340 32 2538666
340 32 2560000
348 32 2581333
334 32 2602666
328 32 2624000
341 32 2645333
339 32 2666666
337 32 2688000
350 32 2709333
326 32 2730666
360 32 2752000
344 32 2773333
340 32 2794666
343 32 2816000
361 32 2837333
329 32 2858666
345 32 2880000
345 32 2901333
330 32 2922666
342 32 2944000
344 32 2965333
330 32 2986666
329 32 3008000
335 32 3029333
366 32 3050666
328 32 3072000
349 32 3093333
339 32 3114666
340 32 3136000
335 32 3157333
327 32 3178666
348 32 3200000
339 32 3221333
334 32 3242666
350 32 3264000
325 32 3285333
361 32 3306666
338 32 3328000
350 32 3349333
353 32 3370666
327 32 3392000
346 32 3413333
348 32 3434666
339 32 3456000
342 32 3477333
334 32 3498666
350 32 3520000
354 32 3541333
363 32 3562666
322 32 3584000
337 32 3605333
355 32 3626666
329 32 3648000
324 32 3669333
338 32 3690666
356 32 3712000
330 32 3733333
321 32 3754666
337 32 3776000
345 32 3797333
335 32 3818666
348 32 3840000
342 32 3861333
348 32 3882666
335 32 3904000
344 32 3925333
357 32 3946666
368 32 3968000
324 32 3989333
343 32 4010666
341 32 4032000
329 32 4053333
356 32 4074666
317 32 4096000
351 32 4117333
340 32 4138666
340 32 4160000
332 32 4181333
355 32 4202666
357 32 4224000
327 32 4245333
338 32 4266666
323 32 4288000
346 32 4309333
352 32 4330666
347 32 4352000
343 32 4373333
311 32 4394666
338 32 4416000
365 32 4437333
349 32 4458666
327 32 4480000
355 32 4501333
319 32 4522666
349 32 4544000
351 32 4565333
337 32 4586666
340 32 4608000
349 32 4629333
316 32 4650666
344 32 4672000
334 32 4693333
344 32 4714666
347 32 4736000
348 32 4757333
334 32 4778666
338 32 4800000
331 32 4821333
344 32 4842666
342 32 4864000
336 32 4885333
326 32 4906666
364 32 4928000
350 32 4949333
350 32 4970666
363 32 4992000
358 32 5013333
305 32 5034666
344 32 5056000
346 32 5077333
342 32 5098666
330 32 5120000
318 32 5141333
361 32 5162666
354 32 5184000
313 32 5205333
330 32 5226666
350 32 5248000
347 32 5269333
346 32 5290666
357 32 5312000
325 32 5333333
335 32 5354666
331 32 5376000
366 32 5397333
329 32 5418666
349 32 5440000
371 32 5461333
326 32 5482666
333 32 5504000
319 32 5525333
327 32 5546666
353 32 5568000
356 32 5589333
348 32 5610666
338 32 5632000
331 32 5653333
341 32 5674666
362 32 5696000
326 32 5717333
359 32 5738666
315 32 5760000
376 32 5781333
343 32 5802666
354 32 5824000
353 32 5845333
344 32 5866666
334 32 5888000
345 32 5909333
355 32 5930666
322 32 5952000
334 32 5973333
353 32 5994666
338 32 6016000
351 32 6037333
334 32 6058666
339 32 6080000
345 32 6101333
347 32 6122666
355 32 6144000
312 32 6165333
352 32 6186666
354 32 6208000
318 32 6229333
344 32 6250666
363 32 6272000
321 32 6293333
339 32 6314666
356 32 6336000
334 32 6357333
354 32 6378666
325 32 6400000
321 32 6421333
341 32 6442666
337 32 6464000
351 32 6485333
343 32 6506666
341 32 6528000
344 32 6549333
341 32 6570666
364 32 6592000
319 32 6613333
348 32 6634666
332 32 6656000
333 32 6677333
343 32 6698666
348 32 6720000
347 32 6741333
350 32 6762666
342 32 6784000
341 32 6805333
326 32 6826666
351 32 6848000
329 32 6869333
323 32 6890666
350 32 6912000
361 32 6933333
326 32 6954666
345 32 6976000
345 32 6997333
311 32 7018666
349 32 7040000
358 32 7061333
352 32 7082666
347 32 7104000
364 32 7125333
328 32 7146666
318 32 7168000
351 32 7189333
340 32 7210666
341 32 7232000
355 32 7253333
336 32 7274666
352 32 7296000
341 32 7317333
334 32 7338666
348 32 7360000
342 32 7381333
335 32 7402666
342 32 7424000
359 32 7445333
349 32 7466666
329 32 7488000
356 32 7509333
292 32 7530666
316 32 7552000
318 32 7573333
320 32 7594666
342 32 7616000
285 32 7637333
326 32 7658666
352 32 7680000
392 32 7701333
364 32 7722666
384 32 7744000
334 32 7765333
317 32 7786666
326 32 7808000
373 32 7829333
354 32 7850666
329 32 7872000
347 32 7893333
353 32 7914666
338 32 7936000
317 32 7957333
354 32 7978666
345 32 8000000
350 32 8021333
351 32 8042666
332 32 8064000
358 32 8085333
315 32 8106666
336 32 8128000
358 32 8149333
343 32 8170666
319 32 8192000
370 32 8213333
344 32 8234666
361 32 8256000
343 32 8277333
337 32 8298666
354 32 8320000
332 32 8341333
348 32 8362666
328 32 8384000
345 32 8405333
340 32 8426666
346 32 8448000
341 32 8469333
344 32 8490666
342 32 8512000
341 32 8533333
345 32 8554666
337 32 8576000
335 32 8597333
335 32 8618666
340 32 8640000
345 32 8661333
341 32 8682666
342 32 8704000
338 32 8725333
343 32 8746666
336 32 8768000
338 32 8789333
353 32 8810666
339 32 8832000
329 32 8853333
349 32 8874666
323 32 8896000
351 32 8917333
359 32 8938666
357 32 8960000
341 32 8981333
333 32 9002666
335 32 9024000
328 32 9045333
347 32 9066666
343 32 9088000
369 32 9109333
331 32 9130666
344 32 9152000
330 32 9173333
346 32 9194666
337 32 9216000
341 32 9237333
338 32 9258666
329 32 9280000
360 32 9301333
336 32 9322666
341 32 9344000
341 32 9365333
345 32 9386666
351 32 9408000
349 32 9429333
336 32 9450666
326 32 9472000
349 32 9493333
343 32 9514666
357 32 9536000
342 32 9557333
325 32 9578666
346 32 9600000
326 32 9621333
402 32 9642666
331 32 9664000
339 32 9685333
371 32 9706666
314 32 9728000
310 32 9749333
364 32 9770666
338 32 9792000
339 32 9813333
337 32 9834666
355 32 9856000
351 32 9877333
332 32 9898666
316 32 9920000
474 32 9941333

Binary file not shown.

View File

@@ -0,0 +1,494 @@
41 32 0
41 32 20000
41 32 40000
41 32 60000
41 32 80000
41 32 100000
41 32 120000
41 32 140000
41 32 160000
41 32 180000
41 32 200000
41 32 220000
41 32 240000
41 32 260000
41 32 280000
41 32 300000
41 32 320000
41 32 340000
41 32 360000
41 32 380000
41 32 400000
41 32 420000
41 32 440000
41 32 460000
41 32 480000
41 32 500000
41 32 520000
41 32 540000
41 32 560000
41 32 580000
41 32 600000
41 32 620000
41 32 640000
41 32 660000
41 32 680000
41 32 700000
41 32 720000
41 32 740000
41 32 760000
41 32 780000
41 32 800000
41 32 820000
41 32 840000
41 32 860000
41 32 880000
41 32 900000
41 32 920000
41 32 940000
41 32 960000
41 32 980000
41 32 1000000
41 32 1020000
41 32 1040000
41 32 1060000
41 32 1080000
41 32 1100000
41 32 1120000
41 32 1140000
41 32 1160000
41 32 1180000
41 32 1200000
41 32 1220000
41 32 1240000
41 32 1260000
41 32 1280000
41 32 1300000
41 32 1320000
41 32 1340000
41 32 1360000
41 32 1380000
41 32 1400000
41 32 1420000
41 32 1440000
41 32 1460000
41 32 1480000
41 32 1500000
41 32 1520000
41 32 1540000
41 32 1560000
41 32 1580000
41 32 1600000
41 32 1620000
41 32 1640000
41 32 1660000
41 32 1680000
41 32 1700000
41 32 1720000
41 32 1740000
41 32 1760000
41 32 1780000
41 32 1800000
41 32 1820000
41 32 1840000
41 32 1860000
41 32 1880000
41 32 1900000
41 32 1920000
41 32 1940000
41 32 1960000
41 32 1980000
41 32 2000000
41 32 2020000
41 32 2040000
41 32 2060000
41 32 2080000
41 32 2100000
41 32 2120000
41 32 2140000
41 32 2160000
41 32 2180000
41 32 2200000
41 32 2220000
41 32 2240000
41 32 2260000
41 32 2280000
41 32 2300000
41 32 2320000
41 32 2340000
41 32 2360000
41 32 2380000
41 32 2400000
41 32 2420000
41 32 2440000
41 32 2460000
41 32 2480000
41 32 2500000
41 32 2520000
41 32 2540000
41 32 2560000
41 32 2580000
41 32 2600000
41 32 2620000
41 32 2640000
41 32 2660000
41 32 2680000
41 32 2700000
41 32 2720000
41 32 2740000
41 32 2760000
41 32 2780000
41 32 2800000
41 32 2820000
41 32 2840000
41 32 2860000
41 32 2880000
41 32 2900000
41 32 2920000
41 32 2940000
41 32 2960000
41 32 2980000
41 32 3000000
41 32 3020000
41 32 3040000
41 32 3060000
41 32 3080000
41 32 3100000
41 32 3120000
41 32 3140000
41 32 3160000
41 32 3180000
41 32 3200000
41 32 3220000
41 32 3240000
41 32 3260000
41 32 3280000
41 32 3300000
41 32 3320000
41 32 3340000
41 32 3360000
41 32 3380000
41 32 3400000
41 32 3420000
41 32 3440000
41 32 3460000
41 32 3480000
41 32 3500000
41 32 3520000
41 32 3540000
41 32 3560000
41 32 3580000
41 32 3600000
41 32 3620000
41 32 3640000
41 32 3660000
41 32 3680000
41 32 3700000
41 32 3720000
41 32 3740000
41 32 3760000
41 32 3780000
41 32 3800000
41 32 3820000
41 32 3840000
41 32 3860000
41 32 3880000
41 32 3900000
41 32 3920000
41 32 3940000
41 32 3960000
41 32 3980000
41 32 4000000
41 32 4020000
41 32 4040000
41 32 4060000
41 32 4080000
41 32 4100000
41 32 4120000
41 32 4140000
41 32 4160000
41 32 4180000
41 32 4200000
41 32 4220000
41 32 4240000
41 32 4260000
41 32 4280000
41 32 4300000
41 32 4320000
41 32 4340000
41 32 4360000
41 32 4380000
41 32 4400000
41 32 4420000
41 32 4440000
41 32 4460000
41 32 4480000
41 32 4500000
41 32 4520000
41 32 4540000
41 32 4560000
41 32 4580000
41 32 4600000
41 32 4620000
41 32 4640000
41 32 4660000
41 32 4680000
41 32 4700000
41 32 4720000
41 32 4740000
41 32 4760000
41 32 4780000
41 32 4800000
41 32 4820000
41 32 4840000
41 32 4860000
41 32 4880000
41 32 4900000
41 32 4920000
41 32 4940000
41 32 4960000
41 32 4980000
41 32 5000000
41 32 5020000
41 32 5040000
41 32 5060000
41 32 5080000
41 32 5100000
41 32 5120000
41 32 5140000
41 32 5160000
41 32 5180000
41 32 5200000
41 32 5220000
41 32 5240000
41 32 5260000
41 32 5280000
41 32 5300000
41 32 5320000
41 32 5340000
41 32 5360000
41 32 5380000
41 32 5400000
41 32 5420000
41 32 5440000
41 32 5460000
41 32 5480000
41 32 5500000
41 32 5520000
41 32 5540000
41 32 5560000
41 32 5580000
41 32 5600000
41 32 5620000
41 32 5640000
41 32 5660000
41 32 5680000
41 32 5700000
41 32 5720000
41 32 5740000
41 32 5760000
41 32 5780000
41 32 5800000
41 32 5820000
41 32 5840000
41 32 5860000
41 32 5880000
41 32 5900000
41 32 5920000
41 32 5940000
41 32 5960000
41 32 5980000
41 32 6000000
41 32 6020000
41 32 6040000
41 32 6060000
41 32 6080000
41 32 6100000
41 32 6120000
41 32 6140000
41 32 6160000
41 32 6180000
41 32 6200000
41 32 6220000
41 32 6240000
41 32 6260000
41 32 6280000
41 32 6300000
41 32 6320000
41 32 6340000
41 32 6360000
41 32 6380000
41 32 6400000
41 32 6420000
41 32 6440000
41 32 6460000
41 32 6480000
41 32 6500000
41 32 6520000
41 32 6540000
41 32 6560000
41 32 6580000
41 32 6600000
41 32 6620000
41 32 6640000
41 32 6660000
41 32 6680000
41 32 6700000
41 32 6720000
41 32 6740000
41 32 6760000
41 32 6780000
41 32 6800000
41 32 6820000
41 32 6840000
41 32 6860000
41 32 6880000
41 32 6900000
41 32 6920000
41 32 6940000
41 32 6960000
41 32 6980000
41 32 7000000
41 32 7020000
41 32 7040000
41 32 7060000
41 32 7080000
41 32 7100000
41 32 7120000
41 32 7140000
41 32 7160000
41 32 7180000
41 32 7200000
41 32 7220000
41 32 7240000
41 32 7260000
41 32 7280000
41 32 7300000
41 32 7320000
41 32 7340000
41 32 7360000
41 32 7380000
41 32 7400000
41 32 7420000
41 32 7440000
41 32 7460000
41 32 7480000
41 32 7500000
41 32 7520000
41 32 7540000
41 32 7560000
41 32 7580000
41 32 7600000
41 32 7620000
41 32 7640000
41 32 7660000
41 32 7680000
41 32 7700000
41 32 7720000
41 32 7740000
41 32 7760000
41 32 7780000
41 32 7800000
41 32 7820000
41 32 7840000
41 32 7860000
41 32 7880000
41 32 7900000
41 32 7920000
41 32 7940000
41 32 7960000
41 32 7980000
41 32 8000000
41 32 8020000
41 32 8040000
41 32 8060000
41 32 8080000
41 32 8100000
41 32 8120000
41 32 8140000
41 32 8160000
41 32 8180000
41 32 8200000
41 32 8220000
41 32 8240000
41 32 8260000
41 32 8280000
41 32 8300000
41 32 8320000
41 32 8340000
41 32 8360000
41 32 8380000
41 32 8400000
41 32 8420000
41 32 8440000
41 32 8460000
41 32 8480000
41 32 8500000
41 32 8520000
41 32 8540000
41 32 8560000
41 32 8580000
41 32 8600000
41 32 8620000
41 32 8640000
41 32 8660000
41 32 8680000
41 32 8700000
41 32 8720000
41 32 8740000
41 32 8760000
41 32 8780000
41 32 8800000
41 32 8820000
41 32 8840000
41 32 8860000
41 32 8880000
41 32 8900000
41 32 8920000
41 32 8940000
41 32 8960000
41 32 8980000
41 32 9000000
41 32 9020000
41 32 9040000
41 32 9060000
41 32 9080000
41 32 9100000
41 32 9120000
41 32 9140000
41 32 9160000
41 32 9180000
41 32 9200000
41 32 9220000
41 32 9240000
41 32 9260000
41 32 9280000
41 32 9300000
41 32 9320000
41 32 9340000
41 32 9360000
41 32 9380000
41 32 9400000
41 32 9420000
41 32 9440000
41 32 9460000
41 32 9480000
41 32 9500000
41 32 9520000
41 32 9540000
41 32 9560000
41 32 9580000
41 32 9600000
41 32 9620000
41 32 9640000
41 32 9660000
41 32 9680000
41 32 9700000
41 32 9720000
41 32 9740000
41 32 9760000
41 32 9780000
41 32 9800000
41 32 9820000
41 32 9840000
41 32 9860000

View File

@@ -0,0 +1,10 @@
8192 32 0
8192 32 1024000
8192 32 2048000
8192 32 3072000
8192 32 4096000
8192 32 5120000
8192 32 6144000
8192 32 7168000
8192 32 8192000
5462 32 9216000

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
8192 32 0
8192 32 1024000
8192 32 2048000
8192 32 3072000
8192 32 4096000
8192 32 5120000
8192 32 6144000
8192 32 7168000
8192 32 8192000
5462 32 9216000

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
975 32 0
975 32 600000
975 32 1200000
975 32 1800000
975 32 2400000
975 32 3000000
975 32 3600000
975 32 4200000
975 32 4800000
975 32 5400000
975 32 6000000
975 32 6600000
975 32 7200000
975 32 7800000
975 32 8400000
975 32 9000000
520 32 9600000

Binary file not shown.

View File

@@ -0,0 +1,500 @@
19 128 0
8 128 0
615 32 0
557 32 13500
311 32 33500
329 32 53500
341 32 73500
370 32 93500
359 32 113500
344 32 133500
335 32 153500
334 32 173500
327 32 193500
330 32 213500
328 32 233500
328 32 253500
343 32 273500
358 32 293500
341 32 313500
326 32 333500
333 32 353500
333 32 373500
402 32 393500
338 32 413500
327 32 433500
334 32 453500
329 32 473500
318 32 493500
322 32 513500
323 32 533500
320 32 553500
325 32 573500
328 32 593500
325 32 613500
304 32 633500
304 32 653500
303 32 673500
299 32 693500
296 32 713500
305 32 733500
307 32 753500
308 32 773500
310 32 793500
331 32 813500
332 32 833500
323 32 853500
310 32 873500
311 32 893500
316 32 913500
308 32 933500
321 32 953500
320 32 973500
310 32 993500
304 32 1013500
303 32 1033500
301 32 1053500
295 32 1073500
302 32 1093500
311 32 1113500
322 32 1133500
313 32 1153500
315 32 1173500
315 32 1193500
315 32 1213500
339 32 1233500
336 32 1253500
316 32 1273500
321 32 1293500
297 32 1313500
295 32 1333500
294 32 1353500
297 32 1373500
296 32 1393500
295 32 1413500
295 32 1433500
294 32 1453500
306 32 1473500
303 32 1493500
308 32 1513500
302 32 1533500
306 32 1553500
302 32 1573500
295 32 1593500
293 32 1613500
307 32 1633500
313 32 1653500
305 32 1673500
308 32 1693500
325 32 1713500
312 32 1733500
305 32 1753500
301 32 1773500
322 32 1793500
319 32 1813500
317 32 1833500
317 32 1853500
322 32 1873500
302 32 1893500
308 32 1913500
305 32 1933500
305 32 1953500
300 32 1973500
293 32 1993500
300 32 2013500
300 32 2033500
294 32 2053500
293 32 2073500
295 32 2093500
290 32 2113500
303 32 2133500
311 32 2153500
431 32 2173500
293 32 2193500
302 32 2213500
306 32 2233500
297 32 2253500
297 32 2273500
301 32 2293500
404 32 2313500
299 32 2333500
443 32 2353500
296 32 2373500
296 32 2393500
306 32 2413500
313 32 2433500
314 32 2453500
303 32 2473500
306 32 2493500
320 32 2513500
311 32 2533500
303 32 2553500
316 32 2573500
317 32 2593500
300 32 2613500
297 32 2633500
306 32 2653500
312 32 2673500
319 32 2693500
307 32 2713500
309 32 2733500
302 32 2753500
306 32 2773500
316 32 2793500
300 32 2813500
320 32 2833500
312 32 2853500
324 32 2873500
319 32 2893500
313 32 2913500
314 32 2933500
316 32 2953500
310 32 2973500
301 32 2993500
313 32 3013500
303 32 3033500
298 32 3053500
292 32 3073500
288 32 3093500
294 32 3113500
296 32 3133500
296 32 3153500
294 32 3173500
299 32 3193500
303 32 3213500
294 32 3233500
301 32 3253500
321 32 3273500
310 32 3293500
314 32 3313500
298 32 3333500
300 32 3353500
302 32 3373500
297 32 3393500
298 32 3413500
293 32 3433500
304 32 3453500
304 32 3473500
311 32 3493500
310 32 3513500
322 32 3533500
340 32 3553500
330 32 3573500
329 32 3593500
318 32 3613500
309 32 3633500
306 32 3653500
313 32 3673500
314 32 3693500
303 32 3713500
297 32 3733500
296 32 3753500
292 32 3773500
291 32 3793500
291 32 3813500
291 32 3833500
299 32 3853500
295 32 3873500
302 32 3893500
305 32 3913500
301 32 3933500
311 32 3953500
317 32 3973500
314 32 3993500
310 32 4013500
378 32 4033500
310 32 4053500
301 32 4073500
353 32 4093500
289 32 4113500
294 32 4133500
297 32 4153500
294 32 4173500
296 32 4193500
305 32 4213500
303 32 4233500
317 32 4253500
359 32 4273500
314 32 4293500
323 32 4313500
319 32 4333500
330 32 4353500
326 32 4373500
305 32 4393500
300 32 4413500
298 32 4433500
297 32 4453500
293 32 4473500
296 32 4493500
303 32 4513500
318 32 4533500
306 32 4553500
295 32 4573500
294 32 4593500
468 32 4613500
291 32 4633500
295 32 4653500
292 32 4673500
296 32 4693500
291 32 4713500
290 32 4733500
299 32 4753500
291 32 4773500
297 32 4793500
304 32 4813500
306 32 4833500
296 32 4853500
286 32 4873500
299 32 4893500
294 32 4913500
318 32 4933500
328 32 4953500
318 32 4973500
319 32 4993500
312 32 5013500
298 32 5033500
301 32 5053500
296 32 5073500
293 32 5093500
293 32 5113500
297 32 5133500
296 32 5153500
294 32 5173500
294 32 5193500
292 32 5213500
296 32 5233500
291 32 5253500
294 32 5273500
297 32 5293500
304 32 5313500
295 32 5333500
290 32 5353500
294 32 5373500
293 32 5393500
294 32 5413500
294 32 5433500
293 32 5453500
289 32 5473500
293 32 5493500
295 32 5513500
295 32 5533500
286 32 5553500
292 32 5573500
288 32 5593500
292 32 5613500
296 32 5633500
288 32 5653500
294 32 5673500
294 32 5693500
293 32 5713500
291 32 5733500
293 32 5753500
303 32 5773500
306 32 5793500
307 32 5813500
302 32 5833500
294 32 5853500
297 32 5873500
297 32 5893500
302 32 5913500
299 32 5933500
302 32 5953500
297 32 5973500
299 32 5993500
305 32 6013500
307 32 6033500
310 32 6053500
310 32 6073500
315 32 6093500
306 32 6113500
305 32 6133500
304 32 6153500
307 32 6173500
306 32 6193500
297 32 6213500
298 32 6233500
293 32 6253500
293 32 6273500
296 32 6293500
305 32 6313500
299 32 6333500
298 32 6353500
305 32 6373500
291 32 6393500
296 32 6413500
296 32 6433500
303 32 6453500
298 32 6473500
328 32 6493500
322 32 6513500
323 32 6533500
319 32 6553500
331 32 6573500
332 32 6593500
333 32 6613500
325 32 6633500
334 32 6653500
333 32 6673500
329 32 6693500
325 32 6713500
321 32 6733500
460 32 6753500
322 32 6773500
313 32 6793500
303 32 6813500
307 32 6833500
302 32 6853500
298 32 6873500
294 32 6893500
296 32 6913500
288 32 6933500
286 32 6953500
404 32 6973500
408 32 6993500
316 32 7013500
336 32 7033500
326 32 7053500
333 32 7073500
324 32 7093500
330 32 7113500
315 32 7133500
318 32 7153500
323 32 7173500
304 32 7193500
302 32 7213500
310 32 7233500
329 32 7253500
324 32 7273500
332 32 7293500
474 32 7313500
347 32 7333500
351 32 7353500
412 32 7373500
326 32 7393500
300 32 7413500
308 32 7433500
307 32 7453500
299 32 7473500
306 32 7493500
450 32 7513500
294 32 7533500
348 32 7553500
294 32 7573500
289 32 7593500
281 32 7613500
293 32 7633500
291 32 7653500
341 32 7673500
291 32 7693500
298 32 7713500
295 32 7733500
298 32 7753500
299 32 7773500
332 32 7793500
297 32 7813500
302 32 7833500
302 32 7853500
316 32 7873500
322 32 7893500
327 32 7913500
321 32 7933500
315 32 7953500
308 32 7973500
323 32 7993500
306 32 8013500
319 32 8033500
318 32 8053500
319 32 8073500
319 32 8093500
323 32 8113500
320 32 8133500
311 32 8153500
312 32 8173500
307 32 8193500
311 32 8213500
318 32 8233500
346 32 8253500
348 32 8273500
336 32 8293500
334 32 8313500
331 32 8333500
340 32 8353500
335 32 8373500
319 32 8393500
307 32 8413500
304 32 8433500
301 32 8453500
311 32 8473500
317 32 8493500
325 32 8513500
327 32 8533500
335 32 8553500
340 32 8573500
320 32 8593500
333 32 8613500
328 32 8633500
312 32 8653500
304 32 8673500
337 32 8693500
334 32 8713500
333 32 8733500
327 32 8753500
328 32 8773500
340 32 8793500
478 32 8813500
331 32 8833500
328 32 8853500
320 32 8873500
315 32 8893500
321 32 8913500
324 32 8933500
325 32 8953500
323 32 8973500
324 32 8993500
336 32 9013500
340 32 9033500
333 32 9053500
339 32 9073500
490 32 9093500
480 32 9113500
329 32 9133500
327 32 9153500
341 32 9173500
338 32 9193500
337 32 9213500
337 32 9233500
328 32 9253500
322 32 9273500
324 32 9293500
349 32 9313500
350 32 9333500
337 32 9353500
342 32 9373500
334 32 9393500
324 32 9413500
320 32 9433500
329 32 9453500
333 32 9473500
328 32 9493500
335 32 9513500
322 32 9533500
323 32 9553500
330 32 9573500
320 32 9593500
313 32 9613500
526 32 9633500
306 32 9653500
300 32 9673500
299 32 9693500
300 32 9713500
299 32 9733500
299 32 9753500
295 32 9773500
293 32 9793500
297 32 9813500
306 32 9833500
300 32 9853500
438 32 9873500
291 32 9893500
448 32 9913500
504 32 9933500

Binary file not shown.

View File

@@ -0,0 +1,10 @@
16384 32 0
16384 32 1024000
16384 32 2048000
16384 32 3072000
16384 32 4096000
16384 32 5120000
16384 32 6144000
16384 32 7168000
16384 32 8192000
10924 32 9216000

Binary file not shown.

View File

@@ -0,0 +1,520 @@
30 128 0
4140 128 0
33 128 0
52 32 0
58 32 2666
61 32 5333
56 32 8000
59 32 10666
63 32 13333
66 32 16000
71 32 18666
76 32 21333
374 32 24000
366 32 36000
378 32 57333
393 32 78666
393 32 100000
386 32 121333
375 32 142666
388 32 164000
378 32 185333
379 32 206666
374 32 228000
356 32 249333
358 32 270666
332 32 292000
335 32 313333
363 32 334666
341 32 356000
360 32 377333
341 32 398666
335 32 420000
357 32 441333
355 32 462666
363 32 484000
382 32 505333
371 32 526666
357 32 548000
353 32 569333
350 32 590666
327 32 612000
315 32 633333
307 32 654666
303 32 676000
295 32 697333
312 32 718666
316 32 740000
315 32 761333
318 32 782666
330 32 804000
318 32 825333
315 32 846666
322 32 868000
315 32 889333
310 32 910666
315 32 932000
314 32 953333
302 32 974666
313 32 996000
322 32 1017333
323 32 1038666
319 32 1060000
325 32 1081333
328 32 1102666
330 32 1124000
333 32 1145333
330 32 1166666
344 32 1188000
331 32 1209333
342 32 1230666
339 32 1252000
314 32 1273333
285 32 1294666
295 32 1316000
302 32 1337333
305 32 1358666
309 32 1380000
327 32 1401333
304 32 1422666
336 32 1444000
350 32 1465333
346 32 1486666
352 32 1508000
341 32 1529333
343 32 1550666
351 32 1572000
319 32 1593333
328 32 1614666
328 32 1636000
324 32 1657333
338 32 1678666
317 32 1700000
328 32 1721333
335 32 1742666
341 32 1764000
335 32 1785333
348 32 1806666
362 32 1828000
361 32 1849333
344 32 1870666
340 32 1892000
333 32 1913333
329 32 1934666
328 32 1956000
323 32 1977333
310 32 1998666
318 32 2020000
312 32 2041333
295 32 2062666
329 32 2084000
318 32 2105333
311 32 2126666
317 32 2148000
62 32 2169333
75 32 2181333
73 32 2184000
332 32 2186666
327 32 2198666
332 32 2220000
325 32 2241333
329 32 2262666
330 32 2284000
61 32 2305333
61 32 2317333
70 32 2320000
70 32 2322666
319 32 2325333
303 32 2337333
292 32 2358666
313 32 2380000
318 32 2401333
346 32 2422666
328 32 2444000
316 32 2465333
341 32 2486666
328 32 2508000
338 32 2529333
341 32 2550666
337 32 2572000
347 32 2593333
384 32 2614666
358 32 2636000
363 32 2657333
363 32 2678666
358 32 2700000
339 32 2721333
369 32 2742666
343 32 2764000
348 32 2785333
363 32 2806666
350 32 2828000
358 32 2849333
352 32 2870666
338 32 2892000
335 32 2913333
342 32 2934666
338 32 2956000
340 32 2977333
292 32 2998666
279 32 3020000
299 32 3041333
303 32 3062666
298 32 3084000
297 32 3105333
280 32 3126666
297 32 3148000
290 32 3169333
306 32 3190666
301 32 3212000
306 32 3233333
289 32 3254666
311 32 3276000
317 32 3297333
344 32 3318666
308 32 3340000
304 32 3361333
304 32 3382666
312 32 3404000
305 32 3425333
299 32 3446666
301 32 3468000
318 32 3489333
313 32 3510666
330 32 3532000
325 32 3553333
325 32 3574666
321 32 3596000
349 32 3617333
288 32 3638666
300 32 3660000
312 32 3681333
302 32 3702666
278 32 3724000
284 32 3745333
286 32 3766666
274 32 3788000
295 32 3809333
281 32 3830666
288 32 3852000
278 32 3873333
306 32 3894666
62 32 3916000
59 32 3928000
61 32 3930666
55 32 3933333
70 32 3936000
72 32 3938666
324 32 3941333
309 32 3953333
301 32 3974666
301 32 3996000
291 32 4017333
289 32 4038666
306 32 4060000
305 32 4081333
286 32 4102666
294 32 4124000
290 32 4145333
297 32 4166666
308 32 4188000
296 32 4209333
292 32 4230666
287 32 4252000
291 32 4273333
298 32 4294666
295 32 4316000
294 32 4337333
295 32 4358666
275 32 4380000
280 32 4401333
288 32 4422666
285 32 4444000
274 32 4465333
298 32 4486666
301 32 4508000
300 32 4529333
305 32 4550666
297 32 4572000
59 32 4593333
56 32 4605333
57 32 4608000
55 32 4610666
58 32 4613333
57 32 4616000
58 32 4618666
68 32 4621333
67 32 4624000
71 32 4626666
289 32 4629333
282 32 4641333
273 32 4662666
279 32 4684000
286 32 4705333
282 32 4726666
284 32 4748000
278 32 4769333
281 32 4790666
280 32 4812000
263 32 4833333
260 32 4854666
271 32 4876000
273 32 4897333
282 32 4918666
279 32 4940000
297 32 4961333
291 32 4982666
309 32 5004000
283 32 5025333
292 32 5046666
304 32 5068000
296 32 5089333
293 32 5110666
282 32 5132000
273 32 5153333
284 32 5174666
281 32 5196000
265 32 5217333
272 32 5238666
277 32 5260000
280 32 5281333
276 32 5302666
273 32 5324000
278 32 5345333
280 32 5366666
280 32 5388000
268 32 5409333
282 32 5430666
277 32 5452000
274 32 5473333
275 32 5494666
270 32 5516000
282 32 5537333
279 32 5558666
260 32 5580000
272 32 5601333
275 32 5622666
273 32 5644000
276 32 5665333
288 32 5686666
294 32 5708000
271 32 5729333
277 32 5750666
288 32 5772000
276 32 5793333
282 32 5814666
276 32 5836000
275 32 5857333
268 32 5878666
270 32 5900000
266 32 5921333
268 32 5942666
282 32 5964000
279 32 5985333
279 32 6006666
287 32 6028000
286 32 6049333
280 32 6070666
290 32 6092000
266 32 6113333
292 32 6134666
264 32 6156000
271 32 6177333
277 32 6198666
292 32 6220000
298 32 6241333
284 32 6262666
287 32 6284000
275 32 6305333
291 32 6326666
287 32 6348000
283 32 6369333
284 32 6390666
271 32 6412000
282 32 6433333
277 32 6454666
282 32 6476000
285 32 6497333
280 32 6518666
271 32 6540000
289 32 6561333
287 32 6582666
294 32 6604000
277 32 6625333
281 32 6646666
274 32 6668000
271 32 6689333
279 32 6710666
288 32 6732000
280 32 6753333
284 32 6774666
278 32 6796000
276 32 6817333
275 32 6838666
263 32 6860000
266 32 6881333
247 32 6902666
269 32 6924000
263 32 6945333
283 32 6966666
280 32 6988000
281 32 7009333
299 32 7030666
285 32 7052000
288 32 7073333
299 32 7094666
288 32 7116000
279 32 7137333
276 32 7158666
277 32 7180000
282 32 7201333
285 32 7222666
295 32 7244000
294 32 7265333
304 32 7286666
282 32 7308000
299 32 7329333
283 32 7350666
282 32 7372000
287 32 7393333
306 32 7414666
304 32 7436000
289 32 7457333
299 32 7478666
281 32 7500000
281 32 7521333
66 32 7542666
63 32 7554666
289 32 7557333
270 32 7569333
257 32 7590666
246 32 7612000
264 32 7633333
280 32 7654666
273 32 7676000
285 32 7697333
267 32 7718666
275 32 7740000
278 32 7761333
293 32 7782666
281 32 7804000
297 32 7825333
294 32 7846666
286 32 7868000
290 32 7889333
290 32 7910666
289 32 7932000
286 32 7953333
282 32 7974666
306 32 7996000
287 32 8017333
312 32 8038666
312 32 8060000
307 32 8081333
293 32 8102666
289 32 8124000
285 32 8145333
290 32 8166666
285 32 8188000
311 32 8209333
307 32 8230666
314 32 8252000
318 32 8273333
319 32 8294666
315 32 8316000
300 32 8337333
295 32 8358666
291 32 8380000
282 32 8401333
295 32 8422666
296 32 8444000
288 32 8465333
304 32 8486666
299 32 8508000
298 32 8529333
305 32 8550666
295 32 8572000
296 32 8593333
295 32 8614666
287 32 8636000
292 32 8657333
308 32 8678666
287 32 8700000
307 32 8721333
295 32 8742666
292 32 8764000
292 32 8785333
279 32 8806666
289 32 8828000
303 32 8849333
307 32 8870666
310 32 8892000
300 32 8913333
299 32 8934666
299 32 8956000
288 32 8977333
290 32 8998666
291 32 9020000
304 32 9041333
299 32 9062666
304 32 9084000
290 32 9105333
309 32 9126666
301 32 9148000
296 32 9169333
288 32 9190666
305 32 9212000
317 32 9233333
292 32 9254666
300 32 9276000
301 32 9297333
295 32 9318666
282 32 9340000
296 32 9361333
295 32 9382666
287 32 9404000
292 32 9425333
301 32 9446666
311 32 9468000
301 32 9489333
307 32 9510666
300 32 9532000
309 32 9553333
298 32 9574666
304 32 9596000
60 32 9617333
59 32 9629333
64 32 9632000
64 32 9634666
77 32 9637333
72 32 9640000
306 32 9642666
297 32 9654666
294 32 9676000
295 32 9697333
308 32 9718666
303 32 9740000
308 32 9761333
289 32 9782666
300 32 9804000
304 32 9825333
308 32 9846666
64 32 9868000
63 32 9880000
64 32 9882666
64 32 9885333
60 32 9888000
74 32 9890666
69 32 9893333
68 32 9896000
61 32 9898666
71 32 9901333
76 32 9904000
73 32 9906666
70 32 9909333
72 32 9912000
60 32 9914666
69 32 9917333
82 32 9920000
278 32 9922666
30 32 9934666

Binary file not shown.