Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion include/ipu75xa/ia_imaging/IIPUAic.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 Intel Corporation.
* Copyright (C) 2020-2026 Intel Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -267,6 +267,20 @@ class IPU7Aic {
ia_err updateTuning(const ia_binary_data *aiqb, const ia_cmc_t *cmc,
int32_t streamId = -1);

/*!
* \brief ISP-mode-switch only: refresh AIC tuning bytes for the given
* stream without touching CMC. Forwards to IaAic::updateGAicTuning,
* which internally arms mForceStreamConst on every PacEngine so the
* next iaPacRun() re-runs the j=0 stream-constant slot for each
* kernel and bypasses isChanged inside executeKernel.
*
* \param[in] aiqb New tuning binary (already LARD-selected for the
* desired ISP mode).
* \param[in] streamId (Optional) AIC handle stream id. Default -1.
* \return Error code.
*/
ia_err updateGAicTuning(const ia_binary_data *aiqb, int32_t streamId = -1);

/*!
* \brief Get statistics parameters for a specific frame.
*
Expand Down
8 changes: 7 additions & 1 deletion include/ipu75xa/ia_imaging/IntelCCA.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2025 Intel Corporation.
* Copyright (C) 2025-2026 Intel Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -265,6 +265,12 @@ class LIBEXPORT IntelCCA : public IntelCCABase {
virtual ia_err updateAicTuning(const ia_binary_data *aiqb, const ia_cmc_t *cmc,
int32_t streamId = -1) override;

/*! ISP-mode-switch only: forwards to IPU7Aic::updateGAicTuning, which
* refreshes the AIC tuning bytes in-place and marks tuning changed
* without touching CMC. */
virtual ia_err updateAicGAicTuning(const ia_binary_data *aiqb,
int32_t streamId = -1) override;

/*!
* \brief Get DVS statistics from AIC.
*
Expand Down
35 changes: 34 additions & 1 deletion include/ipu75xa/ia_imaging/IntelCCABase.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2025 Intel Corporation.
* Copyright (C) 2019-2026 Intel Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -380,6 +380,27 @@ class LIBEXPORT IntelCCABase {
ia_err updateTuning(uint8_t tag, ia_lard_input_params &lardParams, const cca_nvm &nvm,
ia_lard_results **pLardResults, int32_t aicId = -1);

/*!
* \brief ISP-mode-switch only tuning refresh.
*
* Like updateTuning() but skips CMC re-parse and AIQ tuning update.
* Honors the same tag bitfield as updateTuning() for the remaining
* sections: CCA_LARD_ISP gates the AIC tuning refresh, CCA_LARD_OTHER
* gates the LTM tuning refresh. CCA_LARD_CMC / CCA_LARD_AIQ bits in
* tag are intentionally ignored on this path. Use when only the
* per-mode tuning needs to change (e.g. driver-side runtime ISP-mode
* switch where CMC and 3A data stay the same).
*
* \param[in] tag Mandatory. Bitfield of CCA_LARD_* groups to
* refresh; CMC/AIQ bits are ignored.
* \param[in] lardParams Mandatory. Lard input parameters (must carry
* the new isp_mode_index).
* \param[in] aicId Optional. Target AIC handle; default -1 picks
* the first stream id.
* \return Error code.
*/
ia_err updateIspTuning(uint8_t tag, ia_lard_input_params &lardParams, int32_t aicId = -1);

/*!
* \brief Parse embedded data in run time.
*
Expand Down Expand Up @@ -509,6 +530,18 @@ class LIBEXPORT IntelCCABase {
const cca_stream_ids &aic_stream_ids) = 0;
virtual ia_err updateAicTuning(const ia_binary_data *aiqb, const ia_cmc_t *cmc,
int32_t streamId = -1) = 0;

/*! ISP-mode-switch only AIC tuning refresh. Default implementation
* reuses updateAicTuning with cmc=nullptr (the existing AIC chain
* already short-circuits CMC handling when cmc is null), so derived
* classes that don't have a dedicated path inherit working behavior.
* IPU7's IntelCCA overrides this to call IPU7Aic::updateGAicTuning
* directly for clarity of intent. */
virtual ia_err updateAicGAicTuning(const ia_binary_data *aiqb,
int32_t streamId = -1) {
return updateAicTuning(aiqb, nullptr, streamId);
}

virtual ia_err getDvsStatsAic(ia_dvs_statistics *stats) = 0;

protected:
Expand Down
3 changes: 2 additions & 1 deletion include/ipu75xa/ia_imaging/ia_abstraction.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 Intel Corporation
* Copyright 2012-2026 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -155,6 +155,7 @@ typedef uint16_t half;
#define IA_SIN(a) sinf(CAST_TO_TYPE(float32_t,(a)))
#define IA_COS(a) cosf(CAST_TO_TYPE(float32_t,(a)))
#define IA_ATAN(a) atanf(CAST_TO_TYPE(float32_t,(a)))
#define IA_TANH(a) tanhf(CAST_TO_TYPE(float32_t,(a)))
#define IA_LN(a) logf(CAST_TO_TYPE(float32_t,(a)))
#define IA_UNUSED(x) (void)x
#define IA_LOGD(x) (log(CAST_TO_TYPE(float64_t,(x))))
Expand Down
15 changes: 14 additions & 1 deletion include/ipu75xa/ia_imaging/ia_aic_class.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* INTEL CONFIDENTIAL
*
* Copyright (C) 2018-2025 Intel Corporation
* Copyright (C) 2018-2026 Intel Corporation
*
* This software and the related documents are Intel copyrighted materials,
* and your use of them is governed by the express license under which they
Expand Down Expand Up @@ -162,6 +162,12 @@ class LIBEXPORT IaAic
const ia_binary_data *aiqb_data,
const ia_cmc_t *ia_cmc_ptr = nullptr);

