summaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
authorStefan Klug <stefan.klug@ideasonboard.com>2024-06-14 12:35:50 +0200
committerStefan Klug <stefan.klug@ideasonboard.com>2024-07-05 22:38:20 +0200
commite91f6c384f837f8cf685c9d32355ea1b3b77d5ec (patch)
treea4b96ae758c0cf908461380d85b22ad9e522eafe /test/py
parente0f41b7401eb8cc672d4fe62c219bd082c5830ed (diff)
libtuning: lsc: rkisp1: Do not calculate ratios to green
The current LSC algorithm for the rkisp1 just forwards the LSC tables to the hardware, so absolute factors are needed and not ratios compared to green. Therefore every channel needs to be calculated independently. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'test/py')
0 files changed, 0 insertions, 0 deletions
n126'>126 127 128 129
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2019, Google Inc.
 *
 * threads.cpp - Threads test
 */

#include <chrono>
#include <iostream>
#include <memory>
#include <thread>

#include <libcamera/base/thread.h>

#include "test.h"

using namespace std;
using namespace libcamera;

class DelayThread : public Thread
{
public:
	DelayThread(chrono::steady_clock::duration duration)
		: duration_(duration)
	{
	}

protected:
	void run()
	{
		this_thread::sleep_for(duration_);
	}

private:
	chrono::steady_clock::duration duration_;
};

class ThreadTest : public Test
{
protected:
	int init()
	{
		return 0;
	}

	int run()
	{
		/* Test Thread() retrieval for the main thread. */
		Thread *mainThread = Thread::current();
		if (!mainThread) {
			cout << "Thread::current() failed to main thread"
			     << endl;
			return TestFail;
		}