summaryrefslogtreecommitdiff
path: root/test/camera/configuration_default.cpp
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2024-02-21 12:49:19 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-02-23 15:12:15 +0200
commit366077c4db502c8129eacc81a59d6e0ec958e4f0 (patch)
tree267e114a3a0440194ac53d73544aabea35f4c0c6 /test/camera/configuration_default.cpp
parent5e4dc46a0c6fc3138c887e9afbabfe7dfa6ebd98 (diff)
pipeline: rpi: vc4: Use an unpacked format if no packed one is available
When validating a stream, and no valid packed pixel format can be found, see if an unpacked format can be used instead. This is particularly helpful for 8 (and 16) bit raw formats, where asking for a packed format would previously have failed. Now the configuration will be adjusted to give you a format (in fact, the only format) that will work. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/camera/configuration_default.cpp')
0 files changed, 0 insertions, 0 deletions
pan class="hl opt">: public CameraTest, public Test { public: ControlInfoMapTest() : CameraTest("platform/vimc.0 Sensor B") { } protected: int init() override { return status_; } int run() override { const ControlInfoMap &infoMap = camera_->controls(); /* Test looking up a valid control by ControlId. */ if (infoMap.count(&controls::Brightness) != 1) { cerr << "count() on valid control failed" << endl; return TestFail; } if (infoMap.find(&controls::Brightness) == infoMap.end()) { cerr << "find() on valid control failed" << endl; return TestFail; } infoMap.at(&controls::Brightness); /* Test looking up a valid control by numerical ID. */ if (infoMap.count(controls::Brightness.id()) != 1) { cerr << "count() on valid ID failed" << endl; return TestFail; } if (infoMap.find(controls::Brightness.id()) == infoMap.end()) { cerr << "find() on valid ID failed" << endl; return TestFail; } infoMap.at(controls::Brightness.id()); /* Test looking up an invalid control by numerical ID. */ if (infoMap.count(12345) != 0) { cerr << "count() on invalid ID failed" << endl; return TestFail; } if (infoMap.find(12345) != infoMap.end()) { cerr << "find() on invalid ID failed" << endl; return TestFail; } /* Test looking up a control on a default-constructed infoMap */ const ControlInfoMap emptyInfoMap; if (emptyInfoMap.find(12345) != emptyInfoMap.end()) { cerr << "find() on empty ControlInfoMap failed" << endl; return TestFail; } return TestPass; } }; TEST_REGISTER(ControlInfoMapTest)