index
:
libcamera/jmondi/libcamera.git
imx8mp/extensible-format
imx8mp/extensible-format-v8
imx8mp/extensible-format-v9
isi/raw_sensor
isi/raw_sensor_v2
jmondi/android/ndk/pinephonepro
jmondi/android/pinephonepro
jmondi/android/vndk
jmondi/c-abi
jmondi/device-match-generalize
jmondi/imx8mp/debix-a
jmondi/lc-compliance-cros
jmondi/pinephone
jmondi/pinephonepro
jmondi/pinephonepro-af
jmondi/rk3399/google-dru-scarlet
jmondi/rockpi/af/imx519
jmondi/rpi5-on-mainline
multicontext/rpi/v3
pfc/rkisp1-free-run
pfc/rkisp1-free-run-upstreaming
pfc/rkisp1-free-run-v2
rcar-gen4
yaml-emitter
Jacopo Mondi's clone of libcamera
git repository hosting on libcamera.org
summary
refs
log
tree
commit
diff
log msg
author
committer
range
path:
root
/
utils
/
raspberrypi
Mode
Name
Size
d---------
ctt
583
log
plain
-rw-r--r--
delayedctrls_parse.py
4084
log
plain
:
* Hans de Goede <hdegoede@redhat.com>
*
* swstats_cpu.h - CPU based software statistics implementation
*/
#pragma once
#include <stdint.h>
#include <libcamera/base/signal.h>
#include <libcamera/geometry.h>
#include
"libcamera/internal/shared_mem_object.h"
#include
"libcamera/internal/software_isp/swisp_stats.h"
namespace
libcamera
{
class
PixelFormat
;
struct
StreamConfiguration
;
class
SwStatsCpu
{
public
:
SwStatsCpu
();
~
SwStatsCpu
() =
default
;
bool
isValid
()
const
{
return
sharedStats_
.
fd
().
isValid
(); }
const
SharedFD
&
getStatsFD
() {
return
sharedStats_
.
fd
(); }
const
Size
&
patternSize
() {
return
patternSize_
; }
int
configure
(
const
StreamConfiguration
&
inputCfg
);
void
setWindow
(
const
Rectangle
&
window
);
void
startFrame
();
void
finishFrame
();
void
processLine0
(
unsigned int
y
,
const uint8_t
*
src
[])
{
if
((
y
&
ySkipMask_
) ||
y
<
static_cast
<
unsigned int
>(
window_
.
y
) ||
y
>= (
window_
.
y
+
window_
.
height
))
return
;
(
this
->*
stats0_
)(
src
);
}
void
processLine2
(
unsigned int
y
,
const uint8_t
*
src
[])
{
if
((
y
&
ySkipMask_
) ||
y
<
static_cast
<
unsigned int
>(
window_
.
y
) ||
y
>= (
window_
.
y
+
window_
.
height
))
return
;
(
this
->*
stats2_
)(
src
);
}
Signal
<>
statsReady
;
private
:
using
statsProcessFn
=
void
(
SwStatsCpu
::*)(
const uint8_t
*
src
[]);
void
statsBGGR10PLine0
(
const uint8_t
*
src
[]);
void
statsGBRG10PLine0
(
const uint8_t
*
src
[]);
/* Variables set by configure(), used every line */
statsProcessFn stats0_
;
statsProcessFn stats2_
;
bool
swapLines_
;
unsigned int
ySkipMask_
;
Rectangle window_
;
Size patternSize_
;
unsigned int
xShift_
;
SharedMemObject
<
SwIspStats
>
sharedStats_
;
SwIspStats stats_
;
};
}
/* namespace libcamera */