refactor(synthetic): make switch of disable copy and disable unnessary copy
This commit is contained in:
@@ -31,6 +31,9 @@ class DepthProcessorOCV : public Processor {
|
||||
std::string Name() override;
|
||||
|
||||
protected:
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
|
||||
@@ -31,6 +31,12 @@ class DisparityNormalizedProcessor : public Processor {
|
||||
std::string Name() override;
|
||||
|
||||
protected:
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
inline Processor::process_type ProcessInputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
|
||||
@@ -36,6 +36,9 @@ class PointsProcessor : public Processor {
|
||||
std::string Name() override;
|
||||
|
||||
protected:
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
|
||||
@@ -79,6 +79,12 @@ class RectifyProcessor : public Processor {
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) override;
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
inline Processor::process_type ProcessInputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
|
||||
private:
|
||||
void InitParams(IntrinsicsEquidistant in_left,
|
||||
|
||||
@@ -49,6 +49,13 @@ class RectifyProcessorOCV : public Processor {
|
||||
cv::Mat map11, map12, map21, map22;
|
||||
|
||||
protected:
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
inline Processor::process_type ProcessInputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
|
||||
@@ -73,7 +73,7 @@ void s1s2Processor::ProcessNativeStream(
|
||||
}
|
||||
if (left_data.img && right_data.img &&
|
||||
left_data.img->frame_id == right_data.img->frame_id) {
|
||||
Process(data_obj(left_data, right_data));
|
||||
Process(std::make_shared<ObjMat2>(data_obj(left_data, right_data)));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,12 @@ class s1s2Processor : public RootProcessor {
|
||||
api::StreamData GetStreamData(const Stream &stream) override;
|
||||
std::vector<api::StreamData> GetStreamDatas(const Stream &stream) override; // NOLINT
|
||||
protected:
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
inline Processor::process_type ProcessInputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
|
||||
Reference in New Issue
Block a user