[PATCH] ipa: simple: Initialize ccmEnabled to false
Milan Zamazal
mzamazal at redhat.com
Tue Apr 1 12:17:56 CEST 2025
Hi Stanislaw,
thank you for the patch.
Stanislaw Gruszka <stanislaw.gruszka at linux.intel.com> writes:
> ccmEnabled variable is not initialized by default, what result of
> usage of CCM when the algorithm itself is not enabled and configured.
Interesting, I thought the default boolean value in C++ is false.
If true or not, it doesn't harm to set it explicitly.
> The bug manifest itself as seldom reproducible corrupted video stream.
> Fix by initialize the variable in IPAContext class initialization list.
>
> Fixes: ac3068655643 ("libcamera: software_isp: Track whether CCM is enabled")
> Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka at linux.intel.com>
> ---
> src/ipa/simple/ipa_context.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/ipa/simple/ipa_context.h b/src/ipa/simple/ipa_context.h
> index 7dc2cd7ae828..afccf557121e 100644
> --- a/src/ipa/simple/ipa_context.h
> +++ b/src/ipa/simple/ipa_context.h
> @@ -82,7 +82,7 @@ struct IPAFrameContext : public FrameContext {
>
> struct IPAContext {
> IPAContext(unsigned int frameContextSize)
> - : frameContexts(frameContextSize)
> + : frameContexts(frameContextSize), ccmEnabled(false)
Or setting it
bool ccmEnabled = false;
in IPAContext? Up to the maintainers, what they prefer.
>From my side, in either case:
Reviewed-by: Milan Zamazal <mzamazal at redhat.com>
> {
> }
More information about the libcamera-devel
mailing list