summaryrefslogtreecommitdiff
BranchCommit messageAuthorAge
masterlibcamera: request: addBuffer(): Do fence check earlierBarnabás Pőcze5 hours
 
TagDownloadAuthorAge
v0.4.0commit 35ed4b9129...Kieran Bingham8 weeks
v0.3.2commit 8bcec68734...Kieran Bingham5 months
v0.3.1commit 9c40320763...Kieran Bingham7 months
v0.3.0commit aee16c0691...Kieran Bingham9 months
v0.2.0commit 89227a428a...Kieran Bingham13 months
v0.1.0commit 668a5e674a...Kieran Bingham19 months
v0.0.5commit fb44403f1c...Kieran Bingham22 months
v0.0.4commit 6cf637eb25...Kieran Bingham2 years
v0.0.3commit f66a5c447b...Kieran Bingham2 years
v0.0.2commit 2b1e1cd1ab...Kieran Bingham2 years
v0.0.1commit a83aed77df...Kieran Bingham2 years
v0.0.0commit 87ba17ba41...Laurent Pinchart3 years
a> 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2020, Sebastian Fricke
 *
 * bayer_format.cpp - BayerFormat class tests
 */

#include <iostream>

#include <libcamera/transform.h>

#include "libcamera/internal/bayer_format.h"

#include "test.h"

using namespace std;
using namespace libcamera;

class BayerFormatTest : public Test
{
protected:
	int run()
	{
		/* An empty Bayer format has to be invalid. */
		BayerFormat bayerFmt;
		if (bayerFmt.isValid()) {
			cerr << "An empty BayerFormat has to be invalid."
			     << endl;
			return TestFail;
		}

		/* A correct Bayer format has to be valid. */
		bayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::None);
		if (!bayerFmt.isValid()) {
			cerr << "A correct BayerFormat has to be valid."
			     << endl;
			return TestFail;
		}

		/*
		 * Two bayer formats created with the same order and bit depth
		 * have to be equal.
		 */