diff --git a/include/ipu75xa/ia_imaging/IIPUAic.h b/include/ipu75xa/ia_imaging/IIPUAic.h index 6d99253..cc942c6 100644 --- a/include/ipu75xa/ia_imaging/IIPUAic.h +++ b/include/ipu75xa/ia_imaging/IIPUAic.h @@ -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. @@ -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. * diff --git a/include/ipu75xa/ia_imaging/IntelCCA.h b/include/ipu75xa/ia_imaging/IntelCCA.h index 8d679bf..4a0fc37 100644 --- a/include/ipu75xa/ia_imaging/IntelCCA.h +++ b/include/ipu75xa/ia_imaging/IntelCCA.h @@ -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. @@ -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. * diff --git a/include/ipu75xa/ia_imaging/IntelCCABase.h b/include/ipu75xa/ia_imaging/IntelCCABase.h index 999d31e..4f07e6c 100644 --- a/include/ipu75xa/ia_imaging/IntelCCABase.h +++ b/include/ipu75xa/ia_imaging/IntelCCABase.h @@ -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. @@ -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. * @@ -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: diff --git a/include/ipu75xa/ia_imaging/ia_abstraction.h b/include/ipu75xa/ia_imaging/ia_abstraction.h index 3c98ebe..01b7567 100644 --- a/include/ipu75xa/ia_imaging/ia_abstraction.h +++ b/include/ipu75xa/ia_imaging/ia_abstraction.h @@ -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. @@ -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)))) diff --git a/include/ipu75xa/ia_imaging/ia_aic_class.h b/include/ipu75xa/ia_imaging/ia_aic_class.h index 85f971c..479f637 100644 --- a/include/ipu75xa/ia_imaging/ia_aic_class.h +++ b/include/ipu75xa/ia_imaging/ia_aic_class.h @@ -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 @@ -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 * * @@ -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(); diff --git a/include/ipu75xa/ia_imaging/ia_ccat_types.h b/include/ipu75xa/ia_imaging/ia_ccat_types.h index bd73db0..b43d68b 100644 --- a/include/ipu75xa/ia_imaging/ia_ccat_types.h +++ b/include/ipu75xa/ia_imaging/ia_ccat_types.h @@ -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.*/ @@ -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 */ diff --git a/include/ipu75xa/ia_imaging/ia_pal_types_isp_ids_autogen.h b/include/ipu75xa/ia_imaging/ia_pal_types_isp_ids_autogen.h index 2195bed..9a8c202 100644 --- a/include/ipu75xa/ia_imaging/ia_pal_types_isp_ids_autogen.h +++ b/include/ipu75xa/ia_imaging/ia_pal_types_isp_ids_autogen.h @@ -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, @@ -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, @@ -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, diff --git a/include/ipu7x/ia_imaging/IIPUAic.h b/include/ipu7x/ia_imaging/IIPUAic.h index 6d99253..cc942c6 100644 --- a/include/ipu7x/ia_imaging/IIPUAic.h +++ b/include/ipu7x/ia_imaging/IIPUAic.h @@ -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. @@ -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. * diff --git a/include/ipu7x/ia_imaging/IntelCCA.h b/include/ipu7x/ia_imaging/IntelCCA.h index 8d679bf..4a0fc37 100644 --- a/include/ipu7x/ia_imaging/IntelCCA.h +++ b/include/ipu7x/ia_imaging/IntelCCA.h @@ -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. @@ -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. * diff --git a/include/ipu7x/ia_imaging/IntelCCABase.h b/include/ipu7x/ia_imaging/IntelCCABase.h index 999d31e..4f07e6c 100644 --- a/include/ipu7x/ia_imaging/IntelCCABase.h +++ b/include/ipu7x/ia_imaging/IntelCCABase.h @@ -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. @@ -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. * @@ -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: diff --git a/include/ipu7x/ia_imaging/ia_abstraction.h b/include/ipu7x/ia_imaging/ia_abstraction.h index 3c98ebe..01b7567 100644 --- a/include/ipu7x/ia_imaging/ia_abstraction.h +++ b/include/ipu7x/ia_imaging/ia_abstraction.h @@ -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. @@ -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)))) diff --git a/include/ipu7x/ia_imaging/ia_aic_class.h b/include/ipu7x/ia_imaging/ia_aic_class.h index 85f971c..479f637 100644 --- a/include/ipu7x/ia_imaging/ia_aic_class.h +++ b/include/ipu7x/ia_imaging/ia_aic_class.h @@ -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 @@ -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 * * @@ -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(); diff --git a/include/ipu7x/ia_imaging/ia_ccat_types.h b/include/ipu7x/ia_imaging/ia_ccat_types.h index bd73db0..b43d68b 100644 --- a/include/ipu7x/ia_imaging/ia_ccat_types.h +++ b/include/ipu7x/ia_imaging/ia_ccat_types.h @@ -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.*/ @@ -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 */ diff --git a/include/ipu7x/ia_imaging/ia_pal_types_isp_ids_autogen.h b/include/ipu7x/ia_imaging/ia_pal_types_isp_ids_autogen.h index cd6ad0e..493e2d2 100644 --- a/include/ipu7x/ia_imaging/ia_pal_types_isp_ids_autogen.h +++ b/include/ipu7x/ia_imaging/ia_pal_types_isp_ids_autogen.h @@ -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, diff --git a/include/ipu8/ia_imaging/IIPUAic.h b/include/ipu8/ia_imaging/IIPUAic.h index 6d99253..cc942c6 100644 --- a/include/ipu8/ia_imaging/IIPUAic.h +++ b/include/ipu8/ia_imaging/IIPUAic.h @@ -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. @@ -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. * diff --git a/include/ipu8/ia_imaging/IntelCCA.h b/include/ipu8/ia_imaging/IntelCCA.h index 8d679bf..4a0fc37 100644 --- a/include/ipu8/ia_imaging/IntelCCA.h +++ b/include/ipu8/ia_imaging/IntelCCA.h @@ -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. @@ -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. * diff --git a/include/ipu8/ia_imaging/IntelCCABase.h b/include/ipu8/ia_imaging/IntelCCABase.h index 999d31e..4f07e6c 100644 --- a/include/ipu8/ia_imaging/IntelCCABase.h +++ b/include/ipu8/ia_imaging/IntelCCABase.h @@ -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. @@ -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. * @@ -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: diff --git a/include/ipu8/ia_imaging/ia_abstraction.h b/include/ipu8/ia_imaging/ia_abstraction.h index 3c98ebe..01b7567 100644 --- a/include/ipu8/ia_imaging/ia_abstraction.h +++ b/include/ipu8/ia_imaging/ia_abstraction.h @@ -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. @@ -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)))) diff --git a/include/ipu8/ia_imaging/ia_aic_class.h b/include/ipu8/ia_imaging/ia_aic_class.h index 85f971c..479f637 100644 --- a/include/ipu8/ia_imaging/ia_aic_class.h +++ b/include/ipu8/ia_imaging/ia_aic_class.h @@ -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 @@ -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 * * @@ -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(); diff --git a/include/ipu8/ia_imaging/ia_ccat_types.h b/include/ipu8/ia_imaging/ia_ccat_types.h index bd73db0..b43d68b 100644 --- a/include/ipu8/ia_imaging/ia_ccat_types.h +++ b/include/ipu8/ia_imaging/ia_ccat_types.h @@ -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.*/ @@ -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 */ diff --git a/include/ipu8/ia_imaging/ia_pal_types_isp_ids_autogen.h b/include/ipu8/ia_imaging/ia_pal_types_isp_ids_autogen.h index fc6e4d7..9e4dfea 100644 --- a/include/ipu8/ia_imaging/ia_pal_types_isp_ids_autogen.h +++ b/include/ipu8/ia_imaging/ia_pal_types_isp_ids_autogen.h @@ -39,6 +39,7 @@ typedef enum { ia_pal_uuid_isp_acm_1_2 = 17531, ia_pal_uuid_isp_aestatistics_2_1 = 55073, + ia_pal_uuid_isp_b2b = 17306, ia_pal_uuid_isp_b2i_ds_1_1 = 40299, ia_pal_uuid_isp_b2i_ds_output_1_1 = 50136, ia_pal_uuid_isp_sw_scaler = 19706, @@ -104,6 +105,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_pafstatistics_1_2 = 44308, ia_pal_uuid_isp_pext_1_0 = 43213, ia_pal_uuid_isp_rgb_ir_2_0 = 14488, @@ -136,6 +138,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_4 = 10944, ia_pal_uuid_system_api_bxt_blc = 12306, diff --git a/include/ipu8/ia_imaging/ia_pal_types_isp_parameters_autogen.h b/include/ipu8/ia_imaging/ia_pal_types_isp_parameters_autogen.h index ff32b37..5e18ff7 100644 --- a/include/ipu8/ia_imaging/ia_pal_types_isp_parameters_autogen.h +++ b/include/ipu8/ia_imaging/ia_pal_types_isp_parameters_autogen.h @@ -192,6 +192,30 @@ typedef struct } ia_pal_isp_aestatistics_2_1_t; +/*! \isp struct b2b + +*/ +typedef struct +{ + /*!< cvt_k CVT_K for Bayer to Bayer. Original Value is a float multiplied by 2^22*/ + int32_t cvt_k; + /*!< cvt_b CVT_B for Bayer to Bayer. Original Value is a float multiplied by 2^22*/ + int32_t cvt_b; + /*!< noisy_blend Noisy blend for Bayer to Bayer. Should be divided by 100 before sending to b2b algo to normalize to 0-1 range.*/ + int32_t noisy_blend; + /*!< temporal_strength Temporal strength for Bayer to Bayer. Should be divided by 100 before sending to b2b algo to normalize to 0-1 range.*/ + int32_t temporal_strength; + /*!< left B2B roi left*/ + int32_t left; + /*!< top B2B roi top*/ + int32_t top; + /*!< width B2B roi width*/ + int32_t width; + /*!< height B2B roi height*/ + int32_t height; + +} ia_pal_isp_b2b_t; + /*! \isp struct b2i_ds_1_1 */ @@ -1962,6 +1986,52 @@ typedef struct } ia_pal_isp_nntm_1_0_t; +/*! \isp struct nntm_1_2 + +*/ +typedef struct +{ + /*!< bypass bypass for the filter*/ + int32_t bypass; + /*!< mode NNTM modes [0,1]*/ + int32_t mode; + /*!< offset_yuv2rgb[3] yuv2rgb offset*/ + int32_t offset_yuv2rgb[3]; + /*!< yuv2rgb[9] yuv2rgb calibration*/ + int32_t yuv2rgb[9]; + /*!< rgb2yuv[9] rgb2yuv calibration*/ + int32_t rgb2yuv[9]; + /*!< input_range_restricted input range is restricted flag*/ + int32_t input_range_restricted; + /*!< output_range_restricted output range is restricted flag*/ + int32_t output_range_restricted; + /*!< blending_map[16384] blending map*/ + int32_t blending_map[16384]; + /*!< blending_width blending map width*/ + int32_t blending_width; + /*!< blending_height blending map height*/ + int32_t blending_height; + /*!< guidence_weight_bias[2] guidence conv weight & bias*/ + int32_t guidence_weight_bias[2]; + /*!< chroma_save_enable chroma protection enable*/ + int32_t chroma_save_enable; + /*!< chroma_save_min chroma min range for chroma save*/ + int32_t chroma_save_min; + /*!< chroma_save_max chroma max range for chroma save*/ + int32_t chroma_save_max; + /*!< luma_threshold_min luma min range for chroma save*/ + int32_t luma_threshold_min; + /*!< luma_threshold_max luma max range for chroma save*/ + int32_t luma_threshold_max; + /*!< gtm_a polynomial chromaticity model degree*/ + int32_t gtm_a; + /*!< gtm_b color saturation in highlights*/ + int32_t gtm_b; + /*!< gtm_c overall color desaturation*/ + int32_t gtm_c; + +} ia_pal_isp_nntm_1_2_t; + /*! \isp struct pafstatistics_1_2 PAF Statistics */ @@ -3561,6 +3631,22 @@ typedef struct } ia_pal_system_api_aestatistics_2_1_t; +/*! \system api struct b2b + +*/ +typedef struct +{ + /*!< height B2B roi height*/ + int32_t height; + /*!< left B2B roi left*/ + int32_t left; + /*!< top B2B roi top*/ + int32_t top; + /*!< width B2B roi width*/ + int32_t width; + +} ia_pal_system_api_b2b_t; + /*! \system api struct b2i_ds_1_1 */ diff --git a/lib/libia_aic-ipu75xa.so.0 b/lib/libia_aic-ipu75xa.so.0 index 8dafc80..d1ba17e 100644 Binary files a/lib/libia_aic-ipu75xa.so.0 and b/lib/libia_aic-ipu75xa.so.0 differ diff --git a/lib/libia_aic-ipu7x.so.0 b/lib/libia_aic-ipu7x.so.0 index 927da6b..a8f966f 100644 Binary files a/lib/libia_aic-ipu7x.so.0 and b/lib/libia_aic-ipu7x.so.0 differ diff --git a/lib/libia_aic-ipu8.so.0 b/lib/libia_aic-ipu8.so.0 index 7875d6f..0465546 100644 Binary files a/lib/libia_aic-ipu8.so.0 and b/lib/libia_aic-ipu8.so.0 differ diff --git a/lib/libia_aiq_v1-ipu75xa.so.0 b/lib/libia_aiq_v1-ipu75xa.so.0 index 005cb97..111ca4c 100644 Binary files a/lib/libia_aiq_v1-ipu75xa.so.0 and b/lib/libia_aiq_v1-ipu75xa.so.0 differ diff --git a/lib/libia_aiq_v1-ipu7x.so.0 b/lib/libia_aiq_v1-ipu7x.so.0 index b3d672b..cb0f14f 100644 Binary files a/lib/libia_aiq_v1-ipu7x.so.0 and b/lib/libia_aiq_v1-ipu7x.so.0 differ diff --git a/lib/libia_aiq_v1-ipu8.so.0 b/lib/libia_aiq_v1-ipu8.so.0 index a2465fb..531ac73 100644 Binary files a/lib/libia_aiq_v1-ipu8.so.0 and b/lib/libia_aiq_v1-ipu8.so.0 differ diff --git a/lib/libia_aiq_v1_file_debug-ipu75xa.so.0 b/lib/libia_aiq_v1_file_debug-ipu75xa.so.0 index b49e7aa..9f21174 100644 Binary files a/lib/libia_aiq_v1_file_debug-ipu75xa.so.0 and b/lib/libia_aiq_v1_file_debug-ipu75xa.so.0 differ diff --git a/lib/libia_aiq_v1_file_debug-ipu7x.so.0 b/lib/libia_aiq_v1_file_debug-ipu7x.so.0 index 2088964..482ed1b 100644 Binary files a/lib/libia_aiq_v1_file_debug-ipu7x.so.0 and b/lib/libia_aiq_v1_file_debug-ipu7x.so.0 differ diff --git a/lib/libia_aiq_v1_file_debug-ipu8.so.0 b/lib/libia_aiq_v1_file_debug-ipu8.so.0 index c89b033..eb5694e 100644 Binary files a/lib/libia_aiq_v1_file_debug-ipu8.so.0 and b/lib/libia_aiq_v1_file_debug-ipu8.so.0 differ diff --git a/lib/libia_cca-ipu75xa.so.0 b/lib/libia_cca-ipu75xa.so.0 index 524329c..fc055a6 100644 Binary files a/lib/libia_cca-ipu75xa.so.0 and b/lib/libia_cca-ipu75xa.so.0 differ diff --git a/lib/libia_cca-ipu7x.so.0 b/lib/libia_cca-ipu7x.so.0 index 822cf5d..cfb263b 100644 Binary files a/lib/libia_cca-ipu7x.so.0 and b/lib/libia_cca-ipu7x.so.0 differ diff --git a/lib/libia_cca-ipu8.so.0 b/lib/libia_cca-ipu8.so.0 index 39bd5f7..c40d8fa 100644 Binary files a/lib/libia_cca-ipu8.so.0 and b/lib/libia_cca-ipu8.so.0 differ diff --git a/lib/libia_ccat-ipu75xa.so.0 b/lib/libia_ccat-ipu75xa.so.0 index 201a085..bd4356c 100644 Binary files a/lib/libia_ccat-ipu75xa.so.0 and b/lib/libia_ccat-ipu75xa.so.0 differ diff --git a/lib/libia_ccat-ipu7x.so.0 b/lib/libia_ccat-ipu7x.so.0 index e6de545..d9f9aea 100644 Binary files a/lib/libia_ccat-ipu7x.so.0 and b/lib/libia_ccat-ipu7x.so.0 differ diff --git a/lib/libia_ccat-ipu8.so.0 b/lib/libia_ccat-ipu8.so.0 index 67007a2..8437c59 100644 Binary files a/lib/libia_ccat-ipu8.so.0 and b/lib/libia_ccat-ipu8.so.0 differ diff --git a/lib/libia_cmc_parser-ipu75xa.so.0 b/lib/libia_cmc_parser-ipu75xa.so.0 index c777f54..9d00934 100644 Binary files a/lib/libia_cmc_parser-ipu75xa.so.0 and b/lib/libia_cmc_parser-ipu75xa.so.0 differ diff --git a/lib/libia_cmc_parser-ipu7x.so.0 b/lib/libia_cmc_parser-ipu7x.so.0 index a5c8a3d..d25a59c 100644 Binary files a/lib/libia_cmc_parser-ipu7x.so.0 and b/lib/libia_cmc_parser-ipu7x.so.0 differ diff --git a/lib/libia_cmc_parser-ipu8.so.0 b/lib/libia_cmc_parser-ipu8.so.0 index 8d7a455..711e05e 100644 Binary files a/lib/libia_cmc_parser-ipu8.so.0 and b/lib/libia_cmc_parser-ipu8.so.0 differ diff --git a/lib/libia_dvs-ipu75xa.so.0 b/lib/libia_dvs-ipu75xa.so.0 index 678c7d1..21a0ad3 100644 Binary files a/lib/libia_dvs-ipu75xa.so.0 and b/lib/libia_dvs-ipu75xa.so.0 differ diff --git a/lib/libia_dvs-ipu7x.so.0 b/lib/libia_dvs-ipu7x.so.0 index 6b815d3..f05ce49 100644 Binary files a/lib/libia_dvs-ipu7x.so.0 and b/lib/libia_dvs-ipu7x.so.0 differ diff --git a/lib/libia_dvs-ipu8.so.0 b/lib/libia_dvs-ipu8.so.0 index d78d8c4..e93304c 100644 Binary files a/lib/libia_dvs-ipu8.so.0 and b/lib/libia_dvs-ipu8.so.0 differ diff --git a/lib/libia_lard-ipu75xa.so.0 b/lib/libia_lard-ipu75xa.so.0 index dba04db..f9aa8cb 100644 Binary files a/lib/libia_lard-ipu75xa.so.0 and b/lib/libia_lard-ipu75xa.so.0 differ diff --git a/lib/libia_lard-ipu7x.so.0 b/lib/libia_lard-ipu7x.so.0 index 6898a1e..0e40854 100644 Binary files a/lib/libia_lard-ipu7x.so.0 and b/lib/libia_lard-ipu7x.so.0 differ diff --git a/lib/libia_lard-ipu8.so.0 b/lib/libia_lard-ipu8.so.0 index d889817..b8e243e 100644 Binary files a/lib/libia_lard-ipu8.so.0 and b/lib/libia_lard-ipu8.so.0 differ