1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

G-API: Integrated cv::MediaFrame as I/O type + CPU backend

This commit is contained in:
Dmitry Matveev
2020-10-02 21:48:54 +03:00
parent aabeb8a18e
commit 050c960dfc
19 changed files with 132 additions and 56 deletions
+6
View File
@@ -57,6 +57,11 @@ void cv::GCompiled::Priv::checkArgs(const cv::gimpl::GRuntimeArgs &args) const
// FIXME: Add details on what is actually wrong
}
validate_input_args(args.inObjs);
// FIXME: Actually, the passed parameter vector is never checked
// against its shapes - so if you compile with GScalarDesc passed
// for GMat argument, you will get your compilation right (!!)
// Probably it was there but somehow that olds checks (if they
// exist) are bypassed now.
}
bool cv::GCompiled::Priv::canReshape() const
@@ -97,6 +102,7 @@ cv::GCompiled::operator bool() const
void cv::GCompiled::operator() (GRunArgs &&ins, GRunArgsP &&outs)
{
// FIXME: Check that <ins> matches the protocol!!!
// FIXME: Check that <outs> matches the protocol
m_priv->run(cv::gimpl::GRuntimeArgs{std::move(ins),std::move(outs)});
}
+3 -1
View File
@@ -311,9 +311,11 @@ void cv::gimpl::GCompiler::validateInputMeta()
// FIXME: Auto-generate methods like this from traits:
case GProtoArg::index_of<cv::GMat>():
case GProtoArg::index_of<cv::GMatP>():
case GProtoArg::index_of<cv::GFrame>():
return util::holds_alternative<cv::GMatDesc>(meta);
case GProtoArg::index_of<cv::GFrame>():
return util::holds_alternative<cv::GFrameDesc>(meta);
case GProtoArg::index_of<cv::GScalar>():
return util::holds_alternative<cv::GScalarDesc>(meta);
@@ -33,6 +33,7 @@ void dumpDot(const ade::Graph &g, std::ostream& os)
{cv::GShape::GSCALAR, "GScalar"},
{cv::GShape::GARRAY, "GArray"},
{cv::GShape::GOPAQUE, "GOpaque"},
{cv::GShape::GFRAME, "GFrame"},
};
auto format_op_label = [&gr](ade::NodeHandle nh) -> std::string {