libcamera: pixelformats: Replace set of modifiers with single value

DRM fourccs look like they have a per-plane modifier, but in fact each
of them should be same. Hence instead of passing a set of modifiers for
each fourcc in PixelFormat class, we can pass just a single modifier.
So, replace the set with a single value.

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Fix compilation error in src/libcamera/pipeline/ipu3/ipu3.cpp]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Kaaira Gupta
2020-04-04 00:39:44 +03:00
committed by Laurent Pinchart
parent 8f8992e4ee
commit 72278369b3
3 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ class PixelFormat
{
public:
PixelFormat();
explicit PixelFormat(uint32_t fourcc, const std::set<uint64_t> &modifiers = {});
explicit PixelFormat(uint32_t fourcc, uint64_t modifier = 0);
bool operator==(const PixelFormat &other) const;
bool operator!=(const PixelFormat &other) const { return !(*this == other); }
@@ -29,13 +29,13 @@ public:
operator uint32_t() const { return fourcc_; }
uint32_t fourcc() const { return fourcc_; }
const std::set<uint64_t> &modifiers() const { return modifiers_; }
uint64_t modifier() const { return modifier_; }
std::string toString() const;
private:
uint32_t fourcc_;
std::set<uint64_t> modifiers_;
uint64_t modifier_;
};
} /* namespace libcamera */