summaryrefslogtreecommitdiff
path: root/utils/raspberrypi
ModeNameSize
d---------ctt583logplain
-rw-r--r--delayedctrls_parse.py4084logplain
: * Hans de Goede <hdegoede@redhat.com> * * swstats_cpu.h - CPU based software statistics implementation */ #pragma once #include <stdint.h> #include <libcamera/base/signal.h> #include <libcamera/geometry.h> #include "libcamera/internal/shared_mem_object.h" #include "libcamera/internal/software_isp/swisp_stats.h" namespace libcamera { class PixelFormat; struct StreamConfiguration; class SwStatsCpu { public: SwStatsCpu(); ~SwStatsCpu() = default; bool isValid() const { return sharedStats_.fd().isValid(); } const SharedFD &getStatsFD() { return sharedStats_.fd(); } const Size &patternSize() { return patternSize_; } int configure(const StreamConfiguration &inputCfg); void setWindow(const Rectangle &window); void startFrame(); void finishFrame(); void processLine0(unsigned int y, const uint8_t *src[]) { if ((y & ySkipMask_) || y < static_cast<unsigned int>(window_.y) || y >= (window_.y + window_.height)) return; (this->*stats0_)(src); } void processLine2(unsigned int y, const uint8_t *src[]) { if ((y & ySkipMask_) || y < static_cast<unsigned int>(window_.y) || y >= (window_.y + window_.height)) return; (this->*stats2_)(src); } Signal<> statsReady; private: using statsProcessFn = void (SwStatsCpu::*)(const uint8_t *src[]); void statsBGGR10PLine0(const uint8_t *src[]); void statsGBRG10PLine0(const uint8_t *src[]); /* Variables set by configure(), used every line */ statsProcessFn stats0_; statsProcessFn stats2_; bool swapLines_; unsigned int ySkipMask_; Rectangle window_; Size patternSize_; unsigned int xShift_; SharedMemObject<SwIspStats> sharedStats_; SwIspStats stats_; }; } /* namespace libcamera */