diff options
| author | Nikita Kostovsky <nikita@kostovsky.me> | 2025-11-22 21:59:31 +0100 |
|---|---|---|
| committer | Nikita Kostovsky <nikita@kostovsky.me> | 2025-11-22 21:59:31 +0100 |
| commit | fe1a89dbd83e10bfb480962a511fa0f43885eb77 (patch) | |
| tree | c184dcb51732b9a621dfbd9adeb8548e0ca55215 /src/image.h | |
| parent | 9157b253251f357b76fdfd657300d43e702f1674 (diff) | |
introduce calc pixels thread; rotation still requires 2 threads
Diffstat (limited to 'src/image.h')
| -rw-r--r-- | src/image.h | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/src/image.h b/src/image.h index d5fd953..33fb4d8 100644 --- a/src/image.h +++ b/src/image.h @@ -12,38 +12,27 @@ class Pixels; // TODO: template struct Image { - // Image(Image &other) { std::cerr << __func__ << ": don't copy me please" << std::endl; } Image() = default; Image(Image &other) = delete; Image(Image &&other) = delete; Image &operator=(Image &&other) = default; - // uint8_t data[img_height][img_width] = {{0}}; -#ifdef RADXA_ZERO_3E using radxa_row_t = std::array<uint8_t, radxa_raw_img_stride>; using radxa_data_t = std::array<radxa_row_t, img_height>; - // using row_t = std::array<uint8_t, radxa_raw_img_stride>; - using row_t = std::array<uint8_t, img_width>; - using data_t = std::array<row_t, img_height>; -#else + using row_t = std::array<uint8_t, img_width>; using data_t = std::array<row_t, img_height>; -#endif // RADXA_ZERO_3E + using rotated_row_t = std::array<uint8_t, img_height>; using column_t = rotated_row_t; using rotated_data_t = std::array<column_t, img_width>; - // data_t d; + alignas(128) data_t data; - // alignas(128) std::array<uint8_t, 417792> rawData; - int width{0}; - int height{0}; - // data_t *data; - // uint8_t *data = {nullptr}; - // uint8_t &dataAt(size_t row, size_t col); - // uint8_t rotated_cw[img_width][img_height] = {{0}}; - rotated_data_t rotated_cw; - // size_t dataSize{0}; - // unsigned int stride{0}; + alignas(128) rotated_data_t rotated_cw; + + uint16_t width{0}; + uint16_t height{0}; + libcamera::PixelFormat pixelFormat{0}; Counters counters{}; bool hasInputData{false}; |
