mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge pull request #21775 from luzpaz:typos/gapi
* GAPI: fix various gapi related typos Fixes source comments and documentation related to gapi code. * Fix source typos * Fixed typos requested * Follow-up typo fix
This commit is contained in:
@@ -39,7 +39,7 @@ cv::GMat cv::gapi::streaming::desync(const cv::GMat &g) {
|
||||
//
|
||||
// At the same time, generally, every island in the streaming
|
||||
// graph gets its individual input as a queue (so normally, a
|
||||
// writer pushes the same output MULTIPLE TIMES if it has mutliple
|
||||
// writer pushes the same output MULTIPLE TIMES if it has multiple
|
||||
// readers):
|
||||
//
|
||||
// LWV
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace magazine
|
||||
// without utilizing magazine at all
|
||||
void GAPI_EXPORTS bindInArg (Mag& mag, const RcDesc &rc, const GRunArg &arg, HandleRMat handleRMat = HandleRMat::BIND);
|
||||
|
||||
// Extracts a memory object reference fro GRunArgP, stores it in appropriate slot in a magazine
|
||||
// Extracts a memory object reference from GRunArgP, stores it in appropriate slot in a magazine
|
||||
// Note on RMat handling from bindInArg above is also applied here
|
||||
void GAPI_EXPORTS bindOutArg(Mag& mag, const RcDesc &rc, const GRunArgP &arg, HandleRMat handleRMat = HandleRMat::BIND);
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ GAPI_EXPORTS void serialize( IOStream& os
|
||||
GAPI_EXPORTS GSerialized deserialize(IIStream& is);
|
||||
GAPI_EXPORTS void reconstruct(const GSerialized &s, ade::Graph &g);
|
||||
|
||||
// FIXME: Basic Stream implementaions //////////////////////////////////////////
|
||||
// FIXME: Basic Stream implementations /////////////////////////////////////////
|
||||
|
||||
// Basic in-memory stream implementations.
|
||||
class GAPI_EXPORTS ByteMemoryOutStream final: public IOStream {
|
||||
|
||||
@@ -460,7 +460,7 @@ public:
|
||||
const IEUnit &uu;
|
||||
cv::gimpl::GIslandExecutable::IOutput &out;
|
||||
|
||||
// NB: Need to gurantee that MediaFrame::View doesn't die until request is over.
|
||||
// NB: Need to guarantee that MediaFrame::View doesn't die until request is over.
|
||||
using Views = std::vector<std::unique_ptr<cv::MediaFrame::View>>;
|
||||
Views views;
|
||||
|
||||
@@ -963,7 +963,7 @@ cv::gimpl::ie::GIEExecutable::GIEExecutable(const ade::Graph &g,
|
||||
|
||||
void cv::gimpl::ie::GIEExecutable::run(cv::gimpl::GIslandExecutable::IInput &in,
|
||||
cv::gimpl::GIslandExecutable::IOutput &out) {
|
||||
// General alghoritm:
|
||||
// General algorithm:
|
||||
// 1. Collect island inputs/outputs.
|
||||
// 2. Create kernel context. (Every kernel has his own context).
|
||||
// 3. If the EndOfStream message is recieved, wait until all passed task are done.
|
||||
|
||||
@@ -766,7 +766,7 @@ cv::gimpl::GOAKExecutable::GOAKExecutable(const ade::Graph& g,
|
||||
// 1. Link input nodes to camera
|
||||
for (const auto& nh : in_nodes) {
|
||||
GAPI_Assert(m_oak_nodes.at(nh).inputs.size() == 1);
|
||||
// FIXME: cover other camera outputs
|
||||
// FIXME: convert other camera outputs
|
||||
// Link preview to infer, video to all other nodes
|
||||
if (m_oak_infer_info.find(nh) == m_oak_infer_info.end()) {
|
||||
m_camera_input->video.link(*(m_oak_nodes.at(nh).inputs[0]));
|
||||
|
||||
@@ -1102,7 +1102,7 @@ struct InferList2: public cv::detail::KernelTag {
|
||||
} else {
|
||||
GAPI_Assert(false && "Only Rect and Mat types are supported for infer list 2!");
|
||||
}
|
||||
// }}} (Preapre input)
|
||||
// }}} (Prepare input)
|
||||
} // }}} (For every input of the net)
|
||||
|
||||
std::vector<cv::Mat> out_mats(uu.oc->numOutputs());
|
||||
|
||||
@@ -80,7 +80,7 @@ cv::Size cv::gapi::wip::draw::FTTextRender::Priv::getTextSize(const std::wstring
|
||||
// See (1) on picture.
|
||||
//
|
||||
// 4) As we can see the last pen position is isn't horizontal size yet.
|
||||
// We need to check if the glyph goes beyound the last position of the pen
|
||||
// We need to check if the glyph goes beyond the last position of the pen
|
||||
// To do this we can:
|
||||
// a) Return to the previous position -advance
|
||||
// b) Shift on left value +left
|
||||
|
||||
@@ -346,9 +346,9 @@ std::string GIslandModel::traceIslandName(const ade::NodeHandle& island_nh, cons
|
||||
auto& backend_impl = island_ptr->backend().priv();
|
||||
std::string backend_impl_type_name = typeid(backend_impl).name();
|
||||
|
||||
// NOTE: Major part of already existing backends implementaion classes are called using
|
||||
// NOTE: Major part of already existing backends implementation classes are called using
|
||||
// "*G[Name]BackendImpl*" pattern.
|
||||
// We are trying to match against this pattern and retrive just [Name] part.
|
||||
// We are trying to match against this pattern and retrieve just [Name] part.
|
||||
// If matching isn't successful, full mangled class name will be used.
|
||||
//
|
||||
// To match we use following algorithm:
|
||||
|
||||
@@ -254,7 +254,7 @@ void apply(cv::gimpl::GModel::Graph &g) {
|
||||
}
|
||||
|
||||
// Probably the simplest case: desync makes no sense in the regular
|
||||
// compilation process, so just drop all its occurences in the graph,
|
||||
// compilation process, so just drop all its occurrences in the graph,
|
||||
// reconnecting nodes properly.
|
||||
void drop(cv::gimpl::GModel::Graph &g) {
|
||||
// FIXME: LOG here that we're dropping the desync operations as
|
||||
|
||||
@@ -212,7 +212,7 @@ void cv::gimpl::passes::resolveKernels(ade::passes::PassContext &ctx,
|
||||
GAPI_Assert(op.k.outMeta == nullptr);
|
||||
const_cast<cv::GKernel::M&>(op.k.outMeta) = selected_impl.outMeta;
|
||||
} else {
|
||||
// Sanity check: the metadata funciton must be present
|
||||
// Sanity check: the metadata function must be present
|
||||
GAPI_Assert(op.k.outMeta != nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ void writeBackExec(const Mag& mag, const RcDesc &rc, GRunArgP &g_arg)
|
||||
{
|
||||
case GRunArgP::index_of<cv::Mat*>() : {
|
||||
// If there is a copy intrinsic at the end of the graph
|
||||
// we need to actualy copy the data to the user buffer
|
||||
// we need to actually copy the data to the user buffer
|
||||
// since output runarg was optimized to simply point
|
||||
// to the input of the copy kernel
|
||||
// FIXME:
|
||||
|
||||
@@ -1520,7 +1520,7 @@ cv::gimpl::GStreamingExecutor::GStreamingExecutor(std::unique_ptr<ade::Graph> &&
|
||||
|
||||
cv::gimpl::GStreamingExecutor::~GStreamingExecutor()
|
||||
{
|
||||
// FIXME: this is a temporary try-catch exception hadling.
|
||||
// FIXME: this is a temporary try-catch exception handling.
|
||||
// Need to eliminate throwings from stop()
|
||||
try {
|
||||
if (state == State::READY || state == State::RUNNING)
|
||||
@@ -1619,7 +1619,7 @@ void cv::gimpl::GStreamingExecutor::setSource(GRunArgs &&ins)
|
||||
case T::index_of<cv::gapi::wip::IStreamSource::Ptr>():
|
||||
#if !defined(GAPI_STANDALONE)
|
||||
emitter.reset(new VideoEmitter{emit_arg});
|
||||
// Currently all video inputs are syncronized if sync policy is to drop,
|
||||
// Currently all video inputs are synchronized if sync policy is to drop,
|
||||
// there is no different fps branches etc, so all video emitters are registered
|
||||
video_emitters.emplace_back(emit_nh);
|
||||
#else
|
||||
|
||||
@@ -353,7 +353,7 @@ namespace graph {
|
||||
}
|
||||
|
||||
ctx.executed++;
|
||||
// reset dependecy_count to initial state to simplify re-execution of the same graph
|
||||
// reset dependency_count to initial state to simplify re-execution of the same graph
|
||||
node->dependency_count = node->dependencies;
|
||||
|
||||
return result;
|
||||
|
||||
@@ -111,11 +111,11 @@ GstElement* GStreamerPipelineFacade::getElementByName(const std::string& element
|
||||
void GStreamerPipelineFacade::completePreroll() {
|
||||
// FIXME: If there are multiple sources in pipeline and one of them is live, then pipeline
|
||||
// will return GST_STATE_CHANGE_NO_PREROLL while pipeline pausing.
|
||||
// But appsink may not be connected to this live source and only to anothers,
|
||||
// But appsink may not be connected to this live source and only to another,
|
||||
// not-live ones. So, it is not required to start the playback for appsink to complete
|
||||
// the preroll.
|
||||
// Starting of playback for the not-live sources before the first frame pull will lead
|
||||
// to loosing of some amount of frames and pulling of the first frame can return frame
|
||||
// to losing of some amount of frames and pulling of the first frame can return frame
|
||||
// which is far from the first.
|
||||
//
|
||||
// Need to handle this case or forbid to mix multiples sources of different
|
||||
|
||||
@@ -54,7 +54,7 @@ struct VPLAccelerationPolicy
|
||||
virtual void init(session_t session) = 0;
|
||||
virtual void deinit(session_t session) = 0;
|
||||
|
||||
// Limitation: cannot give guarantee in succesful memory realloccation
|
||||
// Limitation: cannot give guarantee in successful memory realloccation
|
||||
// for existing workspace in existing pool (see realloc)
|
||||
// thus it is not implemented,
|
||||
// PLEASE provide initial memory area large enough
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
/**
|
||||
* Extract value thread-safe lock counter (see @ref Surface description).
|
||||
* It's usual situation that counter may be instantly decreased in other thread after this method called.
|
||||
* We need instantaneous value. This method syncronized in inter-threading way with @ref Surface::release_lock()
|
||||
* We need instantaneous value. This method synchronized in inter-threading way with @ref Surface::release_lock()
|
||||
*
|
||||
* @return fetched locks count.
|
||||
*/
|
||||
|
||||
@@ -163,7 +163,7 @@ private:
|
||||
* deinitialization called off in `on_unlock`
|
||||
* because new `incoming` request had appeared at here before
|
||||
* `on_unlock` started deinit procedure in another thread.
|
||||
* So no reinit required because no deinit had happended
|
||||
* So no reinit required because no deinit had happened
|
||||
*
|
||||
* main `busy-wait` request must break busy-wait state
|
||||
* and become `outgoing` request.
|
||||
|
||||
@@ -44,7 +44,7 @@ void VPLLegacyDecodeEngine::try_modify_pool_size_request_param(const char* param
|
||||
param_name + ", overflow");
|
||||
}
|
||||
request.NumFrameSuggested = static_cast<mfxU16>(new_frames_count);
|
||||
GAPI_LOG_DEBUG(nullptr, "mfxFrameAllocRequest overriden by user input: " <<
|
||||
GAPI_LOG_DEBUG(nullptr, "mfxFrameAllocRequest overridden by user input: " <<
|
||||
", mfxFrameAllocRequest.NumFrameMin: " << request.NumFrameMin <<
|
||||
", mfxFrameAllocRequest.NumFrameSuggested: " << request.NumFrameSuggested <<
|
||||
", mfxFrameAllocRequest.Type: " << request.Type);
|
||||
@@ -152,7 +152,7 @@ VPLLegacyDecodeEngine::VPLLegacyDecodeEngine(std::unique_ptr<VPLAccelerationPoli
|
||||
} while (MFX_ERR_NONE == sess.last_status && !my_sess.sync_queue.empty());
|
||||
return ExecutionStatus::Continue;
|
||||
},
|
||||
// 4) Falls back on generic status procesing
|
||||
// 4) Falls back on generic status processing
|
||||
[this] (EngineSession& sess) -> ExecutionStatus
|
||||
{
|
||||
return this->process_error(sess.last_status, static_cast<LegacyDecodeSession&>(sess));
|
||||
@@ -177,7 +177,7 @@ VPLLegacyDecodeEngine::SessionParam VPLLegacyDecodeEngine::prepare_session_param
|
||||
mfxVideoParam mfxDecParams {};
|
||||
mfxDecParams.mfx.CodecId = decoder_id_name;
|
||||
|
||||
// set memory stream direction accroding to accelearion policy device type
|
||||
// set memory stream direction according to acceleration policy device type
|
||||
IDeviceSelector::DeviceScoreTable devices = acceleration_policy->get_device_selector()->select_devices();
|
||||
GAPI_Assert(devices.size() == 1 && "Multiple(or zero) acceleration devices case is unsupported");
|
||||
AccelType accel_type = devices.begin()->second.get_type();
|
||||
@@ -252,7 +252,7 @@ VPLLegacyDecodeEngine::SessionParam VPLLegacyDecodeEngine::prepare_session_param
|
||||
acceleration_policy->create_surface_pool(decRequest, mfxDecParams.mfx.FrameInfo);
|
||||
|
||||
// Input parameters finished, now initialize decode
|
||||
// create decoder for session accoring to header recovered from source file
|
||||
// create decoder for session according to header recovered from source file
|
||||
|
||||
sts = MFXVideoDECODE_Init(mfx_session, &mfxDecParams);
|
||||
if (MFX_ERR_NONE != sts) {
|
||||
|
||||
@@ -147,7 +147,7 @@ VPPPreprocEngine::VPPPreprocEngine(std::unique_ptr<VPLAccelerationPolicy>&& acce
|
||||
} while (MFX_ERR_NONE == sess.last_status && !my_sess.vpp_out_queue.empty());
|
||||
return ExecutionStatus::Continue;
|
||||
},
|
||||
// 2) Falls back on generic status procesing
|
||||
// 2) Falls back on generic status processing
|
||||
[this] (EngineSession& sess) -> ExecutionStatus
|
||||
{
|
||||
return this->process_error(sess.last_status, static_cast<session_type&>(sess));
|
||||
@@ -273,7 +273,7 @@ pp_session VPPPreprocEngine::initialize_preproc(const pp_params& initial_frame_p
|
||||
throw std::runtime_error("Cannot execute MFXVideoVPP_QueryIOSurf");
|
||||
}
|
||||
|
||||
// NB: Assing ID as upper limit descendant to distinguish specific VPP allocation
|
||||
// NB: Assign ID as upper limit descendant to distinguish specific VPP allocation
|
||||
// from decode allocations witch started from 0: by local module convention
|
||||
|
||||
static uint16_t request_id = 0;
|
||||
|
||||
@@ -248,7 +248,7 @@ VPLLegacyTranscodeEngine::VPLLegacyTranscodeEngine(std::unique_ptr<VPLAccelerati
|
||||
} while (MFX_ERR_NONE == sess.last_status && !my_sess.vpp_queue.empty());
|
||||
return ExecutionStatus::Continue;
|
||||
},
|
||||
// 5) Falls back on generic status procesing
|
||||
// 5) Falls back on generic status processing
|
||||
[this] (EngineSession& sess) -> ExecutionStatus
|
||||
{
|
||||
return this->process_error(sess.last_status, static_cast<LegacyDecodeSession&>(sess));
|
||||
@@ -358,7 +358,7 @@ VPLLegacyTranscodeEngine::initialize_session(mfxSession mfx_session,
|
||||
|
||||
}
|
||||
|
||||
// NB: Assing ID as upper limit descendant to distinguish specific VPP allocation
|
||||
// NB: Assign ID as upper limit descendant to distinguish specific VPP allocation
|
||||
// from decode allocations witch started from 0: by local module convention
|
||||
vppRequests[1].AllocId = std::numeric_limits<uint16_t>::max();
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ GSource::Priv::Priv(std::shared_ptr<IDataProvider> provider,
|
||||
}
|
||||
|
||||
// collect optional-preferred input parameters from input params
|
||||
// which may (optionally) or may not be used to choose the most preferrable
|
||||
// which may (optionally) or may not be used to choose the most preferable
|
||||
// VPL implementation (for example, specific API version or Debug/Release VPL build)
|
||||
std::vector<CfgParam> preferred_params;
|
||||
std::copy_if(cfg_params.begin(), cfg_params.end(), std::back_inserter(preferred_params),
|
||||
@@ -137,7 +137,7 @@ GSource::Priv::Priv(std::shared_ptr<IDataProvider> provider,
|
||||
std::sort(preferred_params.begin(), preferred_params.end());
|
||||
|
||||
GAPI_LOG_DEBUG(nullptr, "Find MFX better implementation from handle: " << mfx_handle <<
|
||||
" is satisfying preferrable params count: " << preferred_params.size());
|
||||
" is satisfying preferable params count: " << preferred_params.size());
|
||||
int i = 0;
|
||||
mfxImplDescription *idesc = nullptr;
|
||||
std::vector<mfxImplDescription*> available_impl_descriptions;
|
||||
@@ -162,7 +162,7 @@ GSource::Priv::Priv(std::shared_ptr<IDataProvider> provider,
|
||||
GAPI_LOG_INFO(nullptr, "Implementation index: " << i << "\n" << ss.str());
|
||||
|
||||
// Only one VPL implementation is required for GSource here.
|
||||
// Let's find intersection params from available impl with preferrable input params
|
||||
// Let's find intersection params from available impl with preferable input params
|
||||
// to find best match.
|
||||
// An available VPL implementation with max matching count
|
||||
std::vector<CfgParam> impl_params = get_params_from_string<CfgParam>(ss.str());
|
||||
@@ -178,7 +178,7 @@ GSource::Priv::Priv(std::shared_ptr<IDataProvider> provider,
|
||||
// in case of no input preferrance we consider all params are matched
|
||||
// for the first available VPL implementation. It will be a chosen one
|
||||
matches_count.emplace(impl_params.size(), i++);
|
||||
GAPI_LOG_DEBUG(nullptr, "No preferrable params, use the first one implementation");
|
||||
GAPI_LOG_DEBUG(nullptr, "No preferable params, use the first one implementation");
|
||||
break;
|
||||
} else {
|
||||
GAPI_LOG_DEBUG(nullptr, "Equal param intersection count: " << matched_params.size());
|
||||
|
||||
@@ -401,7 +401,7 @@ std::string ext_mem_frame_type_to_cstr(int type) {
|
||||
std::stringstream ss;
|
||||
APPEND_STRINGIFY_MASK_N_ERASE(type, "|", MFX_MEMTYPE_DXVA2_DECODER_TARGET);
|
||||
APPEND_STRINGIFY_MASK_N_ERASE(type, "|", MFX_MEMTYPE_DXVA2_PROCESSOR_TARGET);
|
||||
// NB: accoring to VPL source the commented MFX_* constane below are belong to the
|
||||
// NB: according to VPL source the commented MFX_* constane below are belong to the
|
||||
// same actual integral value as condition abobe. So it is impossible
|
||||
// to distinct them in condition branch. Just put this comment and possible
|
||||
// constans here...
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <opencv2/gapi/util/compiler_hints.hpp>
|
||||
|
||||
// NOTE: OPENCV_WITH_ITT is only defined if ITT dependecy is built by OpenCV infrastructure.
|
||||
// NOTE: OPENCV_WITH_ITT is only defined if ITT dependency is built by OpenCV infrastructure.
|
||||
// There will not be such define in G-API standalone mode.
|
||||
// TODO: Consider using OpenCV's trace.hpp
|
||||
#if defined(OPENCV_WITH_ITT)
|
||||
|
||||
Reference in New Issue
Block a user