summaryrefslogtreecommitdiff
path: root/src/android/jpeg/exif.h
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2022-08-08 21:30:26 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-09-05 17:34:49 +0100
commit1a082a3e957bc669ae7b143e04d8d1012dddac4c (patch)
treed309a439c9f15a8309d6eebb4365fef005edc0bc /src/android/jpeg/exif.h
parentda9bb8dea6821edcfd3464e8cba37ad4a91087d6 (diff)
libcamera: yaml_parser: Report filename on failures
It can be helpful to know 'which' file failed to parse if there is a failure. Report it to the user in the error message. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'src/android/jpeg/exif.h')
0 files changed, 0 insertions, 0 deletions
href='#n53'>53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2020, Raspberry Pi Ltd
 *
 * transform.h - 2D plane transforms
 */

#pragma once

#include <string>

namespace libcamera {

enum class Transform : int {
	Identity = 0,
	Rot0 = Identity,
	HFlip = 1,
	VFlip = 2,
	HVFlip = HFlip | VFlip,
	Rot180 = HVFlip,
	Transpose = 4,
	Rot270 = HFlip | Transpose,
	Rot90 = VFlip | Transpose,
	Rot180Transpose = HFlip | VFlip | Transpose
};

constexpr Transform operator&(Transform t0, Transform t1)
{
	return static_cast<Transform>(static_cast<int>(t0) & static_cast<int>(t1));
}

constexpr Transform operator|(Transform t0, Transform t1)
{
	return static_cast<Transform>(static_cast<int>(t0) | static_cast<int>(t1));
}

constexpr Transform operator^(Transform t0, Transform t1)
{
	return static_cast<Transform>(static_cast<int>(t0) ^ static_cast<int>(t1));
}

constexpr Transform &operator&=(Transform &t0, Transform t1)
{
	return t0 = t0 & t1;
}

constexpr Transform &operator|=(Transform &t0, Transform t1)
{
	return t0 = t0 | t1;
}

constexpr Transform &operator^=(Transform &t0, Transform t1)
{
	return t0 = t0 ^ t1;
}

Transform operator*(Transform t0, Transform t1);

Transform operator-(Transform t);

constexpr bool operator!(Transform t)
{
	return t == Transform::Identity;
}

constexpr Transform operator~(Transform t)
{
	return static_cast<Transform>(~static_cast<int>(t) & 7);
}

Transform transformFromRotation(int angle, bool *success = nullptr);

const char *transformToString(Transform t);

} /* namespace libcamera */