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

Merge pull request #19516 from dbudniko:dbudniko/gapi_render_frame_cpu

Render Frame NV12 on CPU

* render frame on CPU

* doxygen fix

* address review from Alexey

* comment fixes

* Address comments from Ruslan

* remove NV12 specific

* mat clone and more renaming

* misprint fix
This commit is contained in:
Dmitry Budnikov
2021-02-15 22:57:22 +03:00
committed by GitHub
parent 47426a8ae5
commit 0cdbdfdf9f
5 changed files with 442 additions and 1 deletions
+20
View File
@@ -33,6 +33,20 @@ void cv::gapi::wip::draw::render(cv::Mat& y_plane,
cv::gout(y_plane, uv_plane), std::move(args));
}
void cv::gapi::wip::draw::render(cv::MediaFrame& frame,
const Prims& prims,
cv::GCompileArgs&& args)
{
cv::GFrame in, out;
cv::GArray<cv::gapi::wip::draw::Prim> arr;
out = cv::gapi::wip::draw::renderFrame(in, arr);
cv::GComputation comp(cv::GIn(in, arr), cv::GOut(out));
comp.apply(cv::gin(frame, prims),
cv::gout(frame), std::move(args));
}
void cv::gapi::wip::draw::cvtYUVToNV12(const cv::Mat& yuv,
cv::Mat& y,
cv::Mat& uv)
@@ -69,3 +83,9 @@ cv::gapi::wip::draw::renderNV12(const cv::GMat& y,
{
return cv::gapi::wip::draw::GRenderNV12::on(y, uv, prims);
}
cv::GFrame cv::gapi::wip::draw::renderFrame(const cv::GFrame& frame,
const cv::GArray<cv::gapi::wip::draw::Prim>& prims)
{
return cv::gapi::wip::draw::GRenderFrame::on(frame, prims);
}