1
0
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:
luzpaz
2022-04-13 13:06:37 -04:00
committed by GitHub
parent 03c9648f2e
commit 554d08c3a1
48 changed files with 72 additions and 72 deletions
@@ -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());
+1 -1
View File
@@ -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...