/*! ISP-mode-switch only: refresh GAIC tuning bytes in-place via
* IaAicUpdateGAic. Skips CMC re-parse and PAF stats update -
* caller guarantees CMC is unchanged. On success, internally arms
* mForceStreamConst on every PacEngine. */
ia_err updateGAicTuning(const ia_binary_data *aiqb_data);

/*! Update resolutions info/history configuration for CB/PG to AIC context
*
*
Expand Down Expand Up @@ -253,6 +259,13 @@ class LIBEXPORT IaAic

int32_t PgIndex(int32_t group_id) const;

/*! Forward "ISP tuning bytes were just refreshed" signal to every
* PacEngine in this AIC context. The next iaPacRun() runs the j=0
* stream-constant slot once for each kernel and bypasses
* PacObject::isChanged() inside executeKernel. One-shot per engine.
* Called internally from updateGAicTuning() on success. */
void setForceStreamConst();

ia_err IaAicInitPrivate(const ia_binary_data *aiqb_data);

void IaAicDeinitPrivate();
Expand Down
3 changes: 2 additions & 1 deletion include/ipu75xa/ia_imaging/ia_ccat_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ typedef struct
ia_aiq_awb_results awb_results; /*!< Optional. */
ia_aiq_af_results af_results; /*!< Optional. */
bool bAssitLightOn; /*!< True if the af assist light is on, false otherwise .*/
bool zoom_on; /*!< True if the camera is zooming, false otherwise .*/
#ifdef IA_CCAT_FACE_ANALYSIS_ENABLED
ia_face_roi faces[IA_CCAT_FACES_MAX_NUM]; /*!< Optional. Face coordinates from external face detector. NULL if not available. */
bool updated; /*!< The update status of face. true is the real statistics, and false is the false statistics that have not been updated.*/
Expand Down Expand Up @@ -261,7 +262,7 @@ typedef enum
ccat_project_adaption_bitmap_8 = 1 << 8, /*!< is to skip the logic that sets stable face signal when MSFT is updated. */
ccat_project_adaption_bitmap_9 = 1 << 9, /*!< TBD */
ccat_project_adaption_bitmap_10 = 1 << 10, /*!< TBD */
ccat_project_adaption_bitmap_11 = 1 << 11, /*!< TBD */
ccat_project_adaption_bitmap_11 = 1 << 11, /*!< is world facing camera */
ccat_project_adaption_bitmap_12 = 1 << 12, /*!< TBD */
ccat_project_adaption_bitmap_13 = 1 << 13, /*!< TBD */
ccat_project_adaption_bitmap_14 = 1 << 14, /*!< TBD */
Expand Down
4 changes: 3 additions & 1 deletion include/ipu75xa/ia_imaging/ia_pal_types_isp_ids_autogen.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ typedef enum
ia_pal_uuid_isp_acm_1_1 = 13026,
ia_pal_uuid_isp_acm_1_2 = 17531,
ia_pal_uuid_isp_aestatistics_2_1 = 55073,
ia_pal_uuid_isp_b2b = 45372,
ia_pal_uuid_isp_b2b = 17306,
ia_pal_uuid_isp_b2i_ds_1_1 = 40299,
ia_pal_uuid_isp_sw_scaler = 19706,
ia_pal_uuid_isp_bnlm_3_3 = 21777,
Expand Down Expand Up @@ -96,6 +96,7 @@ typedef enum
ia_pal_uuid_isp_linearization2_0 = 10326,
ia_pal_uuid_isp_lsc_1_2 = 2144,
ia_pal_uuid_isp_nntm_1_0 = 46539,
ia_pal_uuid_isp_nntm_1_2 = 8034,
ia_pal_uuid_isp_outputscaler_2_0_a = 6800,
ia_pal_uuid_isp_pafstatistics_1_2 = 44308,
ia_pal_uuid_isp_pext_1_0 = 43213,
Expand All @@ -122,6 +123,7 @@ typedef enum
{
ia_pal_uuid_system_api_acm_1_2 = 36320,
ia_pal_uuid_system_api_aestatistics_2_1 = 6191,
ia_pal_uuid_system_api_b2b = 58968,
ia_pal_uuid_system_api_b2i_ds_1_1 = 51813,
ia_pal_uuid_system_api_bnlm_3_3 = 5901,
ia_pal_uuid_system_api_bxt_blc = 12306,
Expand Down
16 changes: 15 additions & 1 deletion include/ipu7x/ia_imaging/IIPUAic.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2025 Intel Corporation.
* Copyright (C) 2020-2026 Intel Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -267,6 +267,20 @@ class IPU7Aic {
ia_err updateTuning(const ia_binary_data *aiqb, const ia_cmc_t *cmc,
int32_t streamId = -1);

/*!
* \brief ISP-mode-switch only: refresh AIC tuning bytes for the given
* stream without touching CMC. Forwards to IaAic::updateGAicTuning,
* which internally arms mForceStreamConst on every PacEngine so the
* next iaPacRun() re-runs the j=0 stream-constant slot for each
* kernel and bypasses isChanged inside executeKernel.
*
* \param[in] aiqb New tuning binary (already LARD-selected for the
* desired ISP mode).
* \param[in] streamId (Optional) AIC handle stream id. Default -1.
* \return Error code.
*/
ia_err updateGAicTuning(const ia_binary_data *aiqb, int32_t streamId = -1);

/*!
* \brief Get statistics parameters for a specific frame.
*
Expand Down
8 changes: 7 additions & 1 deletion include/ipu7x/ia_imaging/IntelCCA.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2025 Intel Corporation.
* Copyright (C) 2025-2026 Intel Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -265,6 +265,12 @@ class LIBEXPORT IntelCCA : public IntelCCABase {
virtual ia_err updateAicTuning(const ia_binary_data *aiqb, const ia_cmc_t *cmc,
int32_t streamId = -1) override;

/*! ISP-mode-switch only: forwards to IPU7Aic::updateGAicTuning, which
* refreshes the AIC tuning bytes in-place and marks tuning changed
* without touching CMC. */
virtual ia_err updateAicGAicTuning(const ia_binary_data *aiqb,
int32_t streamId = -1) override;

/*!
* \brief Get DVS statistics from AIC.
*
Expand Down
35 changes: 34 additions & 1 deletion include/ipu7x/ia_imaging/IntelCCABase.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2025 Intel Corporation.
* Copyright (C) 2019-2026 Intel Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -380,6 +380,27 @@ class LIBEXPORT IntelCCABase {
ia_err updateTuning(uint8_t tag, ia_lard_input_params &lardParams, const cca_nvm &nvm,
ia_lard_results **pLardResults, int32_t aicId = -1);

/*!
* \brief ISP-mode-switch only tuning refresh.
*
* Like updateTuning() but skips CMC re-parse and AIQ tuning update.
* Honors the same tag bitfield as updateTuning() for the remaining
* sections: CCA_LARD_ISP gates the AIC tuning refresh, CCA_LARD_OTHER
* gates the LTM tuning refresh. CCA_LARD_CMC / CCA_LARD_AIQ bits in
* tag are intentionally ignored on this path. Use when only the
* per-mode tuning needs to change (e.g. driver-side runtime ISP-mode
* switch where CMC and 3A data stay the same).
*
* \param[in] tag Mandatory. Bitfield of CCA_LARD_* groups to
* refresh; CMC/AIQ bits are ignored.
* \param[in] lardParams Mandatory. Lard input parameters (must carry
* the new isp_mode_index).
* \param[in] aicId Optional. Target AIC handle; default -1 picks
* the first stream id.
* \return Error code.
*/
ia_err updateIspTuning(uint8_t tag, ia_lard_input_params &lardParams, int32_t aicId = -1);

/*!
* \brief Parse embedded data in run time.
*
Expand Down Expand Up @@ -509,6 +530,18 @@ class LIBEXPORT IntelCCABase {
const cca_stream_ids &aic_stream_ids) = 0;
virtual ia_err updateAicTuning(const ia_binary_data *aiqb, const ia_cmc_t *cmc,
int32_t streamId = -1) = 0;

/*! ISP-mode-switch only AIC tuning refresh. Default implementation
* reuses updateAicTuning with cmc=nullptr (the existing AIC chain
* already short-circuits CMC handling when cmc is null), so derived
* classes that don't have a dedicated path inherit working behavior.
* IPU7's IntelCCA overrides this to call IPU7Aic::updateGAicTuning
* directly for clarity of intent. */
virtual ia_err updateAicGAicTuning(const ia_binary_data *aiqb,
int32_t streamId = -1) {
return updateAicTuning(aiqb, nullptr, streamId);
}

virtual ia_err getDvsStatsAic(ia_dvs_statistics *stats) = 0;

protected:
Expand Down
3 changes: 2 additions & 1 deletion include/ipu7x/ia_imaging/ia_abstraction.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 Intel Corporation
* Copyright 2012-2026 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -155,6 +155,7 @@ typedef uint16_t half;
#define IA_SIN(a) sinf(CAST_TO_TYPE(float32_t,(a)))
#define IA_COS(a) cosf(CAST_TO_TYPE(float32_t,(a)))
#define IA_ATAN(a) atanf(CAST_TO_TYPE(float32_t,(a)))
#define IA_TANH(a) tanhf(CAST_TO_TYPE(float32_t,(a)))
#define IA_LN(a) logf(CAST_TO_TYPE(float32_t,(a)))
#define IA_UNUSED(x) (void)x
#define IA_LOGD(x) (log(CAST_TO_TYPE(float64_t,(x))))
Expand Down
15 changes: 14 additions & 1 deletion include/ipu7x/ia_imaging/ia_aic_class.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* INTEL CONFIDENTIAL
*
* Copyright (C) 2018-2025 Intel Corporation
* Copyright (C) 2018-2026 Intel Corporation
*
* This software and the related documents are Intel copyrighted materials,
* and your use of them is governed by the express license under which they
Expand Down Expand Up @@ -162,6 +162,12 @@ class LIBEXPORT IaAic
const ia_binary_data *aiqb_data,
const ia_cmc_t *ia_cmc_ptr = nullptr);

/*! ISP-mode-switch only: refresh GAIC tuning bytes in-place via
* IaAicUpdateGAic. Skips CMC re-parse and PAF stats update -
* caller guarantees CMC is unchanged. On success, internally arms
* mForceStreamConst on every PacEngine. */
ia_err updateGAicTuning(const ia_binary_data *aiqb_data);

/*! Update resolutions info/history configuration for CB/PG to AIC context
*
*
Expand Down Expand Up @@ -253,6 +259,13 @@ class LIBEXPORT IaAic

int32_t PgIndex(int32_t group_id) const;

/*! Forward "ISP tuning bytes were just refreshed" signal to every
* PacEngine in this AIC context. The next iaPacRun() runs the j=0
* stream-constant slot once for each kernel and bypasses
* PacObject::isChanged() inside executeKernel. One-shot per engine.
* Called internally from updateGAicTuning() on success. */
void setForceStreamConst();

ia_err IaAicInitPrivate(const ia_binary_data *aiqb_data);

void IaAicDeinitPrivate();
Expand Down
3 changes: 2 additions & 1 deletion include/ipu7x/ia_imaging/ia_ccat_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ typedef struct
ia_aiq_awb_results awb_results; /*!< Optional. */
ia_aiq_af_results af_results; /*!< Optional. */
bool bAssitLightOn; /*!< True if the af assist light is on, false otherwise .*/
bool zoom_on; /*!< True if the camera is zooming, false otherwise .*/
#ifdef IA_CCAT_FACE_ANALYSIS_ENABLED
ia_face_roi faces[IA_CCAT_FACES_MAX_NUM]; /*!< Optional. Face coordinates from external face detector. NULL if not available. */
bool updated; /*!< The update status of face. true is the real statistics, and false is the false statistics that have not been updated.*/
Expand Down Expand Up @@ -261,7 +262,7 @@ typedef enum
ccat_project_adaption_bitmap_8 = 1 << 8, /*!< is to skip the logic that sets stable face signal when MSFT is updated. */
ccat_project_adaption_bitmap_9 = 1 << 9, /*!< TBD */
ccat_project_adaption_bitmap_10 = 1 << 10, /*!< TBD */
ccat_project_adaption_bitmap_11 = 1 << 11, /*!< TBD */
ccat_project_adaption_bitmap_11 = 1 << 11, /*!< is world facing camera */
ccat_project_adaption_bitmap_12 = 1 << 12, /*!< TBD */
ccat_project_adaption_bitmap_13 = 1 << 13, /*!< TBD */
ccat_project_adaption_bitmap_14 = 1 << 14, /*!< TBD */
Expand Down
1 change: 1 addition & 0 deletions include/ipu7x/ia_imaging/ia_pal_types_isp_ids_autogen.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ typedef enum
ia_pal_uuid_isp_linearization2_0 = 10326,
ia_pal_uuid_isp_lsc_1_2 = 2144,
ia_pal_uuid_isp_nntm_1_0 = 46539,
ia_pal_uuid_isp_nntm_1_2 = 8034,
ia_pal_uuid_isp_outputscaler_2_0_a = 6800,
ia_pal_uuid_isp_outputscaler_2_0_b = 51856,
ia_pal_uuid_isp_pafstatistics_1_2 = 44308,
Expand Down
Loading
Loading