summaryrefslogtreecommitdiff
path: root/test/bayer-format.cpp
AgeCommit message (Collapse)Author
2022-05-04libcamera: Replace toString with operator<<() for format classesLaurent Pinchart
Now that format classes implement the stream formatting operator<<(), use it instead of the toString() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-11-02libcamera: bayer_format: Turn BayerFormat::Packing into scoped enumLaurent Pinchart
The unscoped enum BayerFormat::Packing leads to usage of the ambiguous BayerFormat::None enumerator. Turn the enumeration into a scoped enum to force usage of BayerFormat::Packing::None, and drop the now redundant "Packed" suffix for the CSI2 and IPU3 packing. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-05-05test: bayer-format: Rectify internal header's #include pathUmang Jain
libcamera internal headers are not available system-wide. Hence, directive `#include <libcamera/internal/header.h>` is wrong. Fix it by using "" for the #include directive. Fixes: e09c487b97f8 ("test: Add unit tests for the BayerFormat class") Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2021-02-04test: Add unit tests for the BayerFormat classSebastian Fricke
Test all of the present methods including the newly implemented `fromV4L2PixelFormat`, as well as the new operators `==/!=`. Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@posteo.net> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>