/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* * Copyright (C) 2019, Google Inc. * * libcamera Pixel Format */ #pragma once #include #include #include #include namespace libcamera { class PixelFormat { public: constexpr PixelFormat() : fourcc_(0), modifier_(0) { } explicit constexpr PixelFormat(uint32_t fourcc, uint64_t modifier = 0) : fourcc_(fourcc), modifier_(modifier) { } bool operator==(const PixelFormat &other) const; bool operator!=(const PixelFormat &other) const { return !(*this == other); } bool operator<(const PixelFormat &other) const; constexpr bool isValid() const { return fourcc_ != 0; } constexpr operator uint32_t() const { return fourcc_; } constexpr uint32_t fourcc() const { return fourcc_; } constexpr uint64_t modifier() const { return modifier_; } std::string toString() const; static PixelFormat fromString(const std::string &name); private: uint32_t fourcc_; uint64_t modifier_; }; std::ostream &operator<<(std::ostream &out, const PixelFormat &f); } /* namespace libcamera */ class='sub'>libcamera pipeline handler for VIVIDgit repository hosting on libcamera.org
summaryrefslogtreecommitdiff
blob: 82b364681f376dfaac4576a3075a569017e8cfeb (plain)
1
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-wind"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg>