summaryrefslogtreecommitdiff
path: root/src/qcam/assets/feathericons/chevrons-up.svg
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-12-09 13:13:38 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-12-14 15:45:58 +0200
commitcd4636c14fff91a3f729918d96d76e2dae095b91 (patch)
treec1f789e416affb818452d4fd6688ff7d1cc4ac4f /src/qcam/assets/feathericons/chevrons-up.svg
parent5cfbbcd20731a2160206cc1d935eac2c770376ae (diff)
libcamera: pipeline: raspberrypi: Don't leak RPiCameraData::sensor_
The CameraSensor instance stored in RPiCameraData::sensor_ is allocated dynamically and never deleted. Fix the memory leak by storing it in a std::unique_ptr<>. Fixes: 740fd1b62f67 ("libcamera: pipeline: Raspberry Pi pipeline handler") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/qcam/assets/feathericons/chevrons-up.svg')
0 files changed, 0 insertions, 0 deletions
'n63' href='#n63'>63 64 65 66 67
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2021, Google inc.
 *
 * blc.cpp - IPU3 Black Level Correction control
 */

#include "blc.h"

#include <string.h>

/**
 * \file blc.h
 * \brief IPU3 Black Level Correction control
 */

namespace libcamera {

namespace ipa::ipu3::algorithms {

/**
 * \class BlackLevelCorrection
 * \brief A class to handle black level correction
 *
 * The pixels output by the camera normally include a black level, because
 * sensors do not always report a signal level of '0' for black. Pixels at or
 * below this level should be considered black. To achieve that, the ImgU BLC
 * algorithm subtracts a configurable offset from all pixels.
 *
 * The black level can be measured at runtime from an optical dark region of the
 * camera sensor, or measured during the camera tuning process. The first option
 * isn't currently supported.
 */

BlackLevelCorrection::BlackLevelCorrection()
{
}

/**
 * \brief Fill in the parameter structure, and enable black level correction
 * \param context The shared IPA context
 * \param params The IPU3 parameters
 *
 * Populate the IPU3 parameter structure with the correction values for each
 * channel and enable the corresponding ImgU block processing.
 */
void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context,
			      ipu3_uapi_params *params)
{
	/*
	 * The Optical Black Level correction values
	 * \todo The correction values should come from sensor specific
	 * tuning processes. This is a first rough approximation.
	 */
	params->obgrid_param.gr = 64;
	params->obgrid_param.r  = 64;
	params->obgrid_param.b  = 64;