Avoid dma sync dependency in shoe plugin
This commit is contained in:
parent
324bd3296c
commit
73071c10d2
@ -592,13 +592,11 @@ private:
|
||||
const size_t packed_size = static_cast<size_t>(model_w_) * static_cast<size_t>(model_h_) * 3;
|
||||
if (resized_data && resized_stride > 0) {
|
||||
if (packed_size > input_buf_.size()) input_buf_.resize(packed_size);
|
||||
if (resized_frame.DmaFd() >= 0) resized_frame.SyncStart();
|
||||
for (int row = 0; row < model_h_; ++row) {
|
||||
memcpy(input_buf_.data() + static_cast<size_t>(row) * static_cast<size_t>(model_w_) * 3,
|
||||
resized_data + static_cast<size_t>(row) * static_cast<size_t>(resized_stride),
|
||||
static_cast<size_t>(model_w_) * 3);
|
||||
}
|
||||
if (resized_frame.DmaFd() >= 0) resized_frame.SyncEnd();
|
||||
model_input_data = input_buf_.data();
|
||||
model_input_size = packed_size;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user