| Message ID | 20251024085130.995967-23-stefan.klug@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
2025. 10. 24. 10:50 keltezéssel, Stefan Klug írta: > When there are no stats available for a frame, it still makes sense > to call processStats to fill in the metadata of that frame. This mechanism is > already used for the raw path. Allow it's use for no-raw also. > > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > --- > src/ipa/rkisp1/rkisp1.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp > index 7a7b7682e242..01b30c947a0a 100644 > --- a/src/ipa/rkisp1/rkisp1.cpp > +++ b/src/ipa/rkisp1/rkisp1.cpp > @@ -389,7 +389,7 @@ void IPARkISP1::processStats(const uint32_t frame, const uint32_t bufferId, > * provided. > */ > const rkisp1_stat_buffer *stats = nullptr; > - if (!context_.configuration.raw) > + if (bufferId != 0) > stats = reinterpret_cast<rkisp1_stat_buffer *>( > mappedBuffers_.at(bufferId).planes()[0].data()); This assumes that bufferId of 0 is considered "invalid". This is kind of ensured in `PipelineHandlerRkISP1::allocateBuffers()`, but not really enforced in `IPARkISP1::mapBuffers()` or such. So maybe doing something like if (auto it = mappedBuffers_.find(bufferId); it != mappedBuffers_.end()) stats = reinterpret_cast<rkisp1_stat_buffer *>(it->second.planes()[0].data()); could be considered. Although this has the potential of "hiding" incorrect of incorrect ids, whereas currently they cause an exception, which terminates the process quite visibly. > > -- > 2.48.1 >
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 7a7b7682e242..01b30c947a0a 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -389,7 +389,7 @@ void IPARkISP1::processStats(const uint32_t frame, const uint32_t bufferId, * provided. */ const rkisp1_stat_buffer *stats = nullptr; - if (!context_.configuration.raw) + if (bufferId != 0) stats = reinterpret_cast<rkisp1_stat_buffer *>( mappedBuffers_.at(bufferId).planes()[0].data());
When there are no stats available for a frame, it still makes sense to call processStats to fill in the metadata of that frame. This mechanism is already used for the raw path. Allow it's use for no-raw also. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- src/ipa/rkisp1/rkisp1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)