diff --git a/config/linux/ipu75xa/gcss/OV08X40_KAFE799.IPU75XA.bin b/config/linux/ipu75xa/gcss/OV08X40_KAFE799.IPU75XA.bin index 120faa6..4b785e4 100644 Binary files a/config/linux/ipu75xa/gcss/OV08X40_KAFE799.IPU75XA.bin and b/config/linux/ipu75xa/gcss/OV08X40_KAFE799.IPU75XA.bin differ diff --git a/config/linux/ipu75xa/gcss/OV13B10_09B13.IPU75XA.bin b/config/linux/ipu75xa/gcss/OV13B10_09B13.IPU75XA.bin index e8c8b0a..f0960bc 100644 Binary files a/config/linux/ipu75xa/gcss/OV13B10_09B13.IPU75XA.bin and b/config/linux/ipu75xa/gcss/OV13B10_09B13.IPU75XA.bin differ diff --git a/config/linux/ipu75xa/libcamhal_configs.json b/config/linux/ipu75xa/libcamhal_configs.json index d22a301..869a793 100644 --- a/config/linux/ipu75xa/libcamhal_configs.json +++ b/config/linux/ipu75xa/libcamhal_configs.json @@ -25,7 +25,15 @@ "ov13b10-uf-2", "ov08x40-uf-0", "lt6911gxd-1-0", - "lt6911gxd-2-2" + "lt6911gxd-2-2", + "isx031-1-0", + "isx031-2-0", + "isx031-3-0", + "isx031-4-0", + "isx031-5-2", + "isx031-6-2", + "isx031-7-2", + "isx031-8-2" ], "videoStreamNum" : 2 } diff --git a/config/linux/ipu75xa/sensors/isx031-1.json b/config/linux/ipu75xa/sensors/isx031-1.json new file mode 100644 index 0000000..f93d147 --- /dev/null +++ b/config/linux/ipu75xa/sensors/isx031-1.json @@ -0,0 +1,439 @@ +// +// Copyright (C) 2025 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +{ + "CameraSettings": { + "Sensor": [ + { + "name": "isx031-1", + "description": "isx031 as sensor.", + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "route" : [ + { + "name": "max9x a-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + } + ], + "link": [ + { + "srcName": "isx031 a-0", "srcPad": 0, "sinkName": "max9x a-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 0", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 0", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "route" : [ + { + "name": "max9x a-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + } + ], + "link": [ + { + "srcName": "isx031 a-0", "srcPad": 0, "sinkName": "max9x a-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 0", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 0", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "route" : [ + { + "name": "max9x a-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + } + ], + "link": [ + { + "srcName": "isx031 a-0", "srcPad": 0, "sinkName": "max9x a-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 0", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 0", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x4-1", + "description": "isx031 as sensor.", + "vcCount": 4, + "vcId": 0, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 0", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 0", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 0", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x8-1", + "description": "isx031 as sensor.", + "vcCount": 4, + "vcId": 0, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 0", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 0", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 0", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + } + ] + } +} diff --git a/config/linux/ipu75xa/sensors/isx031-2.json b/config/linux/ipu75xa/sensors/isx031-2.json new file mode 100644 index 0000000..e20b4f7 --- /dev/null +++ b/config/linux/ipu75xa/sensors/isx031-2.json @@ -0,0 +1,442 @@ +// +// Copyright (C) 2025 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +{ + "CameraSettings": { + "Sensor": [ + { + "name": "isx031-2", + "description": "isx031 bs sensor.", + "vcCount": 1, + "vcId": 1, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "route" : [ + { + "name": "max9x b-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + } + ], + "link": [ + { + "srcName": "isx031 b-0", "srcPad": 0, "sinkName": "max9x b-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 1", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 1", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "route" : [ + { + "name": "max9x b-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + } + ], + "link": [ + { + "srcName": "isx031 b-0", "srcPad": 0, "sinkName": "max9x b-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 1", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 1", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "route" : [ + { + "name": "max9x b-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + } + ], + "link": [ + { + "srcName": "isx031 b-0", "srcPad": 0, "sinkName": "max9x b-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 1", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 1", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x4-2", + "description": "isx031 bs sensor.", + "vcCount": 4, + "vcId": 1, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 1", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 1", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 1", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x8-2", + "description": "isx031 bs sensor.", + "vcCount": 4, + "vcId": 1, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 1", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 1", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 1", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + } + ] + } +} diff --git a/config/linux/ipu75xa/sensors/isx031-3.json b/config/linux/ipu75xa/sensors/isx031-3.json new file mode 100644 index 0000000..c699cf7 --- /dev/null +++ b/config/linux/ipu75xa/sensors/isx031-3.json @@ -0,0 +1,442 @@ +// +// Copyright (C) 2025 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +{ + "CameraSettings": { + "Sensor": [ + { + "name": "isx031-3", + "description": "isx031 cs sensor.", + "vcCount": 1, + "vcId": 2, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "route" : [ + { + "name": "max9x c-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + } + ], + "link": [ + { + "srcName": "isx031 c-0", "srcPad": 0, "sinkName": "max9x c-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 2", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 2", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "route" : [ + { + "name": "max9x c-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + } + ], + "link": [ + { + "srcName": "isx031 c-0", "srcPad": 0, "sinkName": "max9x c-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 2", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 2", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "route" : [ + { + "name": "max9x c-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + } + ], + "link": [ + { + "srcName": "isx031 c-0", "srcPad": 0, "sinkName": "max9x c-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 2", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 2", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x4-3", + "description": "isx031 cs sensor.", + "vcCount": 4, + "vcId": 2, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 2", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 2", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 2", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x8-3", + "description": "isx031 cs sensor.", + "vcCount": 4, + "vcId": 2, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 2", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 2", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 2", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + } + ] + } +} diff --git a/config/linux/ipu75xa/sensors/isx031-4.json b/config/linux/ipu75xa/sensors/isx031-4.json new file mode 100644 index 0000000..4c200a2 --- /dev/null +++ b/config/linux/ipu75xa/sensors/isx031-4.json @@ -0,0 +1,1132 @@ +// +// Copyright (C) 2025 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +{ + "CameraSettings": { + "Sensor": [ + { + "name": "isx031-4", + "description": "isx031 ds sensor.", + "vcCount": 1, + "vcId": 3, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "route" : [ + { + "name": "max9x d-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 d-0", "srcPad": 0, "sinkName": "max9x d-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 3", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 3", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1080], + "route" : [ + { + "name": "max9x d-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 d-0", "srcPad": 0, "sinkName": "max9x d-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 3", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 3", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "route" : [ + { + "name": "max9x d-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 d-0", "srcPad": 0, "sinkName": "max9x d-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 3", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 3", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x4-4", + "description": "isx031 ds sensor.", + "vcCount": 4, + "vcId": 3, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "route" : [ + { + "name": "max9x a-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 a-0", "srcPad": 0, "sinkName": "max9x a-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-0", "srcPad": 0, "sinkName": "max9x b-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 1", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-0", "srcPad": 0, "sinkName": "max9x c-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-0", "srcPad": 0, "sinkName": "max9x d-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 3", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 3", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "route" : [ + { + "name": "max9x a-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 a-0", "srcPad": 0, "sinkName": "max9x a-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-0", "srcPad": 0, "sinkName": "max9x b-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 1", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-0", "srcPad": 0, "sinkName": "max9x c-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-0", "srcPad": 0, "sinkName": "max9x d-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 3", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 3", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "route" : [ + { + "name": "max9x a-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 a-0", "srcPad": 0, "sinkName": "max9x a-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-0", "srcPad": 0, "sinkName": "max9x b-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 1", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-0", "srcPad": 0, "sinkName": "max9x c-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-0", "srcPad": 0, "sinkName": "max9x d-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 3", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 3", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x8-4", + "description": "isx031 ds sensor.", + "vcCount": 4, + "vcId": 3, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 3", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 3", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 3", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 0", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-0", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + } + ] + } +} diff --git a/config/linux/ipu75xa/sensors/isx031-5.json b/config/linux/ipu75xa/sensors/isx031-5.json new file mode 100644 index 0000000..7a2b95f --- /dev/null +++ b/config/linux/ipu75xa/sensors/isx031-5.json @@ -0,0 +1,439 @@ +// +// Copyright (C) 2025 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +{ + "CameraSettings": { + "Sensor": [ + { + "name": "isx031-5", + "description": "isx031 as sensor.", + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "route" : [ + { + "name": "max9x a-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + } + ], + "link": [ + { + "srcName": "isx031 a-2", "srcPad": 0, "sinkName": "max9x a-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 16", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 16", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "route" : [ + { + "name": "max9x a-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + } + ], + "link": [ + { + "srcName": "isx031 a-2", "srcPad": 0, "sinkName": "max9x a-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 16", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 16", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "route" : [ + { + "name": "max9x a-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + } + ], + "link": [ + { + "srcName": "isx031 a-2", "srcPad": 0, "sinkName": "max9x a-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 16", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 16", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x4-5", + "description": "isx031 as sensor.", + "vcCount": 4, + "vcId": 0, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 16", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 16", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 16", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x8-5", + "description": "isx031 as sensor.", + "vcCount": 4, + "vcId": 0, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 16", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 16", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 16", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 a-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + } + ] + } +} diff --git a/config/linux/ipu75xa/sensors/isx031-6.json b/config/linux/ipu75xa/sensors/isx031-6.json new file mode 100644 index 0000000..4dc5789 --- /dev/null +++ b/config/linux/ipu75xa/sensors/isx031-6.json @@ -0,0 +1,442 @@ +// +// Copyright (C) 2025 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +{ + "CameraSettings": { + "Sensor": [ + { + "name": "isx031-6", + "description": "isx031 bs sensor.", + "vcCount": 1, + "vcId": 1, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "route" : [ + { + "name": "max9x b-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + } + ], + "link": [ + { + "srcName": "isx031 b-2", "srcPad": 0, "sinkName": "max9x b-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 17", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 17", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "route" : [ + { + "name": "max9x b-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + } + ], + "link": [ + { + "srcName": "isx031 b-2", "srcPad": 0, "sinkName": "max9x b-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 17", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 17", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "route" : [ + { + "name": "max9x b-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + } + ], + "link": [ + { + "srcName": "isx031 b-2", "srcPad": 0, "sinkName": "max9x b-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 17", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 17", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x4-6", + "description": "isx031 bs sensor.", + "vcCount": 4, + "vcId": 1, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 17", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 17", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 17", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x8-6", + "description": "isx031 bs sensor.", + "vcCount": 4, + "vcId": 1, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 17", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 17", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 17", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 b-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + } + ] + } +} diff --git a/config/linux/ipu75xa/sensors/isx031-7.json b/config/linux/ipu75xa/sensors/isx031-7.json new file mode 100644 index 0000000..a301ec3 --- /dev/null +++ b/config/linux/ipu75xa/sensors/isx031-7.json @@ -0,0 +1,442 @@ +// +// Copyright (C) 2025 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +{ + "CameraSettings": { + "Sensor": [ + { + "name": "isx031-7", + "description": "isx031 cs sensor.", + "vcCount": 1, + "vcId": 2, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "route" : [ + { + "name": "max9x c-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + } + ], + "link": [ + { + "srcName": "isx031 c-2", "srcPad": 0, "sinkName": "max9x c-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 18", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 18", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "route" : [ + { + "name": "max9x c-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + } + ], + "link": [ + { + "srcName": "isx031 c-2", "srcPad": 0, "sinkName": "max9x c-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 18", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 18", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "route" : [ + { + "name": "max9x c-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + } + ], + "link": [ + { + "srcName": "isx031 c-2", "srcPad": 0, "sinkName": "max9x c-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 18", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 18", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x4-7", + "description": "isx031 cs sensor.", + "vcCount": 4, + "vcId": 2, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 18", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 18", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 18", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x8-7", + "description": "isx031 cs sensor.", + "vcCount": 4, + "vcId": 2, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 18", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 18", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "format": "V4L2_PIX_FMT_UYVY", + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 18", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 c-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + } + ] + } +} diff --git a/config/linux/ipu75xa/sensors/isx031-8.json b/config/linux/ipu75xa/sensors/isx031-8.json new file mode 100644 index 0000000..60b51b8 --- /dev/null +++ b/config/linux/ipu75xa/sensors/isx031-8.json @@ -0,0 +1,2494 @@ +// +// Copyright (C) 2025 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +{ + "CameraSettings": { + "Sensor": [ + { + "name": "isx031-8", + "description": "isx031 ds sensor.", + "vcCount": 1, + "vcId": 3, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "route" : [ + { + "name": "max9x d-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 d-2", "srcPad": 0, "sinkName": "max9x d-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 19", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 19", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1080], + "route" : [ + { + "name": "max9x d-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 d-2", "srcPad": 0, "sinkName": "max9x d-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 19", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 19", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "route" : [ + { + "name": "max9x d-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 d-2", "srcPad": 0, "sinkName": "max9x d-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 19", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 19", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x4-8", + "description": "isx031 ds sensor.", + "vcCount": 4, + "vcId": 3, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "route" : [ + { + "name": "max9x a-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 a-2", "srcPad": 0, "sinkName": "max9x a-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 16", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-2", "srcPad": 0, "sinkName": "max9x b-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 17", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-2", "srcPad": 0, "sinkName": "max9x c-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 18", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-2", "srcPad": 0, "sinkName": "max9x d-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 19", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 19", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "route" : [ + { + "name": "max9x a-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 a-2", "srcPad": 0, "sinkName": "max9x a-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 16", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-2", "srcPad": 0, "sinkName": "max9x b-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 17", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-2", "srcPad": 0, "sinkName": "max9x c-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 18", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-2", "srcPad": 0, "sinkName": "max9x d-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 19", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 19", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "route" : [ + { + "name": "max9x a-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 a-2", "srcPad": 0, "sinkName": "max9x a-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 16", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-2", "srcPad": 0, "sinkName": "max9x b-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 17", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-2", "srcPad": 0, "sinkName": "max9x c-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 18", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-2", "srcPad": 0, "sinkName": "max9x d-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 19", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 19", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + }, + { + "name": "isx031x8-8", + "description": "isx031 ds sensor.", + "vcCount": 4, + "vcId": 3, + "vcGroupId": 0, + "MediaCtlConfig": [ + { + "id": 0 , + "configMode": "AUTO", + "output": [1920, 1536], + "route" : [ + { + "name": "max9x a-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + }, + { + "name": "max9x a-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "isx031 a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 a-0", "srcPad": 0, "sinkName": "max9x a-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-0", "srcPad": 0, "sinkName": "max9x b-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 1", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-0", "srcPad": 0, "sinkName": "max9x c-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-0", "srcPad": 0, "sinkName": "max9x d-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 3", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 a-2", "srcPad": 0, "sinkName": "max9x a-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 16", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-2", "srcPad": 0, "sinkName": "max9x b-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 17", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-2", "srcPad": 0, "sinkName": "max9x c-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 18", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-2", "srcPad": 0, "sinkName": "max9x d-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 19", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 19", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 1 , + "configMode": "AUTO", + "output": [1920, 1080], + "route" : [ + { + "name": "max9x a-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + }, + { + "name": "max9x a-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "isx031 a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 a-0", "srcPad": 0, "sinkName": "max9x a-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-0", "srcPad": 0, "sinkName": "max9x b-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 1", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-0", "srcPad": 0, "sinkName": "max9x c-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-0", "srcPad": 0, "sinkName": "max9x d-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 3", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 a-2", "srcPad": 0, "sinkName": "max9x a-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 16", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-2", "srcPad": 0, "sinkName": "max9x b-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 17", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-2", "srcPad": 0, "sinkName": "max9x c-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 18", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-2", "srcPad": 0, "sinkName": "max9x d-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 19", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 19", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + }, + { + "id": 2 , + "configMode": "AUTO", + "output": [1280, 720], + "route" : [ + { + "name": "max9x a-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-0", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x a", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + }, + { + "name": "max9x a-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 4, "sinkStream": 0, "srcPad": 0, + "srcStream": 0, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 0, "srcPad": 1, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x b-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 5, "sinkStream": 0, "srcPad": 0, + "srcStream": 1, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 1, "srcPad": 2, + "srcStream": 1, "flag": 1 + }, + { + "name": "max9x c-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 6, "sinkStream": 0, "srcPad": 0, + "srcStream": 2, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 2, "srcPad": 3, + "srcStream": 2, "flag": 1 + }, + { + "name": "max9x d-2", "sinkPad": 0, "sinkStream": 0, "srcPad": 2, + "srcStream": 0, "flag": 1 + }, + { + "name": "max9x c", "sinkPad": 7, "sinkStream": 0, "srcPad": 0, + "srcStream": 3, "flag": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "sinkPad": 0, "sinkStream": 3, "srcPad": 4, + "srcStream": 3, "flag": 1 + } + ], + "format": "V4L2_PIX_FMT_UYVY", + "formats": [ + { + "name": "isx031 a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-0", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 0", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "isx031 a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x a-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 1, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "isx031 b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x b-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 5, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 1 + }, + { + "name": "isx031 c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 6, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 3, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 2 + }, + { + "name": "isx031 d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x d-2", "pad": 2, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 7, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 0 + }, + { + "name": "max9x c", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 0, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + }, + { + "name": "Intel IPU7 CSI2 2", "pad": 4, "width": 1920, "height": 1536, + "format": "V4L2_MBUS_FMT_UYVY8_1X16", "stream": 3 + } + ], + "link": [ + { + "srcName": "isx031 a-0", "srcPad": 0, "sinkName": "max9x a-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-0", "srcPad": 0, "sinkName": "max9x b-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 1", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-0", "srcPad": 0, "sinkName": "max9x c-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-0", "srcPad": 0, "sinkName": "max9x d-0", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-0", "srcPad": 2, "sinkName": "max9x a", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x a", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 0", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 0", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 3", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 a-2", "srcPad": 0, "sinkName": "max9x a-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x a-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 4, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 1, + "sinkName": "Intel IPU7 ISYS Capture 16", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 b-2", "srcPad": 0, "sinkName": "max9x b-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x b-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 5, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 2, + "sinkName": "Intel IPU7 ISYS Capture 17", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 c-2", "srcPad": 0, "sinkName": "max9x c-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x c-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 6, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 3, + "sinkName": "Intel IPU7 ISYS Capture 18", "sinkPad": 0, "enable": true + }, + { + "srcName": "isx031 d-2", "srcPad": 0, "sinkName": "max9x d-2", + "sinkPad": 0, "enable": true + }, + { + "srcName": "max9x d-2", "srcPad": 2, "sinkName": "max9x c", + "sinkPad": 7, "enable": true + }, + { + "srcName": "max9x c", "srcPad": 0, + "sinkName": "Intel IPU7 CSI2 2", "sinkPad": 0, "enable": true + }, + { + "srcName": "Intel IPU7 CSI2 2", "srcPad": 4, + "sinkName": "Intel IPU7 ISYS Capture 19", "sinkPad": 0, "enable": true + } + ], + "videonode": [ + { + "name": "Intel IPU7 ISYS Capture 19", "videoNodeType": "VIDEO_GENERIC" + }, + { + "name": "Intel IPU7 CSI2 2", "videoNodeType": "VIDEO_ISYS_RECEIVER" + }, + { + "name": "isx031 d-2", "videoNodeType": "VIDEO_PIXEL_ARRAY" + } + ] + } + ], + "StaticMetadata": { + "supportedStreamConfig": [ + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1536], "field": 0, "mcId": 0 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1920, 1080], "field": 0, "mcId": 1 + }, + { + "format": "V4L2_PIX_FMT_UYVY", "size": [1280, 720], "field": 0, "mcId": 2 + } + ] + }, + + "supportedISysSizes": [[1280, 720], [1920, 1080], [1920, 1536]], + "supportedISysFormat": ["V4L2_PIX_FMT_UYVY"], + "enableAIQ": false, + "usePSysProcessor": false + } + ] + } +} diff --git a/config/linux/ipu7x/gcss/IMX471_AAJH5-D.IPU7X.bin b/config/linux/ipu7x/gcss/IMX471_AAJH5-D.IPU7X.bin deleted file mode 100644 index 21ff557..0000000 Binary files a/config/linux/ipu7x/gcss/IMX471_AAJH5-D.IPU7X.bin and /dev/null differ diff --git a/config/linux/ipu7x/gcss/OV02C10_MSHW0550.IPU7X.bin b/config/linux/ipu7x/gcss/OV02C10_MSHW0550.IPU7X.bin index d7a0ab0..41773f7 100644 Binary files a/config/linux/ipu7x/gcss/OV02C10_MSHW0550.IPU7X.bin and b/config/linux/ipu7x/gcss/OV02C10_MSHW0550.IPU7X.bin differ diff --git a/config/linux/ipu7x/gcss/OV02E10_CBG202N3.IPU7X.bin b/config/linux/ipu7x/gcss/OV02E10_CBG202N3.IPU7X.bin index 973fee8..ab8e8c8 100644 Binary files a/config/linux/ipu7x/gcss/OV02E10_CBG202N3.IPU7X.bin and b/config/linux/ipu7x/gcss/OV02E10_CBG202N3.IPU7X.bin differ diff --git a/config/linux/ipu7x/gcss/OV05C10_BBG501N3.IPU7X.bin b/config/linux/ipu7x/gcss/OV05C10_BBG501N3.IPU7X.bin index 6674f34..a48e24b 100644 Binary files a/config/linux/ipu7x/gcss/OV05C10_BBG501N3.IPU7X.bin and b/config/linux/ipu7x/gcss/OV05C10_BBG501N3.IPU7X.bin differ diff --git a/config/linux/ipu7x/gcss/OV08X40_BBG802N3_LNL.IPU7X.bin b/config/linux/ipu7x/gcss/OV08X40_BBG802N3_LNL.IPU7X.bin index a24eb64..d20bf1a 100644 Binary files a/config/linux/ipu7x/gcss/OV08X40_BBG802N3_LNL.IPU7X.bin and b/config/linux/ipu7x/gcss/OV08X40_BBG802N3_LNL.IPU7X.bin differ diff --git a/config/linux/ipu7x/gcss/OV13B10_09B13.IPU7X.bin b/config/linux/ipu7x/gcss/OV13B10_09B13.IPU7X.bin index 39c5086..f1345b4 100644 Binary files a/config/linux/ipu7x/gcss/OV13B10_09B13.IPU7X.bin and b/config/linux/ipu7x/gcss/OV13B10_09B13.IPU7X.bin differ diff --git a/config/linux/ipu7x/gcss/S5K3J1_GRBG_NONPDAF.IPU7X.bin b/config/linux/ipu7x/gcss/S5K3J1_GRBG_NONPDAF.IPU7X.bin index 4300828..4a3f64b 100644 Binary files a/config/linux/ipu7x/gcss/S5K3J1_GRBG_NONPDAF.IPU7X.bin and b/config/linux/ipu7x/gcss/S5K3J1_GRBG_NONPDAF.IPU7X.bin differ diff --git a/include/api/ICamera.h b/include/api/ICamera.h index 09e15b3..fefe3f8 100644 --- a/include/api/ICamera.h +++ b/include/api/ICamera.h @@ -251,7 +251,7 @@ void camera_device_close(int camera_id); * \param[in] * int camera_id: ID of the camera * \param[in] - * int inputConfig: Specify which input format, resolution(the output of ISYS) should be used. + * int input_config: Specify which input format, resolution(the output of ISYS) should be used. * * \return * 0 succeed to configure streams @@ -268,7 +268,7 @@ void camera_device_close(int camera_id); * ret = camera_device_config_sensor_input(camera_id, &input_config); * \endcode **/ -int camera_device_config_sensor_input(int camera_id, const stream_t* inputConfig); +int camera_device_config_sensor_input(int camera_id, const stream_t* input_config); /** * \brief diff --git a/include/api/Parameters.h b/include/api/Parameters.h index e9334b8..246097a 100644 --- a/include/api/Parameters.h +++ b/include/api/Parameters.h @@ -1509,7 +1509,7 @@ class Parameters { * * \return 0 if successfully, otherwise non-0 value is returned. */ - int setFaceIds(int* faceIds, int faceNum); + int setFaceIds(const int* faceIds, int faceNum); /** * Get sensor active array size diff --git a/include/utils/ScopedAtrace.h b/include/utils/ScopedAtrace.h index d3f29c2..641add4 100644 --- a/include/utils/ScopedAtrace.h +++ b/include/utils/ScopedAtrace.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef SCOPED_ATRACE_H -#define SCOPED_ATRACE_H +#pragma once #include #include @@ -28,9 +27,9 @@ namespace icamera { /** * Following macros PERF_CAMERA_ATRACE_XXX() can be called in the function * we are scoping. Environment variable "camPerf" is need to be set as "16" - * or "128", to enalbe atrace profiling: + * or "128", to enable atrace profiling: * 1. When "16" is set, ATRACE with level of CAMERA_DEBUG_LOG_ATRACE_OS is - * enalbed. + * enabled. * 2. When "128" is set, ATRACE with level of CAMERA_DEBUG_LOG_ATRACE_IMAGING * is enabled. */ @@ -75,5 +74,3 @@ class ScopedAtrace { PERF_LOG_TAG_STR(LOG_TAG), note, value, note2, value2, note3, \ value3); } // namespace icamera - -#endif // SCOPED_ATRACE_H diff --git a/modules/algowrapper/IntelCca.cpp b/modules/algowrapper/IntelCca.cpp index ce362ff..9c8804a 100644 --- a/modules/algowrapper/IntelCca.cpp +++ b/modules/algowrapper/IntelCca.cpp @@ -29,10 +29,10 @@ std::vector IntelCca::sCcaInstance; Mutex IntelCca::sLock; IntelCca* IntelCca::getInstance(int cameraId, TuningMode mode) { + AutoMutex lock(sLock); LOG2("@%s, tuningMode:%d, cca instance size:%zu", cameraId, __func__, mode, sCcaInstance.size()); - AutoMutex lock(sLock); for (auto &it : sCcaInstance) { if (cameraId == it.cameraId) { if (it.ccaHandle.find(mode) == it.ccaHandle.end()) { diff --git a/modules/ipu_desc/ipu75xa/CBLayoutUtils.cpp b/modules/ipu_desc/ipu75xa/CBLayoutUtils.cpp index f03c7f8..f101e87 100644 --- a/modules/ipu_desc/ipu75xa/CBLayoutUtils.cpp +++ b/modules/ipu_desc/ipu75xa/CBLayoutUtils.cpp @@ -169,6 +169,7 @@ static const payload_descriptor_t *sLBCBPayloadDescriptors[] = { &lbff_0_descriptors, // TERMINAL_LOAD_ALGO_CACHED &lbff_1_descriptors, // TERMINAL_LOAD_ALGO_FRAG_SEQ &lbff_2_descriptors, // TERMINAL_LOAD_SYSTEM + &lbff_3_descriptors, // DOL, TNR and CAS }; static const payload_descriptor_t *sBBCBPayloadDescriptors[] = { diff --git a/modules/ipu_desc/ipu75xa/FragmentsConfigurator.cpp b/modules/ipu_desc/ipu75xa/FragmentsConfigurator.cpp new file mode 100644 index 0000000..ab40be6 --- /dev/null +++ b/modules/ipu_desc/ipu75xa/FragmentsConfigurator.cpp @@ -0,0 +1,735 @@ +/* +* INTEL CONFIDENTIAL +* Copyright (c) 2022 Intel Corporation +* All Rights Reserved. +* +* The source code contained or described herein and all documents related to +* the source code ("Material") are owned by Intel Corporation or its +* suppliers or licensors. Title to the Material remains with Intel +* Corporation or its suppliers and licensors. The Material may contain trade +* secrets and proprietary and confidential information of Intel Corporation +* and its suppliers and licensors, and is protected by worldwide copyright +* and trade secret laws and treaty provisions. No part of the Material may be +* used, copied, reproduced, modified, published, uploaded, posted, +* transmitted, distributed, or disclosed in any way without Intel's prior +* express written permission. +* +* No license under any patent, copyright, trade secret or other intellectual +* property right is granted to or conferred upon you by disclosure or +* delivery of the Materials, either expressly, by implication, inducement, +* estoppel or otherwise. Any license under such intellectual property rights +* must be express and approved by Intel in writing. +* +* Unless otherwise agreed by Intel in writing, you may not remove or alter +* this notice or any other notice embedded in Materials by Intel or Intels +* suppliers or licensors in any way. +*/ +#include "FragmentsConfigurator.h" + +Ipu8FragmentsConfigurator::Ipu8FragmentsConfigurator(IStaticGraphConfig* staticGraph, OuterNode* node, uint32_t upscalerWidthGranularity) + : _staticGraph(staticGraph), _node(node), _upscalerWidthGranularity(upscalerWidthGranularity) +{ +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configureFragments() +{ + if (_staticGraph == nullptr || _node == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + // Reset status + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + _node->fragmentVanishStatus[stripe] = VanishOption::Full; + } + + for (uint32_t j = 0; j < _node->nodeKernels.kernelCount; j++) + { + StaticGraphRunKernel* runKernel = &_node->nodeKernels.kernelList[j].run_kernel; + StaticGraphFragmentDesc* kernelFragments = _node->nodeKernels.kernelList[j].fragment_descs; + + // Take previous kernel as reference, unless we will change it below. + StaticGraphFragmentDesc* prevKernelFragments = j == 0 ? nullptr : _node->nodeKernels.kernelList[j - 1].fragment_descs; + uint32_t prevKernelUuid = j == 0 ? 0 : _node->nodeKernels.kernelList[j - 1].run_kernel.kernel_uuid; + + uint32_t referenceKernel = GraphResolutionConfiguratorHelper::getReferenceKernel(runKernel->kernel_uuid); + + if (referenceKernel != 0) + { + // Special reference kernel + for (uint32_t k = 0; k < _node->nodeKernels.kernelCount; k++) + { + if (_node->nodeKernels.kernelList[k].run_kernel.kernel_uuid == referenceKernel) + { + prevKernelFragments = _node->nodeKernels.kernelList[k].fragment_descs; + prevKernelUuid = referenceKernel; + break; + } + } + } + + // Find the handling function for this kernel + GraphResolutionConfiguratorKernelRole kernelRole = GraphResolutionConfiguratorHelper::getKernelRole(runKernel->kernel_uuid); + + switch (kernelRole) + { + case GraphResolutionConfiguratorKernelRole::DownScaler: + { + configFragmentsDownscaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::EspaCropper: + { + configFragmentsCropper(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::UpScaler: + { + configFragmentsUpscaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::Output: + { + configFragmentsOutput(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::TnrScaler: + { + configFragmentsTnrScaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::TnrFeederFull: + case GraphResolutionConfiguratorKernelRole::TnrFeederSmall: + { + configFragmentsTnrFeeder(runKernel, kernelFragments, kernelRole); + break; + } + + case GraphResolutionConfiguratorKernelRole::NonRcb: + { + // Before zoom kernels - take prev kernel fragments as-is + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + } + + default: + { + // No action for other kernels + break; + } + } + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsDownscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactorW = static_cast(resInfo->output_width) / (resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right); + auto scaleFactorH = static_cast(resInfo->output_height) / (resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom); + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + int rightCrop = stripe == static_cast(_node->numberOfFragments - 1) ? resInfo->input_crop.right : 0; + + double value = (static_cast(kernelFragments[stripe].fragmentInputWidth - rightCrop) * scaleFactor) / 4; + kernelFragments[stripe].fragmentOutputWidth = static_cast(floor(value)) * 4; + + // Start of output is rounded up since this is what b2i_ds does (Creates pixels starting from the pixel after) + value = (scaleFactor * kernelFragments[stripe].fragmentStartX) / 2; + _outputStartX[runKernel->kernel_uuid][stripe] = static_cast(ceil(value)) * 2; + } + + return StaticGraphStatus::SG_OK; +} + +void Ipu8FragmentsConfigurator::vanishStripe(uint8_t stripe, uint32_t runKerenlUuid, StaticGraphFragmentDesc* kernelFragments, VanishOption vanishOption) +{ + _node->fragmentVanishStatus[stripe] = vanishOption; + kernelFragments[stripe] = {}; + _outputStartX[runKerenlUuid][stripe] = 0; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsCropper(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + // prev kernel is the downscaler + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + // No cropping in DS, cropping is done by ESPA cropper + + int32_t leftPixel = runKernel->resolution_info->input_crop.left; + int32_t rightPixel = static_cast(runKernel->resolution_info->input_width - runKernel->resolution_info->input_crop.right); + + int32_t leftNonVanishedStripe = 0; + int32_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + std::vector xOffset(_node->numberOfFragments, 0); + + for (int8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (leftPixel + VANISH_MIN >= kernelFragments[stripe].fragmentStartX + kernelFragments[stripe].fragmentInputWidth) + { + // This stripe is cropped out, vanish it! + // Note that we set output width to 0 for ESPA cropper and forward. But Stripe vanishes much eairlier in pipe, and these infos are not updated. + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (rightPixel <= kernelFragments[stripe].fragmentStartX + VANISH_MIN) + { + // This stripe is cropped out, vanish it! + // Note that we set output width to 0 for ESPA cropper and forward. But Stripe vanishes much eairlier in pipe, and these infos are not updated. + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + + for (int32_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + int32_t leftCrop = runKernel->resolution_info->input_crop.left > kernelFragments[stripe].fragmentStartX ? + runKernel->resolution_info->input_crop.left - kernelFragments[stripe].fragmentStartX : 0; + int32_t rightCrop = runKernel->resolution_info->input_crop.right > (runKernel->resolution_info->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) ? + runKernel->resolution_info->input_crop.right - (runKernel->resolution_info->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) : 0; + + // Save for sys api + xOffset[stripe] = static_cast(leftCrop); + + // ESPA crop is after the down scaling and it must output resolution that divides by 8 for tnr scalers. + int32_t stripeZoomCrop = leftCrop + rightCrop; + + int outputWidth = (int)kernelFragments[stripe].fragmentOutputWidth - stripeZoomCrop; + if (outputWidth < 0) + { + return StaticGraphStatus::SG_ERROR; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(outputWidth); + + // For start point, we need to remove the left cropping only for stripes 1 and on + uint16_t outputStartX = static_cast(kernelFragments[stripe].fragmentStartX > runKernel->resolution_info->input_crop.left) ? + static_cast(kernelFragments[stripe].fragmentStartX - runKernel->resolution_info->input_crop.left) : 0; + + _outputStartX[runKernel->kernel_uuid][stripe] = outputStartX; + + if (kernelFragments[stripe].fragmentOutputWidth % 8 != 0) + { + uint16_t pixelsToCrop = kernelFragments[stripe].fragmentOutputWidth % 8; + + // Additional crop on the right, affects only output width + kernelFragments[stripe].fragmentOutputWidth -= pixelsToCrop; + + if (stripe == rightNonVanishedStripe) + { + // Last stripe - crop from left + _outputStartX[runKernel->kernel_uuid][stripe] += pixelsToCrop; + xOffset[stripe] += pixelsToCrop; + } + } + } + + // Update system API offsets + +#ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES + if (runKernel->system_api.size != ((GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)) + (sizeof(StaticGraphKernelSystemApiIoBuffer1_4)))) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } +#endif + + auto systemApiHeader = static_cast(runKernel->system_api.data); + if (systemApiHeader->systemApiUuid != GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid()) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } + + StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast + (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); + + for (uint8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + systemApi->x_output_offset_per_stripe[stripe] = xOffset[stripe]; + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsUpscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + if (runKernel->resolution_info->input_width == runKernel->resolution_info->output_width && + runKernel->resolution_info->input_height == runKernel->resolution_info->output_height && + runKernel->resolution_info->input_crop.left == 0 && + runKernel->resolution_info->input_crop.right == 0 && + runKernel->resolution_info->input_crop.top == 0 && + runKernel->resolution_info->input_crop.bottom == 0) + { + // Upscaler bypassed + return StaticGraphStatus::SG_OK; + } + + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactorW = static_cast(resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / resInfo->output_width; + auto scaleFactorH = static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / resInfo->output_height; + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + uint32_t upscalerWidthGranularity = _upscalerWidthGranularity; + uint16_t inputUnits = static_cast((resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / upscalerWidthGranularity); + + // We would like to keep upscalerWidthGranularity as large as possible in order to minimize the number of pixels that cannot be used for upscaling + // (upscalerWidthGranularity is divided to stripes, so the larger it is the more accurately we can divide) + while (inputUnits % 2 == 0) + { + inputUnits /= 2; + upscalerWidthGranularity *= 2; + } + + int32_t leftPixel = runKernel->resolution_info->input_crop.left; + int32_t rightPixel = static_cast(runKernel->resolution_info->input_width - runKernel->resolution_info->input_crop.right); + + uint8_t leftNonVanishedStripe = 0; + uint8_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + for (int8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + if (leftPixel >= kernelFragments[stripe].fragmentStartX + kernelFragments[stripe].fragmentInputWidth) + { + // This stripe is cropped out, vanish it! + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + if (rightPixel <= kernelFragments[stripe].fragmentStartX) + { + // This stripe is cropped out, vanish it! + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + int32_t leftCrop = resInfo->input_crop.left > kernelFragments[stripe].fragmentStartX ? + resInfo->input_crop.left - kernelFragments[stripe].fragmentStartX : 0; + int32_t rightCrop = resInfo->input_crop.right > (resInfo->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) ? + resInfo->input_crop.right - (resInfo->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) : 0; + + int32_t stripeZoomCrop = leftCrop + rightCrop; + + // Calculate the step, proportional to the part of input to upscaler that this stripe is working on + uint16_t inputWidthAfterZoomCrop = static_cast(kernelFragments[stripe].fragmentInputWidth - stripeZoomCrop); + + uint16_t pixelsToCrop = 0; + uint16_t maxInputWidth = static_cast(UPSCALER_MAX_OUTPUT_WIDTH * scaleFactor); + if (inputWidthAfterZoomCrop > maxInputWidth) + { + pixelsToCrop = inputWidthAfterZoomCrop - maxInputWidth; + inputWidthAfterZoomCrop = maxInputWidth; + } + + uint16_t stripeStepW = GRA_ROUND_DOWN(static_cast(static_cast(inputWidthAfterZoomCrop) / (resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) * upscalerWidthGranularity), 2); + uint16_t inputWidthAfterTotalCrop = stripeStepW * inputUnits; + + if (inputWidthAfterTotalCrop < 16) + { + // Too little left after cropping, vanish this stripe + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + + pixelsToCrop += (inputWidthAfterZoomCrop - inputWidthAfterTotalCrop); + + kernelFragments[stripe].fragmentOutputWidth = static_cast(GRA_ROUND(static_cast(inputWidthAfterTotalCrop) / scaleFactor)); + + // Validate output width + if (static_cast(inputWidthAfterTotalCrop) / kernelFragments[stripe].fragmentOutputWidth != + static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / resInfo->output_height) + { + // Output width is not valid, return error + return StaticGraphStatus::SG_ERROR; + } + + if (stripe == leftNonVanishedStripe && stripe != rightNonVanishedStripe) + { + // Crop on the right + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = 0; + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = pixelsToCrop; + } + else if (stripe == rightNonVanishedStripe && stripe != leftNonVanishedStripe) + { + // Crop on the left + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = pixelsToCrop; + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = 0; + } + else + { + // Crop both sides + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = GRA_ROUND_DOWN(static_cast(pixelsToCrop / 2), 2); + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = pixelsToCrop - kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft; + } + + uint16_t outputStartX = static_cast(kernelFragments[stripe].fragmentStartX > resInfo->input_crop.left ? + kernelFragments[stripe].fragmentStartX - resInfo->input_crop.left : 0); + + outputStartX += kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft; + + outputStartX = GRA_ROUND_UP(static_cast(ceil(static_cast(outputStartX) / scaleFactor)), 2); + + _outputStartX[runKernel->kernel_uuid][stripe] = outputStartX; + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsOutput(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + int16_t leftNonVanishedStripe = 0; + int16_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + for (int16_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::Full) + { + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + } + + for (int16_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::Full) + { + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + } + + // Remove overlaps between stripes + FormatType bufferFormat = GraphResolutionConfiguratorHelper::getFormatForDrainer(runKernel->kernel_uuid); + std::vector newOutputStartX = std::vector(_node->numberOfFragments, 0); + + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + if (stripe == leftNonVanishedStripe) // first stripe + { + newOutputStartX[stripe] = 0; + } + else //middle or last stripe + { + newOutputStartX[stripe] = + (_outputStartX[runKernel->kernel_uuid][stripe] + _outputStartX[runKernel->kernel_uuid][stripe-1] + kernelFragments[stripe-1].fragmentOutputWidth) / 4 * 2; + + // Align to format restrictions if TNR drainer & data is 10-bit packed + newOutputStartX[stripe] = alignToFormatRestrictions(newOutputStartX[stripe], bufferFormat); + } + } + + _outputStartX[runKernel->kernel_uuid] = newOutputStartX; + + // Data Width is calculated according to data starts + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + if (stripe == rightNonVanishedStripe) // last stripe + { + kernelFragments[stripe].fragmentOutputWidth = static_cast(runKernel->resolution_info->input_width - _outputStartX[runKernel->kernel_uuid][stripe]); + } + else // first or middle stripe + { + if (_outputStartX[runKernel->kernel_uuid][stripe + 1] <= _outputStartX[runKernel->kernel_uuid][stripe]) + { + return StaticGraphStatus::SG_ERROR; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(_outputStartX[runKernel->kernel_uuid][stripe+1] - _outputStartX[runKernel->kernel_uuid][stripe]); + } + } + + // Update system API offsets +#ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES + if (runKernel->system_api.size != ((GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)) + (sizeof(StaticGraphKernelSystemApiIoBuffer1_4)))) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } +#endif + + auto systemApiHeader = static_cast(runKernel->system_api.data); + if (systemApiHeader->systemApiUuid != GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid()) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } + + StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast + (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); + + for (int16_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + systemApi->x_output_offset_per_stripe[stripe] = 0; + + for (uint8_t plane = 0; plane < 3; plane++) + { + systemApi->plane_start_address_per_stripe[stripe * 3 + plane] = 0; + } + } + + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + uint32_t sumOfPrevWidths = 0; + + for (int16_t s = leftNonVanishedStripe; s < stripe; s++) + { + sumOfPrevWidths += kernelFragments[s].fragmentOutputWidth; + } + + // OutputOffsetPerStripe: Sum(prev output widths) + input_crop.left - stripe.startX + systemApi->x_output_offset_per_stripe[stripe] = + sumOfPrevWidths + runKernel->resolution_info->input_crop.left - kernelFragments[stripe].fragmentStartX; + + // PlaneOffsetStartAddressPerStripe: Sum(prev output widths) * DataSize + for (uint8_t plane = 0; plane < 2; plane++) + { + systemApi->plane_start_address_per_stripe[stripe * 3 + plane] = getPlaneStartAddress(sumOfPrevWidths, bufferFormat, plane); + } + } + + return StaticGraphStatus::SG_OK; +} + +uint32_t Ipu8FragmentsConfigurator::getPlaneStartAddress(uint32_t sumOfPrevWidths, FormatType formatType, uint8_t plane) +{ + // Calculate according to format BPP. + uint32_t bitsPerElement = 8; + uint32_t elementsPerCacheLine = 64; + uint8_t numberOfPlanes = 3; + + if (formatType == FormatType::YUV420_8_SP_P) + { + // 8-bit packed (OFS output) + bitsPerElement = 8; + elementsPerCacheLine = 64; + numberOfPlanes = 2; + } + else if (formatType == FormatType::YUV420_10_SP_P) + { + // 10-bit packed (TNR ref) + bitsPerElement = 10; + elementsPerCacheLine = 50; + numberOfPlanes = 2; + } + else if (formatType == FormatType::META_8) + { + // 8-bit meta data (TNR recursice similarity) + bitsPerElement = 8; + elementsPerCacheLine = 64; + numberOfPlanes = 1; + } + else + { + // Format not supported + // Log error + return 0; + } + + if (plane >= numberOfPlanes) + { + // Plane does not exist + return 0; + } + + // Offset is calculated by taking whole cache lines and then adding the remaining pixles and translate to bytes. + uint32_t wholeCacheLines = sumOfPrevWidths / elementsPerCacheLine; + uint32_t remainingPixels = sumOfPrevWidths % elementsPerCacheLine; + + if ((remainingPixels * bitsPerElement) % 8 != 0) + { + // Log error + return 0; + } + + return wholeCacheLines * 64 + (remainingPixels * bitsPerElement) / 8; +} + +uint16_t Ipu8FragmentsConfigurator::alignToFormatRestrictions(uint16_t size, FormatType bufferFormat) +{ + if (bufferFormat != FormatType::YUV420_10_SP_P) + { + return size; + } + + uint16_t elementsPerCacheLine = 50; + + uint16_t remainingPixels = size % elementsPerCacheLine; + uint16_t pixelsToRemove = remainingPixels % 4; + + return size - pixelsToRemove; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsTnrScaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactor = static_cast(resInfo->output_width) / (resInfo->input_width); + + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(kernelFragments[stripe].fragmentInputWidth * scaleFactor); + + // Start of output is rounded up since this is what b2i_ds does (Creates pixels starting from the pixel after) + _outputStartX[runKernel->kernel_uuid][stripe] = static_cast(ceil(scaleFactor * kernelFragments[stripe].fragmentStartX / 2)) * 2; + } + + // Save stripes for feeder configuration + _tnrScalerFragments = kernelFragments; + _tnrScalerUuid = runKernel->kernel_uuid; + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsTnrFeeder(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, GraphResolutionConfiguratorKernelRole kernelRole) +{ + if (kernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + for (uint8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::AfterStats) + { + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + if (kernelRole == GraphResolutionConfiguratorKernelRole::TnrFeederFull) + { + // TNR Full resolution + kernelFragments[stripe].fragmentOutputWidth = _tnrScalerFragments[stripe].fragmentInputWidth; + kernelFragments[stripe].fragmentStartX = _tnrScalerFragments[stripe].fragmentStartX; + _outputStartX[runKernel->kernel_uuid][stripe] = _tnrScalerFragments[stripe].fragmentStartX; + } + else // GraphResolutionConfiguratorKernelRole::TnrFeederSmall + { + // TNR Small resolution + kernelFragments[stripe].fragmentOutputWidth = _tnrScalerFragments[stripe].fragmentOutputWidth; + kernelFragments[stripe].fragmentStartX = _outputStartX[_tnrScalerUuid][stripe]; + _outputStartX[runKernel->kernel_uuid][stripe] = _outputStartX[_tnrScalerUuid][stripe]; + } + } + + return StaticGraphStatus::SG_OK; +} + +void Ipu8FragmentsConfigurator::copyFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* prevKernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* kernelFragments) +{ + if (prevKernelFragments == nullptr || kernelFragments == nullptr) + { + return; + } + + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + if (_outputStartX.find(prevKernelUuid) == _outputStartX.end()) + { + // This is the main DS, we start from it, no need to copy + return; + } + + for (uint32_t i = 0; i < _node->numberOfFragments; i++) + { + kernelFragments[i].fragmentInputWidth = prevKernelFragments[i].fragmentOutputWidth; + kernelFragments[i].fragmentOutputWidth = prevKernelFragments[i].fragmentOutputWidth; + kernelFragments[i].fragmentStartX = _outputStartX[prevKernelUuid][i]; + kernelFragments[i].upscalerFragDesc.fragmentInputCropLeft = 0; + kernelFragments[i].upscalerFragDesc.fragmentInputCropRight = 0; + + _outputStartX[runKernel->kernel_uuid][i] = kernelFragments[i].fragmentStartX; + } +} diff --git a/modules/ipu_desc/ipu75xa/FragmentsConfigurator.h b/modules/ipu_desc/ipu75xa/FragmentsConfigurator.h new file mode 100644 index 0000000..f3c6c9a --- /dev/null +++ b/modules/ipu_desc/ipu75xa/FragmentsConfigurator.h @@ -0,0 +1,65 @@ +/* +* INTEL CONFIDENTIAL +* Copyright (c) 2022 Intel Corporation +* All Rights Reserved. +* +* The source code contained or described herein and all documents related to +* the source code ("Material") are owned by Intel Corporation or its +* suppliers or licensors. Title to the Material remains with Intel +* Corporation or its suppliers and licensors. The Material may contain trade +* secrets and proprietary and confidential information of Intel Corporation +* and its suppliers and licensors, and is protected by worldwide copyright +* and trade secret laws and treaty provisions. No part of the Material may be +* used, copied, reproduced, modified, published, uploaded, posted, +* transmitted, distributed, or disclosed in any way without Intel's prior +* express written permission. +* +* No license under any patent, copyright, trade secret or other intellectual +* property right is granted to or conferred upon you by disclosure or +* delivery of the Materials, either expressly, by implication, inducement, +* estoppel or otherwise. Any license under such intellectual property rights +* must be express and approved by Intel in writing. +* +* Unless otherwise agreed by Intel in writing, you may not remove or alter +* this notice or any other notice embedded in Materials by Intel or Intels +* suppliers or licensors in any way. +*/ +#pragma once +#include "GraphResolutionConfiguratorInclude.h" +#include + +class Ipu8FragmentsConfigurator +{ +public: + + static const int32_t VANISH_MIN = 16; + static const int32_t UPSCALER_MAX_OUTPUT_WIDTH = 4672; + Ipu8FragmentsConfigurator(IStaticGraphConfig* staticGraph, OuterNode* node, uint32_t upscalerWidthGranularity); + + StaticGraphStatus configureFragments(); + +private: + // Stripe Actions - each filter will perform one action according to its role + StaticGraphStatus configFragmentsDownscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsCropper(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsUpscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsOutput(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsTnrScaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsTnrFeeder(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, GraphResolutionConfiguratorKernelRole kernelRole); + + void copyFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* prevKernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* kernelFragments); + void vanishStripe(uint8_t stripe, uint32_t runKerenlUuid, StaticGraphFragmentDesc* kernelFragments, VanishOption vanishOption); + uint32_t getPlaneStartAddress(uint32_t sumOfPrevWidths, FormatType formatType, uint8_t plane); + uint16_t alignToFormatRestrictions(uint16_t size, FormatType bufferFormat); + + OuterNode* _node = nullptr; + IStaticGraphConfig* _staticGraph = nullptr; + + // Fragments binaries do not contain output start x, so we keep them here + std::map> _outputStartX; + uint32_t _upscalerWidthGranularity = 1; + + // Save TNR resolutions for feeder configurations + StaticGraphFragmentDesc* _tnrScalerFragments = nullptr; + uint32_t _tnrScalerUuid = 0; +}; diff --git a/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.cpp b/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.cpp index 49b5b6e..bd5dbb9 100644 --- a/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.cpp +++ b/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.cpp @@ -30,6 +30,10 @@ #include #include +#if SUPPORT_FRAGMENTS == 1 +#include "FragmentsConfigurator.h" +#endif + #define GRA_CONVERT_TO_RADIANS(degreeAngle) ((double)((degreeAngle)*M_PI/180.0)) /* * External Interfaces @@ -122,10 +126,20 @@ sensorMode->verticalCropOffset - sensorMode->croppedImageHeight; // Input crop to scaler includes sensor, so we need to remove it - _originalCropInputToScaler.top = static_cast((_originalCropInputToScaler.top - static_cast(_sensorVerticalCropTop)) * _sensorHorizontalScaling); - _originalCropInputToScaler.bottom = static_cast((_originalCropInputToScaler.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorHorizontalScaling); - _originalCropInputToScaler.left = static_cast((_originalCropInputToScaler.left - static_cast(_sensorHorizontalCropLeft)) * _sensorVerticalScaling); - _originalCropInputToScaler.right = static_cast((_originalCropInputToScaler.right - static_cast(_sensorHorizontalCropRight)) * _sensorVerticalScaling); + _originalCropInputToScaler.left = static_cast((_originalCropInputToScaler.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); + _originalCropInputToScaler.right = static_cast((_originalCropInputToScaler.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); + _originalCropInputToScaler.top = static_cast((_originalCropInputToScaler.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); + _originalCropInputToScaler.bottom = static_cast((_originalCropInputToScaler.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); + + _originalCropScalerToOutput.left = static_cast(_originalCropScalerToOutput.left * _sensorHorizontalScaling); + _originalCropScalerToOutput.right = static_cast(_originalCropScalerToOutput.right * _sensorHorizontalScaling); + _originalCropScalerToOutput.top = static_cast(_originalCropScalerToOutput.top * _sensorVerticalScaling); + _originalCropScalerToOutput.bottom = static_cast(_originalCropScalerToOutput.bottom * _sensorVerticalScaling); + + _originalCropScalerToOutput.left -= cropperRunKernel->resolution_info->input_crop.left; + _originalCropScalerToOutput.right -= cropperRunKernel->resolution_info->input_crop.right; + _originalCropScalerToOutput.top -= cropperRunKernel->resolution_info->input_crop.top; + _originalCropScalerToOutput.bottom -= cropperRunKernel->resolution_info->input_crop.bottom; } /* @@ -204,77 +218,79 @@ StaticGraphStatus GraphResolutionConfigurator::updateStaticGraphConfig(const Reg { return StaticGraphStatus::SG_ERROR; } - - // Key resolution index - uint32_t keyResIndex = 0; - if (isCenteredZoom == true) + if (roi.fromInput == false) { - ZoomKeyResolutions* zoomKeyResolutions = nullptr; - if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + // Key resolution index + uint32_t keyResIndex = 0; + if (isCenteredZoom == true) { - return StaticGraphStatus::SG_ERROR; - } + ZoomKeyResolutions* zoomKeyResolutions = nullptr; + if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Get key resolution for this ROI - // Special case for factor 1, this means there is no zoom, so we select index 0 - if (userRoi.zoomFactor == 1.0) - { - keyResIndex = 0; - } - else if (getZoomKeyResolutionIndex(zoomKeyResolutions, sensorRoi, keyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; - } + // Get key resolution for this ROI + // Special case for factor 1, this means there is no zoom, so we select index 0 + if (userRoi.zoomFactor == 1.0) + { + keyResIndex = 0; + } + else if (getZoomKeyResolutionIndex(zoomKeyResolutions, sensorRoi, keyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Update the static configuration according to the key resolution index - // Copy the original kernels configuration a _kernels - if (_staticGraph->updateConfiguration(keyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; + // Update the static configuration according to the key resolution index + // Copy the original kernels configuration a _kernels + if (_staticGraph->updateConfiguration(keyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } - } - else - { - if (_staticGraph->updateConfiguration() != StaticGraphStatus::SG_OK) + else { - return StaticGraphStatus::SG_ERROR; + if (_staticGraph->updateConfiguration() != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } - } - // Get key resolution for previous ROI - uint32_t prevKeyResIndex = 0; + // Get key resolution for previous ROI + uint32_t prevKeyResIndex = 0; - if (prevIsCenteredZoom == true) - { - ZoomKeyResolutions* zoomKeyResolutions = nullptr; - if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + if (prevIsCenteredZoom == true) { - return StaticGraphStatus::SG_ERROR; - } + ZoomKeyResolutions* zoomKeyResolutions = nullptr; + if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - SensorRoi prevSensorRoi; - if (getSensorRoi(prevUserRoi, prevSensorRoi) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; - } + SensorRoi prevSensorRoi; + if (getSensorRoi(prevUserRoi, prevSensorRoi) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Special case for factor 1, this means there is no zoom, so we select index 0 - if (prevUserRoi.zoomFactor == 1.0) - { - prevKeyResIndex = 0; - } - else if (getZoomKeyResolutionIndex(zoomKeyResolutions, prevSensorRoi, prevKeyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; + // Special case for factor 1, this means there is no zoom, so we select index 0 + if (prevUserRoi.zoomFactor == 1.0) + { + prevKeyResIndex = 0; + } + else if (getZoomKeyResolutionIndex(zoomKeyResolutions, prevSensorRoi, prevKeyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } + // Update whether if key resolution has changed + isKeyResolutionChanged = (keyResIndex == prevKeyResIndex) ? false : true; } - // Update whether if key resolution has changed - isKeyResolutionChanged = (keyResIndex == prevKeyResIndex) ? false : true; // // Step #2 Dynamic update according to this ROI // - return updateRunKernelOfScalers(sensorRoi); + return updateRunKernelOfScalers(roi.fromInput,sensorRoi); } #endif @@ -289,14 +305,26 @@ StaticGraphStatus GraphResolutionConfigurator::getSensorRoi(const RegionOfIntere return StaticGraphStatus::SG_ERROR; } - auto outputRunKernel = getRunKernel(_outputRunKernelCoord); - if (userRoi.fromInput == true) { - // Not supported - return StaticGraphStatus::SG_ERROR; + if (userRoi.zoomFactor == 1 && userRoi.panFactor == 0) + { + auto cropRunKernel = getRunKernel(_cropperRunKernelCoord); + sensorRoi.width = cropRunKernel->resolution_info->output_width; + sensorRoi.height = cropRunKernel->resolution_info->output_height; + sensorRoi.cropLeft = cropRunKernel->resolution_info->input_crop.left; + sensorRoi.cropRight = cropRunKernel->resolution_info->input_crop.right; + sensorRoi.cropTop = GRA_ROUND_DOWN(std::min(cropRunKernel->resolution_history->input_height- cropRunKernel->resolution_info->output_height, std::max(0, static_cast(static_cast(cropRunKernel->resolution_history->input_height * userRoi.tiltFactor)))), 2); + sensorRoi.cropBottom = cropRunKernel->resolution_info->input_height - cropRunKernel->resolution_info->output_height - sensorRoi.cropTop; + // Not supported + return StaticGraphStatus::SG_OK; + } + else + { + return StaticGraphStatus::SG_ERROR; + } } - + auto outputRunKernel = getRunKernel(_outputRunKernelCoord); // Calculate ROI on output, using original output since user ROI is relative to full output ROI (not after some zoom was performed) StaticGraphKernelRes* outputRunKernelResolution = outputRunKernel->resolution_info; if (outputRunKernelResolution == nullptr) @@ -331,91 +359,118 @@ StaticGraphStatus GraphResolutionConfigurator::getSensorRoi(const RegionOfIntere return StaticGraphStatus::SG_OK; } -StaticGraphStatus GraphResolutionConfigurator::updateRunKernelOfScalers(SensorRoi& roi) +StaticGraphStatus GraphResolutionConfigurator::updateRunKernelOfScalers(bool fromInput, SensorRoi& roi) { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - auto downscalerRunKernel = getRunKernel(_downscalerRunKernelCoord); auto upscalerRunKernel = getRunKernel(_upscalerRunKernelCoord); auto cropperRunKernel = getRunKernel(_cropperRunKernelCoord); - uint32_t inputWidth = downscalerRunKernel->resolution_info->input_width; - uint32_t inputHeight = downscalerRunKernel->resolution_info->input_height; - - uint32_t outputWidth = cropperRunKernel->resolution_info->output_width; - uint32_t outputHeight = cropperRunKernel->resolution_info->output_height; - - StaticGraphKernelResCrop downscalerCropHistory; - downscalerCropHistory.left = static_cast((downscalerRunKernel->resolution_history->input_crop.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); - downscalerCropHistory.right = static_cast((downscalerRunKernel->resolution_history->input_crop.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); - downscalerCropHistory.top = static_cast((downscalerRunKernel->resolution_history->input_crop.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); - downscalerCropHistory.bottom = static_cast((downscalerRunKernel->resolution_history->input_crop.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); - - // If ROI is larger than scaler's output resolution - we downscale - if (roi.width >= outputWidth) + if (fromInput) { - // Only down scaler is active - if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, - outputWidth, outputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + cropperRunKernel->resolution_info->input_crop.top = roi.cropTop; + cropperRunKernel->resolution_info->input_crop.bottom = roi.cropBottom; + + // Update resolution history for relevant kernels + for (auto& runKernelForUpdate : _kernelsForUpdate) { - ret = StaticGraphStatus::SG_ERROR; + // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. + StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); + if (updateRunKernelResolutionHistory(runKernelPtr, cropperRunKernel, false) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } } - - updateRunKernelPassThrough(upscalerRunKernel, outputWidth, outputHeight); - - // When downscaling, cropper is not a part of dynamic scaling, even if it was a part of static configuration. - updateRunKernelPassThrough(cropperRunKernel, outputWidth, outputHeight); } else { - // Configure downscaler and upscaler according to upscaler constraints - // Update upscaler info, according constraints. Returns the expected input width and height for upscaler. - uint32_t upscalerActualInputWidth; - uint32_t upscalerActualInputHeight; - uint32_t upscalerActualOutputWidth; - uint32_t upscalerActualOutputHeight; - if (updateRunKernelUpScaler(upscalerRunKernel, roi.width, roi.height, outputWidth, outputHeight, - upscalerActualInputWidth, upscalerActualInputHeight, - upscalerActualOutputWidth, upscalerActualOutputHeight) != StaticGraphStatus::SG_OK) + uint32_t inputWidth = downscalerRunKernel->resolution_info->input_width; + uint32_t inputHeight = downscalerRunKernel->resolution_info->input_height; + + uint32_t outputWidth = cropperRunKernel->resolution_info->output_width; + uint32_t outputHeight = cropperRunKernel->resolution_info->output_height; + + StaticGraphKernelResCrop downscalerCropHistory; + downscalerCropHistory.left = static_cast((downscalerRunKernel->resolution_history->input_crop.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); + downscalerCropHistory.right = static_cast((downscalerRunKernel->resolution_history->input_crop.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); + downscalerCropHistory.top = static_cast((downscalerRunKernel->resolution_history->input_crop.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); + downscalerCropHistory.bottom = static_cast((downscalerRunKernel->resolution_history->input_crop.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); + if (roi.width == outputWidth || roi.height == outputHeight) { - ret = StaticGraphStatus::SG_ERROR; + updateRunKernelPassThrough(downscalerRunKernel, inputWidth, inputHeight); + updateRunKernelPassThrough(upscalerRunKernel, inputWidth, inputHeight); + // Update ESPA crop if required + updateRunKernelFinalCropper(cropperRunKernel, inputWidth, inputHeight, outputWidth, outputHeight); } - - // Update DS cropping and downscale according to the resolution the upscaler requires. - if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, - upscalerActualInputWidth, upscalerActualInputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + // If ROI is larger than scaler's output resolution - we downscale + else if (roi.width > outputWidth) { - ret = StaticGraphStatus::SG_ERROR; + // Only down scaler is active + if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, + outputWidth, outputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + + updateRunKernelPassThrough(upscalerRunKernel, outputWidth, outputHeight); + + // When downscaling, cropper is not a part of dynamic scaling, even if it was a part of static configuration. + updateRunKernelPassThrough(cropperRunKernel, outputWidth, outputHeight); + } + else + { + // Configure downscaler and upscaler according to upscaler constraints + + // Update upscaler info, according constraints. Returns the expected input width and height for upscaler. + uint32_t upscalerActualInputWidth; + uint32_t upscalerActualInputHeight; + uint32_t upscalerActualOutputWidth; + uint32_t upscalerActualOutputHeight; + if (updateRunKernelUpScaler(upscalerRunKernel, roi.width, roi.height, outputWidth, outputHeight, + upscalerActualInputWidth, upscalerActualInputHeight, + upscalerActualOutputWidth, upscalerActualOutputHeight) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Now that we're done, if downscaler is not doing any scaling, it is better to let it be bypassed and move the cropping to upscaler - updateCroppingScaler(downscalerRunKernel, upscalerRunKernel); + // Update DS cropping and downscale according to the resolution the upscaler requires. + if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, + upscalerActualInputWidth, upscalerActualInputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Update ESPA crop if required - updateRunKernelFinalCropper(cropperRunKernel, upscalerActualOutputWidth, upscalerActualOutputHeight, outputWidth, outputHeight); - } + // Now that we're done, if downscaler is not doing any scaling, it is better to let it be bypassed and move the cropping to upscaler + updateCroppingScaler(downscalerRunKernel, upscalerRunKernel); - // Update resolution histories according to decisions made above - if (updateRunKernelResolutionHistory(upscalerRunKernel, downscalerRunKernel) != StaticGraphStatus::SG_OK) - { - ret = StaticGraphStatus::SG_ERROR; - } + // Update ESPA crop if required + updateRunKernelFinalCropper(cropperRunKernel, upscalerActualOutputWidth, upscalerActualOutputHeight, outputWidth, outputHeight); + } - if (updateRunKernelResolutionHistory(cropperRunKernel, upscalerRunKernel) != StaticGraphStatus::SG_OK) - { - ret = StaticGraphStatus::SG_ERROR; - } + // Update resolution histories according to decisions made above + if (updateRunKernelResolutionHistory(upscalerRunKernel, downscalerRunKernel) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Update resolution history for relevant kernels - for (auto& runKernelForUpdate : _kernelsForUpdate) - { - // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. - StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); - if (updateRunKernelResolutionHistory(runKernelPtr, upscalerRunKernel, false) != StaticGraphStatus::SG_OK) + if (updateRunKernelResolutionHistory(cropperRunKernel, upscalerRunKernel) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } + + // Update resolution history for relevant kernels + for (auto& runKernelForUpdate : _kernelsForUpdate) + { + // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. + // Anna - I don't know why cropping was ignored. I think it should be after cropping + StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); + if (updateRunKernelResolutionHistory(runKernelPtr, cropperRunKernel, false) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + } } return ret; @@ -717,11 +772,11 @@ StaticGraphStatus GraphResolutionConfigurator::updateRunKernelFinalCropper(Stati runKernel->resolution_info->output_width = outputWidth; runKernel->resolution_info->output_height = outputHeight; - // Crop on the right & bottom in order not to influence resolution history - runKernel->resolution_info->input_crop.left = 0; - runKernel->resolution_info->input_crop.right = inputWidth - outputWidth; - runKernel->resolution_info->input_crop.top = 0; - runKernel->resolution_info->input_crop.bottom = inputHeight - outputHeight; + // Crop symmetrically + runKernel->resolution_info->input_crop.left = GRA_ROUND_DOWN(static_cast((inputWidth - outputWidth) / 2.0), 2); + runKernel->resolution_info->input_crop.right = inputWidth - outputWidth - runKernel->resolution_info->input_crop.left; + runKernel->resolution_info->input_crop.top = GRA_ROUND_DOWN(static_cast((inputHeight - outputHeight) / 2.0), 2); + runKernel->resolution_info->input_crop.bottom = inputHeight - outputHeight - runKernel->resolution_info->input_crop.top; return StaticGraphStatus::SG_OK; } @@ -734,6 +789,16 @@ StaticGraphStatus GraphResolutionConfigurator::updateCroppingScaler(StaticGraphR int32_t heightAfterCtop = downscalerRunKernel->resolution_info->input_height - downscalerRunKernel->resolution_info->input_crop.top - downscalerRunKernel->resolution_info->input_crop.bottom; + int32_t extraPixelsWidth = (downscalerRunKernel->resolution_info->input_width - downscalerRunKernel->resolution_info->input_crop.left - downscalerRunKernel->resolution_info->input_crop.right)- + downscalerRunKernel->resolution_info->output_width; + + widthAfterCtop -= extraPixelsWidth % 4; + + int32_t extraPixelsHeight = (downscalerRunKernel->resolution_info->input_width - downscalerRunKernel->resolution_info->input_crop.left - downscalerRunKernel->resolution_info->input_crop.right) - + downscalerRunKernel->resolution_info->output_width; + + heightAfterCtop -= extraPixelsHeight % 4; + if (widthAfterCtop == downscalerRunKernel->resolution_info->output_width && heightAfterCtop == downscalerRunKernel->resolution_info->output_height) { @@ -1026,8 +1091,8 @@ StaticGraphStatus GraphResolutionConfigurator::undoSensorScaleRipAngle(int32_t& StaticGraphStatus GraphResolutionConfigurator::sensorCropOrScaleExist(bool& sensor_crop_or_scale_exist) { sensor_crop_or_scale_exist = false; - if ((abs(_sensorHorizontalScaling - 1.0F) < 0.01F) || - (abs(_sensorVerticalScaling - 1.0F) < 0.01F) || + if ((abs(_sensorHorizontalScaling - 1.0F) > 0.01F) || + (abs(_sensorVerticalScaling - 1.0F) > 0.01F) || (_sensorHorizontalCropLeft > 0) || (_sensorHorizontalCropRight > 0) || (_sensorVerticalCropTop > 0) || @@ -1056,7 +1121,8 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon initRunKernel(GraphResolutionConfiguratorKernelRole::UpScaler, _upscalerRunKernel) != StaticGraphStatus::SG_OK || initRunKernel(GraphResolutionConfiguratorKernelRole::EspaCropper, _cropperRunKernel) != StaticGraphStatus::SG_OK || initOutputRunKernel() != StaticGraphStatus::SG_OK || - initKernelsForUpdate() != StaticGraphStatus::SG_OK) + initKernelsForUpdate() != StaticGraphStatus::SG_OK || + _node == nullptr) { _staticGraph = nullptr; return; @@ -1079,7 +1145,17 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon _upscalerStepW *= 2; _upscalerStepH *= 2; - // Save original values for kernels that are being updated + // Due to upscaler constraints, we should avoid having too many units. + // Number of pixels that cannot be used when upscaling a stripe may be up to ~ 2*units + // For details: https://hsdes.intel.com/appstore/article-one/#/article/15018342122 + // This affects the number of possible zoom steps, but for large resolutions it is OK to enlarge the step + while (outputWidth / _upscalerStepW > 70) + { + _upscalerStepW *= 2; + _upscalerStepH *= 2; + } + + // Save original values for kernels that are being updated _originalCropOfDownScaler = _downscalerRunKernel->resolution_info->input_crop; _originalCropOfEspaCropper = _cropperRunKernel->resolution_info->input_crop; @@ -1106,12 +1182,36 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon return; } - if (sensorMode->horizontalScalingDenominator) { + if (sensorMode->horizontalScalingDenominator) + { _sensorHorizontalScaling = static_cast(sensorMode->horizontalScalingNumerator) / sensorMode->horizontalScalingDenominator; } - if (sensorMode->verticalScalingDenominator) { + + if (sensorMode->verticalScalingDenominator) + { _sensorVerticalScaling = static_cast(sensorMode->verticalScalingNumerator) / sensorMode->verticalScalingDenominator; } + +#if SUPPORT_FRAGMENTS == 1 + if (_node != nullptr && _node->GetNumberOfFragments() > 1) + { + _fragmentsConfigurator = new Ipu8FragmentsConfigurator(_staticGraph, _node, _upscalerStepW); + } +#endif +} + +Ipu8GraphResolutionConfigurator::~Ipu8GraphResolutionConfigurator() +{ + _kernelsForUpdateAfterCropper.clear(); + _kernelsForUpdateAfterUpscaler.clear(); + +#if SUPPORT_FRAGMENTS == 1 + if (_fragmentsConfigurator != nullptr) + { + delete _fragmentsConfigurator; + _fragmentsConfigurator = nullptr; + } +#endif } StaticGraphStatus Ipu8GraphResolutionConfigurator::initRunKernel(GraphResolutionConfiguratorKernelRole role, StaticGraphRunKernel*& runKernel) @@ -1139,6 +1239,10 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::initRunKernel(uint32_t kernel if (node->nodeKernels.kernelList[j].run_kernel.kernel_uuid == kernelUuid) { runKernel = &node->nodeKernels.kernelList[j].run_kernel; + if (node->type == NodeTypes::Cb) + { + _node = node; + } return StaticGraphStatus::SG_OK; } } @@ -1216,6 +1320,21 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::initKernelsForUpdate() } } + std::vector> smurfUuids; + GraphResolutionConfiguratorHelper::getSmurfRunKernelUuid(smurfUuids); + + for (auto& smurfUuid : smurfUuids) + { + StaticGraphRunKernel* runKernel; + StaticGraphRunKernel* deviceRunKernel; + if (initRunKernel(smurfUuid.first, runKernel) == StaticGraphStatus::SG_OK && + initRunKernel(smurfUuid.second, deviceRunKernel) == StaticGraphStatus::SG_OK) + { + std::pair runKernelPair = std::make_pair(runKernel, deviceRunKernel); + _smurfKernels.push_back(runKernelPair); + } + } + return StaticGraphStatus::SG_OK; } @@ -1306,11 +1425,6 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - //uint32_t fragments = 1; - //auto downscalerFragments = getKernelFragments(_downscalerRunKernelCoord); - //auto upscalerFragments = getKernelFragments(_upscalerRunKernelCoord); - //auto cropperFragments = getKernelFragments(_cropperRunKernelCoord); - uint32_t inputWidth = _downscalerRunKernel->resolution_info->input_width; uint32_t inputHeight = _downscalerRunKernel->resolution_info->input_height; @@ -1323,17 +1437,20 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso if (roi.width >= outputWidth) { // Only down scaler is active - if (updateRunKernelDownScaler(_downscalerRunKernel, roi, outputWidth, outputHeight) != StaticGraphStatus::SG_OK) + uint32_t dsOutputWidth = outputWidth; + uint32_t dsOutputHeight = outputHeight; + + if (updateRunKernelDownScaler(_downscalerRunKernel, roi, dsOutputWidth, dsOutputHeight) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } - // Pass-through. Must call cropper function in order to update the system API. StaticGraphKernelResCrop EmptyCrop = { 0, 0, 0, 0 }; - if (updateRunKernelCropper(_cropperRunKernel, roi, outputWidth, outputHeight, outputWidth, outputHeight, EmptyCrop) != StaticGraphStatus::SG_OK) + if (updateRunKernelCropper(_cropperRunKernel, roi, dsOutputWidth, dsOutputHeight, outputWidth, outputHeight, downscalerCropHist) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } + updateRunKernelPassThrough(_upscalerRunKernel, outputWidth, outputHeight); } else @@ -1385,32 +1502,66 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso } } - // :TODO: Striping Support - // Currently we assume one stripe. - //updateKernelFragments(_downscalerRunKernel, downscalerFragments, fragments); - //updateKernelFragments(_upscalerRunKernel, upscalerFragments, fragments); - //updateKernelFragments(_cropperRunKernel, cropperFragments, fragments); + // After resolution history was updated, re-configure SAP devices to get the correct FOV + // We do not change the sap feeders configuration, only update the crop & scale of smurfs + for (auto& runKernelForUpdate : _smurfKernels) + { + if (updateRunKernelSmurf(runKernelForUpdate.first, runKernelForUpdate.second) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + } if (ret == StaticGraphStatus::SG_OK) { ret = SanityCheck(); } + if (_fragmentsConfigurator != nullptr) + { + // Configure fragments according to the new zoomed run kernels information + _fragmentsConfigurator->configureFragments(); + } + return ret; } -StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, - uint32_t outputWidth, uint32_t outputHeight) +StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t& outputWidth, uint32_t& outputHeight) { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - runKernel->resolution_info->output_width = outputWidth; - runKernel->resolution_info->output_height = outputHeight; + if (_fragmentsConfigurator == nullptr) + { + // No fragments, crop to ROI and downscale to output resolution + runKernel->resolution_info->output_width = outputWidth; + runKernel->resolution_info->output_height = outputHeight; - runKernel->resolution_info->input_crop.left = roi.left; - runKernel->resolution_info->input_crop.right = roi.right; - runKernel->resolution_info->input_crop.top = roi.top; - runKernel->resolution_info->input_crop.bottom = roi.bottom; + runKernel->resolution_info->input_crop.left = roi.left; + runKernel->resolution_info->input_crop.right = roi.right; + runKernel->resolution_info->input_crop.top = roi.top; + runKernel->resolution_info->input_crop.bottom = roi.bottom; + } + else + { + // Fragments, leave the crop to espa crop, configure according to desired scale factor + // Since ESPA can only crop, make sure new output sizes are larger or equal to requested sizes + auto resInfo = runKernel->resolution_info; + + // If we have frgments, downscaler cannot perform left cropping + auto scaleFactorW = static_cast(roi.width) / outputWidth; + auto scaleFactorH = static_cast(roi.height) / outputHeight; + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + + runKernel->resolution_info->input_crop = _originalCropOfDownScaler; + + runKernel->resolution_info->output_width = std::max(outputWidth, + GRA_ROUND_UP(static_cast(ceil(static_cast(resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / scaleFactor)), 4)); + runKernel->resolution_info->output_height = std::max(outputHeight, + GRA_ROUND_UP(static_cast(ceil(static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / scaleFactor)), 2)); + + outputWidth = runKernel->resolution_info->output_width; + outputHeight = runKernel->resolution_info->output_height; + } return ret; } @@ -1433,23 +1584,6 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static runKernel->resolution_info->input_crop.bottom = 0; // In certain cases need to adjust negative and/or odd crop values. - if (downscalerCropHist.left < 0) - { - downscalerCropHist.left = 0; - } - if (downscalerCropHist.right < 0) - { - downscalerCropHist.right = 0; - } - if (downscalerCropHist.top < 0) - { - downscalerCropHist.top = 0; - } - if (downscalerCropHist.bottom < 0) - { - downscalerCropHist.bottom = 0; - } - if (downscalerCropHist.left & 1) { downscalerCropHist.left = downscalerCropHist.left - 1; @@ -1470,29 +1604,30 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static // Configure to crop the required amount. First try to use the original DS cropping (Remove padding) int32_t totalHorizontalCrop = inputWidth - outputWidth; - int32_t originalDsPadding = downscalerCropHist.left < 0 ? -downscalerCropHist.left : 0; - if (totalHorizontalCrop >= originalDsPadding && originalDsPadding > 0) + int32_t originalDsCrop = downscalerCropHist.left < 0 ? -downscalerCropHist.left : 0; + if (totalHorizontalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.left = originalDsPadding; - totalHorizontalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.left = originalDsCrop; + totalHorizontalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.left = 0; } - originalDsPadding = downscalerCropHist.right < 0 ? -downscalerCropHist.right : 0; - if (totalHorizontalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.right < 0 ? -downscalerCropHist.right : 0; + if (totalHorizontalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.right = originalDsPadding; - totalHorizontalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.right = originalDsCrop; + totalHorizontalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.right = 0; } // Now crop symmetrically to TNR size if any more cropping is required + // :TODO: fix this for PTZ with striping since should take roi into account runKernel->resolution_info->input_crop.left += GRA_ROUND_DOWN(static_cast(static_cast(totalHorizontalCrop)) / 2, 2); - runKernel->resolution_info->input_crop.right += GRA_ROUND_UP(static_cast(static_cast(totalHorizontalCrop)) / 2, 2); + runKernel->resolution_info->input_crop.right += (totalHorizontalCrop - GRA_ROUND_DOWN(static_cast(static_cast(totalHorizontalCrop)) / 2, 2)); if (roi.left < static_cast(runKernel->resolution_info->input_crop.left)) { @@ -1508,29 +1643,30 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static // Configure to crop the required amount. First try to use the original DS cropping (Remove padding) int32_t totalVerticalCrop = inputHeight - outputHeight; - originalDsPadding = downscalerCropHist.top < 0 ? -downscalerCropHist.top : 0; - if (totalVerticalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.top < 0 ? -downscalerCropHist.top : 0; + if (totalVerticalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.top = originalDsPadding; - totalVerticalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.top = originalDsCrop; + totalVerticalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.top = 0; } - originalDsPadding = downscalerCropHist.bottom < 0 ? -downscalerCropHist.bottom : 0; - if (totalVerticalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.bottom < 0 ? -downscalerCropHist.bottom : 0; + if (totalVerticalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.bottom = originalDsPadding; - totalVerticalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.bottom = originalDsCrop; + totalVerticalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.bottom = 0; } // Now crop symmetrically to TNR size if any more cropping is required + // :TODO: fix this for PTZ with striping since should take roi into account runKernel->resolution_info->input_crop.top += GRA_ROUND_DOWN(static_cast(static_cast(totalVerticalCrop)) / 2, 2); - runKernel->resolution_info->input_crop.bottom += GRA_ROUND_UP(static_cast(static_cast(totalVerticalCrop)) / 2, 2); + runKernel->resolution_info->input_crop.bottom += (totalVerticalCrop - GRA_ROUND_DOWN(static_cast(static_cast(totalVerticalCrop)) / 2, 2)); if (roi.top < static_cast(runKernel->resolution_info->input_crop.top)) { @@ -1559,6 +1695,8 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static return StaticGraphStatus::SG_ERROR; } + // The following will update the system API for single stripe. In case there are additional stripes system API will + // be configured by FrgamentsConfigurator. StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); @@ -1591,13 +1729,15 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelUpScaler(Stati uint32_t actualCropW = units * _upscalerStepW; uint32_t actualCropH = units * _upscalerStepH; - uint32_t deltaW = GRA_ROUND_DOWN((totalCropW - actualCropW) / 2, 2); - uint32_t deltaH = GRA_ROUND_DOWN((totalCropH - actualCropH) / 2, 2); + uint32_t deltaLeft = GRA_ROUND_DOWN((totalCropW - actualCropW) / 2, 2); + uint32_t deltaRight = totalCropW - actualCropW - deltaLeft; + uint32_t deltaTop = GRA_ROUND_DOWN((totalCropH - actualCropH) / 2, 2); + uint32_t deltaBottom = totalCropH - actualCropH - deltaTop; - runKernel->resolution_info->input_crop.left = roi.left - cropperKernelCrop.left - deltaW; - runKernel->resolution_info->input_crop.right = actualCropW - runKernel->resolution_info->input_crop.left; - runKernel->resolution_info->input_crop.top = roi.top - cropperKernelCrop.top - deltaH; - runKernel->resolution_info->input_crop.bottom = actualCropH - runKernel->resolution_info->input_crop.top; + runKernel->resolution_info->input_crop.left = roi.left - cropperKernelCrop.left - deltaLeft; + runKernel->resolution_info->input_crop.right = roi.right - cropperKernelCrop.right - deltaRight; + runKernel->resolution_info->input_crop.top = roi.top - cropperKernelCrop.top - deltaTop; + runKernel->resolution_info->input_crop.bottom = roi.bottom - cropperKernelCrop.bottom - deltaBottom; if (runKernel->resolution_info->input_crop.left < 0) { @@ -1623,34 +1763,36 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelUpScaler(Stati return ret; } -StaticGraphFragmentDesc* Ipu8GraphResolutionConfigurator::getKernelFragments(RunKernelCoords& coord) +StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelSmurf(StaticGraphRunKernel* smurfRunKernel, StaticGraphRunKernel* deviceRunKernel) { - GraphTopology* graphTopology = nullptr; - StaticGraphStatus status = _staticGraph->getGraphTopology(&graphTopology); + StaticGraphStatus ret = StaticGraphStatus::SG_OK; - if (status != StaticGraphStatus::SG_OK) { - return nullptr; + auto resInfo = smurfRunKernel->resolution_info; + if (resInfo->input_width == 0 || resInfo->input_height == 0) + { + return StaticGraphStatus::SG_OK; } - auto node = graphTopology->links[coord.nodeInd]->destNode; - return node->nodeKernels.kernelList[coord.kernelInd].fragment_descs; -} + // We need to reach new history for device, without the crop already done by feeder. + // The hist of the smurf is the crop already being done by feeder, mutliplied by segmap factor (without smurf factor which changes) + StaticGraphKernelResCrop smurfNewCrop; + smurfNewCrop.left = deviceRunKernel->resolution_history->input_crop.left - smurfRunKernel->resolution_history->input_crop.left; + smurfNewCrop.right = deviceRunKernel->resolution_history->input_crop.right - smurfRunKernel->resolution_history->input_crop.right; + smurfNewCrop.top = deviceRunKernel->resolution_history->input_crop.top - smurfRunKernel->resolution_history->input_crop.top; + smurfNewCrop.bottom = deviceRunKernel->resolution_history->input_crop.bottom - smurfRunKernel->resolution_history->input_crop.bottom; -StaticGraphStatus Ipu8GraphResolutionConfigurator::updateKernelFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* fragmentsDesc, uint32_t fragments) -{ - if (runKernel == nullptr || fragmentsDesc == nullptr) - { - return StaticGraphStatus::SG_ERROR; - } + // Now calculate how much is left for the smurf to crop + // Translate from history units to device units + double newInputToDeviceFactor = static_cast(deviceRunKernel->resolution_history->input_width - deviceRunKernel->resolution_history->input_crop.left - deviceRunKernel->resolution_history->input_crop.right) / + deviceRunKernel->resolution_history->output_width; - if (fragments == 1) - { - // Nothing to do - return StaticGraphStatus::SG_OK; - } + // Now translate from history units to smurf output (device) + smurfRunKernel->resolution_info->output_crop.left = static_cast(smurfNewCrop.left / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.right = static_cast(smurfNewCrop.right / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.top = static_cast(smurfNewCrop.top / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.bottom = static_cast(smurfNewCrop.bottom / newInputToDeviceFactor); - // Add support here - return StaticGraphStatus::SG_OK; + return ret; } StaticGraphStatus Ipu8GraphResolutionConfigurator::SanityCheck() @@ -1691,12 +1833,12 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::SanityCheck() int32_t widthAfterCrop = _downscalerRunKernel->resolution_info->input_width - _downscalerRunKernel->resolution_info->input_crop.left - _downscalerRunKernel->resolution_info->input_crop.right; int32_t heightAfterCrop = _downscalerRunKernel->resolution_info->input_height - _downscalerRunKernel->resolution_info->input_crop.top - _downscalerRunKernel->resolution_info->input_crop.bottom; - if (widthAfterCrop < 0 || widthAfterCrop < _downscalerRunKernel->resolution_info->output_width || - heightAfterCrop < 0 || heightAfterCrop < _downscalerRunKernel->resolution_info->output_height || - static_cast(widthAfterCrop) / _downscalerRunKernel->resolution_info->output_width > 16) - { - return StaticGraphStatus::SG_ERROR; - } + if (widthAfterCrop < 0 || widthAfterCrop < _downscalerRunKernel->resolution_info->output_width || + heightAfterCrop < 0 || heightAfterCrop < _downscalerRunKernel->resolution_info->output_height || + static_cast(widthAfterCrop) / _downscalerRunKernel->resolution_info->output_width > 16) + { + return StaticGraphStatus::SG_ERROR; + } // Make sure US is actually up scaling widthAfterCrop = _upscalerRunKernel->resolution_info->input_width - _upscalerRunKernel->resolution_info->input_crop.left - _upscalerRunKernel->resolution_info->input_crop.right; @@ -1852,4 +1994,4 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::getStatsRoiFromSensorRoi(cons return StaticGraphStatus::SG_OK; } -#endif +#endif \ No newline at end of file diff --git a/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.h b/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.h index 12d7f6d..21ddfb1 100644 --- a/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.h +++ b/modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.h @@ -26,10 +26,13 @@ */ #pragma once #include +#include +#include #define _USE_MATH_DEFINES #define GRA_ROUND_UP(a,b) (((a) + ((b)-1)) / (b) * (b)) #define GRA_ROUND_DOWN(a,b) ((a) / (b) * (b)) +#define GRA_ROUND(a) (((double)(a) > 0.0) ? floor((double)(a) + 0.5) : ceil((double)(a) - 0.5)) // ROI in user level class RegionOfInterest @@ -73,7 +76,13 @@ enum class GraphResolutionConfiguratorKernelRole : uint8_t { UpScaler, DownScaler, - EspaCropper + EspaCropper, + NonRcb, + Output, + TnrScaler, + TnrFeederFull, + TnrFeederSmall, + None }; class RunKernelCoords @@ -138,7 +147,7 @@ class GraphResolutionConfigurator #if SUPPORT_KEY_RESOLUTIONS == 1 StaticGraphStatus getZoomKeyResolutionIndex(ZoomKeyResolutions* zoomKeyResolutions, SensorRoi sensorRoi, uint32_t& selectedIndex); #endif - StaticGraphStatus updateRunKernelOfScalers(SensorRoi& roi); + StaticGraphStatus updateRunKernelOfScalers(bool fromInput, SensorRoi& roi); StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, SensorRoi& roi, uint32_t inputWidth, uint32_t inputHeight, uint32_t outputWidth, uint32_t outputHeight, StaticGraphKernelResCrop* originalScalerCrop); @@ -161,15 +170,13 @@ class GraphResolutionConfigurator StaticGraphKernelResCrop _originalCropScalerToOutput = { 0,0,0,0 }; }; +class Ipu8FragmentsConfigurator; + class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator { public: Ipu8GraphResolutionConfigurator(IStaticGraphConfig* staticGraph); - ~Ipu8GraphResolutionConfigurator() - { - _kernelsForUpdateAfterCropper.clear(); - _kernelsForUpdateAfterUpscaler.clear(); - } + ~Ipu8GraphResolutionConfigurator(); StaticGraphStatus updateStaticGraphConfig(const RegionOfInterest& roi, bool isCenteredZoom); @@ -185,18 +192,16 @@ class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator StaticGraphStatus initOutputRunKernel(); StaticGraphStatus initKernelsForUpdate(); - StaticGraphFragmentDesc* getKernelFragments(RunKernelCoords& coord); - // Calculate ROI in dimensions of pipe downscaler input. StaticGraphStatus getDownscalerInputRoi(const RegionOfInterest& userRoi, ResolutionRoi& pipeInputRoi); StaticGraphStatus updateRunKernelOfScalers(ResolutionRoi& roi); - StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t outputWidth, uint32_t outputHeight); + StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t& outputWidth, uint32_t& outputHeight); StaticGraphStatus updateRunKernelUpScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, StaticGraphKernelResCrop& cropperKernelCrop, uint32_t outputWidth, uint32_t outputHeight); StaticGraphStatus updateRunKernelCropper(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t inputWidth, uint32_t inputHeight, uint32_t outputWidth, uint32_t outputHeight, StaticGraphKernelResCrop& downscalerCropHist); - StaticGraphStatus updateKernelFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* fragmentsDesc, uint32_t fragments); + StaticGraphStatus updateRunKernelSmurf(StaticGraphRunKernel* smurfRunKernel, StaticGraphRunKernel* deviceRunKernel); StaticGraphStatus SanityCheck(); StaticGraphStatus SanityCheckCrop(StaticGraphKernelResCrop* crop); @@ -215,5 +220,9 @@ class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator StaticGraphRunKernel* _outputRunKernel; std::vector _kernelsForUpdateAfterCropper; std::vector _kernelsForUpdateAfterUpscaler; -}; + std::vector> _smurfKernels; + // For striping + OuterNode* _node = nullptr; + Ipu8FragmentsConfigurator* _fragmentsConfigurator = nullptr; +}; diff --git a/modules/ipu_desc/ipu75xa/GraphResolutionConfiguratorInclude.h b/modules/ipu_desc/ipu75xa/GraphResolutionConfiguratorInclude.h index 1eceba9..30bb063 100644 --- a/modules/ipu_desc/ipu75xa/GraphResolutionConfiguratorInclude.h +++ b/modules/ipu_desc/ipu75xa/GraphResolutionConfiguratorInclude.h @@ -39,6 +39,10 @@ #include "Ipu8StaticGraphAutogen.h" #include "Ipu8StaticGraphTypesAutogen.h" #include "Ipu8GraphResolutionConfiguratorAutogen.h" +#elif defined(GRC_IPU9) +#include "Ipu9StaticGraphAutogen.h" +#include "Ipu9StaticGraphTypesAutogen.h" +#include "Ipu9GraphResolutionConfiguratorAutogen.h" #else #include "StaticGraphAutogen.h" #include "StaticGraphTypesAutogen.h" diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.cpp b/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.cpp index 3922a6f..c0e8dd2 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.cpp +++ b/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.cpp @@ -58,12 +58,27 @@ uint32_t GraphResolutionConfiguratorHelper::getRunKernelUuidOfOutput(HwSink hwSi case 100039: // RgbIr_NoPdaf_WithDvs_WithTnr case 100040: // Dol2Inputs_WithDvs_WithTnr case 100041: // Dol3Inputs_WithDvs_WithTnr + case 100056: // Dol2Inputs_WithDvs_WithTnr + case 100057: // Dol3Inputs_WithDvs_WithTnr return 5637; // gdc7_1 case 100005: // Bayer_NoPdaf_WithNntm_WithTnr + case 100031: // Dol2Inputs_NoDvs_NoTnr + case 100032: // Dol2Inputs_NoDvs_WithTnr + case 100033: // Dol3Inputs_NoDvs_NoTnr + case 100034: // Dol3Inputs_NoDvs_WithTnr case 100042: // Bayer_WithPdaf3_WithNntm_WithTnr + case 100052: // Dol2Inputs_NoDvs_NoTnr + case 100053: // Dol2Inputs_NoDvs_WithTnr + case 100054: // Dol3Inputs_NoDvs_NoTnr + case 100055: // Dol3Inputs_NoDvs_WithTnr return 46539; // nntm_1_0 + case 100044: // Bayer_NoPdaf_NoDvs_WithTnr_WithNntm_WithImv + case 100050: // Bayer_NoPdaf_WithRemosaic_NoDvs_WithTnr + case 100051: // Bayer_NoPdaf_WithB2b_WithNntm_WithTnr + return 33331; // imv } break; + case HwSink::ProcessedSecondarySink: return 19706; // sw_scaler case HwSink::AeOutSink: return 55073; // aestatistics_2_1 } @@ -76,6 +91,7 @@ StaticGraphStatus GraphResolutionConfiguratorHelper::getRunKernelUuidForResHisto // Must take only one from each resolution history index, since in static graph they all share the same // resolution history instance + kernelUuids.push_back(38648); // odr_output_ps_1_3 kernelUuids.push_back(59680); // odr_output_me_1_3 kernelUuids.push_back(6907); // slim_tnr_spatial_bifd_yuvn_regs_1_3 @@ -92,11 +108,41 @@ StaticGraphStatus GraphResolutionConfiguratorHelper::getRunKernelUuidForResHisto kernelUuids.push_back(57803); // tnr_sp_bc_bifd_yuv4n_regs_1_3 kernelUuids.push_back(26536); // slim_tnr_fp_blend_bifd_yuvnm1_regs_1_3 kernelUuids.push_back(5637); // gdc7_1 + kernelUuids.push_back(19706); // sw_scaler kernelUuids.push_back(46539); // nntm_1_0 + kernelUuids.push_back(33331); // imv return StaticGraphStatus::SG_OK; } uint32_t GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid() { return 47358; -} \ No newline at end of file +} + +GraphResolutionConfiguratorKernelRole GraphResolutionConfiguratorHelper::getKernelRole(uint32_t kernelUuid) +{ + (void) kernelUuid; + return GraphResolutionConfiguratorKernelRole::NonRcb; +} + +uint32_t GraphResolutionConfiguratorHelper::getReferenceKernel(uint32_t kernelUuid) +{ + (void) kernelUuid; + return 0; +} + +FormatType GraphResolutionConfiguratorHelper::getFormatForDrainer(uint32_t kernelUuid) +{ + (void) kernelUuid; + return FormatType::YUV420_8_SP_P; +} + +StaticGraphStatus GraphResolutionConfiguratorHelper::getSmurfRunKernelUuid(std::vector>& kernelUuids) +{ + kernelUuids.clear(); + + std::pair smurfPair; + + return StaticGraphStatus::SG_OK; +} + diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.h index 0428ff3..02823ee 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaGraphResolutionConfiguratorAutogen.h @@ -33,10 +33,13 @@ class GraphResolutionConfiguratorHelper { public: - GraphResolutionConfiguratorHelper(); static uint32_t getRunKernelUuid(GraphResolutionConfiguratorKernelRole role); static uint32_t getRunKernelUuidOfOutput(HwSink hwSink, int32_t graphId, GraphLink** links); static StaticGraphStatus getRunKernelUuidForResHistoryUpdate(std::vector& kernelUuids); static uint32_t getRunKernelIoBufferSystemApiUuid(); + static GraphResolutionConfiguratorKernelRole getKernelRole(uint32_t kernelUuid); + static uint32_t getReferenceKernel(uint32_t kernelUuid); + static FormatType getFormatForDrainer(uint32_t kernelUuid); + static StaticGraphStatus getSmurfRunKernelUuid(std::vector>& kernelUuids); }; diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.cpp b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.cpp index 5597209..cf3dfdb 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.cpp +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.cpp @@ -328,7 +328,7 @@ void LbffBayerOuterNode::Init(LbffBayerOuterNodeConfiguration** selectedGraphCon uint64_t kernelsRcbBitmap = 0x13FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12] } - uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -376,7 +376,7 @@ void LbffBayerWithGmvOuterNode::Init(LbffBayerWithGmvOuterNodeConfiguration** se uint64_t kernelsRcbBitmap = 0x113FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28], gmv_statistics_1_0[32] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7FEE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {ifd_gmv_1_3}[13], {gmv_statistics_1_0}[14], {odr_gmv_match_1_3}[15], {odr_gmv_feature_1_3}[16] } - uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -437,6 +437,27 @@ void SwGdcOuterNode::Init(SwGdcOuterNodeConfiguration** selectedGraphConfigurati setInnerNode(None); } +void SwScalerOuterNode::Init(SwScalerOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(4, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[1] = {19706 /*sw_scaler*/}; + uint64_t kernelsRcbBitmap = 0x1; // { sw_scaler[0] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{sw_scaler}[0] } + + uint8_t systemApisSizes[1] = {5 /*sw_scaler*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + void SwNntmOuterNode::Init(SwNntmOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) { OuterNode::Init(5, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); @@ -466,7 +487,7 @@ void LbffRgbIrOuterNode::Init(LbffRgbIrOuterNodeConfiguration** selectedGraphCon uint64_t kernelsRcbBitmap = 0xFF800071; // { ifd_pipe_1_3[0], rgbs_grid_1_1[4], rgb_ir_2_0[5], odr_ir_1_3[6], ccm_3a_2_0[23], fr_grid_1_0[24], b2i_ds_1_1[25], upscaler_1_0[26], lbff_crop_espa_1_3[27], tnr_scale_lb[28], odr_output_ps_1_3[29], odr_output_me_1_3[30], aestatistics_2_1[31] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x3DC000FC2; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0, gd_dpc_2_2, rgbs_grid_1_1, rgb_ir_2_0}[1], {odr_ir_1_3}[2], {odr_awb_std_1_3}[3], {odr_awb_sve_1_3}[4], {odr_awb_sat_1_3}[5], {ifd_lsc_1_3}[6], {lsc_1_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[7], {upscaler_1_0}[8], {lbff_crop_espa_1_3}[9], {tnr_scale_lb, odr_output_ps_1_3}[10], {odr_output_me_1_3}[11], {aestatistics_2_1}[12], {odr_ae_1_3}[13], {odr_af_std_1_3}[14] } - uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 0 /*gd_dpc_2_2*/, 24 /*rgbs_grid_1_1*/, 0 /*rgb_ir_2_0*/, 156 /*odr_ir_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 0 /*gd_dpc_2_2*/, 24 /*rgbs_grid_1_1*/, 0 /*rgb_ir_2_0*/, 156 /*odr_ir_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -493,7 +514,7 @@ void LbffIrNoGmvIrStreamOuterNode::Init(LbffIrNoGmvIrStreamOuterNodeConfiguratio uint64_t kernelsRcbBitmap = 0x13FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12] } - uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -541,7 +562,7 @@ void LbffBayerBurstOutNo3AOuterNode::Init(LbffBayerBurstOutNo3AOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x137F0001; // { ifd_pipe_1_3[0], odr_burst_isp_1_3[16], b2i_ds_1_1[17], upscaler_1_0[18], lbff_crop_espa_1_3[19], tnr_scale_lb[20], odr_output_ps_1_3[21], odr_output_me_1_3[22], pext_1_0[24], pafstatistics_1_2[25], gmv_statistics_1_0[28] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EDC0002; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0, lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, odr_burst_isp_1_3, b2i_ds_1_1}[1], {upscaler_1_0}[2], {lbff_crop_espa_1_3}[3], {tnr_scale_lb, odr_output_ps_1_3}[4], {odr_output_me_1_3}[5], {ifd_pdaf_1_3, pext_1_0}[6], {pafstatistics_1_2}[7], {odr_pdaf_1_3}[8], {ifd_gmv_1_3}[9], {gmv_statistics_1_0}[10], {odr_gmv_match_1_3}[11], {odr_gmv_feature_1_3}[12] } - uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 156 /*odr_burst_isp_1_3*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 156 /*odr_burst_isp_1_3*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -589,7 +610,7 @@ void LbffIrNoGmvOuterNode::Init(LbffIrNoGmvOuterNodeConfiguration** selectedGrap uint64_t kernelsRcbBitmap = 0x13FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12] } - uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[31] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -631,7 +652,7 @@ void LbffBayerPdaf2OuterNode::Init(LbffBayerPdaf2OuterNodeConfiguration** select uint64_t kernelsRcbBitmap = 0x313FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28], pext_1_0[32], pafstatistics_1_2[33] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x6FEE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {ifd_pdaf_1_3, pext_1_0}[13], {pafstatistics_1_2}[14], {odr_pdaf_1_3}[15] } - uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/}; + uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -658,7 +679,7 @@ void LbffBayerPdaf3OuterNode::Init(LbffBayerPdaf3OuterNodeConfiguration** select uint64_t kernelsRcbBitmap = 0x127FE0001; // { ifd_pipe_1_3[0], pext_1_0[17], rgbs_grid_1_1[18], ccm_3a_2_0[19], fr_grid_1_0[20], b2i_ds_1_1[21], upscaler_1_0[22], lbff_crop_espa_1_3[23], tnr_scale_lb[24], odr_output_ps_1_3[25], odr_output_me_1_3[26], aestatistics_2_1[29], pafstatistics_1_2[32] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x3FDC0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, pext_1_0, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {pafstatistics_1_2}[13], {odr_pdaf_1_3}[14] } - uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*pext_1_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/}; + uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*pext_1_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -706,7 +727,7 @@ void LbffDol2InputsOuterNode::Init(LbffDol2InputsOuterNodeConfiguration** select uint64_t kernelsRcbBitmap = 0x1FC000463; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], rgbs_grid_1_1[5], ccm_3a_2_0[6], aestatistics_2_1[10], fr_grid_1_0[26], b2i_ds_1_1[27], upscaler_1_0[28], lbff_crop_espa_1_3[29], tnr_scale_lb[30], odr_output_ps_1_3[31], odr_output_me_1_3[32] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x370003F86; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {dol_lite_1_1, bxt_blc, linearization2_0, rgbs_grid_1_1, ccm_3a_2_0}[2], {odr_awb_std_1_3}[3], {odr_awb_sve_1_3}[4], {odr_awb_sat_1_3}[5], {aestatistics_2_1}[6], {odr_ae_1_3}[7], {ifd_lsc_1_3}[8], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, fr_grid_1_0, b2i_ds_1_1}[9], {upscaler_1_0}[10], {lbff_crop_espa_1_3}[11], {tnr_scale_lb, odr_output_ps_1_3}[12], {odr_output_me_1_3}[13], {odr_af_std_1_3}[14] } - uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -760,7 +781,7 @@ void LbffDol3InputsOuterNode::Init(LbffDol3InputsOuterNodeConfiguration** select uint64_t kernelsRcbBitmap = 0x3F80008C7; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], ifd_pipe_short_smth_1_3[2], rgbs_grid_1_1[6], ccm_3a_2_0[7], aestatistics_2_1[11], fr_grid_1_0[27], b2i_ds_1_1[28], upscaler_1_0[29], lbff_crop_espa_1_3[30], tnr_scale_lb[31], odr_output_ps_1_3[32], odr_output_me_1_3[33] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x6E0007F0E; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {ifd_pipe_short_smth_1_3}[2], {dol_lite_1_1, bxt_blc, linearization2_0, rgbs_grid_1_1, ccm_3a_2_0}[3], {odr_awb_std_1_3}[4], {odr_awb_sve_1_3}[5], {odr_awb_sat_1_3}[6], {aestatistics_2_1}[7], {odr_ae_1_3}[8], {ifd_lsc_1_3}[9], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, fr_grid_1_0, b2i_ds_1_1}[10], {upscaler_1_0}[11], {lbff_crop_espa_1_3}[12], {tnr_scale_lb, odr_output_ps_1_3}[13], {odr_output_me_1_3}[14], {odr_af_std_1_3}[15] } - uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 156 /*ifd_pipe_short_smth_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/}; + uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 156 /*ifd_pipe_short_smth_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -787,7 +808,7 @@ void LbffBayerPdaf2WithGmvOuterNode::Init(LbffBayerPdaf2WithGmvOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x1313FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28], pext_1_0[32], pafstatistics_1_2[33], gmv_statistics_1_0[36] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EFEE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {ifd_pdaf_1_3, pext_1_0}[13], {pafstatistics_1_2}[14], {odr_pdaf_1_3}[15], {ifd_gmv_1_3}[16], {gmv_statistics_1_0}[17], {odr_gmv_match_1_3}[18], {odr_gmv_feature_1_3}[19] } - uint8_t systemApisSizes[39] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[39] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_pdaf_1_3*/, 24 /*pext_1_0*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -814,7 +835,7 @@ void LbffBayerPdaf3WithGmvOuterNode::Init(LbffBayerPdaf3WithGmvOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x927FE0001; // { ifd_pipe_1_3[0], pext_1_0[17], rgbs_grid_1_1[18], ccm_3a_2_0[19], fr_grid_1_0[20], b2i_ds_1_1[21], upscaler_1_0[22], lbff_crop_espa_1_3[23], tnr_scale_lb[24], odr_output_ps_1_3[25], odr_output_me_1_3[26], aestatistics_2_1[29], pafstatistics_1_2[32], gmv_statistics_1_0[35] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x3FFDC0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, pext_1_0, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {pafstatistics_1_2}[13], {odr_pdaf_1_3}[14], {ifd_gmv_1_3}[15], {gmv_statistics_1_0}[16], {odr_gmv_match_1_3}[17], {odr_gmv_feature_1_3}[18] } - uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*pext_1_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*pext_1_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 8 /*pafstatistics_1_2*/, 156 /*odr_pdaf_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -841,7 +862,7 @@ void LbffRgbIrWithGmvOuterNode::Init(LbffRgbIrWithGmvOuterNodeConfiguration** se uint64_t kernelsRcbBitmap = 0x8FF800071; // { ifd_pipe_1_3[0], rgbs_grid_1_1[4], rgb_ir_2_0[5], odr_ir_1_3[6], ccm_3a_2_0[23], fr_grid_1_0[24], b2i_ds_1_1[25], upscaler_1_0[26], lbff_crop_espa_1_3[27], tnr_scale_lb[28], odr_output_ps_1_3[29], odr_output_me_1_3[30], aestatistics_2_1[31], gmv_statistics_1_0[35] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x3FDC000FC2; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0, gd_dpc_2_2, rgbs_grid_1_1, rgb_ir_2_0}[1], {odr_ir_1_3}[2], {odr_awb_std_1_3}[3], {odr_awb_sve_1_3}[4], {odr_awb_sat_1_3}[5], {ifd_lsc_1_3}[6], {lsc_1_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[7], {upscaler_1_0}[8], {lbff_crop_espa_1_3}[9], {tnr_scale_lb, odr_output_ps_1_3}[10], {odr_output_me_1_3}[11], {aestatistics_2_1}[12], {odr_ae_1_3}[13], {odr_af_std_1_3}[14], {ifd_gmv_1_3}[15], {gmv_statistics_1_0}[16], {odr_gmv_match_1_3}[17], {odr_gmv_feature_1_3}[18] } - uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 0 /*gd_dpc_2_2*/, 24 /*rgbs_grid_1_1*/, 0 /*rgb_ir_2_0*/, 156 /*odr_ir_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 0 /*gd_dpc_2_2*/, 24 /*rgbs_grid_1_1*/, 0 /*rgb_ir_2_0*/, 156 /*odr_ir_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -868,7 +889,7 @@ void LbffIrWithGmvIrStreamOuterNode::Init(LbffIrWithGmvIrStreamOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x113FE0001; // { ifd_pipe_1_3[0], rgbs_grid_1_1[17], ccm_3a_2_0[18], fr_grid_1_0[19], b2i_ds_1_1[20], upscaler_1_0[21], lbff_crop_espa_1_3[22], tnr_scale_lb[23], odr_output_ps_1_3[24], odr_output_me_1_3[25], aestatistics_2_1[28], gmv_statistics_1_0[32] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7FEE0001A; // {{ifd_pipe_1_3}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_3}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_3}[5], {tnr_scale_lb, odr_output_ps_1_3}[6], {odr_output_me_1_3}[7], {odr_awb_std_1_3}[8], {odr_awb_sat_1_3}[9], {aestatistics_2_1}[10], {odr_ae_1_3}[11], {odr_af_std_1_3}[12], {ifd_gmv_1_3}[13], {gmv_statistics_1_0}[14], {odr_gmv_match_1_3}[15], {odr_gmv_feature_1_3}[16] } - uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -895,7 +916,7 @@ void LbffDol2InputsWithGmvOuterNode::Init(LbffDol2InputsWithGmvOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x9FC000463; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], rgbs_grid_1_1[5], ccm_3a_2_0[6], aestatistics_2_1[10], fr_grid_1_0[26], b2i_ds_1_1[27], upscaler_1_0[28], lbff_crop_espa_1_3[29], tnr_scale_lb[30], odr_output_ps_1_3[31], odr_output_me_1_3[32], gmv_statistics_1_0[35] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x3F70003F86; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {dol_lite_1_1, bxt_blc, linearization2_0, rgbs_grid_1_1, ccm_3a_2_0}[2], {odr_awb_std_1_3}[3], {odr_awb_sve_1_3}[4], {odr_awb_sat_1_3}[5], {aestatistics_2_1}[6], {odr_ae_1_3}[7], {ifd_lsc_1_3}[8], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, fr_grid_1_0, b2i_ds_1_1}[9], {upscaler_1_0}[10], {lbff_crop_espa_1_3}[11], {tnr_scale_lb, odr_output_ps_1_3}[12], {odr_output_me_1_3}[13], {odr_af_std_1_3}[14], {ifd_gmv_1_3}[15], {gmv_statistics_1_0}[16], {odr_gmv_match_1_3}[17], {odr_gmv_feature_1_3}[18] } - uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -922,7 +943,7 @@ void LbffDol3InputsWithGmvOuterNode::Init(LbffDol3InputsWithGmvOuterNodeConfigur uint64_t kernelsRcbBitmap = 0x13F80008C7; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], ifd_pipe_short_smth_1_3[2], rgbs_grid_1_1[6], ccm_3a_2_0[7], aestatistics_2_1[11], fr_grid_1_0[27], b2i_ds_1_1[28], upscaler_1_0[29], lbff_crop_espa_1_3[30], tnr_scale_lb[31], odr_output_ps_1_3[32], odr_output_me_1_3[33], gmv_statistics_1_0[36] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x7EE0007F0E; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {ifd_pipe_short_smth_1_3}[2], {dol_lite_1_1, bxt_blc, linearization2_0, rgbs_grid_1_1, ccm_3a_2_0}[3], {odr_awb_std_1_3}[4], {odr_awb_sve_1_3}[5], {odr_awb_sat_1_3}[6], {aestatistics_2_1}[7], {odr_ae_1_3}[8], {ifd_lsc_1_3}[9], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, fr_grid_1_0, b2i_ds_1_1}[10], {upscaler_1_0}[11], {lbff_crop_espa_1_3}[12], {tnr_scale_lb, odr_output_ps_1_3}[13], {odr_output_me_1_3}[14], {odr_af_std_1_3}[15], {ifd_gmv_1_3}[16], {gmv_statistics_1_0}[17], {odr_gmv_match_1_3}[18], {odr_gmv_feature_1_3}[19] } - uint8_t systemApisSizes[39] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 156 /*ifd_pipe_short_smth_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 0 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + uint8_t systemApisSizes[39] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 156 /*ifd_pipe_short_smth_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { @@ -941,6 +962,150 @@ void LbffDol3InputsWithGmvOuterNode::Init(LbffDol3InputsWithGmvOuterNodeConfigur setInnerNode(None); } +void SwB2bOuterNode::Init(SwB2bOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(7, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[1] = {45372 /*b2b*/}; + uint64_t kernelsRcbBitmap = 0x0; // { } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{b2b}[0] } + + uint8_t systemApisSizes[1] = {0 /*b2b*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, nullptr, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, nullptr); + } + + // set default inner Node + setInnerNode(None); +} + +void SwImvOuterNode::Init(SwImvOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(6, NodeTypes::Sw, 2, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[2] = {33331 /*imv*/, 19706 /*sw_scaler*/}; + uint64_t kernelsRcbBitmap = 0x3; // { imv[0], sw_scaler[1] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x2; // {{imv}[0], {sw_scaler}[1] } + + uint8_t systemApisSizes[2] = {0 /*imv*/, 5 /*sw_scaler*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + +void SwRemosaicOuterNode::Init(SwRemosaicOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(8, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[1] = {19706 /*sw_scaler*/}; + uint64_t kernelsRcbBitmap = 0x1; // { sw_scaler[0] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{sw_scaler}[0] } + + uint8_t systemApisSizes[1] = {5 /*sw_scaler*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + +void LbffDol2InputsBayerStatOuterNode::Init(LbffDol2InputsBayerStatOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(0, NodeTypes::Cb, 34, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[34] = {55223 /*ifd_pipe_1_3*/, 52982 /*ifd_pipe_long_1_3*/, 22000 /*dol_lite_1_1*/, 11700 /*bxt_blc*/, 10326 /*linearization2_0*/, 27730 /*ifd_lsc_1_3*/, 2144 /*lsc_1_2*/, 33714 /*gd_dpc_2_2*/, 5144 /*wb_1_1*/, 21777 /*bnlm_3_3*/, 48695 /*bxt_demosaic*/, 13708 /*vcsc_2_0_b*/, 54721 /*gltm_2_0*/, 58858 /*xnr_5_2*/, 36035 /*vcr_3_1*/, 36029 /*glim_2_0*/, 13026 /*acm_1_1*/, 5394 /*gammatm_v4*/, 62703 /*csc_1_1*/, 15021 /*rgbs_grid_1_1*/, 62344 /*ccm_3a_2_0*/, 26958 /*fr_grid_1_0*/, 40299 /*b2i_ds_1_1*/, 25569 /*upscaler_1_0*/, 42330 /*lbff_crop_espa_1_3*/, 33723 /*tnr_scale_lb*/, 38648 /*odr_output_ps_1_3*/, 59680 /*odr_output_me_1_3*/, 1338 /*odr_awb_std_1_3*/, 8720 /*odr_awb_sve_1_3*/, 45123 /*odr_awb_sat_1_3*/, 55073 /*aestatistics_2_1*/, 53496 /*odr_ae_1_3*/, 23958 /*odr_af_std_1_3*/}; + uint64_t kernelsRcbBitmap = 0x8FF80003; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], rgbs_grid_1_1[19], ccm_3a_2_0[20], fr_grid_1_0[21], b2i_ds_1_1[22], upscaler_1_0[23], lbff_crop_espa_1_3[24], tnr_scale_lb[25], odr_output_ps_1_3[26], odr_output_me_1_3[27], aestatistics_2_1[31] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x3FB800066; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {dol_lite_1_1, bxt_blc, linearization2_0}[2], {ifd_lsc_1_3}[3], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[4], {upscaler_1_0}[5], {lbff_crop_espa_1_3}[6], {tnr_scale_lb, odr_output_ps_1_3}[7], {odr_output_me_1_3}[8], {odr_awb_std_1_3}[9], {odr_awb_sve_1_3}[10], {odr_awb_sat_1_3}[11], {aestatistics_2_1}[12], {odr_ae_1_3}[13], {odr_af_std_1_3}[14] } + + uint8_t systemApisSizes[34] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // Metadata update + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + kernelListOptions[i][9].run_kernel.metadata[0] = 1; // bnlm_3_3 + } + + // set default inner Node + setInnerNode(None); +} + +void LbffDol3InputsBayerStatOuterNode::Init(LbffDol3InputsBayerStatOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(0, NodeTypes::Cb, 35, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[35] = {55223 /*ifd_pipe_1_3*/, 52982 /*ifd_pipe_long_1_3*/, 49695 /*ifd_pipe_short_smth_1_3*/, 22000 /*dol_lite_1_1*/, 11700 /*bxt_blc*/, 10326 /*linearization2_0*/, 27730 /*ifd_lsc_1_3*/, 2144 /*lsc_1_2*/, 33714 /*gd_dpc_2_2*/, 5144 /*wb_1_1*/, 21777 /*bnlm_3_3*/, 48695 /*bxt_demosaic*/, 13708 /*vcsc_2_0_b*/, 54721 /*gltm_2_0*/, 58858 /*xnr_5_2*/, 36035 /*vcr_3_1*/, 36029 /*glim_2_0*/, 13026 /*acm_1_1*/, 5394 /*gammatm_v4*/, 62703 /*csc_1_1*/, 15021 /*rgbs_grid_1_1*/, 62344 /*ccm_3a_2_0*/, 26958 /*fr_grid_1_0*/, 40299 /*b2i_ds_1_1*/, 25569 /*upscaler_1_0*/, 42330 /*lbff_crop_espa_1_3*/, 33723 /*tnr_scale_lb*/, 38648 /*odr_output_ps_1_3*/, 59680 /*odr_output_me_1_3*/, 1338 /*odr_awb_std_1_3*/, 8720 /*odr_awb_sve_1_3*/, 45123 /*odr_awb_sat_1_3*/, 55073 /*aestatistics_2_1*/, 53496 /*odr_ae_1_3*/, 23958 /*odr_af_std_1_3*/}; + uint64_t kernelsRcbBitmap = 0x11FF00007; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], ifd_pipe_short_smth_1_3[2], rgbs_grid_1_1[20], ccm_3a_2_0[21], fr_grid_1_0[22], b2i_ds_1_1[23], upscaler_1_0[24], lbff_crop_espa_1_3[25], tnr_scale_lb[26], odr_output_ps_1_3[27], odr_output_me_1_3[28], aestatistics_2_1[32] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x7F70000CE; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {ifd_pipe_short_smth_1_3}[2], {dol_lite_1_1, bxt_blc, linearization2_0}[3], {ifd_lsc_1_3}[4], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[5], {upscaler_1_0}[6], {lbff_crop_espa_1_3}[7], {tnr_scale_lb, odr_output_ps_1_3}[8], {odr_output_me_1_3}[9], {odr_awb_std_1_3}[10], {odr_awb_sve_1_3}[11], {odr_awb_sat_1_3}[12], {aestatistics_2_1}[13], {odr_ae_1_3}[14], {odr_af_std_1_3}[15] } + + uint8_t systemApisSizes[35] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 156 /*ifd_pipe_short_smth_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // Metadata update + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + kernelListOptions[i][10].run_kernel.metadata[0] = 1; // bnlm_3_3 + } + + // set default inner Node + setInnerNode(None); +} + +void LbffDol2InputsWithGmvBayerStatOuterNode::Init(LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(0, NodeTypes::Cb, 38, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[38] = {55223 /*ifd_pipe_1_3*/, 52982 /*ifd_pipe_long_1_3*/, 22000 /*dol_lite_1_1*/, 11700 /*bxt_blc*/, 10326 /*linearization2_0*/, 27730 /*ifd_lsc_1_3*/, 2144 /*lsc_1_2*/, 33714 /*gd_dpc_2_2*/, 5144 /*wb_1_1*/, 21777 /*bnlm_3_3*/, 48695 /*bxt_demosaic*/, 13708 /*vcsc_2_0_b*/, 54721 /*gltm_2_0*/, 58858 /*xnr_5_2*/, 36035 /*vcr_3_1*/, 36029 /*glim_2_0*/, 13026 /*acm_1_1*/, 5394 /*gammatm_v4*/, 62703 /*csc_1_1*/, 15021 /*rgbs_grid_1_1*/, 62344 /*ccm_3a_2_0*/, 26958 /*fr_grid_1_0*/, 40299 /*b2i_ds_1_1*/, 25569 /*upscaler_1_0*/, 42330 /*lbff_crop_espa_1_3*/, 33723 /*tnr_scale_lb*/, 38648 /*odr_output_ps_1_3*/, 59680 /*odr_output_me_1_3*/, 1338 /*odr_awb_std_1_3*/, 8720 /*odr_awb_sve_1_3*/, 45123 /*odr_awb_sat_1_3*/, 55073 /*aestatistics_2_1*/, 53496 /*odr_ae_1_3*/, 23958 /*odr_af_std_1_3*/, 62409 /*ifd_gmv_1_3*/, 61146 /*gmv_statistics_1_0*/, 32160 /*odr_gmv_match_1_3*/, 55924 /*odr_gmv_feature_1_3*/}; + uint64_t kernelsRcbBitmap = 0x88FF80003; // { ifd_pipe_1_3[0], ifd_pipe_long_1_3[1], rgbs_grid_1_1[19], ccm_3a_2_0[20], fr_grid_1_0[21], b2i_ds_1_1[22], upscaler_1_0[23], lbff_crop_espa_1_3[24], tnr_scale_lb[25], odr_output_ps_1_3[26], odr_output_me_1_3[27], aestatistics_2_1[31], gmv_statistics_1_0[35] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x3FFB800066; // {{ifd_pipe_1_3}[0], {ifd_pipe_long_1_3}[1], {dol_lite_1_1, bxt_blc, linearization2_0}[2], {ifd_lsc_1_3}[3], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v4, csc_1_1, rgbs_grid_1_1, ccm_3a_2_0, fr_grid_1_0, b2i_ds_1_1}[4], {upscaler_1_0}[5], {lbff_crop_espa_1_3}[6], {tnr_scale_lb, odr_output_ps_1_3}[7], {odr_output_me_1_3}[8], {odr_awb_std_1_3}[9], {odr_awb_sve_1_3}[10], {odr_awb_sat_1_3}[11], {aestatistics_2_1}[12], {odr_ae_1_3}[13], {odr_af_std_1_3}[14], {ifd_gmv_1_3}[15], {gmv_statistics_1_0}[16], {odr_gmv_match_1_3}[17], {odr_gmv_feature_1_3}[18] } + + uint8_t systemApisSizes[38] = {156 /*ifd_pipe_1_3*/, 156 /*ifd_pipe_long_1_3*/, 5 /*dol_lite_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_3*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 0 /*gammatm_v4*/, 0 /*csc_1_1*/, 24 /*rgbs_grid_1_1*/, 5 /*ccm_3a_2_0*/, 20 /*fr_grid_1_0*/, 5 /*b2i_ds_1_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_3*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_3*/, 156 /*odr_output_me_1_3*/, 156 /*odr_awb_std_1_3*/, 156 /*odr_awb_sve_1_3*/, 156 /*odr_awb_sat_1_3*/, 24 /*aestatistics_2_1*/, 156 /*odr_ae_1_3*/, 156 /*odr_af_std_1_3*/, 156 /*ifd_gmv_1_3*/, 0 /*gmv_statistics_1_0*/, 156 /*odr_gmv_match_1_3*/, 156 /*odr_gmv_feature_1_3*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // Metadata update + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + kernelListOptions[i][9].run_kernel.metadata[0] = 1; // bnlm_3_3 + } + + // set default inner Node + setInnerNode(None); +} + /* * Inner Nodes Setters */ @@ -1169,6 +1334,7 @@ void LbffBayerOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1247,6 +1413,7 @@ void BbpsNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1679,6 +1846,7 @@ void LbffBayerWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOpti } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1770,6 +1938,7 @@ void BbpsWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void SwGdcOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1779,6 +1948,13 @@ void SwGdcOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) (void)nodeInnerOptions; } +void SwScalerOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + + // No inner nodes + (void)nodeInnerOptions; +} + void SwNntmOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) { @@ -2230,6 +2406,7 @@ void LbffRgbIrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrNoGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -2458,6 +2635,7 @@ void LbffIrNoGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerO } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsIrWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -2549,6 +2727,7 @@ void BbpsIrWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerBurstOutNo3AOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3352,6 +3531,7 @@ void LbffBayerBurstOutNo3AOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsIrNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3430,6 +3610,7 @@ void BbpsIrNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrNoGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3655,6 +3836,7 @@ void LbffIrNoGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void IsysPdaf2OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -4125,6 +4307,7 @@ void LbffBayerPdaf2OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerPdaf3OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -4575,6 +4758,7 @@ void LbffBayerPdaf3OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void IsysDolOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -4811,6 +4995,7 @@ void LbffDol2InputsOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffDolSmoothOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -5065,6 +5250,7 @@ void LbffDol3InputsOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerPdaf2WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -5984,6 +6170,7 @@ void LbffBayerPdaf2WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerPdaf3WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -6882,6 +7069,7 @@ void LbffBayerPdaf3WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffRgbIrWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -7768,6 +7956,7 @@ void LbffRgbIrWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOpti } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrWithGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -8208,6 +8397,7 @@ void LbffIrWithGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffDol2InputsWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -8653,6 +8843,7 @@ void LbffDol2InputsWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffDol3InputsWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -9099,609 +9290,4262 @@ void LbffDol3InputsWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); -} -/* - * Graph 100000 - */ -StaticGraph100000::StaticGraph100000(GraphConfiguration100000** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100000, selectedSettingsId, zoomKeyResolutions), +} - _imageSubGraph(_sinkMappingConfiguration) +void SwB2bOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) { - // Construct outer nodes - _graphConfigurations = new GraphConfiguration100000[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - - for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) - { - _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; - } - - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerOuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + // No inner nodes + (void)nodeInnerOptions; +} - // Use default configuration - updateConfiguration(0); +void SwImvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ - // Declare all the links in the graph - GraphLink* link = nullptr; - link = &_graphLinks[0]; - link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Source2Node; + // No inner nodes + (void)nodeInnerOptions; +} - link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; +void SwRemosaicOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ - link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; + // No inner nodes + (void)nodeInnerOptions; +} - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; - link->type = LinkType::Node2Sink; +void LbffDol2InputsBayerStatOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + // Kernel default enablement + for (uint32_t j = 0; j < kernelConfigurationsOptionsCount; ++j) + { + for (uint8_t i = 0; i < 34; ++i) + { + kernelListOptions[j][i].run_kernel.enable = 1; + } - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; - link->type = LinkType::Node2Sink; + // Pass-through kernels + kernelListOptions[j][8].run_kernel.enable = 0; // wb_1_1 + } - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; - link->type = LinkType::Node2Sink; + const InnerNodeOptionsFlags nodeRelevantInnerOptions = nodeInnerOptions & (no3A | noLbOutputPs | noLbOutputMe); + bitmaps = HwBitmaps(); // reset HW bitmaps + uint64_t disabledRunKernelsBitmap = 0x0; + if (nodeRelevantInnerOptions == (no3A)) + { + // HW bitmaps + // RBM - 0x00000000000000000000001EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000000C016F + bitmaps.teb[0] = 0xC016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - - link = &_graphLinks[8]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[9]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; - link->type = LinkType::Node2Sink; - - for (uint8_t i = 0; i < 10; ++i) + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3F0380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs)) { - // apply link configuration. select configuration with maximal size - uint32_t selectedLinkConfig = 0; - uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; - for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) - { - if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) - { - maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; - selectedLinkConfig = j; - } - } - _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + // HW bitmaps + // RBM - 0x000000000000000000000016A81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x0000000000243D6F + bitmaps.teb[0] = 0x243D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; - // Assign link to sub-graph - _imageSubGraph.links[i] = &_graphLinks[i]; + // Kernels disablement + // 26 odr_output_ps_1_3- inner node disablement + disabledRunKernelsBitmap = 0x4000000; } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000016A801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x000000000004016F + bitmaps.teb[0] = 0x4016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; - // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; - - // choose the selected sub graph - _selectedGraphTopology = &_imageSubGraph; - - // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerOuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; - // Apply a default inner nodes configuration for the selected sub graph - SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; - if(_selectedGraphTopology != nullptr) + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3F4380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputMe)) { - _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + // HW bitmaps + // RBM - 0x00000000000000000000000EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x0000000000283D6F + bitmaps.teb[0] = 0x283D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0xA000000; } -} + else if (nodeRelevantInnerOptions == (no3A | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x000000000008016F + bitmaps.teb[0] = 0x8016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; -StaticGraphStatus StaticGraph100000::updateConfiguration(uint32_t selectedIndex) -{ - StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FA380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs | noLbOutputMe)) { - return res; + // HW bitmaps + // RBM - 0x000000000000000000000000001E900E + bitmaps.rbm[0] = 0x1E900E; + // DEB - 0x000000000000000000000000001FF1FB + bitmaps.deb[0] = 0x1FF1FB; + // TEB - 0x0000000000203D6F + bitmaps.teb[0] = 0x203D6F; + // REB - 0x00000000000000000000000000007FE7 + bitmaps.reb[0] = 0x7FE7; + + // Kernels disablement + // 8 wb_1_1- inner node disablement + // 9 bnlm_3_3- inner node disablement + // 10 bxt_demosaic- inner node disablement + // 11 vcsc_2_0_b- inner node disablement + // 12 gltm_2_0- inner node disablement + // 13 xnr_5_2- inner node disablement + // 14 vcr_3_1- inner node disablement + // 15 glim_2_0- inner node disablement + // 16 acm_1_1- inner node disablement + // 17 gammatm_v4- inner node disablement + // 18 csc_1_1- inner node disablement + // 22 b2i_ds_1_1- inner node disablement + // 23 upscaler_1_0- inner node disablement + // 24 lbff_crop_espa_1_3- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0xFC7FF00; } - res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs | noLbOutputMe)) { - return res; + // HW bitmaps + // RBM - 0x00000000000000000000000000000000 + // DEB - 0x00000000000000000000000000000000 + // TEB - 0x0000000000000000 + // REB - 0x00000000000000000000000000000000 + + // Kernels disablement + // 0 ifd_pipe_1_3- inner node disablement + // 1 ifd_pipe_long_1_3- inner node disablement + // 2 dol_lite_1_1- inner node disablement + // 3 bxt_blc- inner node disablement + // 4 linearization2_0- inner node disablement + // 5 ifd_lsc_1_3- inner node disablement + // 6 lsc_1_2- inner node disablement + // 7 gd_dpc_2_2- inner node disablement + // 8 wb_1_1- inner node disablement + // 9 bnlm_3_3- inner node disablement + // 10 bxt_demosaic- inner node disablement + // 11 vcsc_2_0_b- inner node disablement + // 12 gltm_2_0- inner node disablement + // 13 xnr_5_2- inner node disablement + // 14 vcr_3_1- inner node disablement + // 15 glim_2_0- inner node disablement + // 16 acm_1_1- inner node disablement + // 17 gammatm_v4- inner node disablement + // 18 csc_1_1- inner node disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 22 b2i_ds_1_1- inner node disablement + // 23 upscaler_1_0- inner node disablement + // 24 lbff_crop_espa_1_3- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FFFFFFFF; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) + else // default inner node { - return res; + // RBM - 0x00000000000000000000001EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000002C3D6F + bitmaps.teb[0] = 0x2C3D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; } - return StaticGraphStatus::SG_OK; -} -StaticGraph100000::~StaticGraph100000() -{ - delete[] _graphConfigurations; - delete _zoomKeyResolutions.zoomKeyResolutionOptions; + SetDisabledKernels(disabledRunKernelsBitmap); + } -StaticGraphStatus imageSubGraphTopology100000::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +void LbffDol3InputsBayerStatOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) { + // Kernel default enablement + for (uint32_t j = 0; j < kernelConfigurationsOptionsCount; ++j) + { + for (uint8_t i = 0; i < 35; ++i) + { + kernelListOptions[j][i].run_kernel.enable = 1; + } - /* - * Init sub graphs inner nodes configuration base on user request - */ - InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); - - /* - * Setting Node lbffBayer initial inner node configuration - */ - InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; - // always active public inner options - lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffBayerInnerOptions |= (noLbOutputMe); + // Pass-through kernels + kernelListOptions[j][9].run_kernel.enable = 0; // wb_1_1 + } - /* - * Setting Node bbpsNoTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; - // active public options according to sink mapping - if ( - subGraphLinks[8]->linkConfiguration->bufferSize == 0 && - true) + const InnerNodeOptionsFlags nodeRelevantInnerOptions = nodeInnerOptions & (no3A | noLbOutputPs | noLbOutputMe); + bitmaps = HwBitmaps(); // reset HW bitmaps + uint64_t disabledRunKernelsBitmap = 0x0; + if (nodeRelevantInnerOptions == (no3A)) { - bbpsNoTnrInnerOptions |= noMp; + // HW bitmaps + // RBM - 0x00000000000000000000001EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD40001FF + bitmaps.deb[0] = 0xD40001FF; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000000C01EF + bitmaps.teb[0] = 0xC01EF; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 20 rgbs_grid_1_1- inner node disablement + // 21 ccm_3a_2_0- inner node disablement + // 22 fr_grid_1_0- inner node disablement + // 29 odr_awb_std_1_3- inner node disablement + // 30 odr_awb_sve_1_3- inner node disablement + // 31 odr_awb_sat_1_3- inner node disablement + // 32 aestatistics_2_1- inner node disablement + // 33 odr_ae_1_3- inner node disablement + // 34 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x7E0700000; } - if ( - subGraphLinks[9]->linkConfiguration->bufferSize == 0 && - true) + else if (nodeRelevantInnerOptions == (noLbOutputPs)) { - bbpsNoTnrInnerOptions |= noDp; - } - - /* - * Configuring inner nodes according to the selected inner options - */ - lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + // HW bitmaps + // RBM - 0x000000000000000000000016A81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD41FF1FF + bitmaps.deb[0] = 0xD41FF1FF; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x0000000000243DEF + bitmaps.teb[0] = 0x243DEF; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; - /* - * Set the selected inner nodes to the outer nodes - */ - lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); - - /* - * Link enablement by public inner options - */ - subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[8]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp - - /* - * Link enablement by private inner options - */ - subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + // Kernels disablement + // 27 odr_output_ps_1_3- inner node disablement + disabledRunKernelsBitmap = 0x8000000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000016A801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD40001FF + bitmaps.deb[0] = 0xD40001FF; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x00000000000401EF + bitmaps.teb[0] = 0x401EF; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; - /* - * Disable links with zero buffer size - * (used for post processing when not all links are being used) - */ - for (uint32_t i = 0; i < 10; i++) - { - if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) - { - subGraphLinks[i]->isActive = false; - } - } + // Kernels disablement + // 20 rgbs_grid_1_1- inner node disablement + // 21 ccm_3a_2_0- inner node disablement + // 22 fr_grid_1_0- inner node disablement + // 27 odr_output_ps_1_3- inner node disablement + // 29 odr_awb_std_1_3- inner node disablement + // 30 odr_awb_sve_1_3- inner node disablement + // 31 odr_awb_sat_1_3- inner node disablement + // 32 aestatistics_2_1- inner node disablement + // 33 odr_ae_1_3- inner node disablement + // 34 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x7E8700000; + } + else if (nodeRelevantInnerOptions == (noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD41FF1FF + bitmaps.deb[0] = 0xD41FF1FF; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x0000000000283DEF + bitmaps.teb[0] = 0x283DEF; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; - return StaticGraphStatus::SG_OK; -} + // Kernels disablement + // 26 tnr_scale_lb- inner node disablement + // 28 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0x14000000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD40001FF + bitmaps.deb[0] = 0xD40001FF; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x00000000000801EF + bitmaps.teb[0] = 0x801EF; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; -/* - * Graph 100001 - */ -StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100001, selectedSettingsId, zoomKeyResolutions), + // Kernels disablement + // 20 rgbs_grid_1_1- inner node disablement + // 21 ccm_3a_2_0- inner node disablement + // 22 fr_grid_1_0- inner node disablement + // 26 tnr_scale_lb- inner node disablement + // 28 odr_output_me_1_3- inner node disablement + // 29 odr_awb_std_1_3- inner node disablement + // 30 odr_awb_sve_1_3- inner node disablement + // 31 odr_awb_sat_1_3- inner node disablement + // 32 aestatistics_2_1- inner node disablement + // 33 odr_ae_1_3- inner node disablement + // 34 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x7F4700000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x000000000000000000000000001E900E + bitmaps.rbm[0] = 0x1E900E; + // DEB - 0x000000000000000000000000001FF1FF + bitmaps.deb[0] = 0x1FF1FF; + // TEB - 0x0000000000203DEF + bitmaps.teb[0] = 0x203DEF; + // REB - 0x00000000000000000000000000007FE7 + bitmaps.reb[0] = 0x7FE7; - _imageSubGraph(_sinkMappingConfiguration) -{ - // Construct outer nodes - _graphConfigurations = new GraphConfiguration100001[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerWithGmvOuterNodeConfiguration** lbffBayerWithGmvOuterNodeConfigurationOptions = new LbffBayerWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + // Kernels disablement + // 9 wb_1_1- inner node disablement + // 10 bnlm_3_3- inner node disablement + // 11 bxt_demosaic- inner node disablement + // 12 vcsc_2_0_b- inner node disablement + // 13 gltm_2_0- inner node disablement + // 14 xnr_5_2- inner node disablement + // 15 vcr_3_1- inner node disablement + // 16 glim_2_0- inner node disablement + // 17 acm_1_1- inner node disablement + // 18 gammatm_v4- inner node disablement + // 19 csc_1_1- inner node disablement + // 23 b2i_ds_1_1- inner node disablement + // 24 upscaler_1_0- inner node disablement + // 25 lbff_crop_espa_1_3- inner node disablement + // 26 tnr_scale_lb- inner node disablement + // 27 odr_output_ps_1_3- inner node disablement + // 28 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0x1F8FFE00; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000000000000 + // DEB - 0x00000000000000000000000000000000 + // TEB - 0x0000000000000000 + // REB - 0x00000000000000000000000000000000 - for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + // Kernels disablement + // 0 ifd_pipe_1_3- inner node disablement + // 1 ifd_pipe_long_1_3- inner node disablement + // 2 ifd_pipe_short_smth_1_3- inner node disablement + // 3 dol_lite_1_1- inner node disablement + // 4 bxt_blc- inner node disablement + // 5 linearization2_0- inner node disablement + // 6 ifd_lsc_1_3- inner node disablement + // 7 lsc_1_2- inner node disablement + // 8 gd_dpc_2_2- inner node disablement + // 9 wb_1_1- inner node disablement + // 10 bnlm_3_3- inner node disablement + // 11 bxt_demosaic- inner node disablement + // 12 vcsc_2_0_b- inner node disablement + // 13 gltm_2_0- inner node disablement + // 14 xnr_5_2- inner node disablement + // 15 vcr_3_1- inner node disablement + // 16 glim_2_0- inner node disablement + // 17 acm_1_1- inner node disablement + // 18 gammatm_v4- inner node disablement + // 19 csc_1_1- inner node disablement + // 20 rgbs_grid_1_1- inner node disablement + // 21 ccm_3a_2_0- inner node disablement + // 22 fr_grid_1_0- inner node disablement + // 23 b2i_ds_1_1- inner node disablement + // 24 upscaler_1_0- inner node disablement + // 25 lbff_crop_espa_1_3- inner node disablement + // 26 tnr_scale_lb- inner node disablement + // 27 odr_output_ps_1_3- inner node disablement + // 28 odr_output_me_1_3- inner node disablement + // 29 odr_awb_std_1_3- inner node disablement + // 30 odr_awb_sve_1_3- inner node disablement + // 31 odr_awb_sat_1_3- inner node disablement + // 32 aestatistics_2_1- inner node disablement + // 33 odr_ae_1_3- inner node disablement + // 34 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x7FFFFFFFF; + } + else // default inner node { - _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerWithGmvOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + // RBM - 0x00000000000000000000001EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD41FF1FF + bitmaps.deb[0] = 0xD41FF1FF; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000002C3DEF + bitmaps.teb[0] = 0x2C3DEF; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerWithGmvOuterNode.Init(lbffBayerWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + SetDisabledKernels(disabledRunKernelsBitmap); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerWithGmvOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; +} - // Use default configuration - updateConfiguration(0); +void LbffDol2InputsWithGmvBayerStatOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + // Kernel default enablement + for (uint32_t j = 0; j < kernelConfigurationsOptionsCount; ++j) + { + for (uint8_t i = 0; i < 38; ++i) + { + kernelListOptions[j][i].run_kernel.enable = 1; + } - // Declare all the links in the graph - GraphLink* link = nullptr; - link = &_graphLinks[0]; - link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Source2Node; + // Pass-through kernels + kernelListOptions[j][8].run_kernel.enable = 0; // wb_1_1 + } - link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; + const InnerNodeOptionsFlags nodeRelevantInnerOptions = nodeInnerOptions & (no3A | noLbOutputPs | noLbOutputMe | noGmv); + bitmaps = HwBitmaps(); // reset HW bitmaps + uint64_t disabledRunKernelsBitmap = 0x0; + if (nodeRelevantInnerOptions == (no3A)) + { + // HW bitmaps + // RBM - 0x00000000000000000000003EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x3E; + // DEB - 0x00000000000000000001FFFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1FFFF; + // TEB - 0x00000000019C016F + bitmaps.teb[0] = 0x19C016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; - link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3F0380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000036A81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x36; + // DEB - 0x00000000000000000001F7FFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1F7FF; + // TEB - 0x0000000001B43D6F + bitmaps.teb[0] = 0x1B43D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; - link->type = LinkType::Node2Sink; + // Kernels disablement + // 26 odr_output_ps_1_3- inner node disablement + disabledRunKernelsBitmap = 0x4000000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000036A801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x36; + // DEB - 0x00000000000000000001F7FFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1F7FF; + // TEB - 0x000000000194016F + bitmaps.teb[0] = 0x194016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; - link->type = LinkType::Node2Sink; + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3F4380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000002EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x2E; + // DEB - 0x00000000000000000001EBFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1EBFF; + // TEB - 0x0000000001B83D6F + bitmaps.teb[0] = 0x1B83D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0xA000000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000002EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x2E; + // DEB - 0x00000000000000000001EBFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1EBFF; + // TEB - 0x000000000198016F + bitmaps.teb[0] = 0x198016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FA380000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x000000000000000000000026A81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x26; + // DEB - 0x00000000000000000001E3FFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1E3FF; + // TEB - 0x0000000001B03D6F + bitmaps.teb[0] = 0x1B03D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + disabledRunKernelsBitmap = 0xE000000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x000000000000000000000026A801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x26; + // DEB - 0x00000000000000000001E3FFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1E3FF; + // TEB - 0x000000000190016F + bitmaps.teb[0] = 0x190016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FE380000; + } + else if (nodeRelevantInnerOptions == (noGmv)) + { + // HW bitmaps + // RBM - 0x00000000000000000000001EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000002C3D6F + bitmaps.teb[0] = 0x2C3D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3C00000000; + } + else if (nodeRelevantInnerOptions == (no3A | noGmv)) + { + // HW bitmaps + // RBM - 0x00000000000000000000001EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x1E; + // DEB - 0x000000000000000000001FFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x1FFF; + // TEB - 0x00000000000C016F + bitmaps.teb[0] = 0xC016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FF0380000; + } + else if (nodeRelevantInnerOptions == (noGmv | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000016A81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x0000000000243D6F + bitmaps.teb[0] = 0x243D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 26 odr_output_ps_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3C04000000; + } + else if (nodeRelevantInnerOptions == (no3A | noGmv | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x000000000000000000000016A801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0x16; + // DEB - 0x0000000000000000000017FFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0x17FF; + // TEB - 0x000000000004016F + bitmaps.teb[0] = 0x4016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FF4380000; + } + else if (nodeRelevantInnerOptions == (noGmv | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x0000000000283D6F + bitmaps.teb[0] = 0x283D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + + // Kernels disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3C0A000000; + } + else if (nodeRelevantInnerOptions == (no3A | noGmv | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000EA801900E + bitmaps.rbm[0] = 0xA801900E; + bitmaps.rbm[1] = 0xE; + // DEB - 0x000000000000000000000BFFD40001FB + bitmaps.deb[0] = 0xD40001FB; + bitmaps.deb[1] = 0xBFF; + // TEB - 0x000000000008016F + bitmaps.teb[0] = 0x8016F; + // REB - 0x000000000000000000000000007B07E7 + bitmaps.reb[0] = 0x7B07E7; + + // Kernels disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FFA380000; + } + else if (nodeRelevantInnerOptions == (noGmv | noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x000000000000000000000000001E900E + bitmaps.rbm[0] = 0x1E900E; + // DEB - 0x000000000000000000000000001FF1FB + bitmaps.deb[0] = 0x1FF1FB; + // TEB - 0x0000000000203D6F + bitmaps.teb[0] = 0x203D6F; + // REB - 0x00000000000000000000000000007FE7 + bitmaps.reb[0] = 0x7FE7; + + // Kernels disablement + // 8 wb_1_1- inner node disablement + // 9 bnlm_3_3- inner node disablement + // 10 bxt_demosaic- inner node disablement + // 11 vcsc_2_0_b- inner node disablement + // 12 gltm_2_0- inner node disablement + // 13 xnr_5_2- inner node disablement + // 14 vcr_3_1- inner node disablement + // 15 glim_2_0- inner node disablement + // 16 acm_1_1- inner node disablement + // 17 gammatm_v4- inner node disablement + // 18 csc_1_1- inner node disablement + // 22 b2i_ds_1_1- inner node disablement + // 23 upscaler_1_0- inner node disablement + // 24 lbff_crop_espa_1_3- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3C0FC7FF00; + } + else if (nodeRelevantInnerOptions == (no3A | noGmv | noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000000000000 + // DEB - 0x00000000000000000000000000000000 + // TEB - 0x0000000000000000 + // REB - 0x00000000000000000000000000000000 + + // Kernels disablement + // 0 ifd_pipe_1_3- inner node disablement + // 1 ifd_pipe_long_1_3- inner node disablement + // 2 dol_lite_1_1- inner node disablement + // 3 bxt_blc- inner node disablement + // 4 linearization2_0- inner node disablement + // 5 ifd_lsc_1_3- inner node disablement + // 6 lsc_1_2- inner node disablement + // 7 gd_dpc_2_2- inner node disablement + // 8 wb_1_1- inner node disablement + // 9 bnlm_3_3- inner node disablement + // 10 bxt_demosaic- inner node disablement + // 11 vcsc_2_0_b- inner node disablement + // 12 gltm_2_0- inner node disablement + // 13 xnr_5_2- inner node disablement + // 14 vcr_3_1- inner node disablement + // 15 glim_2_0- inner node disablement + // 16 acm_1_1- inner node disablement + // 17 gammatm_v4- inner node disablement + // 18 csc_1_1- inner node disablement + // 19 rgbs_grid_1_1- inner node disablement + // 20 ccm_3a_2_0- inner node disablement + // 21 fr_grid_1_0- inner node disablement + // 22 b2i_ds_1_1- inner node disablement + // 23 upscaler_1_0- inner node disablement + // 24 lbff_crop_espa_1_3- inner node disablement + // 25 tnr_scale_lb- inner node disablement + // 26 odr_output_ps_1_3- inner node disablement + // 27 odr_output_me_1_3- inner node disablement + // 28 odr_awb_std_1_3- inner node disablement + // 29 odr_awb_sve_1_3- inner node disablement + // 30 odr_awb_sat_1_3- inner node disablement + // 31 aestatistics_2_1- inner node disablement + // 32 odr_ae_1_3- inner node disablement + // 33 odr_af_std_1_3- inner node disablement + // 34 ifd_gmv_1_3- inner node disablement + // 35 gmv_statistics_1_0- inner node disablement + // 36 odr_gmv_match_1_3- inner node disablement + // 37 odr_gmv_feature_1_3- inner node disablement + disabledRunKernelsBitmap = 0x3FFFFFFFFF; + } + else // default inner node + { + // RBM - 0x00000000000000000000003EA81F900E + bitmaps.rbm[0] = 0xA81F900E; + bitmaps.rbm[1] = 0x3E; + // DEB - 0x00000000000000000001FFFFD41FF1FB + bitmaps.deb[0] = 0xD41FF1FB; + bitmaps.deb[1] = 0x1FFFF; + // TEB - 0x0000000001BC3D6F + bitmaps.teb[0] = 0x1BC3D6F; + // REB - 0x000000000000000000000000007B7FE7 + bitmaps.reb[0] = 0x7B7FE7; + } + + SetDisabledKernels(disabledRunKernelsBitmap); + +} + +/* + * Graph 100000 + */ +StaticGraph100000::StaticGraph100000(GraphConfiguration100000** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100000, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100000[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[8]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 10; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100000::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100000::~StaticGraph100000() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100000::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayer initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffBayerInnerOptions |= (noLbOutputMe); + + /* + * Setting Node bbpsNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[8]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[9]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[8]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + + /* + * Link enablement by private inner options + */ + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 10; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100001 + */ +StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100001, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100001[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerWithGmvOuterNodeConfiguration** lbffBayerWithGmvOuterNodeConfigurationOptions = new LbffBayerWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerWithGmvOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerWithGmvOuterNode.Init(lbffBayerWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerWithGmvOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[21]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 22; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerWithGmvOuterNode = &_lbffBayerWithGmvOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerWithGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100001::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100001::~StaticGraph100001() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100001::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayerWithGmv initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerWithGmvOuterNode->setInnerNode(lbffBayerWithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[7]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input + subGraphLinks[8]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + + /* + * Link enablement by private inner options + */ + subGraphLinks[9]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[10]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 22; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[7]->isActive = (lbffBayerWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100002 + */ +StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100002, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100002[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 15; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100002::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100002::~StaticGraph100002() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayer initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + + /* + * Link enablement by private inner options + */ + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 15; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100003 + */ +StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100003, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100003[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerWithGmvOuterNodeConfiguration** lbffBayerWithGmvOuterNodeConfigurationOptions = new LbffBayerWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerWithGmvOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerWithGmvOuterNode.Init(lbffBayerWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerWithGmvOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffBayerWithGmv; + link->destNode = &_lbffBayerWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffBayerWithGmv; + link->srcNode = &_lbffBayerWithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 20; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerWithGmvOuterNode = &_lbffBayerWithGmvOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerWithGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100003::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100003::~StaticGraph100003() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100003::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayerWithGmv initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerWithGmvOuterNode->setInnerNode(lbffBayerWithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[7]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input + subGraphLinks[8]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + + /* + * Link enablement by private inner options + */ + subGraphLinks[9]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[10]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 20; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[7]->isActive = (lbffBayerWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100005 + */ +StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100005, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100005[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 20; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100005::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100005::~StaticGraph100005() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100005::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayer initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + + /* + * Link enablement by private inner options + */ + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 20; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100006 + */ +StaticGraph100006::StaticGraph100006(GraphConfiguration100006** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100006, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) + ,_irSubGraph(_sinkMappingConfiguration) + ,_image_irSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100006[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffRgbIrOuterNodeConfiguration** lbffRgbIrOuterNodeConfigurationOptions = new LbffRgbIrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffIrNoGmvIrStreamOuterNodeConfiguration** lbffIrNoGmvIrStreamOuterNodeConfigurationOptions = new LbffIrNoGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsIrWithTnrOuterNodeConfiguration** bbpsIrWithTnrOuterNodeConfigurationOptions = new BbpsIrWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffRgbIrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + lbffIrNoGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvIrStreamOuterNodeConfiguration; + bbpsIrWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrWithTnrOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffRgbIrOuterNode.Init(lbffRgbIrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffIrNoGmvIrStreamOuterNode.Init(lbffIrNoGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsIrWithTnrOuterNode.Init(bbpsIrWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffRgbIrOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] lbffIrNoGmvIrStreamOuterNodeConfigurationOptions; + delete[] bbpsIrWithTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + _imageSubGraph.links[0] = link; + _irSubGraph.links[0] = link; + _image_irSubGraph.links[0] = link; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffRgbIr; + link->destNode = &_lbffRgbIrOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + _imageSubGraph.links[1] = link; + _irSubGraph.links[1] = link; + _image_irSubGraph.links[1] = link; + + link = &_graphLinks[2]; + link->src = GraphElementType::LscBufferIr; + link->dest = GraphElementType::LbffIrNoGmvIrStream; + link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + _irSubGraph.links[2] = link; + _image_irSubGraph.links[16] = link; + + link = &_graphLinks[3]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffRgbIr; + link->destNode = &_lbffRgbIrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + _imageSubGraph.links[2] = link; + _irSubGraph.links[3] = link; + _image_irSubGraph.links[2] = link; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[3] = link; + _irSubGraph.links[4] = link; + _image_irSubGraph.links[3] = link; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[4] = link; + _irSubGraph.links[5] = link; + _image_irSubGraph.links[4] = link; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[5] = link; + _irSubGraph.links[6] = link; + _image_irSubGraph.links[5] = link; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[6] = link; + _irSubGraph.links[7] = link; + _image_irSubGraph.links[6] = link; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[7] = link; + _irSubGraph.links[8] = link; + _image_irSubGraph.links[7] = link; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + _imageSubGraph.links[8] = link; + _image_irSubGraph.links[8] = link; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + _imageSubGraph.links[9] = link; + _image_irSubGraph.links[9] = link; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[10] = link; + _image_irSubGraph.links[10] = link; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[11] = link; + _image_irSubGraph.links[11] = link; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + _imageSubGraph.links[12] = link; + _image_irSubGraph.links[12] = link; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[13] = link; + _image_irSubGraph.links[13] = link; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[14] = link; + _image_irSubGraph.links[14] = link; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[15] = link; + _image_irSubGraph.links[15] = link; + + link = &_graphLinks[17]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::LbffIrNoGmvIrStream; + link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + _irSubGraph.links[9] = link; + _image_irSubGraph.links[17] = link; + + link = &_graphLinks[18]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::IrAeOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[10] = link; + _image_irSubGraph.links[18] = link; + + link = &_graphLinks[19]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::IrAfStdOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[11] = link; + _image_irSubGraph.links[19] = link; + + link = &_graphLinks[20]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::IrAwbStdOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[12] = link; + _image_irSubGraph.links[20] = link; + + link = &_graphLinks[21]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::IrAwbSatOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[13] = link; + _image_irSubGraph.links[21] = link; + + link = &_graphLinks[22]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + _irSubGraph.links[14] = link; + _image_irSubGraph.links[22] = link; + + link = &_graphLinks[23]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + _irSubGraph.links[15] = link; + _image_irSubGraph.links[23] = link; + + link = &_graphLinks[24]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _irSubGraph.links[16] = link; + _image_irSubGraph.links[24] = link; + + link = &_graphLinks[25]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _irSubGraph.links[17] = link; + _image_irSubGraph.links[25] = link; + + link = &_graphLinks[26]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + _irSubGraph.links[18] = link; + _image_irSubGraph.links[26] = link; + + link = &_graphLinks[27]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _irSubGraph.links[19] = link; + _image_irSubGraph.links[27] = link; + + link = &_graphLinks[28]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::IrMp; + link->type = LinkType::Node2Sink; + _irSubGraph.links[20] = link; + _image_irSubGraph.links[28] = link; + + for (uint8_t i = 0; i < 29; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _irSubGraph.isysOuterNode = &_isysOuterNode; + _irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; + _irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; + _image_irSubGraph.isysOuterNode = &_isysOuterNode; + _image_irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _image_irSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; + _image_irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; + + // choose the selected sub graph + if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffRgbIrOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_irSubGraph; + + // logical node IDs + _irSubGraph.isysOuterNode->contextId = 0; + _irSubGraph.lbffRgbIrOuterNode->contextId = 1; + _irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 2; + _irSubGraph.bbpsIrWithTnrOuterNode->contextId = 3; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_image_irSubGraph; + + // logical node IDs + _image_irSubGraph.isysOuterNode->contextId = 0; + _image_irSubGraph.lbffRgbIrOuterNode->contextId = 1; + _image_irSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 3; + _image_irSubGraph.bbpsIrWithTnrOuterNode->contextId = 4; + } + else + { + STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); + } + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100006::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffRgbIrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffIrNoGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsIrWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100006::~StaticGraph100006() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffRgbIr initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffRgbIrInnerOptions |= (noIr); + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + + /* + * Link enablement by private inner options + */ + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noLbOutputMe); // lbff_RgbIr:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 16; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus irSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + + /* + * Setting Node lbffRgbIr initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffRgbIrInnerOptions |= (noLbOutputPs | noLbOutputMe); + + /* + * Setting Node lbffIrNoGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsIrWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrWithTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsIrWithTnrInnerOptions |= noMp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); + bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[10]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[11]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[12]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[20]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + + /* + * Link enablement by private inner options + */ + subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[15]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_NoGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 21; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[16]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[17]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[18]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[19]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus image_irSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + + /* + * Setting Node lbffRgbIr initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrInnerOptions = None; + // combine inner options for the node common sub graphs + lbffRgbIrInnerOptions |= imagePublicInnerNodeConfiguration; + lbffRgbIrInnerOptions |= irPublicInnerNodeConfiguration; + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Setting Node lbffIrNoGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsIrWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrWithTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( + subGraphLinks[28]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsIrWithTnrInnerOptions |= noMp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); + bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[18]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[19]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[20]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[21]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[28]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + + /* + * Link enablement by private inner options + */ + subGraphLinks[17]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noLbOutputMe); // lbff_RgbIr:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[22]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[23]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_NoGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 29; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[24]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[25]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[26]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[27]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100007 + */ +StaticGraph100007::StaticGraph100007(GraphConfiguration100007** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100007, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100007[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerBurstOutNo3AOuterNodeConfiguration** lbffBayerBurstOutNo3AOuterNodeConfigurationOptions = new LbffBayerBurstOutNo3AOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerBurstOutNo3AOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerBurstOutNo3AOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerBurstOutNo3AOuterNode.Init(lbffBayerBurstOutNo3AOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerBurstOutNo3AOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayerBurstOutNo3A; + link->destNode = &_lbffBayerBurstOutNo3AOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::LbffBayerBurstOutNo3A; + link->srcNode = &_lbffBayerBurstOutNo3AOuterNode; + link->srcTerminalId = 16; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 3; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerBurstOutNo3AOuterNode = &_lbffBayerBurstOutNo3AOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerBurstOutNo3AOuterNode->contextId = 1; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100007::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerBurstOutNo3AOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100007::~StaticGraph100007() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100007::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayerBurstOutNo3A initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerBurstOutNo3AInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerBurstOutNo3AInnerOptions |= (no3A | noGmv | noIr | noLbOutputPs | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffBayerBurstOutNo3AInnerOptions |= (noLbOutputPs | noLbOutputMe | noPdaf); + // active private inner options according to links + if ( + subGraphLinks[2]->linkConfiguration->bufferSize == 0 && + true) + { + lbffBayerBurstOutNo3AInnerOptions |= noBurstCapture; + } + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerBurstOutNo3AOuterNode->setInnerNode(lbffBayerBurstOutNo3AInnerOptions); + + /* + * Link enablement by private inner options + */ + subGraphLinks[2]->isActive = !(lbffBayerBurstOutNo3AInnerOptions & noBurstCapture); // lbff_Bayer_BurstOut_No3A:terminal_connect_burst_isp_output -> image_mp + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 3; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100008 + */ +StaticGraph100008::StaticGraph100008(GraphConfiguration100008** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100008, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) + ,_irSubGraph(_sinkMappingConfiguration) + ,_image_irSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100008[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffRgbIrOuterNodeConfiguration** lbffRgbIrOuterNodeConfigurationOptions = new LbffRgbIrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffIrNoGmvIrStreamOuterNodeConfiguration** lbffIrNoGmvIrStreamOuterNodeConfigurationOptions = new LbffIrNoGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsIrNoTnrOuterNodeConfiguration** bbpsIrNoTnrOuterNodeConfigurationOptions = new BbpsIrNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffRgbIrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + lbffIrNoGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvIrStreamOuterNodeConfiguration; + bbpsIrNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrNoTnrOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffRgbIrOuterNode.Init(lbffRgbIrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffIrNoGmvIrStreamOuterNode.Init(lbffIrNoGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsIrNoTnrOuterNode.Init(bbpsIrNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffRgbIrOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] lbffIrNoGmvIrStreamOuterNodeConfigurationOptions; + delete[] bbpsIrNoTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + _imageSubGraph.links[0] = link; + _irSubGraph.links[0] = link; + _image_irSubGraph.links[0] = link; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffRgbIr; + link->destNode = &_lbffRgbIrOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + _imageSubGraph.links[1] = link; + _irSubGraph.links[1] = link; + _image_irSubGraph.links[1] = link; + + link = &_graphLinks[2]; + link->src = GraphElementType::LscBufferIr; + link->dest = GraphElementType::LbffIrNoGmvIrStream; + link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + _irSubGraph.links[2] = link; + _image_irSubGraph.links[11] = link; + + link = &_graphLinks[3]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffRgbIr; + link->destNode = &_lbffRgbIrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + _imageSubGraph.links[2] = link; + _irSubGraph.links[3] = link; + _image_irSubGraph.links[2] = link; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[3] = link; + _irSubGraph.links[4] = link; + _image_irSubGraph.links[3] = link; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[4] = link; + _irSubGraph.links[5] = link; + _image_irSubGraph.links[4] = link; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[5] = link; + _irSubGraph.links[6] = link; + _image_irSubGraph.links[5] = link; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[6] = link; + _irSubGraph.links[7] = link; + _image_irSubGraph.links[6] = link; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[7] = link; + _irSubGraph.links[8] = link; + _image_irSubGraph.links[7] = link; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + _imageSubGraph.links[8] = link; + _image_irSubGraph.links[8] = link; + + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[9] = link; + _image_irSubGraph.links[9] = link; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[10] = link; + _image_irSubGraph.links[10] = link; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffRgbIr; + link->srcNode = &_lbffRgbIrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::LbffIrNoGmvIrStream; + link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + _irSubGraph.links[9] = link; + _image_irSubGraph.links[12] = link; + + link = &_graphLinks[13]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::IrAeOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[10] = link; + _image_irSubGraph.links[13] = link; + + link = &_graphLinks[14]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::IrAfStdOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[11] = link; + _image_irSubGraph.links[14] = link; + + link = &_graphLinks[15]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::IrAwbStdOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[12] = link; + _image_irSubGraph.links[15] = link; + + link = &_graphLinks[16]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::IrAwbSatOut; + link->type = LinkType::Node2Sink; + _irSubGraph.links[13] = link; + _image_irSubGraph.links[16] = link; + + link = &_graphLinks[17]; + link->src = GraphElementType::LbffIrNoGmvIrStream; + link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsIrNoTnr; + link->destNode = &_bbpsIrNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + _irSubGraph.links[14] = link; + _image_irSubGraph.links[17] = link; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsIrNoTnr; + link->srcNode = &_bbpsIrNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::IrMp; + link->type = LinkType::Node2Sink; + _irSubGraph.links[15] = link; + _image_irSubGraph.links[18] = link; + + for (uint8_t i = 0; i < 19; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _irSubGraph.isysOuterNode = &_isysOuterNode; + _irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; + _irSubGraph.bbpsIrNoTnrOuterNode = &_bbpsIrNoTnrOuterNode; + _image_irSubGraph.isysOuterNode = &_isysOuterNode; + _image_irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; + _image_irSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; + _image_irSubGraph.bbpsIrNoTnrOuterNode = &_bbpsIrNoTnrOuterNode; + + // choose the selected sub graph + if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffRgbIrOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_irSubGraph; + + // logical node IDs + _irSubGraph.isysOuterNode->contextId = 0; + _irSubGraph.lbffRgbIrOuterNode->contextId = 1; + _irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 2; + _irSubGraph.bbpsIrNoTnrOuterNode->contextId = 3; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_image_irSubGraph; + + // logical node IDs + _image_irSubGraph.isysOuterNode->contextId = 0; + _image_irSubGraph.lbffRgbIrOuterNode->contextId = 1; + _image_irSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 3; + _image_irSubGraph.bbpsIrNoTnrOuterNode->contextId = 4; + } + else + { + STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); + } + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100008::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffRgbIrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffIrNoGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsIrNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; - link->type = LinkType::Node2Sink; +StaticGraph100008::~StaticGraph100008() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; +StaticGraphStatus imageSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; - link->type = LinkType::Node2Sink; + /* + * Setting Node lbffRgbIr initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffRgbIrInnerOptions |= (noIr | noLbOutputMe); - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; + /* + * Setting Node bbpsNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[9]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[10]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noDp; + } - link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; + /* + * Link enablement by private inner options + */ + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 11; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; - link->type = LinkType::Node2Sink; + return StaticGraphStatus::SG_OK; +} - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; - link->type = LinkType::Node2Sink; +StaticGraphStatus irSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ - link = &_graphLinks[17]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); - link = &_graphLinks[18]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; + /* + * Setting Node lbffRgbIr initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffRgbIrInnerOptions |= (noLbOutputPs | noLbOutputMe); - link = &_graphLinks[19]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::ProcessedMain; - link->type = LinkType::Node2Sink; + /* + * Setting Node lbffIrNoGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffIrNoGmvIrStreamInnerOptions |= (noLbOutputMe); - for (uint8_t i = 0; i < 20; ++i) + /* + * Setting Node bbpsIrNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrNoTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrNoTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) { - // apply link configuration. select configuration with maximal size - uint32_t selectedLinkConfig = 0; - uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; - for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) - { - if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) - { - maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; - selectedLinkConfig = j; - } - } - _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - - // Assign link to sub-graph - _imageSubGraph.links[i] = &_graphLinks[i]; + bbpsIrNoTnrInnerOptions |= noMp; } - // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerWithGmvOuterNode = &_lbffBayerWithGmvOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); + bbpsIrNoTnrOuterNode->setInnerNode(bbpsIrNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[10]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[11]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[12]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[15]->isActive = !(bbpsIrNoTnrInnerOptions & noMp); // bbps_Ir_NoTnr:bbps_ofs_mp_yuvn_odr -> ir_mp - // choose the selected sub graph - _selectedGraphTopology = &_imageSubGraph; + /* + * Link enablement by private inner options + */ + subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_NoTnr:bbps_slim_spatial_yuvn_ifd - // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerWithGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; - // Apply a default inner nodes configuration for the selected sub graph - SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; - if(_selectedGraphTopology != nullptr) - { - _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); - } -} + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 16; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } -StaticGraphStatus StaticGraph100001::updateConfiguration(uint32_t selectedIndex) -{ - StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _lbffBayerWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } return StaticGraphStatus::SG_OK; } -StaticGraph100001::~StaticGraph100001() -{ - delete[] _graphConfigurations; - delete _zoomKeyResolutions.zoomKeyResolutionOptions; -} - -StaticGraphStatus imageSubGraphTopology100001::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus image_irSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* * Init sub graphs inner nodes configuration base on user request */ InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); /* - * Setting Node lbffBayerWithGmv initial inner node configuration + * Setting Node lbffRgbIr initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerWithGmvInnerOptions = imagePublicInnerNodeConfiguration; - // always active public inner options - lbffBayerWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); - // active public options according to sink mapping + InnerNodeOptionsFlags lbffRgbIrInnerOptions = None; + // always active private inner options + lbffRgbIrInnerOptions |= (noLbOutputMe); + // combine inner options for the node common sub graphs + lbffRgbIrInnerOptions |= imagePublicInnerNodeConfiguration; + lbffRgbIrInnerOptions |= irPublicInnerNodeConfiguration; /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[9]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[10]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noDp; + } + + /* + * Setting Node lbffIrNoGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffIrNoGmvIrStreamInnerOptions |= (noLbOutputMe); + + /* + * Setting Node bbpsIrNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrNoTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrNoTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsIrNoTnrInnerOptions |= noMp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerWithGmvOuterNode->setInnerNode(lbffBayerWithGmvInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); + bbpsIrNoTnrOuterNode->setInnerNode(bbpsIrNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[7]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input - subGraphLinks[8]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[15]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[16]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[18]->isActive = !(bbpsIrNoTnrInnerOptions & noMp); // bbps_Ir_NoTnr:bbps_ofs_mp_yuvn_odr -> ir_mp /* * Link enablement by private inner options */ - subGraphLinks[9]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[10]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[12]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[17]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 20; i++) + for (uint32_t i = 0; i < 19; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -9709,47 +13553,34 @@ StaticGraphStatus imageSubGraphTopology100001::configInnerNodes(SubGraphInnerNod } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[7]->isActive = (lbffBayerWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - return StaticGraphStatus::SG_OK; } /* - * Graph 100002 + * Graph 100015 */ -StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100002, selectedSettingsId, zoomKeyResolutions), +StaticGraph100015::StaticGraph100015(GraphConfiguration100015** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100015, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100002[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100015[kernelConfigurationsOptionsCount]; IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -9805,80 +13636,23 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[9]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[10]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 19; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 18; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 15; ++i) + for (uint8_t i = 0; i < 9; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -9900,7 +13674,6 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysOuterNode = &_isysOuterNode; _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -9908,7 +13681,6 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon // logical node IDs _imageSubGraph.isysOuterNode->contextId = 0; _imageSubGraph.lbffBayerOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -9917,7 +13689,7 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon } } -StaticGraphStatus StaticGraph100002::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100015::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -9930,21 +13702,16 @@ StaticGraphStatus StaticGraph100002::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } return StaticGraphStatus::SG_OK; } -StaticGraph100002::~StaticGraph100002() +StaticGraph100015::~StaticGraph100015() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100015::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -9959,36 +13726,24 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod // always active public inner options lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping - - /* - * Setting Node bbpsWithTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; - // active public options according to sink mapping + // active private inner options according to links if ( - subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[7]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + lbffBayerInnerOptions |= noLbOutputPs; } if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[8]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + lbffBayerInnerOptions |= noLbOutputMe; } - /* - * Configuring inner nodes according to the selected inner options - */ - lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - /* * Set the selected inner nodes to the outer nodes */ lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options @@ -9997,20 +13752,18 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> image_mp + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> image_dp /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 15; i++) + for (uint32_t i = 0; i < 9; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -10018,50 +13771,190 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod } } + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100016 + */ +StaticGraph100016::StaticGraph100016(GraphConfiguration100016** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100016, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100016[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + } + + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[2]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 3; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 0; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100016::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100016::~StaticGraph100016() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100016::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + /* - * Link enablement by inner options combinations + * Init sub graphs inner nodes configuration base on user request */ - subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node bbpsNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[1]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[2]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noDp; + } + + /* + * Set the selected inner nodes to the outer nodes + */ + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[1]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[2]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 3; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } return StaticGraphStatus::SG_OK; } /* - * Graph 100003 + * Graph 100025 */ -StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100003, selectedSettingsId, zoomKeyResolutions), +StaticGraph100025::StaticGraph100025(GraphConfiguration100025** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100025, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100003[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100025[kernelConfigurationsOptionsCount]; IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerWithGmvOuterNodeConfiguration** lbffBayerWithGmvOuterNodeConfigurationOptions = new LbffBayerWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffIrNoGmvOuterNodeConfiguration** lbffIrNoGmvOuterNodeConfigurationOptions = new LbffIrNoGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerWithGmvOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + lbffIrNoGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerWithGmvOuterNode.Init(lbffBayerWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffIrNoGmvOuterNode.Init(lbffIrNoGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerWithGmvOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; + delete[] lbffIrNoGmvOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -10077,8 +13970,8 @@ StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphCon link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; + link->dest = GraphElementType::LbffIrNoGmv; + link->destNode = &_lbffIrNoGmvOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; @@ -10086,153 +13979,63 @@ StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphCon link->src = GraphElementType::Isys; link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; + link->dest = GraphElementType::LbffIrNoGmv; + link->destNode = &_lbffIrNoGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; + link->src = GraphElementType::LbffIrNoGmv; + link->srcNode = &_lbffIrNoGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; + link->src = GraphElementType::LbffIrNoGmv; + link->srcNode = &_lbffIrNoGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; + link->src = GraphElementType::LbffIrNoGmv; + link->srcNode = &_lbffIrNoGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; + link->src = GraphElementType::LbffIrNoGmv; + link->srcNode = &_lbffIrNoGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffBayerWithGmv; - link->destNode = &_lbffBayerWithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; + link->src = GraphElementType::LbffIrNoGmv; + link->srcNode = &_lbffIrNoGmvOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerWithGmv; - link->srcNode = &_lbffBayerWithGmvOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[17]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; - - link = &_graphLinks[18]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; - - link = &_graphLinks[19]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::ProcessedMain; - link->type = LinkType::Node2Sink; - - for (uint8_t i = 0; i < 20; ++i) + for (uint8_t i = 0; i < 10; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -10253,18 +14056,16 @@ StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerWithGmvOuterNode = &_lbffBayerWithGmvOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.lbffIrNoGmvOuterNode = &_lbffIrNoGmvOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerWithGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.lbffIrNoGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -10273,7 +14074,7 @@ StaticGraph100003::StaticGraph100003(GraphConfiguration100003** selectedGraphCon } } -StaticGraphStatus StaticGraph100003::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100025::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -10281,17 +14082,12 @@ StaticGraphStatus StaticGraph100003::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffBayerWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffIrNoGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -10299,13 +14095,13 @@ StaticGraphStatus StaticGraph100003::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100003::~StaticGraph100003() +StaticGraph100025::~StaticGraph100025() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100003::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100025::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -10314,70 +14110,64 @@ StaticGraphStatus imageSubGraphTopology100003::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerWithGmv initial inner node configuration + * Setting Node lbffIrNoGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffIrNoGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + lbffIrNoGmvInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); // active public options according to sink mapping + // always active private inner options + lbffIrNoGmvInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[8]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[9]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsNoTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffIrNoGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerWithGmvOuterNode->setInnerNode(lbffBayerWithGmvInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffIrNoGmvOuterNode->setInnerNode(lbffIrNoGmvInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerWithGmvInnerOptions & no3A); // lbff_Bayer_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[7]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input - subGraphLinks[8]->isActive = !(lbffBayerWithGmvInnerOptions & noGmv); // lbff_Bayer_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[3]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[8]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[9]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[10]->isActive = !(lbffBayerWithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[7]->isActive = !(lbffIrNoGmvInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 20; i++) + for (uint32_t i = 0; i < 10; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -10385,51 +14175,124 @@ StaticGraphStatus imageSubGraphTopology100003::configInnerNodes(SubGraphInnerNod } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[7]->isActive = (lbffBayerWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Bayer_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_WithGmv:terminal_connect_gmv_input - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; +} + +/* + * Graph 100026 + */ +StaticGraph100026::StaticGraph100026(GraphConfiguration100026** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100026, selectedSettingsId, zoomKeyResolutions), + + _rawSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100026[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::RawIsys; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 2; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _rawSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _rawSubGraph.isysOuterNode = &_isysOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_rawSubGraph; + // logical node IDs + _rawSubGraph.isysOuterNode->contextId = 0; +} + +StaticGraphStatus StaticGraph100026::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } +StaticGraph100026::~StaticGraph100026() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} /* - * Graph 100005 + * Graph 100027 */ -StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100005, selectedSettingsId, zoomKeyResolutions), +StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100027, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100005[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100027[kernelConfigurationsOptionsCount]; + IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf2OuterNodeConfiguration** lbffBayerPdaf2OuterNodeConfigurationOptions = new LbffBayerPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; + lbffBayerPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2OuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf2OuterNode.Init(lbffBayerPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swNntmOuterNodeConfigurationOptions; + delete[] isysPdaf2OuterNodeConfigurationOptions; + delete[] lbffBayerPdaf2OuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -10438,152 +14301,102 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::PdafBuffer; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; + link->destTerminalId = 2; + link->type = LinkType::Source2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; + link->srcTerminalId = 3; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - link = &_graphLinks[9]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::PdafOut; + link->type = LinkType::Node2Sink; link = &_graphLinks[10]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; link = &_graphLinks[11]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::SwNntm; - link->destNode = &_swNntmOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; - - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::SwNntm; - link->destNode = &_swNntmOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Node2Node; - - link = &_graphLinks[17]; - link->src = GraphElementType::SwNntm; - link->srcNode = &_swNntmOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::ProcessedMain; - link->type = LinkType::Node2Sink; - - for (uint8_t i = 0; i < 18; ++i) + for (uint8_t i = 0; i < 13; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -10603,19 +14416,17 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; + _imageSubGraph.lbffBayerPdaf2OuterNode = &_lbffBayerPdaf2OuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.isysPdaf2OuterNode->contextId = 0; + _imageSubGraph.lbffBayerPdaf2OuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -10624,25 +14435,20 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon } } -StaticGraphStatus StaticGraph100005::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100027::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -10650,13 +14456,13 @@ StaticGraphStatus StaticGraph100005::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100005::~StaticGraph100005() +StaticGraph100027::~StaticGraph100027() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100005::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100027::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -10665,68 +14471,65 @@ StaticGraphStatus imageSubGraphTopology100005::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayer initial inner node configuration + * Setting Node lbffBayerPdaf2 initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf2InnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + lbffBayerPdaf2InnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe); // active public options according to sink mapping + // always active private inner options + lbffBayerPdaf2InnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[13]->linkConfiguration->bufferSize == 0 && - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[11]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[12]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsNoTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf2InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffBayerPdaf2OuterNode->setInnerNode(lbffBayerPdaf2InnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[5]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[10]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffBayerPdaf2InnerOptions & noPdaf); // lbff_Bayer_Pdaf2:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 18; i++) + for (uint32_t i = 0; i < 13; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -10734,56 +14537,38 @@ StaticGraphStatus imageSubGraphTopology100005::configInnerNodes(SubGraphInnerNod } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - return StaticGraphStatus::SG_OK; } /* - * Graph 100006 + * Graph 100028 */ -StaticGraph100006::StaticGraph100006(GraphConfiguration100006** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100006, selectedSettingsId, zoomKeyResolutions), +StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100028, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) - ,_irSubGraph(_sinkMappingConfiguration) - ,_image_irSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100006[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100028[kernelConfigurationsOptionsCount]; IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffRgbIrOuterNodeConfiguration** lbffRgbIrOuterNodeConfigurationOptions = new LbffRgbIrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffIrNoGmvIrStreamOuterNodeConfiguration** lbffIrNoGmvIrStreamOuterNodeConfigurationOptions = new LbffIrNoGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsIrWithTnrOuterNodeConfiguration** bbpsIrWithTnrOuterNodeConfigurationOptions = new BbpsIrWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffRgbIrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - lbffIrNoGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvIrStreamOuterNodeConfiguration; - bbpsIrWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrWithTnrOuterNodeConfiguration; + lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffRgbIrOuterNode.Init(lbffRgbIrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffIrNoGmvIrStreamOuterNode.Init(lbffIrNoGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsIrWithTnrOuterNode.Init(bbpsIrWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; - delete[] lbffRgbIrOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] lbffIrNoGmvIrStreamOuterNodeConfigurationOptions; - delete[] bbpsIrWithTnrOuterNodeConfigurationOptions; + delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -10795,305 +14580,83 @@ StaticGraph100006::StaticGraph100006(GraphConfiguration100006** selectedGraphCon link->dest = GraphElementType::Isys; link->destNode = &_isysOuterNode; link->destTerminalId = 0; - link->type = LinkType::Source2Node; - _imageSubGraph.links[0] = link; - _irSubGraph.links[0] = link; - _image_irSubGraph.links[0] = link; - - link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffRgbIr; - link->destNode = &_lbffRgbIrOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; - _imageSubGraph.links[1] = link; - _irSubGraph.links[1] = link; - _image_irSubGraph.links[1] = link; - - link = &_graphLinks[2]; - link->src = GraphElementType::LscBufferIr; - link->dest = GraphElementType::LbffIrNoGmvIrStream; - link->destNode = &_lbffIrNoGmvIrStreamOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; - _irSubGraph.links[2] = link; - _image_irSubGraph.links[16] = link; - - link = &_graphLinks[3]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::LbffRgbIr; - link->destNode = &_lbffRgbIrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; - _imageSubGraph.links[2] = link; - _irSubGraph.links[3] = link; - _image_irSubGraph.links[2] = link; - - link = &_graphLinks[4]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[3] = link; - _irSubGraph.links[4] = link; - _image_irSubGraph.links[3] = link; - - link = &_graphLinks[5]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[4] = link; - _irSubGraph.links[5] = link; - _image_irSubGraph.links[4] = link; - - link = &_graphLinks[6]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[5] = link; - _irSubGraph.links[6] = link; - _image_irSubGraph.links[5] = link; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[6] = link; - _irSubGraph.links[7] = link; - _image_irSubGraph.links[6] = link; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[7] = link; - _irSubGraph.links[8] = link; - _image_irSubGraph.links[7] = link; - - link = &_graphLinks[9]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - _imageSubGraph.links[8] = link; - _image_irSubGraph.links[8] = link; - - link = &_graphLinks[10]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - _imageSubGraph.links[9] = link; - _image_irSubGraph.links[9] = link; - - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[10] = link; - _image_irSubGraph.links[10] = link; - - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[11] = link; - _image_irSubGraph.links[11] = link; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - _imageSubGraph.links[12] = link; - _image_irSubGraph.links[12] = link; - - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[13] = link; - _image_irSubGraph.links[13] = link; - - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[14] = link; - _image_irSubGraph.links[14] = link; + link->type = LinkType::Source2Node; - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[15] = link; - _image_irSubGraph.links[15] = link; + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; - link = &_graphLinks[17]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::LbffIrNoGmvIrStream; - link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - _irSubGraph.links[9] = link; - _image_irSubGraph.links[17] = link; - link = &_graphLinks[18]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 10; - link->dest = GraphElementType::IrAeOut; + link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[10] = link; - _image_irSubGraph.links[18] = link; - link = &_graphLinks[19]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 11; - link->dest = GraphElementType::IrAfStdOut; + link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[11] = link; - _image_irSubGraph.links[19] = link; - link = &_graphLinks[20]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 12; - link->dest = GraphElementType::IrAwbStdOut; + link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[12] = link; - _image_irSubGraph.links[20] = link; - link = &_graphLinks[21]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 13; - link->dest = GraphElementType::IrAwbSatOut; + link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[13] = link; - _image_irSubGraph.links[21] = link; - link = &_graphLinks[22]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::PdafOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - _irSubGraph.links[14] = link; - _image_irSubGraph.links[22] = link; - - link = &_graphLinks[23]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - _irSubGraph.links[15] = link; - _image_irSubGraph.links[23] = link; - - link = &_graphLinks[24]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _irSubGraph.links[16] = link; - _image_irSubGraph.links[24] = link; - - link = &_graphLinks[25]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _irSubGraph.links[17] = link; - _image_irSubGraph.links[25] = link; - - link = &_graphLinks[26]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - _irSubGraph.links[18] = link; - _image_irSubGraph.links[26] = link; - - link = &_graphLinks[27]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _irSubGraph.links[19] = link; - _image_irSubGraph.links[27] = link; - link = &_graphLinks[28]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::IrMp; + link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - _irSubGraph.links[20] = link; - _image_irSubGraph.links[28] = link; - for (uint8_t i = 0; i < 29; ++i) + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 11; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -11108,96 +14671,22 @@ StaticGraph100006::StaticGraph100006(GraphConfiguration100006** selectedGraphCon } _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; } - - // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _irSubGraph.isysOuterNode = &_isysOuterNode; - _irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; - _irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; - _image_irSubGraph.isysOuterNode = &_isysOuterNode; - _image_irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _image_irSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; - _image_irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; - - // choose the selected sub graph - if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_imageSubGraph; - - // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffRgbIrOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_irSubGraph; - - // logical node IDs - _irSubGraph.isysOuterNode->contextId = 0; - _irSubGraph.lbffRgbIrOuterNode->contextId = 1; - _irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 2; - _irSubGraph.bbpsIrWithTnrOuterNode->contextId = 3; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_image_irSubGraph; - - // logical node IDs - _image_irSubGraph.isysOuterNode->contextId = 0; - _image_irSubGraph.lbffRgbIrOuterNode->contextId = 1; - _image_irSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 3; - _image_irSubGraph.bbpsIrWithTnrOuterNode->contextId = 4; - } - else - { - STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); - } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -11206,7 +14695,7 @@ StaticGraph100006::StaticGraph100006(GraphConfiguration100006** selectedGraphCon } } -StaticGraphStatus StaticGraph100006::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100028::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -11214,22 +14703,12 @@ StaticGraphStatus StaticGraph100006::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffRgbIrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _lbffIrNoGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsIrWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -11237,13 +14716,13 @@ StaticGraphStatus StaticGraph100006::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100006::~StaticGraph100006() +StaticGraph100028::~StaticGraph100028() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100028::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -11252,67 +14731,65 @@ StaticGraphStatus imageSubGraphTopology100006::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffRgbIr initial inner node configuration + * Setting Node lbffBayerPdaf3 initial inner node configuration */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe); // active public options according to sink mapping // always active private inner options - lbffRgbIrInnerOptions |= (noIr); + lbffBayerPdaf3InnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[9]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[10]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsNoTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffRgbIrInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noLbOutputMe); // lbff_RgbIr:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 16; i++) + for (uint32_t i = 0; i < 11; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -11320,131 +14797,270 @@ StaticGraphStatus imageSubGraphTopology100006::configInnerNodes(SubGraphInnerNod } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - return StaticGraphStatus::SG_OK; } -StaticGraphStatus irSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +/* + * Graph 100029 + */ +StaticGraph100029::StaticGraph100029(GraphConfiguration100029** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100029, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) { + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100029[kernelConfigurationsOptionsCount]; + IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf2OuterNodeConfiguration** lbffBayerPdaf2OuterNodeConfigurationOptions = new LbffBayerPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - /* - * Init sub graphs inner nodes configuration base on user request - */ - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; + lbffBayerPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2OuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + } - /* - * Setting Node lbffRgbIr initial inner node configuration - */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffRgbIrInnerOptions |= (noLbOutputPs | noLbOutputMe); + _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf2OuterNode.Init(lbffBayerPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - /* - * Setting Node lbffIrNoGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); - // active public options according to sink mapping + delete[] isysPdaf2OuterNodeConfigurationOptions; + delete[] lbffBayerPdaf2OuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; - /* - * Setting Node bbpsIrWithTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - bbpsIrWithTnrInnerOptions |= (noDp); - // active public options according to sink mapping - if ( - subGraphLinks[20]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsIrWithTnrInnerOptions |= noMp; - } + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::PdafBuffer; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; + link->destTerminalId = 2; + link->type = LinkType::Source2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[4]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; + link->srcTerminalId = 3; + link->dest = GraphElementType::LbffBayerPdaf2; + link->destNode = &_lbffBayerPdaf2OuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::PdafOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffBayerPdaf2; + link->srcNode = &_lbffBayerPdaf2OuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; - /* - * Configuring inner nodes according to the selected inner options - */ - lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; - /* - * Set the selected inner nodes to the outer nodes - */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); - lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); - bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; - /* - * Link enablement by public inner options - */ - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[10]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[11]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[12]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[20]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; - /* - * Link enablement by private inner options - */ - subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[15]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_NoGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; - /* - * Disable links with zero buffer size - * (used for post processing when not all links are being used) - */ - for (uint32_t i = 0; i < 21; i++) - { - if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + for (uint8_t i = 0; i < 18; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) { - subGraphLinks[i]->isActive = false; + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } } - } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - /* - * Link enablement by inner options combinations - */ - subGraphLinks[16]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[17]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[18]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[19]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; + _imageSubGraph.lbffBayerPdaf2OuterNode = &_lbffBayerPdaf2OuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysPdaf2OuterNode->contextId = 0; + _imageSubGraph.lbffBayerPdaf2OuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} +StaticGraphStatus StaticGraph100029::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraphStatus image_irSubGraphTopology100006::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraph100029::~StaticGraph100029() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* * Init sub graphs inner nodes configuration base on user request */ InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); /* - * Setting Node lbffRgbIr initial inner node configuration + * Setting Node lbffBayerPdaf2 initial inner node configuration */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = None; - // combine inner options for the node common sub graphs - lbffRgbIrInnerOptions |= imagePublicInnerNodeConfiguration; - lbffRgbIrInnerOptions |= irPublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf2InnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerPdaf2InnerOptions |= (noGmv | noBurstCapture | noIr); + // active public options according to sink mapping /* * Setting Node bbpsWithTnr initial inner node configuration @@ -11452,87 +15068,52 @@ StaticGraphStatus image_irSubGraphTopology100006::configInnerNodes(SubGraphInner InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; } - /* - * Setting Node lbffIrNoGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); - // active public options according to sink mapping - - /* - * Setting Node bbpsIrWithTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - bbpsIrWithTnrInnerOptions |= (noDp); - // active public options according to sink mapping - if ( - subGraphLinks[28]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsIrWithTnrInnerOptions |= noMp; - } - /* * Configuring inner nodes according to the selected inner options */ - lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffRgbIrInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffBayerPdaf2InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf2InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); + lbffBayerPdaf2OuterNode->setInnerNode(lbffBayerPdaf2InnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); - lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); - bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[18]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[19]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[20]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[21]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[28]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + subGraphLinks[5]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[17]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noLbOutputMe); // lbff_RgbIr:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[22]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[23]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_NoGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[10]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf2:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[9]->isActive = !(lbffBayerPdaf2InnerOptions & noPdaf); // lbff_Bayer_Pdaf2:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 29; i++) + for (uint32_t i = 0; i < 18; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -11543,43 +15124,43 @@ StaticGraphStatus image_irSubGraphTopology100006::configInnerNodes(SubGraphInner /* * Link enablement by inner options combinations */ - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - subGraphLinks[24]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[25]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[26]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[27]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100007 + * Graph 100030 */ -StaticGraph100007::StaticGraph100007(GraphConfiguration100007** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100007, selectedSettingsId, zoomKeyResolutions), +StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100030, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100007[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100030[kernelConfigurationsOptionsCount]; IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerBurstOutNo3AOuterNodeConfiguration** lbffBayerBurstOutNo3AOuterNodeConfigurationOptions = new LbffBayerBurstOutNo3AOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerBurstOutNo3AOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerBurstOutNo3AOuterNodeConfiguration; + lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerBurstOutNo3AOuterNode.Init(lbffBayerBurstOutNo3AOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerBurstOutNo3AOuterNodeConfigurationOptions; + delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -11593,23 +15174,129 @@ StaticGraph100007::StaticGraph100007(GraphConfiguration100007** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Source2Node; - link = &_graphLinks[1]; + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; link->src = GraphElementType::Isys; link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerBurstOutNo3A; - link->destNode = &_lbffBayerBurstOutNo3AOuterNode; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[2]; - link->src = GraphElementType::LbffBayerBurstOutNo3A; - link->srcNode = &_lbffBayerBurstOutNo3AOuterNode; - link->srcTerminalId = 16; + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::PdafOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 3; ++i) + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 16; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -11630,14 +15317,16 @@ StaticGraph100007::StaticGraph100007(GraphConfiguration100007** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerBurstOutNo3AOuterNode = &_lbffBayerBurstOutNo3AOuterNode; + _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerBurstOutNo3AOuterNode->contextId = 1; + _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -11646,7 +15335,7 @@ StaticGraph100007::StaticGraph100007(GraphConfiguration100007** selectedGraphCon } } -StaticGraphStatus StaticGraph100007::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100030::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -11654,7 +15343,12 @@ StaticGraphStatus StaticGraph100007::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffBayerBurstOutNo3AOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -11662,13 +15356,13 @@ StaticGraphStatus StaticGraph100007::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100007::~StaticGraph100007() +StaticGraph100030::~StaticGraph100030() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100007::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -11677,37 +15371,65 @@ StaticGraphStatus imageSubGraphTopology100007::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerBurstOutNo3A initial inner node configuration + * Setting Node lbffBayerPdaf3 initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerBurstOutNo3AInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerBurstOutNo3AInnerOptions |= (no3A | noGmv | noIr | noLbOutputPs | noLbOutputMe | noPdaf); + lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping - // always active private inner options - lbffBayerBurstOutNo3AInnerOptions |= (noLbOutputPs | noLbOutputMe | noPdaf); - // active private inner options according to links if ( - subGraphLinks[2]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && true) { - lbffBayerBurstOutNo3AInnerOptions |= noBurstCapture; + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; } + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + /* * Set the selected inner nodes to the outer nodes */ - lbffBayerBurstOutNo3AOuterNode->setInnerNode(lbffBayerBurstOutNo3AInnerOptions); + lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp /* * Link enablement by private inner options */ - subGraphLinks[2]->isActive = !(lbffBayerBurstOutNo3AInnerOptions & noBurstCapture); // lbff_Bayer_BurstOut_No3A:terminal_connect_burst_isp_output -> image_mp + subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 3; i++) + for (uint32_t i = 0; i < 16; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -11715,48 +15437,54 @@ StaticGraphStatus imageSubGraphTopology100007::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100008 + * Graph 100031 */ -StaticGraph100008::StaticGraph100008(GraphConfiguration100008** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100008, selectedSettingsId, zoomKeyResolutions), +StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100031, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) - ,_irSubGraph(_sinkMappingConfiguration) - ,_image_irSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100008[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffRgbIrOuterNodeConfiguration** lbffRgbIrOuterNodeConfigurationOptions = new LbffRgbIrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100031[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsOuterNodeConfiguration** lbffDol2InputsOuterNodeConfigurationOptions = new LbffDol2InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffIrNoGmvIrStreamOuterNodeConfiguration** lbffIrNoGmvIrStreamOuterNodeConfigurationOptions = new LbffIrNoGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsIrNoTnrOuterNodeConfiguration** bbpsIrNoTnrOuterNodeConfigurationOptions = new BbpsIrNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffRgbIrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrOuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDol2InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsOuterNodeConfiguration; bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; - lbffIrNoGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvIrStreamOuterNodeConfiguration; - bbpsIrNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrNoTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffRgbIrOuterNode.Init(lbffRgbIrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsOuterNode.Init(lbffDol2InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffIrNoGmvIrStreamOuterNode.Init(lbffIrNoGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsIrNoTnrOuterNode.Init(bbpsIrNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffRgbIrOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDol2InputsOuterNodeConfigurationOptions; delete[] bbpsNoTnrOuterNodeConfigurationOptions; - delete[] lbffIrNoGmvIrStreamOuterNodeConfigurationOptions; - delete[] bbpsIrNoTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -11765,192 +15493,143 @@ StaticGraph100008::StaticGraph100008(GraphConfiguration100008** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; - _imageSubGraph.links[0] = link; - _irSubGraph.links[0] = link; - _image_irSubGraph.links[0] = link; link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffRgbIr; - link->destNode = &_lbffRgbIrOuterNode; - link->destTerminalId = 8; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; link->type = LinkType::Source2Node; - _imageSubGraph.links[1] = link; - _irSubGraph.links[1] = link; - _image_irSubGraph.links[1] = link; link = &_graphLinks[2]; - link->src = GraphElementType::LscBufferIr; - link->dest = GraphElementType::LbffIrNoGmvIrStream; - link->destNode = &_lbffIrNoGmvIrStreamOuterNode; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - _irSubGraph.links[2] = link; - _image_irSubGraph.links[11] = link; link = &_graphLinks[3]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffRgbIr; - link->destNode = &_lbffRgbIrOuterNode; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - _imageSubGraph.links[2] = link; - _irSubGraph.links[3] = link; - _image_irSubGraph.links[2] = link; link = &_graphLinks[4]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - _imageSubGraph.links[3] = link; - _irSubGraph.links[4] = link; - _image_irSubGraph.links[3] = link; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - _imageSubGraph.links[4] = link; - _irSubGraph.links[5] = link; - _image_irSubGraph.links[4] = link; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - _imageSubGraph.links[5] = link; - _irSubGraph.links[6] = link; - _image_irSubGraph.links[5] = link; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[6] = link; - _irSubGraph.links[7] = link; - _image_irSubGraph.links[6] = link; link = &_graphLinks[8]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - _imageSubGraph.links[7] = link; - _irSubGraph.links[8] = link; - _image_irSubGraph.links[7] = link; link = &_graphLinks[9]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsNoTnr; link->destNode = &_bbpsNoTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - _imageSubGraph.links[8] = link; - _image_irSubGraph.links[8] = link; - link = &_graphLinks[10]; + link = &_graphLinks[11]; link->src = GraphElementType::BbpsNoTnr; link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - _imageSubGraph.links[9] = link; - _image_irSubGraph.links[9] = link; - link = &_graphLinks[11]; + link = &_graphLinks[12]; link->src = GraphElementType::BbpsNoTnr; link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - _imageSubGraph.links[10] = link; - _image_irSubGraph.links[10] = link; - - link = &_graphLinks[12]; - link->src = GraphElementType::LbffRgbIr; - link->srcNode = &_lbffRgbIrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::LbffIrNoGmvIrStream; - link->destNode = &_lbffIrNoGmvIrStreamOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; - _irSubGraph.links[9] = link; - _image_irSubGraph.links[12] = link; link = &_graphLinks[13]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::IrAeOut; - link->type = LinkType::Node2Sink; - _irSubGraph.links[10] = link; - _image_irSubGraph.links[13] = link; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; link = &_graphLinks[14]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::IrAfStdOut; - link->type = LinkType::Node2Sink; - _irSubGraph.links[11] = link; - _image_irSubGraph.links[14] = link; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; link = &_graphLinks[15]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::IrAwbStdOut; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - _irSubGraph.links[12] = link; - _image_irSubGraph.links[15] = link; link = &_graphLinks[16]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::IrAwbSatOut; - link->type = LinkType::Node2Sink; - _irSubGraph.links[13] = link; - _image_irSubGraph.links[16] = link; - - link = &_graphLinks[17]; - link->src = GraphElementType::LbffIrNoGmvIrStream; - link->srcNode = &_lbffIrNoGmvIrStreamOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsIrNoTnr; - link->destNode = &_bbpsIrNoTnrOuterNode; - link->destTerminalId = 9; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; link->type = LinkType::Node2Node; - _irSubGraph.links[14] = link; - _image_irSubGraph.links[17] = link; - link = &_graphLinks[18]; - link->src = GraphElementType::BbpsIrNoTnr; - link->srcNode = &_bbpsIrNoTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::IrMp; + link = &_graphLinks[17]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; link->type = LinkType::Node2Sink; - _irSubGraph.links[15] = link; - _image_irSubGraph.links[18] = link; - for (uint8_t i = 0; i < 19; ++i) + for (uint8_t i = 0; i < 18; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -11965,96 +15644,26 @@ StaticGraph100008::StaticGraph100008(GraphConfiguration100008** selectedGraphCon } _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; - _irSubGraph.isysOuterNode = &_isysOuterNode; - _irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; - _irSubGraph.bbpsIrNoTnrOuterNode = &_bbpsIrNoTnrOuterNode; - _image_irSubGraph.isysOuterNode = &_isysOuterNode; - _image_irSubGraph.lbffRgbIrOuterNode = &_lbffRgbIrOuterNode; - _image_irSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; - _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode = &_lbffIrNoGmvIrStreamOuterNode; - _image_irSubGraph.bbpsIrNoTnrOuterNode = &_bbpsIrNoTnrOuterNode; - - // choose the selected sub graph - if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_imageSubGraph; - - // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffRgbIrOuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_irSubGraph; - - // logical node IDs - _irSubGraph.isysOuterNode->contextId = 0; - _irSubGraph.lbffRgbIrOuterNode->contextId = 1; - _irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 2; - _irSubGraph.bbpsIrNoTnrOuterNode->contextId = 3; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_image_irSubGraph; - - // logical node IDs - _image_irSubGraph.isysOuterNode->contextId = 0; - _image_irSubGraph.lbffRgbIrOuterNode->contextId = 1; - _image_irSubGraph.bbpsNoTnrOuterNode->contextId = 2; - _image_irSubGraph.lbffIrNoGmvIrStreamOuterNode->contextId = 3; - _image_irSubGraph.bbpsIrNoTnrOuterNode->contextId = 4; - } - else - { - STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); - } + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDol2InputsOuterNode = &_lbffDol2InputsOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDol2InputsOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -12063,15 +15672,15 @@ StaticGraph100008::StaticGraph100008(GraphConfiguration100008** selectedGraphCon } } -StaticGraphStatus StaticGraph100008::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100031::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffRgbIrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol2InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -12081,12 +15690,12 @@ StaticGraphStatus StaticGraph100008::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffIrNoGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsIrNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -12094,13 +15703,13 @@ StaticGraphStatus StaticGraph100008::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100008::~StaticGraph100008() +StaticGraph100031::~StaticGraph100031() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -12109,183 +15718,14 @@ StaticGraphStatus imageSubGraphTopology100008::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffRgbIr initial inner node configuration - */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = imagePublicInnerNodeConfiguration; - // always active public inner options - lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffRgbIrInnerOptions |= (noIr | noLbOutputMe); - - /* - * Setting Node bbpsNoTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; - // active public options according to sink mapping - if ( - subGraphLinks[9]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsNoTnrInnerOptions |= noMp; - } - if ( - subGraphLinks[10]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsNoTnrInnerOptions |= noDp; - } - - /* - * Configuring inner nodes according to the selected inner options - */ - lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - - /* - * Set the selected inner nodes to the outer nodes - */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); - - /* - * Link enablement by public inner options - */ - subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp - - /* - * Link enablement by private inner options - */ - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd - - /* - * Disable links with zero buffer size - * (used for post processing when not all links are being used) - */ - for (uint32_t i = 0; i < 11; i++) - { - if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) - { - subGraphLinks[i]->isActive = false; - } - } - - return StaticGraphStatus::SG_OK; -} - -StaticGraphStatus irSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) -{ - - /* - * Init sub graphs inner nodes configuration base on user request - */ - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); - - /* - * Setting Node lbffRgbIr initial inner node configuration - */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffRgbIrInnerOptions |= (noGmv | noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffRgbIrInnerOptions |= (noLbOutputPs | noLbOutputMe); - - /* - * Setting Node lbffIrNoGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffIrNoGmvIrStreamInnerOptions |= (noLbOutputMe); - - /* - * Setting Node bbpsIrNoTnr initial inner node configuration + * Setting Node lbffDol2Inputs initial inner node configuration */ - InnerNodeOptionsFlags bbpsIrNoTnrInnerOptions = irPublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - bbpsIrNoTnrInnerOptions |= (noDp); + lbffDol2InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); // active public options according to sink mapping - if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsIrNoTnrInnerOptions |= noMp; - } - - /* - * Configuring inner nodes according to the selected inner options - */ - lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); - - /* - * Set the selected inner nodes to the outer nodes - */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); - lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); - bbpsIrNoTnrOuterNode->setInnerNode(bbpsIrNoTnrInnerOptions); - - /* - * Link enablement by public inner options - */ - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[10]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[11]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[12]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[15]->isActive = !(bbpsIrNoTnrInnerOptions & noMp); // bbps_Ir_NoTnr:bbps_ofs_mp_yuvn_odr -> ir_mp - - /* - * Link enablement by private inner options - */ - subGraphLinks[9]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_NoTnr:bbps_slim_spatial_yuvn_ifd - - /* - * Disable links with zero buffer size - * (used for post processing when not all links are being used) - */ - for (uint32_t i = 0; i < 16; i++) - { - if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) - { - subGraphLinks[i]->isActive = false; - } - } - - return StaticGraphStatus::SG_OK; -} - -StaticGraphStatus image_irSubGraphTopology100008::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) -{ - - /* - * Init sub graphs inner nodes configuration base on user request - */ - InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); - - /* - * Setting Node lbffRgbIr initial inner node configuration - */ - InnerNodeOptionsFlags lbffRgbIrInnerOptions = None; // always active private inner options - lbffRgbIrInnerOptions |= (noLbOutputMe); - // combine inner options for the node common sub graphs - lbffRgbIrInnerOptions |= imagePublicInnerNodeConfiguration; - lbffRgbIrInnerOptions |= irPublicInnerNodeConfiguration; + lbffDol2InputsInnerOptions |= (noLbOutputMe); /* * Setting Node bbpsNoTnr initial inner node configuration @@ -12293,85 +15733,54 @@ StaticGraphStatus image_irSubGraphTopology100008::configInnerNodes(SubGraphInner InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[9]->linkConfiguration->bufferSize == 0 && + subGraphLinks[11]->linkConfiguration->bufferSize == 0 && + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[10]->linkConfiguration->bufferSize == 0 && + subGraphLinks[12]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noDp; } - /* - * Setting Node lbffIrNoGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrNoGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrNoGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffIrNoGmvIrStreamInnerOptions |= (noLbOutputMe); - - /* - * Setting Node bbpsIrNoTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsIrNoTnrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - bbpsIrNoTnrInnerOptions |= (noDp); - // active public options according to sink mapping - if ( - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsIrNoTnrInnerOptions |= noMp; - } - /* * Configuring inner nodes according to the selected inner options */ - lbffRgbIrInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffRgbIrInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffIrNoGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffDol2InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes - */ - lbffRgbIrOuterNode->setInnerNode(lbffRgbIrInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); - lbffIrNoGmvIrStreamOuterNode->setInnerNode(lbffIrNoGmvIrStreamInnerOptions); - bbpsIrNoTnrOuterNode->setInnerNode(bbpsIrNoTnrInnerOptions); - - /* - * Link enablement by public inner options - */ - subGraphLinks[3]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[7]->isActive = !(lbffRgbIrInnerOptions & no3A); // lbff_RgbIr:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[13]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[14]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[15]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[16]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & no3A); // lbff_Ir_NoGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[18]->isActive = !(bbpsIrNoTnrInnerOptions & noMp); // bbps_Ir_NoTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + */ + lbffDol2InputsOuterNode->setInnerNode(lbffDol2InputsInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[5]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[12]->isActive = !(lbffRgbIrInnerOptions & noIr); // lbff_RgbIr:terminal_connect_ir_output -> lbff_Ir_NoGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[8]->isActive = !(lbffRgbIrInnerOptions & noLbOutputPs); // lbff_RgbIr:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[17]->isActive = !(lbffIrNoGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[10]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputPs); // lbff_Dol2Inputs:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 19; i++) + for (uint32_t i = 0; i < 18; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -12383,30 +15792,42 @@ StaticGraphStatus image_irSubGraphTopology100008::configInnerNodes(SubGraphInner } /* - * Graph 100015 + * Graph 100032 */ -StaticGraph100015::StaticGraph100015(GraphConfiguration100015** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100015, selectedSettingsId, zoomKeyResolutions), +StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100032, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100015[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100032[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsOuterNodeConfiguration** lbffDol2InputsOuterNodeConfigurationOptions = new LbffDol2InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDol2InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsOuterNode.Init(lbffDol2InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDol2InputsOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -12415,70 +15836,191 @@ StaticGraph100015::StaticGraph100015(GraphConfiguration100015** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayer; - link->destNode = &_lbffBayerOuterNode; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol2Inputs; + link->destNode = &_lbffDol2InputsOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol2Inputs; + link->srcNode = &_lbffDol2InputsOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayer; - link->srcNode = &_lbffBayerOuterNode; - link->srcTerminalId = 18; + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 9; ++i) + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[21]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -12498,15 +16040,21 @@ StaticGraph100015::StaticGraph100015(GraphConfiguration100015** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDol2InputsOuterNode = &_lbffDol2InputsOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDol2InputsOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -12515,15 +16063,30 @@ StaticGraph100015::StaticGraph100015(GraphConfiguration100015** selectedGraphCon } } -StaticGraphStatus StaticGraph100015::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100032::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol2InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -12531,13 +16094,13 @@ StaticGraphStatus StaticGraph100015::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100015::~StaticGraph100015() +StaticGraph100032::~StaticGraph100032() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100015::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -12546,50 +16109,69 @@ StaticGraphStatus imageSubGraphTopology100015::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayer initial inner node configuration + * Setting Node lbffDol2Inputs initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + lbffDol2InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping - // active private inner options according to links if ( - subGraphLinks[7]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { - lbffBayerInnerOptions |= noLbOutputPs; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[8]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && true) { - lbffBayerInnerOptions |= noLbOutputMe; + bbpsWithTnrInnerOptions |= noDp; } + /* + * Configuring inner nodes according to the selected inner options + */ + lbffDol2InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + /* * Set the selected inner nodes to the outer nodes */ - lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + lbffDol2InputsOuterNode->setInnerNode(lbffDol2InputsInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[5]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> image_mp - subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> image_dp + subGraphLinks[10]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputPs); // lbff_Dol2Inputs:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputMe); // lbff_Dol2Inputs:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 9; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -12597,30 +16179,58 @@ StaticGraphStatus imageSubGraphTopology100015::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100016 + * Graph 100033 */ -StaticGraph100016::StaticGraph100016(GraphConfiguration100016** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100016, selectedSettingsId, zoomKeyResolutions), +StaticGraph100033::StaticGraph100033(GraphConfiguration100033** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100033, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100016[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100033[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsOuterNodeConfiguration** lbffDol3InputsOuterNodeConfigurationOptions = new LbffDol3InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsOuterNodeConfiguration; bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsOuterNode.Init(lbffDol3InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsOuterNodeConfigurationOptions; delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -12629,26 +16239,161 @@ StaticGraph100016::StaticGraph100016(GraphConfiguration100016** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 19; link->dest = GraphElementType::BbpsNoTnr; link->destNode = &_bbpsNoTnrOuterNode; link->destTerminalId = 9; - link->type = LinkType::Source2Node; + link->type = LinkType::Node2Node; - link = &_graphLinks[1]; + link = &_graphLinks[13]; link->src = GraphElementType::BbpsNoTnr; link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[2]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsNoTnr; link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 3; ++i) + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 20; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -12668,13 +16413,23 @@ StaticGraph100016::StaticGraph100016(GraphConfiguration100016** selectedGraphCon } // add nodes for sub graph + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsOuterNode = &_lbffDol3InputsOuterNode; _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 0; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsOuterNode->contextId = 2; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 4; + _imageSubGraph.swScalerOuterNode->contextId = 5; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -12683,24 +16438,49 @@ StaticGraph100016::StaticGraph100016(GraphConfiguration100016** selectedGraphCon } } -StaticGraphStatus StaticGraph100016::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100033::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol3InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraph100016::~StaticGraph100016() +StaticGraph100033::~StaticGraph100033() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100016::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100033::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -12708,40 +16488,70 @@ StaticGraphStatus imageSubGraphTopology100016::configInnerNodes(SubGraphInnerNod */ InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + /* + * Setting Node lbffDol3Inputs initial inner node configuration + */ + InnerNodeOptionsFlags lbffDol3InputsInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffDol3InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffDol3InputsInnerOptions |= (noLbOutputMe); + /* * Setting Node bbpsNoTnr initial inner node configuration */ InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[1]->linkConfiguration->bufferSize == 0 && + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[2]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noDp; } + /* + * Configuring inner nodes according to the selected inner options + */ + lbffDol3InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + /* * Set the selected inner nodes to the outer nodes */ + lbffDol3InputsOuterNode->setInnerNode(lbffDol3InputsInnerOptions); bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[1]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[2]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[7]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[16]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + + /* + * Link enablement by private inner options + */ + subGraphLinks[12]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputPs); // lbff_Dol3Inputs:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 3; i++) + for (uint32_t i = 0; i < 20; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -12753,34 +16563,46 @@ StaticGraphStatus imageSubGraphTopology100016::configInnerNodes(SubGraphInnerNod } /* - * Graph 100025 + * Graph 100034 */ -StaticGraph100025::StaticGraph100025(GraphConfiguration100025** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100025, selectedSettingsId, zoomKeyResolutions), +StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100034, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100025[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffIrNoGmvOuterNodeConfiguration** lbffIrNoGmvOuterNodeConfigurationOptions = new LbffIrNoGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100034[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsOuterNodeConfiguration** lbffDol3InputsOuterNodeConfigurationOptions = new LbffDol3InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffIrNoGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNoGmvOuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffIrNoGmvOuterNode.Init(lbffIrNoGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsOuterNode.Init(lbffDol3InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffIrNoGmvOuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -12789,79 +16611,209 @@ StaticGraph100025::StaticGraph100025(GraphConfiguration100025** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffIrNoGmv; - link->destNode = &_lbffIrNoGmvOuterNode; - link->destTerminalId = 8; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffIrNoGmv; - link->destNode = &_lbffIrNoGmvOuterNode; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::LbffIrNoGmv; - link->srcNode = &_lbffIrNoGmvOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3Inputs; + link->destNode = &_lbffDol3InputsOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffIrNoGmv; - link->srcNode = &_lbffIrNoGmvOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffIrNoGmv; - link->srcNode = &_lbffIrNoGmvOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffIrNoGmv; - link->srcNode = &_lbffIrNoGmvOuterNode; + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffIrNoGmv; - link->srcNode = &_lbffIrNoGmvOuterNode; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[8]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::LbffDol3Inputs; + link->srcNode = &_lbffDol3InputsOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; + link = &_graphLinks[19]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[20]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[21]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[23]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[24]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 10; ++i) + for (uint8_t i = 0; i < 25; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -12881,17 +16833,23 @@ StaticGraph100025::StaticGraph100025(GraphConfiguration100025** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffIrNoGmvOuterNode = &_lbffIrNoGmvOuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsOuterNode = &_lbffDol3InputsOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffIrNoGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsOuterNode->contextId = 2; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 4; + _imageSubGraph.swScalerOuterNode->contextId = 5; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -12900,20 +16858,35 @@ StaticGraph100025::StaticGraph100025(GraphConfiguration100025** selectedGraphCon } } -StaticGraphStatus StaticGraph100025::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100034::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffIrNoGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol3InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -12921,13 +16894,13 @@ StaticGraphStatus StaticGraph100025::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100025::~StaticGraph100025() +StaticGraph100034::~StaticGraph100034() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100025::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -12936,64 +16909,69 @@ StaticGraphStatus imageSubGraphTopology100025::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffIrNoGmv initial inner node configuration + * Setting Node lbffDol3Inputs initial inner node configuration */ - InnerNodeOptionsFlags lbffIrNoGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol3InputsInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffIrNoGmvInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + lbffDol3InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping - // always active private inner options - lbffIrNoGmvInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsNoTnr initial inner node configuration + * Setting Node bbpsWithTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[8]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noMp; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[9]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[21]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noDp; + bbpsWithTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffIrNoGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffIrNoGmvOuterNode->setInnerNode(lbffIrNoGmvInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffDol3InputsOuterNode->setInnerNode(lbffDol3InputsInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffIrNoGmvInnerOptions & no3A); // lbff_Ir_NoGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[8]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[7]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[7]->isActive = !(lbffIrNoGmvInnerOptions & noLbOutputPs); // lbff_Ir_NoGmv:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[12]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputPs); // lbff_Dol3Inputs:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[13]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputMe); // lbff_Dol3Inputs:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 10; i++) + for (uint32_t i = 0; i < 25; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -13001,30 +16979,38 @@ StaticGraphStatus imageSubGraphTopology100025::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100026 + * Graph 100035 */ -StaticGraph100026::StaticGraph100026(GraphConfiguration100026** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100026, selectedSettingsId, zoomKeyResolutions), +StaticGraph100035::StaticGraph100035(GraphConfiguration100035** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100035, selectedSettingsId, zoomKeyResolutions), _rawSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100026[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100035[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -13033,19 +17019,133 @@ StaticGraph100026::StaticGraph100026(GraphConfiguration100026** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::RawIsys; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::RawIsysDolLong; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 4; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _rawSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _rawSubGraph.isysDolOuterNode = &_isysDolOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_rawSubGraph; + + // logical node IDs + _rawSubGraph.isysDolOuterNode->contextId = 0; +} + +StaticGraphStatus StaticGraph100035::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100035::~StaticGraph100035() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} +/* + * Graph 100036 + */ +StaticGraph100036::StaticGraph100036(GraphConfiguration100036** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100036, selectedSettingsId, zoomKeyResolutions), + + _rawSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100036[kernelConfigurationsOptionsCount]; + IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; + } + + _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysPdaf2OuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::PdafBuffer; + link->dest = GraphElementType::IsysPdaf2; + link->destNode = &_isysPdaf2OuterNode; + link->destTerminalId = 2; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::RawIsys; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 2; ++i) + link = &_graphLinks[3]; + link->src = GraphElementType::IsysPdaf2; + link->srcNode = &_isysPdaf2OuterNode; + link->srcTerminalId = 3; + link->dest = GraphElementType::RawIsysPdaf; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 4; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -13065,19 +17165,19 @@ StaticGraph100026::StaticGraph100026(GraphConfiguration100026** selectedGraphCon } // add nodes for sub graph - _rawSubGraph.isysOuterNode = &_isysOuterNode; + _rawSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; // choose the selected sub graph _selectedGraphTopology = &_rawSubGraph; // logical node IDs - _rawSubGraph.isysOuterNode->contextId = 0; + _rawSubGraph.isysPdaf2OuterNode->contextId = 0; } -StaticGraphStatus StaticGraph100026::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100036::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -13085,40 +17185,44 @@ StaticGraphStatus StaticGraph100026::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100026::~StaticGraph100026() +StaticGraph100036::~StaticGraph100036() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } /* - * Graph 100027 + * Graph 100037 */ -StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100027, selectedSettingsId, zoomKeyResolutions), +StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100037, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100027[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100037[kernelConfigurationsOptionsCount]; IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf2OuterNodeConfiguration** lbffBayerPdaf2OuterNodeConfigurationOptions = new LbffBayerPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf2WithGmvOuterNodeConfiguration** lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions = new LbffBayerPdaf2WithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; - lbffBayerPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2OuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2WithGmvOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf2OuterNode.Init(lbffBayerPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf2WithGmvOuterNode.Init(lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysPdaf2OuterNodeConfigurationOptions; - delete[] lbffBayerPdaf2OuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -13134,8 +17238,8 @@ StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphCon link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->dest = GraphElementType::LbffBayerPdaf2WithGmv; + link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; @@ -13150,8 +17254,8 @@ StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphCon link->src = GraphElementType::IsysPdaf2; link->srcNode = &_isysPdaf2OuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->dest = GraphElementType::LbffBayerPdaf2WithGmv; + link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; @@ -13159,70 +17263,160 @@ StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphCon link->src = GraphElementType::IsysPdaf2; link->srcNode = &_isysPdaf2OuterNode; link->srcTerminalId = 3; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->dest = GraphElementType::LbffBayerPdaf2WithGmv; + link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::PdafOut; link->type = LinkType::Node2Sink; link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffBayerPdaf2WithGmv; + link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::LbffBayerPdaf2WithGmv; + link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[19]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 13; ++i) + link = &_graphLinks[20]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[21]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -13243,16 +17437,18 @@ StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; - _imageSubGraph.lbffBayerPdaf2OuterNode = &_lbffBayerPdaf2OuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.lbffBayerPdaf2WithGmvOuterNode = &_lbffBayerPdaf2WithGmvOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysPdaf2OuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf2OuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.lbffBayerPdaf2WithGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -13261,7 +17457,7 @@ StaticGraph100027::StaticGraph100027(GraphConfiguration100027** selectedGraphCon } } -StaticGraphStatus StaticGraph100027::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100037::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -13269,12 +17465,17 @@ StaticGraphStatus StaticGraph100027::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffBayerPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf2WithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -13282,13 +17483,13 @@ StaticGraphStatus StaticGraph100027::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100027::~StaticGraph100027() +StaticGraph100037::~StaticGraph100037() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100027::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -13297,65 +17498,71 @@ StaticGraphStatus imageSubGraphTopology100027::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf2 initial inner node configuration + * Setting Node lbffBayerPdaf2WithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf2InnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf2WithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf2InnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe); + lbffBayerPdaf2WithGmvInnerOptions |= (noBurstCapture | noIr); // active public options according to sink mapping - // always active private inner options - lbffBayerPdaf2InnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsNoTnr initial inner node configuration + * Setting Node bbpsWithTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[11]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noMp; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[12]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[21]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noDp; + bbpsWithTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf2InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf2WithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf2WithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf2OuterNode->setInnerNode(lbffBayerPdaf2InnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffBayerPdaf2WithGmvOuterNode->setInnerNode(lbffBayerPdaf2WithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[5]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[10]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_input + subGraphLinks[11]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[9]->isActive = !(lbffBayerPdaf2InnerOptions & noPdaf); // lbff_Bayer_Pdaf2:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[12]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[13]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[9]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noPdaf); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 13; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -13363,38 +17570,51 @@ StaticGraphStatus imageSubGraphTopology100027::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[10]->isActive = (lbffBayerPdaf2WithGmvInnerOptions & (noGmv|noBurstCapture|noIr)) != (noGmv|noBurstCapture|noIr); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_input + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100028 + * Graph 100038 */ -StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100028, selectedSettingsId, zoomKeyResolutions), +StaticGraph100038::StaticGraph100038(GraphConfiguration100038** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100038, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100028[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100038[kernelConfigurationsOptionsCount]; IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf3WithGmvOuterNodeConfiguration** lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions = new LbffBayerPdaf3WithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3WithGmvOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf3WithGmvOuterNode.Init(lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -13410,8 +17630,8 @@ StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphCon link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; + link->dest = GraphElementType::LbffBayerPdaf3WithGmv; + link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; @@ -13419,70 +17639,160 @@ StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphCon link->src = GraphElementType::Isys; link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; + link->dest = GraphElementType::LbffBayerPdaf3WithGmv; + link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::PdafOut; link->type = LinkType::Node2Sink; link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffBayerPdaf3WithGmv; + link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[9]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffBayerPdaf3WithGmv; + link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 11; ++i) + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[19]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -13503,16 +17813,18 @@ StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.lbffBayerPdaf3WithGmvOuterNode = &_lbffBayerPdaf3WithGmvOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.lbffBayerPdaf3WithGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -13521,7 +17833,7 @@ StaticGraph100028::StaticGraph100028(GraphConfiguration100028** selectedGraphCon } } -StaticGraphStatus StaticGraph100028::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100038::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -13529,12 +17841,17 @@ StaticGraphStatus StaticGraph100028::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf3WithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -13542,13 +17859,13 @@ StaticGraphStatus StaticGraph100028::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100028::~StaticGraph100028() +StaticGraph100038::~StaticGraph100038() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100028::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100038::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -13557,65 +17874,71 @@ StaticGraphStatus imageSubGraphTopology100028::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf3 initial inner node configuration + * Setting Node lbffBayerPdaf3WithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf3WithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe); + lbffBayerPdaf3WithGmvInnerOptions |= (noBurstCapture | noIr); // active public options according to sink mapping - // always active private inner options - lbffBayerPdaf3InnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsNoTnr initial inner node configuration + * Setting Node bbpsWithTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[9]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noMp; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[10]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noDp; + bbpsWithTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3WithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3WithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffBayerPdaf3WithGmvOuterNode->setInnerNode(lbffBayerPdaf3WithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[10]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[3]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[8]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_input + subGraphLinks[9]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[10]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[7]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noPdaf); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 11; i++) + for (uint32_t i = 0; i < 21; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -13623,38 +17946,61 @@ StaticGraphStatus imageSubGraphTopology100028::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[8]->isActive = (lbffBayerPdaf3WithGmvInnerOptions & (noGmv|noBurstCapture|noIr)) != (noGmv|noBurstCapture|noIr); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_input + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100029 + * Graph 100039 */ -StaticGraph100029::StaticGraph100029(GraphConfiguration100029** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100029, selectedSettingsId, zoomKeyResolutions), +StaticGraph100039::StaticGraph100039(GraphConfiguration100039** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100039, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) + ,_irSubGraph(_sinkMappingConfiguration) + ,_image_irSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100029[kernelConfigurationsOptionsCount]; - IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf2OuterNodeConfiguration** lbffBayerPdaf2OuterNodeConfigurationOptions = new LbffBayerPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100039[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffRgbIrWithGmvOuterNodeConfiguration** lbffRgbIrWithGmvOuterNodeConfigurationOptions = new LbffRgbIrWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffIrWithGmvIrStreamOuterNodeConfiguration** lbffIrWithGmvIrStreamOuterNodeConfigurationOptions = new LbffIrWithGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsIrWithTnrOuterNodeConfiguration** bbpsIrWithTnrOuterNodeConfigurationOptions = new BbpsIrWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; - lbffBayerPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2OuterNodeConfiguration; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffRgbIrWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrWithGmvOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + lbffIrWithGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrWithGmvIrStreamOuterNodeConfiguration; + bbpsIrWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } - _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf2OuterNode.Init(lbffBayerPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffRgbIrWithGmvOuterNode.Init(lbffRgbIrWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffIrWithGmvIrStreamOuterNode.Init(lbffIrWithGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsIrWithTnrOuterNode.Init(bbpsIrWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysPdaf2OuterNodeConfigurationOptions; - delete[] lbffBayerPdaf2OuterNodeConfigurationOptions; + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffRgbIrWithGmvOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] lbffIrWithGmvIrStreamOuterNodeConfigurationOptions; + delete[] bbpsIrWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -13663,150 +18009,362 @@ StaticGraph100029::StaticGraph100029(GraphConfiguration100029** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; + _imageSubGraph.links[0] = link; + _irSubGraph.links[0] = link; + _image_irSubGraph.links[0] = link; link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->dest = GraphElementType::LbffRgbIrWithGmv; + link->destNode = &_lbffRgbIrWithGmvOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; + _imageSubGraph.links[1] = link; + _irSubGraph.links[1] = link; + _image_irSubGraph.links[1] = link; link = &_graphLinks[2]; - link->src = GraphElementType::PdafBuffer; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; - link->destTerminalId = 2; + link->src = GraphElementType::LscBufferIr; + link->dest = GraphElementType::LbffIrWithGmvIrStream; + link->destNode = &_lbffIrWithGmvIrStreamOuterNode; + link->destTerminalId = 8; link->type = LinkType::Source2Node; + _irSubGraph.links[2] = link; + _image_irSubGraph.links[21] = link; link = &_graphLinks[3]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->dest = GraphElementType::LbffRgbIrWithGmv; + link->destNode = &_lbffRgbIrWithGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; + _imageSubGraph.links[2] = link; + _irSubGraph.links[3] = link; + _image_irSubGraph.links[2] = link; link = &_graphLinks[4]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; - link->srcTerminalId = 3; - link->dest = GraphElementType::LbffBayerPdaf2; - link->destNode = &_lbffBayerPdaf2OuterNode; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[3] = link; + _irSubGraph.links[4] = link; + _image_irSubGraph.links[3] = link; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[4] = link; + _irSubGraph.links[5] = link; + _image_irSubGraph.links[4] = link; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[5] = link; + _irSubGraph.links[6] = link; + _image_irSubGraph.links[5] = link; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[6] = link; + _irSubGraph.links[7] = link; + _image_irSubGraph.links[6] = link; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[7] = link; + _irSubGraph.links[8] = link; + _image_irSubGraph.links[7] = link; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffRgbIrWithGmv; + link->destNode = &_lbffRgbIrWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[8] = link; + _irSubGraph.links[9] = link; + _image_irSubGraph.links[8] = link; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[9] = link; + _irSubGraph.links[10] = link; + _image_irSubGraph.links[9] = link; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; + _imageSubGraph.links[10] = link; + _image_irSubGraph.links[10] = link; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + _imageSubGraph.links[11] = link; + _image_irSubGraph.links[11] = link; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[12] = link; + _image_irSubGraph.links[12] = link; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[13] = link; + _image_irSubGraph.links[13] = link; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + _imageSubGraph.links[14] = link; + _image_irSubGraph.links[14] = link; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + _imageSubGraph.links[15] = link; + _image_irSubGraph.links[15] = link; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[16] = link; + _image_irSubGraph.links[16] = link; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + _imageSubGraph.links[17] = link; + _image_irSubGraph.links[17] = link; + + link = &_graphLinks[19]; + link->src = GraphElementType::LbffRgbIrWithGmv; + link->srcNode = &_lbffRgbIrWithGmvOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::LbffIrWithGmvIrStream; + link->destNode = &_lbffIrWithGmvIrStreamOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + _irSubGraph.links[11] = link; + _image_irSubGraph.links[22] = link; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[20]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; + link->dest = GraphElementType::IrAeOut; link->type = LinkType::Node2Sink; + _irSubGraph.links[12] = link; + _image_irSubGraph.links[23] = link; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[21]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; + link->dest = GraphElementType::IrAfStdOut; link->type = LinkType::Node2Sink; + _irSubGraph.links[13] = link; + _image_irSubGraph.links[24] = link; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[22]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; + link->dest = GraphElementType::IrAwbStdOut; link->type = LinkType::Node2Sink; + _irSubGraph.links[14] = link; + _image_irSubGraph.links[25] = link; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[23]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::PdafOut; + link->dest = GraphElementType::IrAwbSatOut; link->type = LinkType::Node2Sink; + _irSubGraph.links[15] = link; + _image_irSubGraph.links[26] = link; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[24]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; + _irSubGraph.links[16] = link; + _image_irSubGraph.links[27] = link; - link = &_graphLinks[11]; - link->src = GraphElementType::LbffBayerPdaf2; - link->srcNode = &_lbffBayerPdaf2OuterNode; + link = &_graphLinks[25]; + link->src = GraphElementType::LbffIrWithGmvIrStream; + link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; + _irSubGraph.links[17] = link; + _image_irSubGraph.links[28] = link; - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[26]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 10; link->type = LinkType::Node2Self; link->frameDelay = 1U; + _irSubGraph.links[18] = link; + _image_irSubGraph.links[29] = link; - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[27]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Self; link->frameDelay = 1U; + _irSubGraph.links[19] = link; + _image_irSubGraph.links[30] = link; - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[28]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 11; link->type = LinkType::Node2Self; + _irSubGraph.links[20] = link; + _image_irSubGraph.links[31] = link; - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[29]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsIrWithTnr; + link->destNode = &_bbpsIrWithTnrOuterNode; link->destTerminalId = 6; link->type = LinkType::Node2Self; link->frameDelay = 1U; + _irSubGraph.links[21] = link; + _image_irSubGraph.links[32] = link; - link = &_graphLinks[16]; + link = &_graphLinks[30]; + link->src = GraphElementType::BbpsIrWithTnr; + link->srcNode = &_bbpsIrWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::IrMp; + link->type = LinkType::Node2Sink; + _irSubGraph.links[22] = link; + _image_irSubGraph.links[33] = link; + + link = &_graphLinks[31]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; - link->type = LinkType::Node2Sink; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + _imageSubGraph.links[18] = link; + _image_irSubGraph.links[18] = link; - link = &_graphLinks[17]; + link = &_graphLinks[32]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + _imageSubGraph.links[19] = link; + _image_irSubGraph.links[19] = link; + + link = &_graphLinks[33]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; + _imageSubGraph.links[20] = link; + _image_irSubGraph.links[20] = link; - for (uint8_t i = 0; i < 18; ++i) + for (uint8_t i = 0; i < 34; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -13821,22 +18379,100 @@ StaticGraph100029::StaticGraph100029(GraphConfiguration100029** selectedGraphCon } _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - // Assign link to sub-graph - _imageSubGraph.links[i] = &_graphLinks[i]; } // add nodes for sub graph - _imageSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; - _imageSubGraph.lbffBayerPdaf2OuterNode = &_lbffBayerPdaf2OuterNode; + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _irSubGraph.isysOuterNode = &_isysOuterNode; + _irSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; + _irSubGraph.lbffIrWithGmvIrStreamOuterNode = &_lbffIrWithGmvIrStreamOuterNode; + _irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; + _image_irSubGraph.isysOuterNode = &_isysOuterNode; + _image_irSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; + _image_irSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _image_irSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _image_irSubGraph.lbffIrWithGmvIrStreamOuterNode = &_lbffIrWithGmvIrStreamOuterNode; + _image_irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; // choose the selected sub graph - _selectedGraphTopology = &_imageSubGraph; + if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_imageSubGraph; - // logical node IDs - _imageSubGraph.isysPdaf2OuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf2OuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_irSubGraph; + + // logical node IDs + _irSubGraph.isysOuterNode->contextId = 0; + _irSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; + _irSubGraph.lbffIrWithGmvIrStreamOuterNode->contextId = 2; + _irSubGraph.bbpsIrWithTnrOuterNode->contextId = 3; + } + else if ( + // image sink group + (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && + // raw sink group + (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && + _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && + // ir sink group + (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || + _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) + { + _selectedGraphTopology = &_image_irSubGraph; + + // logical node IDs + _image_irSubGraph.isysOuterNode->contextId = 0; + _image_irSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; + _image_irSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _image_irSubGraph.swGdcOuterNode->contextId = 3; + _image_irSubGraph.lbffIrWithGmvIrStreamOuterNode->contextId = 4; + _image_irSubGraph.bbpsIrWithTnrOuterNode->contextId = 5; + } + else + { + STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); + } // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -13845,15 +18481,15 @@ StaticGraph100029::StaticGraph100029(GraphConfiguration100029** selectedGraphCon } } -StaticGraphStatus StaticGraph100029::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100039::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffRgbIrWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -13863,16 +18499,31 @@ StaticGraphStatus StaticGraph100029::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _lbffIrWithGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsIrWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraph100029::~StaticGraph100029() +StaticGraph100039::~StaticGraph100039() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -13881,12 +18532,14 @@ StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf2 initial inner node configuration + * Setting Node lbffRgbIrWithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf2InnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf2InnerOptions |= (noGmv | noBurstCapture | noIr); + lbffRgbIrWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); // active public options according to sink mapping + // always active private inner options + lbffRgbIrWithGmvInnerOptions |= (noIr); /* * Setting Node bbpsWithTnr initial inner node configuration @@ -13895,12 +18548,14 @@ StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNod // active public options according to sink mapping if ( subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -13909,37 +18564,271 @@ StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf2InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerPdaf2InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input + subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + + /* + * Link enablement by private inner options + */ + subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputPs); // lbff_RgbIr_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputMe); // lbff_RgbIr_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 21; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[8]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus irSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + + /* + * Setting Node lbffRgbIrWithGmv initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffRgbIrWithGmvInnerOptions |= (noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffRgbIrWithGmvInnerOptions |= (noLbOutputPs | noLbOutputMe); + + /* + * Setting Node lbffIrWithGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrWithGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrWithGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsIrWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrWithTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( + subGraphLinks[22]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsIrWithTnrInnerOptions |= noMp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrWithGmvInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffIrWithGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffIrWithGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); + lbffIrWithGmvIrStreamOuterNode->setInnerNode(lbffIrWithGmvIrStreamInnerOptions); + bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input + subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[12]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[13]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[14]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[15]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[22]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + + /* + * Link enablement by private inner options + */ + subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noIr); // lbff_RgbIr_WithGmv:terminal_connect_ir_output -> lbff_Ir_WithGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[16]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_WithGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[17]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_WithGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 23; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[9]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input + subGraphLinks[18]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[19]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[20]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[21]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus image_irSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + + /* + * Setting Node lbffRgbIrWithGmv initial inner node configuration + */ + InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = None; + // combine inner options for the node common sub graphs + lbffRgbIrWithGmvInnerOptions |= imagePublicInnerNodeConfiguration; + lbffRgbIrWithGmvInnerOptions |= irPublicInnerNodeConfiguration; + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + + /* + * Setting Node lbffIrWithGmvIrStream initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrWithGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + lbffIrWithGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsIrWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; + // always active public inner options + bbpsIrWithTnrInnerOptions |= (noDp); + // active public options according to sink mapping + if ( + subGraphLinks[33]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsIrWithTnrInnerOptions |= noMp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffRgbIrWithGmvInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); + lbffRgbIrWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffRgbIrWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffIrWithGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffIrWithGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf2OuterNode->setInnerNode(lbffBayerPdaf2InnerOptions); + lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffIrWithGmvIrStreamOuterNode->setInnerNode(lbffIrWithGmvIrStreamInnerOptions); + bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffBayerPdaf2InnerOptions & no3A); // lbff_Bayer_Pdaf2:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[3]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input + subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[23]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_ae_output -> ir_ae_out + subGraphLinks[24]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out + subGraphLinks[25]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out + subGraphLinks[26]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out + subGraphLinks[33]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[11]->isActive = !(lbffBayerPdaf2InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf2:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[9]->isActive = !(lbffBayerPdaf2InnerOptions & noPdaf); // lbff_Bayer_Pdaf2:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[22]->isActive = !(lbffRgbIrWithGmvInnerOptions & noIr); // lbff_RgbIr_WithGmv:terminal_connect_ir_output -> lbff_Ir_WithGmv_IrStream:terminal_connect_main_data_input + subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputPs); // lbff_RgbIr_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputMe); // lbff_RgbIr_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[27]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_WithGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[28]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_WithGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 18; i++) + for (uint32_t i = 0; i < 34; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -13950,43 +18839,52 @@ StaticGraphStatus imageSubGraphTopology100029::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ + subGraphLinks[8]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[29]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[30]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[31]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[32]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100030 + * Graph 100040 */ -StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100030, selectedSettingsId, zoomKeyResolutions), +StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100040, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100030[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100040[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsWithGmvOuterNodeConfiguration** lbffDol2InputsWithGmvOuterNodeConfigurationOptions = new LbffDol2InputsWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDol2InputsWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsWithGmvOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsWithGmvOuterNode.Init(lbffDol2InputsWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDol2InputsWithGmvOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -13995,81 +18893,114 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; + link->dest = GraphElementType::LbffDol2InputsWithGmv; + link->destNode = &_lbffDol2InputsWithGmvOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; + link->dest = GraphElementType::LbffDol2InputsWithGmv; + link->destNode = &_lbffDol2InputsWithGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol2InputsWithGmv; + link->destNode = &_lbffDol2InputsWithGmvOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::PdafOut; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffDol2InputsWithGmv; + link->destNode = &_lbffDol2InputsWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::LbffDol2InputsWithGmv; + link->srcNode = &_lbffDol2InputsWithGmvOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[10]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -14079,7 +19010,7 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[11]; + link = &_graphLinks[15]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -14089,7 +19020,7 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[12]; + link = &_graphLinks[16]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -14098,7 +19029,7 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[13]; + link = &_graphLinks[17]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -14108,21 +19039,46 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[14]; + link = &_graphLinks[18]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[15]; + link = &_graphLinks[19]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 16; ++i) + link = &_graphLinks[20]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[21]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -14142,17 +19098,19 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDol2InputsWithGmvOuterNode = &_lbffDol2InputsWithGmvOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDol2InputsWithGmvOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -14161,15 +19119,15 @@ StaticGraph100030::StaticGraph100030(GraphConfiguration100030** selectedGraphCon } } -StaticGraphStatus StaticGraph100030::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol2InputsWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -14179,16 +19137,21 @@ StaticGraphStatus StaticGraph100030::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraph100030::~StaticGraph100030() +StaticGraph100040::~StaticGraph100040() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -14197,11 +19160,11 @@ StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf3 initial inner node configuration + * Setting Node lbffDol2InputsWithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsWithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr); + lbffDol2InputsWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -14210,13 +19173,15 @@ StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[21]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -14225,37 +19190,41 @@ StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerPdaf3InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); + lbffDol2InputsWithGmvOuterNode->setInnerNode(lbffDol2InputsWithGmvInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[5]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[10]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[11]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[9]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[12]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noLbOutputPs); // lbff_Dol2Inputs_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[13]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noLbOutputMe); // lbff_Dol2Inputs_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 16; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -14266,43 +19235,52 @@ StaticGraphStatus imageSubGraphTopology100030::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[10]->isActive = (lbffDol2InputsWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100031 + * Graph 100041 */ -StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100031, selectedSettingsId, zoomKeyResolutions), +StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100041, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100031[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100041[kernelConfigurationsOptionsCount]; IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol2InputsOuterNodeConfiguration** lbffDol2InputsOuterNodeConfigurationOptions = new LbffDol2InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsWithGmvOuterNodeConfiguration** lbffDol3InputsWithGmvOuterNodeConfigurationOptions = new LbffDol3InputsWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDol2InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsOuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsWithGmvOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol2InputsOuterNode.Init(lbffDol2InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsWithGmvOuterNode.Init(lbffDol3InputsWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDol2InputsOuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsWithGmvOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -14324,18 +19302,20 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; link = &_graphLinks[3]; link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; @@ -14343,70 +19323,176 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; link->destTerminalId = 6; link->type = LinkType::Node2Node; link = &_graphLinks[5]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 21; link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[11]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[15]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[19]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[20]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; + link = &_graphLinks[21]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 13; ++i) + link = &_graphLinks[22]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[23]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[24]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 25; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -14427,16 +19513,20 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDol2InputsOuterNode = &_lbffDol2InputsOuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsWithGmvOuterNode = &_lbffDol3InputsWithGmvOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDol2InputsOuterNode->contextId = 1; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsWithGmvOuterNode->contextId = 2; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swGdcOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -14445,7 +19535,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon } } -StaticGraphStatus StaticGraph100031::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100041::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -14453,12 +19543,22 @@ StaticGraphStatus StaticGraph100031::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffDol2InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol3InputsWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -14466,13 +19566,13 @@ StaticGraphStatus StaticGraph100031::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100031::~StaticGraph100031() +StaticGraph100041::~StaticGraph100041() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -14481,65 +19581,71 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol2Inputs initial inner node configuration + * Setting Node lbffDol3InputsWithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffDol2InputsInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol3InputsWithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol2InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + lbffDol3InputsWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); // active public options according to sink mapping - // always active private inner options - lbffDol2InputsInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsNoTnr initial inner node configuration + * Setting Node bbpsWithTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[11]->linkConfiguration->bufferSize == 0 && + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && + subGraphLinks[22]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noMp; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[12]->linkConfiguration->bufferSize == 0 && + subGraphLinks[21]->linkConfiguration->bufferSize == 0 && + subGraphLinks[23]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noDp; + bbpsWithTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffDol2InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol2InputsOuterNode->setInnerNode(lbffDol2InputsInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffDol3InputsWithGmvOuterNode->setInnerNode(lbffDol3InputsWithGmvInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[7]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[12]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[13]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[22]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[23]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputPs); // lbff_Dol2Inputs:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[14]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputPs); // lbff_Dol3Inputs_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[15]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputMe); // lbff_Dol3Inputs_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 13; i++) + for (uint32_t i = 0; i < 25; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -14547,38 +19653,55 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[12]->isActive = (lbffDol3InputsWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[18]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[19]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100032 + * Graph 100042 */ -StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100032, selectedSettingsId, zoomKeyResolutions), +StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100042, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100032[kernelConfigurationsOptionsCount]; - IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol2InputsOuterNodeConfiguration** lbffDol2InputsOuterNodeConfigurationOptions = new LbffDol2InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100042[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDol2InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsOuterNodeConfiguration; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol2InputsOuterNode.Init(lbffDol2InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDol2InputsOuterNodeConfigurationOptions; + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -14587,97 +19710,81 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::SensorDolLongExposure; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; - link->destTerminalId = 4; - link->type = LinkType::Source2Node; - - link = &_graphLinks[2]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - link = &_graphLinks[3]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; + link->dest = GraphElementType::LbffBayerPdaf3; + link->destNode = &_lbffBayerPdaf3OuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[4]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol2Inputs; - link->destNode = &_lbffDol2InputsOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Node; - - link = &_graphLinks[5]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::PdafOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[11]; - link->src = GraphElementType::LbffDol2Inputs; - link->srcNode = &_lbffDol2InputsOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayerPdaf3; + link->srcNode = &_lbffBayerPdaf3OuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[12]; + link = &_graphLinks[10]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -14687,7 +19794,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[13]; + link = &_graphLinks[11]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -14697,7 +19804,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[14]; + link = &_graphLinks[12]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -14706,7 +19813,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[15]; + link = &_graphLinks[13]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -14716,21 +19823,62 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[16]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[17]; + link = &_graphLinks[15]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 18; ++i) + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -14750,17 +19898,21 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDol2InputsOuterNode = &_lbffDol2InputsOuterNode; + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDol2InputsOuterNode->contextId = 1; + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -14769,15 +19921,15 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon } } -StaticGraphStatus StaticGraph100032::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100042::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffDol2InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -14787,16 +19939,26 @@ StaticGraphStatus StaticGraph100032::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraph100032::~StaticGraph100032() +StaticGraph100042::~StaticGraph100042() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -14805,11 +19967,11 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol2Inputs initial inner node configuration + * Setting Node lbffBayerPdaf3 initial inner node configuration */ - InnerNodeOptionsFlags lbffDol2InputsInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol2InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr); // active public options according to sink mapping /* @@ -14818,12 +19980,14 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && subGraphLinks[17]->linkConfiguration->bufferSize == 0 && true) { @@ -14833,37 +19997,39 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffDol2InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffDol2InputsInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerPdaf3InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol2InputsOuterNode->setInnerNode(lbffDol2InputsInnerOptions); + lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(lbffDol2InputsInnerOptions & no3A); // lbff_Dol2Inputs:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputPs); // lbff_Dol2Inputs:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[11]->isActive = !(lbffDol2InputsInnerOptions & noLbOutputMe); // lbff_Dol2Inputs:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 18; i++) + for (uint32_t i = 0; i < 21; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -14874,47 +20040,55 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100033 + * Graph 100044 */ -StaticGraph100033::StaticGraph100033(GraphConfiguration100033** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100033, selectedSettingsId, zoomKeyResolutions), +StaticGraph100044::StaticGraph100044(GraphConfiguration100044** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100044, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100033[kernelConfigurationsOptionsCount]; - IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol3InputsOuterNodeConfiguration** lbffDol3InputsOuterNodeConfigurationOptions = new LbffDol3InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100044[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwB2bOuterNodeConfiguration** swB2bOuterNodeConfigurationOptions = new SwB2bOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwImvOuterNodeConfiguration** swImvOuterNodeConfigurationOptions = new SwImvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; - lbffDol3InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsOuterNodeConfiguration; - bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + swB2bOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swB2bOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swImvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swImvOuterNodeConfiguration; } - _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol3InputsOuterNode.Init(lbffDol3InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swB2bOuterNode.Init(swB2bOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swImvOuterNode.Init(swImvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDolSmoothOuterNodeConfigurationOptions; - delete[] lbffDol3InputsOuterNodeConfigurationOptions; - delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] isysOuterNodeConfigurationOptions; + delete[] swB2bOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swImvOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -14923,120 +20097,186 @@ StaticGraph100033::StaticGraph100033(GraphConfiguration100033** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::SensorDolLongExposure; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; - link->destTerminalId = 4; - link->type = LinkType::Source2Node; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::SwB2b; + link->destNode = &_swB2bOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; link = &_graphLinks[2]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; + link->src = GraphElementType::SwB2b; + link->srcNode = &_swB2bOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDolSmooth; - link->destNode = &_lbffDolSmoothOuterNode; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; link = &_graphLinks[4]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 6; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[5]; - link->src = GraphElementType::LbffDolSmooth; - link->srcNode = &_lbffDolSmoothOuterNode; - link->srcTerminalId = 17; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[6]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 18; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + link = &_graphLinks[11]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; - link->type = LinkType::Node2Sink; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; link = &_graphLinks[12]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsNoTnr; - link->destNode = &_bbpsNoTnrOuterNode; - link->destTerminalId = 9; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; + link = &_graphLinks[19]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; + link = &_graphLinks[21]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::ProcessedSecondary; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 15; ++i) + for (uint8_t i = 0; i < 22; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -15056,19 +20296,23 @@ StaticGraph100033::StaticGraph100033(GraphConfiguration100033** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; - _imageSubGraph.lbffDol3InputsOuterNode = &_lbffDol3InputsOuterNode; - _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.swB2bOuterNode = &_swB2bOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swImvOuterNode = &_swImvOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; - _imageSubGraph.lbffDol3InputsOuterNode->contextId = 2; - _imageSubGraph.bbpsNoTnrOuterNode->contextId = 3; + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.swB2bOuterNode->contextId = 1; + _imageSubGraph.lbffBayerOuterNode->contextId = 2; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 4; + _imageSubGraph.swImvOuterNode->contextId = 5; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -15077,25 +20321,35 @@ StaticGraph100033::StaticGraph100033(GraphConfiguration100033** selectedGraphCon } } -StaticGraphStatus StaticGraph100033::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100044::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swB2bOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffDol3InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swImvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -15103,13 +20357,13 @@ StaticGraphStatus StaticGraph100033::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100033::~StaticGraph100033() +StaticGraph100044::~StaticGraph100044() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100033::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100044::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -15118,65 +20372,68 @@ StaticGraphStatus imageSubGraphTopology100033::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol3Inputs initial inner node configuration + * Setting Node lbffBayer initial inner node configuration */ - InnerNodeOptionsFlags lbffDol3InputsInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol3InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping - // always active private inner options - lbffDol3InputsInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsNoTnr initial inner node configuration + * Setting Node bbpsWithTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noMp; + bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { - bbpsNoTnrInnerOptions |= noDp; + bbpsWithTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffDol3InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol3InputsOuterNode->setInnerNode(lbffDol3InputsInnerOptions); - bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[7]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_ae_output -> ae_out - subGraphLinks[8]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_af_std_output -> af_std_out - subGraphLinks[9]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[10]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[11]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[12]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputPs); // lbff_Dol3Inputs:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[10]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 15; i++) + for (uint32_t i = 0; i < 22; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -15184,42 +20441,54 @@ StaticGraphStatus imageSubGraphTopology100033::configInnerNodes(SubGraphInnerNod } } + /* + * Link enablement by inner options combinations + */ + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + return StaticGraphStatus::SG_OK; } /* - * Graph 100034 + * Graph 100050 */ -StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100034, selectedSettingsId, zoomKeyResolutions), +StaticGraph100050::StaticGraph100050(GraphConfiguration100050** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100050, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100034[kernelConfigurationsOptionsCount]; - IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol3InputsOuterNodeConfiguration** lbffDol3InputsOuterNodeConfigurationOptions = new LbffDol3InputsOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100050[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwRemosaicOuterNodeConfiguration** swRemosaicOuterNodeConfigurationOptions = new SwRemosaicOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwImvOuterNodeConfiguration** swImvOuterNodeConfigurationOptions = new SwImvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; - lbffDol3InputsOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsOuterNodeConfiguration; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + swRemosaicOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swRemosaicOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swImvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swImvOuterNodeConfiguration; } - _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol3InputsOuterNode.Init(lbffDol3InputsOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swRemosaicOuterNode.Init(swRemosaicOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swImvOuterNode.Init(swImvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDolSmoothOuterNodeConfigurationOptions; - delete[] lbffDol3InputsOuterNodeConfigurationOptions; + delete[] isysOuterNodeConfigurationOptions; + delete[] swRemosaicOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swImvOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -15228,115 +20497,83 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::SensorDolLongExposure; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; - link->destTerminalId = 4; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 8; link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDolSmooth; - link->destNode = &_lbffDolSmoothOuterNode; - link->destTerminalId = 5; + link->dest = GraphElementType::SwRemosaic; + link->destNode = &_swRemosaicOuterNode; + link->destTerminalId = 0; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; + link->src = GraphElementType::SwRemosaic; + link->srcNode = &_swRemosaicOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[4]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Node; - - link = &_graphLinks[5]; - link->src = GraphElementType::LbffDolSmooth; - link->srcNode = &_lbffDolSmoothOuterNode; - link->srcTerminalId = 17; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[6]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol3Inputs; - link->destNode = &_lbffDol3InputsOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[11]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[12]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[13]; - link->src = GraphElementType::LbffDol3Inputs; - link->srcNode = &_lbffDol3InputsOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[14]; + link = &_graphLinks[10]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -15346,7 +20583,7 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[15]; + link = &_graphLinks[11]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -15356,7 +20593,7 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[16]; + link = &_graphLinks[12]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -15365,7 +20602,7 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[17]; + link = &_graphLinks[13]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -15375,20 +20612,52 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[18]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[19]; + link = &_graphLinks[15]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + for (uint8_t i = 0; i < 20; ++i) { // apply link configuration. select configuration with maximal size @@ -15409,19 +20678,21 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; - _imageSubGraph.lbffDol3InputsOuterNode = &_lbffDol3InputsOuterNode; + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.swRemosaicOuterNode = &_swRemosaicOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swImvOuterNode = &_swImvOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; - _imageSubGraph.lbffDol3InputsOuterNode->contextId = 2; + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.swRemosaicOuterNode->contextId = 2; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swImvOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -15430,20 +20701,20 @@ StaticGraph100034::StaticGraph100034(GraphConfiguration100034** selectedGraphCon } } -StaticGraphStatus StaticGraph100034::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100050::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swRemosaicOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffDol3InputsOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -15453,16 +20724,21 @@ StaticGraphStatus StaticGraph100034::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swImvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraph100034::~StaticGraph100034() +StaticGraph100050::~StaticGraph100050() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100050::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -15471,11 +20747,11 @@ StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol3Inputs initial inner node configuration + * Setting Node lbffBayer initial inner node configuration */ - InnerNodeOptionsFlags lbffDol3InputsInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol3InputsInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -15484,13 +20760,15 @@ StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -15499,31 +20777,32 @@ StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffDol3InputsInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffDol3InputsInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol3InputsOuterNode->setInnerNode(lbffDol3InputsInnerOptions); + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[7]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_ae_output -> ae_out - subGraphLinks[8]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_af_std_output -> af_std_out - subGraphLinks[9]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[10]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[11]->isActive = !(lbffDol3InputsInnerOptions & no3A); // lbff_Dol3Inputs:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_imv:terminal_connect_input + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_imv:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[12]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputPs); // lbff_Dol3Inputs:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[13]->isActive = !(lbffDol3InputsInnerOptions & noLbOutputMe); // lbff_Dol3Inputs:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[9]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size @@ -15540,247 +20819,51 @@ StaticGraphStatus imageSubGraphTopology100034::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - - return StaticGraphStatus::SG_OK; -} - -/* - * Graph 100035 - */ -StaticGraph100035::StaticGraph100035(GraphConfiguration100035** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100035, selectedSettingsId, zoomKeyResolutions), - - _rawSubGraph(_sinkMappingConfiguration) -{ - // Construct outer nodes - _graphConfigurations = new GraphConfiguration100035[kernelConfigurationsOptionsCount]; - IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - - for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) - { - _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - } - - _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - - delete[] isysDolOuterNodeConfigurationOptions; - - // Use default configuration - updateConfiguration(0); - - // Declare all the links in the graph - GraphLink* link = nullptr; - link = &_graphLinks[0]; - link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; - link->destTerminalId = 0; - link->type = LinkType::Source2Node; - - link = &_graphLinks[1]; - link->src = GraphElementType::SensorDolLongExposure; - link->dest = GraphElementType::IsysDol; - link->destNode = &_isysDolOuterNode; - link->destTerminalId = 4; - link->type = LinkType::Source2Node; - - link = &_graphLinks[2]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::RawIsys; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[3]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 5; - link->dest = GraphElementType::RawIsysDolLong; - link->type = LinkType::Node2Sink; - - for (uint8_t i = 0; i < 4; ++i) - { - // apply link configuration. select configuration with maximal size - uint32_t selectedLinkConfig = 0; - uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; - for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) - { - if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) - { - maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; - selectedLinkConfig = j; - } - } - _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - - // Assign link to sub-graph - _rawSubGraph.links[i] = &_graphLinks[i]; - } - - // add nodes for sub graph - _rawSubGraph.isysDolOuterNode = &_isysDolOuterNode; - - // choose the selected sub graph - _selectedGraphTopology = &_rawSubGraph; - - // logical node IDs - _rawSubGraph.isysDolOuterNode->contextId = 0; -} - -StaticGraphStatus StaticGraph100035::updateConfiguration(uint32_t selectedIndex) -{ - StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - return StaticGraphStatus::SG_OK; -} - -StaticGraph100035::~StaticGraph100035() -{ - delete[] _graphConfigurations; - delete _zoomKeyResolutions.zoomKeyResolutionOptions; -} -/* - * Graph 100036 - */ -StaticGraph100036::StaticGraph100036(GraphConfiguration100036** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100036, selectedSettingsId, zoomKeyResolutions), - - _rawSubGraph(_sinkMappingConfiguration) -{ - // Construct outer nodes - _graphConfigurations = new GraphConfiguration100036[kernelConfigurationsOptionsCount]; - IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - - for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) - { - _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; - } - - _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - - delete[] isysPdaf2OuterNodeConfigurationOptions; - - // Use default configuration - updateConfiguration(0); - - // Declare all the links in the graph - GraphLink* link = nullptr; - link = &_graphLinks[0]; - link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; - link->destTerminalId = 0; - link->type = LinkType::Source2Node; - - link = &_graphLinks[1]; - link->src = GraphElementType::PdafBuffer; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; - link->destTerminalId = 2; - link->type = LinkType::Source2Node; - - link = &_graphLinks[2]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::RawIsys; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[3]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; - link->srcTerminalId = 3; - link->dest = GraphElementType::RawIsysPdaf; - link->type = LinkType::Node2Sink; - - for (uint8_t i = 0; i < 4; ++i) - { - // apply link configuration. select configuration with maximal size - uint32_t selectedLinkConfig = 0; - uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; - for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) - { - if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) - { - maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; - selectedLinkConfig = j; - } - } - _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - - // Assign link to sub-graph - _rawSubGraph.links[i] = &_graphLinks[i]; - } - - // add nodes for sub graph - _rawSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; - - // choose the selected sub graph - _selectedGraphTopology = &_rawSubGraph; - - // logical node IDs - _rawSubGraph.isysPdaf2OuterNode->contextId = 0; -} + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd -StaticGraphStatus StaticGraph100036::updateConfiguration(uint32_t selectedIndex) -{ - StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } return StaticGraphStatus::SG_OK; } -StaticGraph100036::~StaticGraph100036() -{ - delete[] _graphConfigurations; - delete _zoomKeyResolutions.zoomKeyResolutionOptions; -} /* - * Graph 100037 + * Graph 100051 */ -StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100037, selectedSettingsId, zoomKeyResolutions), +StaticGraph100051::StaticGraph100051(GraphConfiguration100051** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100051, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100037[kernelConfigurationsOptionsCount]; - IsysPdaf2OuterNodeConfiguration** isysPdaf2OuterNodeConfigurationOptions = new IsysPdaf2OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf2WithGmvOuterNodeConfiguration** lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions = new LbffBayerPdaf2WithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100051[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwImvOuterNodeConfiguration** swImvOuterNodeConfigurationOptions = new SwImvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysPdaf2OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysPdaf2OuterNodeConfiguration; - lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf2WithGmvOuterNodeConfiguration; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swImvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swImvOuterNodeConfiguration; } - _isysPdaf2OuterNode.Init(isysPdaf2OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf2WithGmvOuterNode.Init(lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swImvOuterNode.Init(swImvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysPdaf2OuterNodeConfigurationOptions; - delete[] lbffBayerPdaf2WithGmvOuterNodeConfigurationOptions; + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swImvOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -15789,114 +20872,74 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf2WithGmv; - link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::PdafBuffer; - link->dest = GraphElementType::IsysPdaf2; - link->destNode = &_isysPdaf2OuterNode; - link->destTerminalId = 2; - link->type = LinkType::Source2Node; - - link = &_graphLinks[3]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf2WithGmv; - link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[4]; - link->src = GraphElementType::IsysPdaf2; - link->srcNode = &_isysPdaf2OuterNode; - link->srcTerminalId = 3; - link->dest = GraphElementType::LbffBayerPdaf2WithGmv; - link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::PdafOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffBayerPdaf2WithGmv; - link->destNode = &_lbffBayerPdaf2WithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[11]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[12]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[13]; - link->src = GraphElementType::LbffBayerPdaf2WithGmv; - link->srcNode = &_lbffBayerPdaf2WithGmvOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[14]; + link = &_graphLinks[9]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -15906,7 +20949,7 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[15]; + link = &_graphLinks[10]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -15916,7 +20959,7 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[16]; + link = &_graphLinks[11]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -15925,7 +20968,7 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[17]; + link = &_graphLinks[12]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -15935,46 +20978,62 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[18]; + link = &_graphLinks[13]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[19]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[20]; + link = &_graphLinks[15]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[21]; + link = &_graphLinks[16]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[22]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; + link = &_graphLinks[17]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 23; ++i) + link = &_graphLinks[19]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 20; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -15994,19 +21053,21 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysPdaf2OuterNode = &_isysPdaf2OuterNode; - _imageSubGraph.lbffBayerPdaf2WithGmvOuterNode = &_lbffBayerPdaf2WithGmvOuterNode; + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swImvOuterNode = &_swImvOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysPdaf2OuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf2WithGmvOuterNode->contextId = 1; + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swImvOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -16015,15 +21076,15 @@ StaticGraph100037::StaticGraph100037(GraphConfiguration100037** selectedGraphCon } } -StaticGraphStatus StaticGraph100037::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100051::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysPdaf2OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerPdaf2WithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -16033,7 +21094,12 @@ StaticGraphStatus StaticGraph100037::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swImvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -16041,13 +21107,13 @@ StaticGraphStatus StaticGraph100037::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100037::~StaticGraph100037() +StaticGraph100051::~StaticGraph100051() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100051::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -16056,11 +21122,11 @@ StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf2WithGmv initial inner node configuration + * Setting Node lbffBayer initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf2WithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf2WithGmvInnerOptions |= (noBurstCapture | noIr); + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -16069,15 +21135,15 @@ StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && - subGraphLinks[20]->linkConfiguration->bufferSize == 0 && + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[19]->linkConfiguration->bufferSize == 0 && - subGraphLinks[21]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -16086,41 +21152,38 @@ StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf2WithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerPdaf2WithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf2WithGmvOuterNode->setInnerNode(lbffBayerPdaf2WithGmvInnerOptions); + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[10]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_input - subGraphLinks[11]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[12]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[13]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[9]->isActive = !(lbffBayerPdaf2WithGmvInnerOptions & noPdaf); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 23; i++) + for (uint32_t i = 0; i < 20; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -16131,48 +21194,51 @@ StaticGraphStatus imageSubGraphTopology100037::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[10]->isActive = (lbffBayerPdaf2WithGmvInnerOptions & (noGmv|noBurstCapture|noIr)) != (noGmv|noBurstCapture|noIr); // lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf2_WithGmv:terminal_connect_gmv_input - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100038 + * Graph 100052 */ -StaticGraph100038::StaticGraph100038(GraphConfiguration100038** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100038, selectedSettingsId, zoomKeyResolutions), +StaticGraph100052::StaticGraph100052(GraphConfiguration100052** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100052, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100038[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf3WithGmvOuterNodeConfiguration** lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions = new LbffBayerPdaf3WithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100052[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsBayerStatOuterNodeConfiguration** lbffDol2InputsBayerStatOuterNodeConfigurationOptions = new LbffDol2InputsBayerStatOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) - { - _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3WithGmvOuterNodeConfiguration; - bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDol2InputsBayerStatOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsBayerStatOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf3WithGmvOuterNode.Init(lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsBayerStatOuterNode.Init(lbffDol2InputsBayerStatOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerPdaf3WithGmvOuterNodeConfigurationOptions; - delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDol2InputsBayerStatOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -16181,176 +21247,143 @@ StaticGraph100038::StaticGraph100038(GraphConfiguration100038** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf3WithGmv; - link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf3WithGmv; - link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::PdafOut; - link->type = LinkType::Node2Sink; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffBayerPdaf3WithGmv; - link->destNode = &_lbffBayerPdaf3WithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; link = &_graphLinks[10]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; link = &_graphLinks[11]; - link->src = GraphElementType::LbffBayerPdaf3WithGmv; - link->srcNode = &_lbffBayerPdaf3WithGmvOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[12]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[17]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[18]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[19]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[20]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; + link = &_graphLinks[15]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 21; ++i) + link = &_graphLinks[16]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 18; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -16370,19 +21403,21 @@ StaticGraph100038::StaticGraph100038(GraphConfiguration100038** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerPdaf3WithGmvOuterNode = &_lbffBayerPdaf3WithGmvOuterNode; - _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDol2InputsBayerStatOuterNode = &_lbffDol2InputsBayerStatOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf3WithGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDol2InputsBayerStatOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -16391,25 +21426,30 @@ StaticGraph100038::StaticGraph100038(GraphConfiguration100038** selectedGraphCon } } -StaticGraphStatus StaticGraph100038::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100052::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerPdaf3WithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol2InputsBayerStatOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -16417,13 +21457,13 @@ StaticGraphStatus StaticGraph100038::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100038::~StaticGraph100038() +StaticGraph100052::~StaticGraph100052() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100038::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100052::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -16432,71 +21472,69 @@ StaticGraphStatus imageSubGraphTopology100038::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf3WithGmv initial inner node configuration + * Setting Node lbffDol2InputsBayerStat initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf3WithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsBayerStatInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf3WithGmvInnerOptions |= (noBurstCapture | noIr); + lbffDol2InputsBayerStatInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); // active public options according to sink mapping + // always active private inner options + lbffDol2InputsBayerStatInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[11]->linkConfiguration->bufferSize == 0 && + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noMp; } if ( - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && - subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[12]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsNoTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf3WithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerPdaf3WithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - - /* - * Set the selected inner nodes to the outer nodes - */ - lbffBayerPdaf3WithGmvOuterNode->setInnerNode(lbffBayerPdaf3WithGmvInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + lbffDol2InputsBayerStatInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* - * Link enablement by public inner options - */ - subGraphLinks[3]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & no3A); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[8]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_input - subGraphLinks[9]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noGmv); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + * Set the selected inner nodes to the outer nodes + */ + lbffDol2InputsBayerStatOuterNode->setInnerNode(lbffDol2InputsBayerStatInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[5]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[11]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[7]->isActive = !(lbffBayerPdaf3WithGmvInnerOptions & noPdaf); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[10]->isActive = !(lbffDol2InputsBayerStatInnerOptions & noLbOutputPs); // lbff_Dol2Inputs_BayerStat:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 21; i++) + for (uint32_t i = 0; i < 18; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -16504,61 +21542,46 @@ StaticGraphStatus imageSubGraphTopology100038::configInnerNodes(SubGraphInnerNod } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[8]->isActive = (lbffBayerPdaf3WithGmvInnerOptions & (noGmv|noBurstCapture|noIr)) != (noGmv|noBurstCapture|noIr); // lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_feature_output -> lbff_Bayer_Pdaf3_WithGmv:terminal_connect_gmv_input - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - return StaticGraphStatus::SG_OK; } /* - * Graph 100039 + * Graph 100053 */ -StaticGraph100039::StaticGraph100039(GraphConfiguration100039** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100039, selectedSettingsId, zoomKeyResolutions), +StaticGraph100053::StaticGraph100053(GraphConfiguration100053** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100053, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) - ,_irSubGraph(_sinkMappingConfiguration) - ,_image_irSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100039[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffRgbIrWithGmvOuterNodeConfiguration** lbffRgbIrWithGmvOuterNodeConfigurationOptions = new LbffRgbIrWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100053[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsBayerStatOuterNodeConfiguration** lbffDol2InputsBayerStatOuterNodeConfigurationOptions = new LbffDol2InputsBayerStatOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffIrWithGmvIrStreamOuterNodeConfiguration** lbffIrWithGmvIrStreamOuterNodeConfigurationOptions = new LbffIrWithGmvIrStreamOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - BbpsIrWithTnrOuterNodeConfiguration** bbpsIrWithTnrOuterNodeConfigurationOptions = new BbpsIrWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffRgbIrWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffRgbIrWithGmvOuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDol2InputsBayerStatOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsBayerStatOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - lbffIrWithGmvIrStreamOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrWithGmvIrStreamOuterNodeConfiguration; - bbpsIrWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsIrWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffRgbIrWithGmvOuterNode.Init(lbffRgbIrWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsBayerStatOuterNode.Init(lbffDol2InputsBayerStatOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffIrWithGmvIrStreamOuterNode.Init(lbffIrWithGmvIrStreamOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _bbpsIrWithTnrOuterNode.Init(bbpsIrWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffRgbIrWithGmvOuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDol2InputsBayerStatOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] lbffIrWithGmvIrStreamOuterNodeConfigurationOptions; - delete[] bbpsIrWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -16567,362 +21590,191 @@ StaticGraph100039::StaticGraph100039(GraphConfiguration100039** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; - _imageSubGraph.links[0] = link; - _irSubGraph.links[0] = link; - _image_irSubGraph.links[0] = link; link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffRgbIrWithGmv; - link->destNode = &_lbffRgbIrWithGmvOuterNode; - link->destTerminalId = 8; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; link->type = LinkType::Source2Node; - _imageSubGraph.links[1] = link; - _irSubGraph.links[1] = link; - _image_irSubGraph.links[1] = link; link = &_graphLinks[2]; - link->src = GraphElementType::LscBufferIr; - link->dest = GraphElementType::LbffIrWithGmvIrStream; - link->destNode = &_lbffIrWithGmvIrStreamOuterNode; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; link->destTerminalId = 8; link->type = LinkType::Source2Node; - _irSubGraph.links[2] = link; - _image_irSubGraph.links[21] = link; link = &_graphLinks[3]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffRgbIrWithGmv; - link->destNode = &_lbffRgbIrWithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; - _imageSubGraph.links[2] = link; - _irSubGraph.links[3] = link; - _image_irSubGraph.links[2] = link; link = &_graphLinks[4]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[3] = link; - _irSubGraph.links[4] = link; - _image_irSubGraph.links[3] = link; - - link = &_graphLinks[5]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[4] = link; - _irSubGraph.links[5] = link; - _image_irSubGraph.links[4] = link; - - link = &_graphLinks[6]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[5] = link; - _irSubGraph.links[6] = link; - _image_irSubGraph.links[5] = link; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[6] = link; - _irSubGraph.links[7] = link; - _image_irSubGraph.links[6] = link; - - link = &_graphLinks[8]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[7] = link; - _irSubGraph.links[8] = link; - _image_irSubGraph.links[7] = link; - - link = &_graphLinks[9]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffRgbIrWithGmv; - link->destNode = &_lbffRgbIrWithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[8] = link; - _irSubGraph.links[9] = link; - _image_irSubGraph.links[8] = link; - - link = &_graphLinks[10]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[9] = link; - _irSubGraph.links[10] = link; - _image_irSubGraph.links[9] = link; - - link = &_graphLinks[11]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 9; - link->type = LinkType::Node2Node; - _imageSubGraph.links[10] = link; - _image_irSubGraph.links[10] = link; - - link = &_graphLinks[12]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - _imageSubGraph.links[11] = link; - _image_irSubGraph.links[11] = link; - - link = &_graphLinks[13]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 10; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[12] = link; - _image_irSubGraph.links[12] = link; - - link = &_graphLinks[14]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[13] = link; - _image_irSubGraph.links[13] = link; - - link = &_graphLinks[15]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 11; - link->type = LinkType::Node2Self; - _imageSubGraph.links[14] = link; - _image_irSubGraph.links[14] = link; - - link = &_graphLinks[16]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsWithTnr; - link->destNode = &_bbpsWithTnrOuterNode; - link->destTerminalId = 6; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; - _imageSubGraph.links[15] = link; - _image_irSubGraph.links[15] = link; - - link = &_graphLinks[17]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::ImageMp; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[16] = link; - _image_irSubGraph.links[16] = link; - - link = &_graphLinks[18]; - link->src = GraphElementType::BbpsWithTnr; - link->srcNode = &_bbpsWithTnrOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::ImageDp; - link->type = LinkType::Node2Sink; - _imageSubGraph.links[17] = link; - _image_irSubGraph.links[17] = link; - - link = &_graphLinks[19]; - link->src = GraphElementType::LbffRgbIrWithGmv; - link->srcNode = &_lbffRgbIrWithGmvOuterNode; - link->srcTerminalId = 15; - link->dest = GraphElementType::LbffIrWithGmvIrStream; - link->destNode = &_lbffIrWithGmvIrStreamOuterNode; - link->destTerminalId = 5; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol2InputsBayerStat; + link->destNode = &_lbffDol2InputsBayerStatOuterNode; + link->destTerminalId = 6; link->type = LinkType::Node2Node; - _irSubGraph.links[11] = link; - _image_irSubGraph.links[22] = link; - link = &_graphLinks[20]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 10; - link->dest = GraphElementType::IrAeOut; + link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[12] = link; - _image_irSubGraph.links[23] = link; - link = &_graphLinks[21]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 11; - link->dest = GraphElementType::IrAfStdOut; + link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[13] = link; - _image_irSubGraph.links[24] = link; - link = &_graphLinks[22]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 12; - link->dest = GraphElementType::IrAwbStdOut; + link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[14] = link; - _image_irSubGraph.links[25] = link; - link = &_graphLinks[23]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 13; - link->dest = GraphElementType::IrAwbSatOut; + link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - _irSubGraph.links[15] = link; - _image_irSubGraph.links[26] = link; - link = &_graphLinks[24]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 19; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - _irSubGraph.links[16] = link; - _image_irSubGraph.links[27] = link; - link = &_graphLinks[25]; - link->src = GraphElementType::LbffIrWithGmvIrStream; - link->srcNode = &_lbffIrWithGmvIrStreamOuterNode; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol2InputsBayerStat; + link->srcNode = &_lbffDol2InputsBayerStatOuterNode; link->srcTerminalId = 18; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - _irSubGraph.links[17] = link; - _image_irSubGraph.links[28] = link; - link = &_graphLinks[26]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 10; link->type = LinkType::Node2Self; link->frameDelay = 1U; - _irSubGraph.links[18] = link; - _image_irSubGraph.links[29] = link; - link = &_graphLinks[27]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Self; link->frameDelay = 1U; - _irSubGraph.links[19] = link; - _image_irSubGraph.links[30] = link; - link = &_graphLinks[28]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 11; link->type = LinkType::Node2Self; - _irSubGraph.links[20] = link; - _image_irSubGraph.links[31] = link; - link = &_graphLinks[29]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; - link->dest = GraphElementType::BbpsIrWithTnr; - link->destNode = &_bbpsIrWithTnrOuterNode; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 6; link->type = LinkType::Node2Self; link->frameDelay = 1U; - _irSubGraph.links[21] = link; - _image_irSubGraph.links[32] = link; - link = &_graphLinks[30]; - link->src = GraphElementType::BbpsIrWithTnr; - link->srcNode = &_bbpsIrWithTnrOuterNode; + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::IrMp; + link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - _irSubGraph.links[22] = link; - _image_irSubGraph.links[33] = link; - link = &_graphLinks[31]; + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[18]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - _imageSubGraph.links[18] = link; - _image_irSubGraph.links[18] = link; - link = &_graphLinks[32]; + link = &_graphLinks[19]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - _imageSubGraph.links[19] = link; - _image_irSubGraph.links[19] = link; - link = &_graphLinks[33]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; + link = &_graphLinks[20]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - _imageSubGraph.links[20] = link; - _image_irSubGraph.links[20] = link; - for (uint8_t i = 0; i < 34; ++i) + link = &_graphLinks[21]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -16937,100 +21789,26 @@ StaticGraph100039::StaticGraph100039(GraphConfiguration100039** selectedGraphCon } _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDol2InputsBayerStatOuterNode = &_lbffDol2InputsBayerStatOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; - _irSubGraph.isysOuterNode = &_isysOuterNode; - _irSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; - _irSubGraph.lbffIrWithGmvIrStreamOuterNode = &_lbffIrWithGmvIrStreamOuterNode; - _irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; - _image_irSubGraph.isysOuterNode = &_isysOuterNode; - _image_irSubGraph.lbffRgbIrWithGmvOuterNode = &_lbffRgbIrWithGmvOuterNode; - _image_irSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _image_irSubGraph.swGdcOuterNode = &_swGdcOuterNode; - _image_irSubGraph.lbffIrWithGmvIrStreamOuterNode = &_lbffIrWithGmvIrStreamOuterNode; - _image_irSubGraph.bbpsIrWithTnrOuterNode = &_bbpsIrWithTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph - if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.previewIr == static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_imageSubGraph; - - // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.video == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.stills == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.thumbnail == static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_irSubGraph; - - // logical node IDs - _irSubGraph.isysOuterNode->contextId = 0; - _irSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; - _irSubGraph.lbffIrWithGmvIrStreamOuterNode->contextId = 2; - _irSubGraph.bbpsIrWithTnrOuterNode->contextId = 3; - } - else if ( - // image sink group - (_graphConfigurations[0].sinkMappingConfiguration.preview != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.video != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.postProcessingVideo != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.stills != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.thumbnail != static_cast(HwSink::Disconnected)) && - // raw sink group - (_graphConfigurations[0].sinkMappingConfiguration.raw == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawPdaf == static_cast(HwSink::Disconnected) && - _graphConfigurations[0].sinkMappingConfiguration.rawDolLong == static_cast(HwSink::Disconnected)) && - // ir sink group - (_graphConfigurations[0].sinkMappingConfiguration.videoIr != static_cast(HwSink::Disconnected) || - _graphConfigurations[0].sinkMappingConfiguration.previewIr != static_cast(HwSink::Disconnected))) - { - _selectedGraphTopology = &_image_irSubGraph; + _selectedGraphTopology = &_imageSubGraph; - // logical node IDs - _image_irSubGraph.isysOuterNode->contextId = 0; - _image_irSubGraph.lbffRgbIrWithGmvOuterNode->contextId = 1; - _image_irSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _image_irSubGraph.swGdcOuterNode->contextId = 3; - _image_irSubGraph.lbffIrWithGmvIrStreamOuterNode->contextId = 4; - _image_irSubGraph.bbpsIrWithTnrOuterNode->contextId = 5; - } - else - { - STATIC_GRAPH_LOG("Didn't found a matching sub graph for the selected virtual sinks."); - } + // logical node IDs + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDol2InputsBayerStatOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -17039,15 +21817,15 @@ StaticGraph100039::StaticGraph100039(GraphConfiguration100039** selectedGraphCon } } -StaticGraphStatus StaticGraph100039::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100053::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffRgbIrWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol2InputsBayerStatOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -17057,17 +21835,12 @@ StaticGraphStatus StaticGraph100039::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffIrWithGmvIrStreamOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _bbpsIrWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -17075,13 +21848,13 @@ StaticGraphStatus StaticGraph100039::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100039::~StaticGraph100039() +StaticGraph100053::~StaticGraph100053() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100053::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -17090,14 +21863,12 @@ StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffRgbIrWithGmv initial inner node configuration + * Setting Node lbffDol2InputsBayerStat initial inner node configuration */ - InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsBayerStatInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffRgbIrWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + lbffDol2InputsBayerStatInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping - // always active private inner options - lbffRgbIrWithGmvInnerOptions |= (noIr); /* * Setting Node bbpsWithTnr initial inner node configuration @@ -17122,41 +21893,39 @@ StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffRgbIrWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffRgbIrWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsBayerStatInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsBayerStatInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); + lbffDol2InputsBayerStatOuterNode->setInnerNode(lbffDol2InputsBayerStatInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input - subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[5]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_BayerStat:terminal_connect_awb_sve_output -> awb_sve_out subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputPs); // lbff_RgbIr_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputMe); // lbff_RgbIr_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[10]->isActive = !(lbffDol2InputsBayerStatInnerOptions & noLbOutputPs); // lbff_Dol2Inputs_BayerStat:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[11]->isActive = !(lbffDol2InputsBayerStatInnerOptions & noLbOutputMe); // lbff_Dol2Inputs_BayerStat:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 21; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -17167,7 +21936,6 @@ StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[8]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd @@ -17176,217 +21944,368 @@ StaticGraphStatus imageSubGraphTopology100039::configInnerNodes(SubGraphInnerNod return StaticGraphStatus::SG_OK; } -StaticGraphStatus irSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +/* + * Graph 100054 + */ +StaticGraph100054::StaticGraph100054(GraphConfiguration100054** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100054, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) { + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100054[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsBayerStatOuterNodeConfiguration** lbffDol3InputsBayerStatOuterNodeConfigurationOptions = new LbffDol3InputsBayerStatOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - /* - * Init sub graphs inner nodes configuration base on user request - */ - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsBayerStatOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsBayerStatOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; + } - /* - * Setting Node lbffRgbIrWithGmv initial inner node configuration - */ - InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffRgbIrWithGmvInnerOptions |= (noBurstCapture | noLbOutputPs | noLbOutputMe | noPdaf); - // active public options according to sink mapping - // always active private inner options - lbffRgbIrWithGmvInnerOptions |= (noLbOutputPs | noLbOutputMe); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsBayerStatOuterNode.Init(lbffDol3InputsBayerStatOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - /* - * Setting Node lbffIrWithGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrWithGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrWithGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); - // active public options according to sink mapping + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsBayerStatOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; - /* - * Setting Node bbpsIrWithTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - bbpsIrWithTnrInnerOptions |= (noDp); - // active public options according to sink mapping - if ( - subGraphLinks[22]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsIrWithTnrInnerOptions |= noMp; - } + // Use default configuration + updateConfiguration(0); - /* - * Configuring inner nodes according to the selected inner options - */ - lbffRgbIrWithGmvInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffIrWithGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); - lbffIrWithGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; - /* - * Set the selected inner nodes to the outer nodes - */ - lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); - lbffIrWithGmvIrStreamOuterNode->setInnerNode(lbffIrWithGmvIrStreamInnerOptions); - bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + link = &_graphLinks[1]; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; - /* - * Link enablement by public inner options - */ - subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input - subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[12]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[13]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[14]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[15]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[22]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + link = &_graphLinks[2]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; - /* - * Link enablement by private inner options - */ - subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noIr); // lbff_RgbIr_WithGmv:terminal_connect_ir_output -> lbff_Ir_WithGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[16]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_WithGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[17]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_WithGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + link = &_graphLinks[3]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 19; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; - /* - * Disable links with zero buffer size - * (used for post processing when not all links are being used) - */ - for (uint32_t i = 0; i < 23; i++) - { - if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + link = &_graphLinks[19]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 20; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) { - subGraphLinks[i]->isActive = false; + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } } - } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; - /* - * Link enablement by inner options combinations - */ - subGraphLinks[9]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input - subGraphLinks[18]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[19]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[20]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[21]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsBayerStatOuterNode = &_lbffDol3InputsBayerStatOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsBayerStatOuterNode->contextId = 2; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 4; + _imageSubGraph.swScalerOuterNode->contextId = 5; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} +StaticGraphStatus StaticGraph100054::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol3InputsBayerStatOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } -StaticGraphStatus image_irSubGraphTopology100039::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraph100054::~StaticGraph100054() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100054::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* * Init sub graphs inner nodes configuration base on user request */ InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); - InnerNodeOptionsFlags irPublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.irInnerOptions); /* - * Setting Node lbffRgbIrWithGmv initial inner node configuration + * Setting Node lbffDol3InputsBayerStat initial inner node configuration */ - InnerNodeOptionsFlags lbffRgbIrWithGmvInnerOptions = None; - // combine inner options for the node common sub graphs - lbffRgbIrWithGmvInnerOptions |= imagePublicInnerNodeConfiguration; - lbffRgbIrWithGmvInnerOptions |= irPublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol3InputsBayerStatInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffDol3InputsBayerStatInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffDol3InputsBayerStatInnerOptions |= (noLbOutputMe); /* - * Setting Node bbpsWithTnr initial inner node configuration + * Setting Node bbpsNoTnr initial inner node configuration */ - InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && - true) - { - bbpsWithTnrInnerOptions |= noMp; - } - if ( - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && - subGraphLinks[19]->linkConfiguration->bufferSize == 0 && + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && true) { - bbpsWithTnrInnerOptions |= noDp; + bbpsNoTnrInnerOptions |= noMp; } - - /* - * Setting Node lbffIrWithGmvIrStream initial inner node configuration - */ - InnerNodeOptionsFlags lbffIrWithGmvIrStreamInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - lbffIrWithGmvIrStreamInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); - // active public options according to sink mapping - - /* - * Setting Node bbpsIrWithTnr initial inner node configuration - */ - InnerNodeOptionsFlags bbpsIrWithTnrInnerOptions = irPublicInnerNodeConfiguration; - // always active public inner options - bbpsIrWithTnrInnerOptions |= (noDp); - // active public options according to sink mapping if ( - subGraphLinks[33]->linkConfiguration->bufferSize == 0 && + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { - bbpsIrWithTnrInnerOptions |= noMp; + bbpsNoTnrInnerOptions |= noDp; } /* * Configuring inner nodes according to the selected inner options */ - lbffRgbIrWithGmvInnerOptions |= noIr & (-((irPublicInnerNodeConfiguration & (no3A | noMp)) == (no3A | noMp))); - lbffRgbIrWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffRgbIrWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffIrWithGmvIrStreamInnerOptions |= noLbOutputPs & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); - lbffIrWithGmvIrStreamInnerOptions |= noLbOutputMe & (-((irPublicInnerNodeConfiguration & (noMp)) == (noMp))); + lbffDol3InputsBayerStatInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffRgbIrWithGmvOuterNode->setInnerNode(lbffRgbIrWithGmvInnerOptions); - bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); - lbffIrWithGmvIrStreamOuterNode->setInnerNode(lbffIrWithGmvIrStreamInnerOptions); - bbpsIrWithTnrOuterNode->setInnerNode(bbpsIrWithTnrInnerOptions); + lbffDol3InputsBayerStatOuterNode->setInnerNode(lbffDol3InputsBayerStatInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[7]->isActive = !(lbffRgbIrWithGmvInnerOptions & no3A); // lbff_RgbIr_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[8]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input - subGraphLinks[9]->isActive = !(lbffRgbIrWithGmvInnerOptions & noGmv); // lbff_RgbIr_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[23]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_ae_output -> ir_ae_out - subGraphLinks[24]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_af_std_output -> ir_af_std_out - subGraphLinks[25]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_std_output -> ir_awb_std_out - subGraphLinks[26]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & no3A); // lbff_Ir_WithGmv_IrStream:terminal_connect_awb_sat_output -> ir_awb_sat_out - subGraphLinks[33]->isActive = !(bbpsIrWithTnrInnerOptions & noMp); // bbps_Ir_WithTnr:bbps_ofs_mp_yuvn_odr -> ir_mp + subGraphLinks[7]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[15]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[16]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[22]->isActive = !(lbffRgbIrWithGmvInnerOptions & noIr); // lbff_RgbIr_WithGmv:terminal_connect_ir_output -> lbff_Ir_WithGmv_IrStream:terminal_connect_main_data_input - subGraphLinks[10]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputPs); // lbff_RgbIr_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[11]->isActive = !(lbffRgbIrWithGmvInnerOptions & noLbOutputMe); // lbff_RgbIr_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[27]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputPs); // lbff_Ir_WithGmv_IrStream:terminal_connect_ps_output -> bbps_Ir_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[28]->isActive = !(lbffIrWithGmvIrStreamInnerOptions & noLbOutputMe); // lbff_Ir_WithGmv_IrStream:terminal_connect_me_output -> bbps_Ir_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[12]->isActive = !(lbffDol3InputsBayerStatInnerOptions & noLbOutputPs); // lbff_Dol3Inputs_BayerStat:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 34; i++) + for (uint32_t i = 0; i < 20; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -17394,55 +22313,50 @@ StaticGraphStatus image_irSubGraphTopology100039::configInnerNodes(SubGraphInner } } - /* - * Link enablement by inner options combinations - */ - subGraphLinks[8]->isActive = (lbffRgbIrWithGmvInnerOptions & (noGmv|noBurstCapture|noPdaf)) != (noGmv|noBurstCapture|noPdaf); // lbff_RgbIr_WithGmv:terminal_connect_gmv_feature_output -> lbff_RgbIr_WithGmv:terminal_connect_gmv_input - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - subGraphLinks[29]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[30]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[31]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[32]->isActive = (bbpsIrWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_Ir_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_Ir_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd - return StaticGraphStatus::SG_OK; } /* - * Graph 100040 + * Graph 100055 */ -StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100040, selectedSettingsId, zoomKeyResolutions), +StaticGraph100055::StaticGraph100055(GraphConfiguration100055** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100055, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100040[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100055[kernelConfigurationsOptionsCount]; IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol2InputsWithGmvOuterNodeConfiguration** lbffDol2InputsWithGmvOuterNodeConfigurationOptions = new LbffDol2InputsWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsBayerStatOuterNodeConfiguration** lbffDol3InputsBayerStatOuterNodeConfigurationOptions = new LbffDol3InputsBayerStatOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDol2InputsWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsWithGmvOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsBayerStatOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsBayerStatOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol2InputsWithGmvOuterNode.Init(lbffDol2InputsWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsBayerStatOuterNode.Init(lbffDol3InputsBayerStatOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDol2InputsWithGmvOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsBayerStatOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swGdcOuterNodeConfigurationOptions; + delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -17464,18 +22378,20 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol2InputsWithGmv; - link->destNode = &_lbffDol2InputsWithGmvOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; link = &_graphLinks[3]; link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol2InputsWithGmv; - link->destNode = &_lbffDol2InputsWithGmvOuterNode; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; @@ -17483,66 +22399,65 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol2InputsWithGmv; - link->destNode = &_lbffDol2InputsWithGmvOuterNode; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; link->destTerminalId = 6; link->type = LinkType::Node2Node; link = &_graphLinks[5]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 10; - link->dest = GraphElementType::AeOut; - link->type = LinkType::Node2Sink; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; link = &_graphLinks[6]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 11; - link->dest = GraphElementType::AfStdOut; - link->type = LinkType::Node2Sink; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3InputsBayerStat; + link->destNode = &_lbffDol3InputsBayerStatOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 12; - link->dest = GraphElementType::AwbStdOut; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 10; + link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 13; - link->dest = GraphElementType::AwbSatOut; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 11; + link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 21; - link->dest = GraphElementType::AwbSveOut; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 24; - link->dest = GraphElementType::LbffDol2InputsWithGmv; - link->destNode = &_lbffDol2InputsWithGmvOuterNode; - link->destTerminalId = 20; - link->type = LinkType::Node2Self; - link->frameDelay = 1U; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; link = &_graphLinks[11]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; - link->srcTerminalId = 23; - link->dest = GraphElementType::GmvMatchOut; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; link = &_graphLinks[12]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; @@ -17550,8 +22465,8 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->type = LinkType::Node2Node; link = &_graphLinks[13]; - link->src = GraphElementType::LbffDol2InputsWithGmv; - link->srcNode = &_lbffDol2InputsWithGmvOuterNode; + link->src = GraphElementType::LbffDol3InputsBayerStat; + link->srcNode = &_lbffDol3InputsBayerStatOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; @@ -17615,8 +22530,8 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; @@ -17624,19 +22539,35 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::SwGdc; - link->destNode = &_swGdcOuterNode; + link->dest = GraphElementType::SwNntm; + link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; link = &_graphLinks[22]; - link->src = GraphElementType::SwGdc; - link->srcNode = &_swGdcOuterNode; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 23; ++i) + link = &_graphLinks[23]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[24]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 25; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -17657,18 +22588,22 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDol2InputsWithGmvOuterNode = &_lbffDol2InputsWithGmvOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsBayerStatOuterNode = &_lbffDol3InputsBayerStatOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDol2InputsWithGmvOuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsBayerStatOuterNode->contextId = 2; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swNntmOuterNode->contextId = 4; + _imageSubGraph.swScalerOuterNode->contextId = 5; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -17677,7 +22612,7 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon } } -StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100055::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -17685,7 +22620,12 @@ StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffDol2InputsWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol3InputsBayerStatOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -17695,7 +22635,12 @@ StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -17703,13 +22648,13 @@ StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100040::~StaticGraph100040() +StaticGraph100055::~StaticGraph100055() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100055::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -17718,11 +22663,11 @@ StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol2InputsWithGmv initial inner node configuration + * Setting Node lbffDol3InputsBayerStat initial inner node configuration */ - InnerNodeOptionsFlags lbffDol2InputsWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol3InputsBayerStatInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol2InputsWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + lbffDol3InputsBayerStatInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -17748,41 +22693,39 @@ StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffDol2InputsWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffDol2InputsWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsBayerStatInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsBayerStatInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol2InputsWithGmvOuterNode->setInnerNode(lbffDol2InputsWithGmvInnerOptions); + lbffDol3InputsBayerStatOuterNode->setInnerNode(lbffDol3InputsBayerStatInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[5]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[6]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[7]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[8]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[9]->isActive = !(lbffDol2InputsWithGmvInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[10]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_input - subGraphLinks[11]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[7]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsBayerStatInnerOptions & no3A); // lbff_Dol3Inputs_BayerStat:terminal_connect_awb_sve_output -> awb_sve_out subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[12]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noLbOutputPs); // lbff_Dol2Inputs_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[13]->isActive = !(lbffDol2InputsWithGmvInnerOptions & noLbOutputMe); // lbff_Dol2Inputs_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[12]->isActive = !(lbffDol3InputsBayerStatInnerOptions & noLbOutputPs); // lbff_Dol3Inputs_BayerStat:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[13]->isActive = !(lbffDol3InputsBayerStatInnerOptions & noLbOutputMe); // lbff_Dol3Inputs_BayerStat:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 23; i++) + for (uint32_t i = 0; i < 25; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -17793,7 +22736,6 @@ StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[10]->isActive = (lbffDol2InputsWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv:terminal_connect_gmv_input subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd @@ -17803,18 +22745,17 @@ StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNod } /* - * Graph 100041 + * Graph 100056 */ -StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100041, selectedSettingsId, zoomKeyResolutions), +StaticGraph100056::StaticGraph100056(GraphConfiguration100056** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100056, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100041[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100056[kernelConfigurationsOptionsCount]; IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffDol3InputsWithGmvOuterNodeConfiguration** lbffDol3InputsWithGmvOuterNodeConfigurationOptions = new LbffDol3InputsWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration** lbffDol2InputsWithGmvBayerStatOuterNodeConfigurationOptions = new LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; @@ -17822,21 +22763,18 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon { _graphConfigurations[i] = *selectedGraphConfiguration[i]; isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; - lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; - lbffDol3InputsWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsWithGmvOuterNodeConfiguration; + lbffDol2InputsWithGmvBayerStatOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol2InputsWithGmvBayerStatOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffDol3InputsWithGmvOuterNode.Init(lbffDol3InputsWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol2InputsWithGmvBayerStatOuterNode.Init(lbffDol2InputsWithGmvBayerStatOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysDolOuterNodeConfigurationOptions; - delete[] lbffDolSmoothOuterNodeConfigurationOptions; - delete[] lbffDol3InputsWithGmvOuterNodeConfigurationOptions; + delete[] lbffDol2InputsWithGmvBayerStatOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swGdcOuterNodeConfigurationOptions; @@ -17860,20 +22798,18 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::IsysDol; - link->srcNode = &_isysDolOuterNode; - link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDolSmooth; - link->destNode = &_lbffDolSmoothOuterNode; - link->destTerminalId = 5; - link->type = LinkType::Node2Node; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->destNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; link = &_graphLinks[3]; link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffDol3InputsWithGmv; - link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->destNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; @@ -17881,98 +22817,82 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->src = GraphElementType::IsysDol; link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 5; - link->dest = GraphElementType::LbffDol3InputsWithGmv; - link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->destNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->destTerminalId = 6; link->type = LinkType::Node2Node; link = &_graphLinks[5]; - link->src = GraphElementType::LbffDolSmooth; - link->srcNode = &_lbffDolSmoothOuterNode; - link->srcTerminalId = 17; - link->dest = GraphElementType::LbffDol3InputsWithGmv; - link->destNode = &_lbffDol3InputsWithGmvOuterNode; - link->destTerminalId = 7; - link->type = LinkType::Node2Node; - - link = &_graphLinks[6]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffDol3InputsWithGmv; - link->destNode = &_lbffDol3InputsWithGmvOuterNode; - link->destTerminalId = 8; - link->type = LinkType::Source2Node; - - link = &_graphLinks[7]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[6]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[10]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[11]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 21; link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[12]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 24; - link->dest = GraphElementType::LbffDol3InputsWithGmv; - link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->dest = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->destNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->destTerminalId = 20; link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[13]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 23; link->dest = GraphElementType::GmvMatchOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[14]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[15]; - link->src = GraphElementType::LbffDol3InputsWithGmv; - link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link = &_graphLinks[13]; + link->src = GraphElementType::LbffDol2InputsWithGmvBayerStat; + link->srcNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[16]; + link = &_graphLinks[14]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -17982,7 +22902,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[17]; + link = &_graphLinks[15]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -17992,7 +22912,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[18]; + link = &_graphLinks[16]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -18001,7 +22921,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[19]; + link = &_graphLinks[17]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -18011,21 +22931,21 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[20]; + link = &_graphLinks[18]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[21]; + link = &_graphLinks[19]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[22]; + link = &_graphLinks[20]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; @@ -18034,7 +22954,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[23]; + link = &_graphLinks[21]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; @@ -18043,14 +22963,14 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[24]; + link = &_graphLinks[22]; link->src = GraphElementType::SwGdc; link->srcNode = &_swGdcOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 25; ++i) + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -18071,8 +22991,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon // add nodes for sub graph _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; - _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; - _imageSubGraph.lbffDol3InputsWithGmvOuterNode = &_lbffDol3InputsWithGmvOuterNode; + _imageSubGraph.lbffDol2InputsWithGmvBayerStatOuterNode = &_lbffDol2InputsWithGmvBayerStatOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; @@ -18081,10 +23000,9 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon // logical node IDs _imageSubGraph.isysDolOuterNode->contextId = 0; - _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; - _imageSubGraph.lbffDol3InputsWithGmvOuterNode->contextId = 2; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; - _imageSubGraph.swGdcOuterNode->contextId = 4; + _imageSubGraph.lbffDol2InputsWithGmvBayerStatOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swGdcOuterNode->contextId = 3; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -18093,7 +23011,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon } } -StaticGraphStatus StaticGraph100041::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100056::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); @@ -18101,12 +23019,7 @@ StaticGraphStatus StaticGraph100041::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); - if (res != StaticGraphStatus::SG_OK) - { - return res; - } - res = _lbffDol3InputsWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDol2InputsWithGmvBayerStatOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -18124,13 +23037,13 @@ StaticGraphStatus StaticGraph100041::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100041::~StaticGraph100041() +StaticGraph100056::~StaticGraph100056() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100056::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -18139,11 +23052,11 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffDol3InputsWithGmv initial inner node configuration + * Setting Node lbffDol2InputsWithGmvBayerStat initial inner node configuration */ - InnerNodeOptionsFlags lbffDol3InputsWithGmvInnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol2InputsWithGmvBayerStatInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffDol3InputsWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); + lbffDol2InputsWithGmvBayerStatInnerOptions |= (noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -18152,15 +23065,15 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && subGraphLinks[20]->linkConfiguration->bufferSize == 0 && - subGraphLinks[22]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && subGraphLinks[21]->linkConfiguration->bufferSize == 0 && - subGraphLinks[23]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -18169,41 +23082,41 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffDol3InputsWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffDol3InputsWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsWithGmvBayerStatInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol2InputsWithGmvBayerStatInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffDol3InputsWithGmvOuterNode->setInnerNode(lbffDol3InputsWithGmvInnerOptions); + lbffDol2InputsWithGmvBayerStatOuterNode->setInnerNode(lbffDol2InputsWithGmvBayerStatInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[7]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_ae_output -> ae_out - subGraphLinks[8]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_af_std_output -> af_std_out - subGraphLinks[9]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[10]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[11]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out - subGraphLinks[12]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input - subGraphLinks[13]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out - subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[22]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input - subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[23]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[5]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_ae_output -> ae_out + subGraphLinks[6]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_af_std_output -> af_std_out + subGraphLinks[7]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[8]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[9]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & no3A); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[10]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_gmv_input + subGraphLinks[11]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & noGmv); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[14]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputPs); // lbff_Dol3Inputs_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[15]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputMe); // lbff_Dol3Inputs_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + subGraphLinks[12]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & noLbOutputPs); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[13]->isActive = !(lbffDol2InputsWithGmvBayerStatInnerOptions & noLbOutputMe); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 25; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -18214,48 +23127,52 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[12]->isActive = (lbffDol3InputsWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input - subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[18]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[19]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[10]->isActive = (lbffDol2InputsWithGmvBayerStatInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_gmv_feature_output -> lbff_Dol2Inputs_WithGmv_BayerStat:terminal_connect_gmv_input + subGraphLinks[14]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[15]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } /* - * Graph 100042 + * Graph 100057 */ -StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : - IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100042, selectedSettingsId, zoomKeyResolutions), +StaticGraph100057::StaticGraph100057(GraphConfiguration100057** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100057, selectedSettingsId, zoomKeyResolutions), _imageSubGraph(_sinkMappingConfiguration) { // Construct outer nodes - _graphConfigurations = new GraphConfiguration100042[kernelConfigurationsOptionsCount]; - IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + _graphConfigurations = new GraphConfiguration100057[kernelConfigurationsOptionsCount]; + IsysDolOuterNodeConfiguration** isysDolOuterNodeConfigurationOptions = new IsysDolOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDolSmoothOuterNodeConfiguration** lbffDolSmoothOuterNodeConfigurationOptions = new LbffDolSmoothOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffDol3InputsWithGmvOuterNodeConfiguration** lbffDol3InputsWithGmvOuterNodeConfigurationOptions = new LbffDol3InputsWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; - SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { _graphConfigurations[i] = *selectedGraphConfiguration[i]; - isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; - lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; + isysDolOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysDolOuterNodeConfiguration; + lbffDolSmoothOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDolSmoothOuterNodeConfiguration; + lbffDol3InputsWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffDol3InputsWithGmvOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; - swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; } - _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDolSmoothOuterNode.Init(lbffDolSmoothOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffDol3InputsWithGmvOuterNode.Init(lbffDol3InputsWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); - delete[] isysOuterNodeConfigurationOptions; - delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; + delete[] isysDolOuterNodeConfigurationOptions; + delete[] lbffDolSmoothOuterNodeConfigurationOptions; + delete[] lbffDol3InputsWithGmvOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; - delete[] swNntmOuterNodeConfigurationOptions; + delete[] swGdcOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -18264,81 +23181,132 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon GraphLink* link = nullptr; link = &_graphLinks[0]; link->src = GraphElementType::Sensor; - link->dest = GraphElementType::Isys; - link->destNode = &_isysOuterNode; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; link->destTerminalId = 0; link->type = LinkType::Source2Node; link = &_graphLinks[1]; - link->src = GraphElementType::LscBuffer; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; - link->destTerminalId = 8; + link->src = GraphElementType::SensorDolLongExposure; + link->dest = GraphElementType::IsysDol; + link->destNode = &_isysDolOuterNode; + link->destTerminalId = 4; link->type = LinkType::Source2Node; link = &_graphLinks[2]; - link->src = GraphElementType::Isys; - link->srcNode = &_isysOuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; link->srcTerminalId = 1; - link->dest = GraphElementType::LbffBayerPdaf3; - link->destNode = &_lbffBayerPdaf3OuterNode; + link->dest = GraphElementType::LbffDolSmooth; + link->destNode = &_lbffDolSmoothOuterNode; link->destTerminalId = 5; link->type = LinkType::Node2Node; link = &_graphLinks[3]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Node; + + link = &_graphLinks[4]; + link->src = GraphElementType::IsysDol; + link->srcNode = &_isysDolOuterNode; + link->srcTerminalId = 5; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Node; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffDolSmooth; + link->srcNode = &_lbffDolSmoothOuterNode; + link->srcTerminalId = 17; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 8; + link->type = LinkType::Source2Node; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 10; link->dest = GraphElementType::AeOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[4]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[8]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 11; link->dest = GraphElementType::AfStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[5]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[9]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 12; link->dest = GraphElementType::AwbStdOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[6]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[10]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 13; link->dest = GraphElementType::AwbSatOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[7]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; - link->srcTerminalId = 14; - link->dest = GraphElementType::PdafOut; + link = &_graphLinks[11]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 21; + link->dest = GraphElementType::AwbSveOut; link->type = LinkType::Node2Sink; - link = &_graphLinks[8]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[12]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 24; + link->dest = GraphElementType::LbffDol3InputsWithGmv; + link->destNode = &_lbffDol3InputsWithGmvOuterNode; + link->destTerminalId = 20; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; + link->srcTerminalId = 23; + link->dest = GraphElementType::GmvMatchOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 19; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 9; link->type = LinkType::Node2Node; - link = &_graphLinks[9]; - link->src = GraphElementType::LbffBayerPdaf3; - link->srcNode = &_lbffBayerPdaf3OuterNode; + link = &_graphLinks[15]; + link->src = GraphElementType::LbffDol3InputsWithGmv; + link->srcNode = &_lbffDol3InputsWithGmvOuterNode; link->srcTerminalId = 18; link->dest = GraphElementType::BbpsWithTnr; link->destNode = &_bbpsWithTnrOuterNode; link->destTerminalId = 7; link->type = LinkType::Node2Node; - link = &_graphLinks[10]; + link = &_graphLinks[16]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 12; @@ -18348,7 +23316,7 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[11]; + link = &_graphLinks[17]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 13; @@ -18358,7 +23326,7 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[12]; + link = &_graphLinks[18]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -18367,7 +23335,7 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon link->destTerminalId = 11; link->type = LinkType::Node2Self; - link = &_graphLinks[13]; + link = &_graphLinks[19]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 8; @@ -18377,46 +23345,46 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon link->type = LinkType::Node2Self; link->frameDelay = 1U; - link = &_graphLinks[14]; + link = &_graphLinks[20]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; link->dest = GraphElementType::ImageMp; link->type = LinkType::Node2Sink; - link = &_graphLinks[15]; + link = &_graphLinks[21]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; link->dest = GraphElementType::ImageDp; link->type = LinkType::Node2Sink; - link = &_graphLinks[16]; + link = &_graphLinks[22]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; - link->dest = GraphElementType::SwNntm; - link->destNode = &_swNntmOuterNode; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[17]; + link = &_graphLinks[23]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; - link->dest = GraphElementType::SwNntm; - link->destNode = &_swNntmOuterNode; + link->dest = GraphElementType::SwGdc; + link->destNode = &_swGdcOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[18]; - link->src = GraphElementType::SwNntm; - link->srcNode = &_swNntmOuterNode; + link = &_graphLinks[24]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 19; ++i) + for (uint8_t i = 0; i < 25; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -18436,19 +23404,21 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon } // add nodes for sub graph - _imageSubGraph.isysOuterNode = &_isysOuterNode; - _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; + _imageSubGraph.isysDolOuterNode = &_isysDolOuterNode; + _imageSubGraph.lbffDolSmoothOuterNode = &_lbffDolSmoothOuterNode; + _imageSubGraph.lbffDol3InputsWithGmvOuterNode = &_lbffDol3InputsWithGmvOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; - _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; // logical node IDs - _imageSubGraph.isysOuterNode->contextId = 0; - _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; - _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; - _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.isysDolOuterNode->contextId = 0; + _imageSubGraph.lbffDolSmoothOuterNode->contextId = 1; + _imageSubGraph.lbffDol3InputsWithGmvOuterNode->contextId = 2; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swGdcOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -18457,15 +23427,20 @@ StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphCon } } -StaticGraphStatus StaticGraph100042::updateConfiguration(uint32_t selectedIndex) +StaticGraphStatus StaticGraph100057::updateConfiguration(uint32_t selectedIndex) { StaticGraphStatus res = StaticGraphStatus::SG_OK; - res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _isysDolOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; } - res = _lbffBayerPdaf3OuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _lbffDolSmoothOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffDol3InputsWithGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -18475,7 +23450,7 @@ StaticGraphStatus StaticGraph100042::updateConfiguration(uint32_t selectedIndex) { return res; } - res = _swNntmOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + res = _swGdcOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); if (res != StaticGraphStatus::SG_OK) { return res; @@ -18483,13 +23458,13 @@ StaticGraphStatus StaticGraph100042::updateConfiguration(uint32_t selectedIndex) return StaticGraphStatus::SG_OK; } -StaticGraph100042::~StaticGraph100042() +StaticGraph100057::~StaticGraph100057() { delete[] _graphConfigurations; delete _zoomKeyResolutions.zoomKeyResolutionOptions; } -StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +StaticGraphStatus imageSubGraphTopology100057::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) { /* @@ -18498,11 +23473,11 @@ StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); /* - * Setting Node lbffBayerPdaf3 initial inner node configuration + * Setting Node lbffDol3InputsWithGmv initial inner node configuration */ - InnerNodeOptionsFlags lbffBayerPdaf3InnerOptions = imagePublicInnerNodeConfiguration; + InnerNodeOptionsFlags lbffDol3InputsWithGmvInnerOptions = imagePublicInnerNodeConfiguration; // always active public inner options - lbffBayerPdaf3InnerOptions |= (noGmv | noBurstCapture | noIr); + lbffDol3InputsWithGmvInnerOptions |= (noBurstCapture | noIr | noPdaf); // active public options according to sink mapping /* @@ -18511,15 +23486,15 @@ StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNod InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; // active public options according to sink mapping if ( - subGraphLinks[14]->linkConfiguration->bufferSize == 0 && - subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + subGraphLinks[20]->linkConfiguration->bufferSize == 0 && + subGraphLinks[22]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; } if ( - subGraphLinks[15]->linkConfiguration->bufferSize == 0 && - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[21]->linkConfiguration->bufferSize == 0 && + subGraphLinks[23]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -18528,39 +23503,41 @@ StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNod /* * Configuring inner nodes according to the selected inner options */ - lbffBayerPdaf3InnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); - lbffBayerPdaf3InnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsWithGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); + lbffDol3InputsWithGmvInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp)) == (noMp | noDp))); /* * Set the selected inner nodes to the outer nodes */ - lbffBayerPdaf3OuterNode->setInnerNode(lbffBayerPdaf3InnerOptions); + lbffDol3InputsWithGmvOuterNode->setInnerNode(lbffDol3InputsWithGmvInnerOptions); bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); /* * Link enablement by public inner options */ - subGraphLinks[3]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_ae_output -> ae_out - subGraphLinks[4]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_af_std_output -> af_std_out - subGraphLinks[5]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_std_output -> awb_std_out - subGraphLinks[6]->isActive = !(lbffBayerPdaf3InnerOptions & no3A); // lbff_Bayer_Pdaf3:terminal_connect_awb_sat_output -> awb_sat_out - subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp - subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input - subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp - subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[7]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_ae_output -> ae_out + subGraphLinks[8]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_af_std_output -> af_std_out + subGraphLinks[9]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[10]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[11]->isActive = !(lbffDol3InputsWithGmvInnerOptions & no3A); // lbff_Dol3Inputs_WithGmv:terminal_connect_awb_sve_output -> awb_sve_out + subGraphLinks[12]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[13]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noGmv); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_match_output -> gmv_match_out + subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[22]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gdc:terminal_connect_input + subGraphLinks[21]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[23]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gdc:terminal_connect_input /* * Link enablement by private inner options */ - subGraphLinks[8]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputPs); // lbff_Bayer_Pdaf3:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd - subGraphLinks[9]->isActive = !(lbffBayerPdaf3InnerOptions & noLbOutputMe); // lbff_Bayer_Pdaf3:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd - subGraphLinks[7]->isActive = !(lbffBayerPdaf3InnerOptions & noPdaf); // lbff_Bayer_Pdaf3:terminal_connect_pdaf_output -> pdaf_out + subGraphLinks[14]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputPs); // lbff_Dol3Inputs_WithGmv:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[15]->isActive = !(lbffDol3InputsWithGmvInnerOptions & noLbOutputMe); // lbff_Dol3Inputs_WithGmv:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd /* * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 19; i++) + for (uint32_t i = 0; i < 25; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -18571,10 +23548,11 @@ StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNod /* * Link enablement by inner options combinations */ - subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd - subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd - subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd - subGraphLinks[13]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + subGraphLinks[12]->isActive = (lbffDol3InputsWithGmvInnerOptions & (noGmv|noBurstCapture|noIr|noPdaf)) != (noGmv|noBurstCapture|noIr|noPdaf); // lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_feature_output -> lbff_Dol3Inputs_WithGmv:terminal_connect_gmv_input + subGraphLinks[16]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[17]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[18]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[19]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp)) != (noMp|noDp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd return StaticGraphStatus::SG_OK; } diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.h index f0dbaff..c7dc265 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.h @@ -36,6 +36,8 @@ #define SUPPORT_KEY_RESOLUTIONS 1 +#define SUPPORT_FRAGMENTS 0 + enum InnerNodeOption { None = 0, @@ -63,18 +65,18 @@ class OuterNode { /** * \brief resourceId - represents the physical ID of the node, e.g. cb_id for CB node. */ - uint8_t resourceId; + uint8_t resourceId = 0; /** * \brief contextId - represents the logical Id of the node according to the use-case. * Same physical nodes in given graph topology will have a different contextId */ uint8_t contextId = 0; - NodeTypes type; + NodeTypes type = NodeTypes::Cb; HwBitmaps bitmaps; - StaticGraphNodeKernels nodeKernels; + StaticGraphNodeKernels nodeKernels = {}; - uint8_t numberOfFragments; + uint8_t numberOfFragments = 0; OuterNode() {} ~OuterNode(); @@ -181,7 +183,7 @@ struct LbffBayerOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[11]; StaticGraphKernelRes resolutionHistories[13]; StaticGraphKernelBppConfiguration bppInfos[31]; - uint8_t systemApiConfiguration[1532]; + uint8_t systemApiConfiguration[1537]; }; struct BbpsNoTnrOuterNodeConfiguration @@ -201,7 +203,7 @@ struct LbffBayerWithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[12]; StaticGraphKernelRes resolutionHistories[17]; StaticGraphKernelBppConfiguration bppInfos[35]; - uint8_t systemApiConfiguration[2000]; + uint8_t systemApiConfiguration[2005]; }; struct BbpsWithTnrOuterNodeConfiguration @@ -223,6 +225,16 @@ struct SwGdcOuterNodeConfiguration StaticGraphKernelBppConfiguration bppInfos[1]; }; +struct SwScalerOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[1]; + StaticGraphKernelRes resolutionHistories[1]; + StaticGraphKernelBppConfiguration bppInfos[1]; + uint8_t systemApiConfiguration[5]; +}; + struct SwNntmOuterNodeConfiguration { uint32_t streamId = 0; @@ -239,7 +251,7 @@ struct LbffRgbIrOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[13]; StaticGraphKernelRes resolutionHistories[15]; StaticGraphKernelBppConfiguration bppInfos[34]; - uint8_t systemApiConfiguration[1844]; + uint8_t systemApiConfiguration[1849]; }; struct LbffIrNoGmvIrStreamOuterNodeConfiguration @@ -249,7 +261,7 @@ struct LbffIrNoGmvIrStreamOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[11]; StaticGraphKernelRes resolutionHistories[13]; StaticGraphKernelBppConfiguration bppInfos[31]; - uint8_t systemApiConfiguration[1532]; + uint8_t systemApiConfiguration[1537]; }; struct BbpsIrWithTnrOuterNodeConfiguration @@ -269,7 +281,7 @@ struct LbffBayerBurstOutNo3AOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[11]; StaticGraphKernelRes resolutionHistories[13]; StaticGraphKernelBppConfiguration bppInfos[31]; - uint8_t systemApiConfiguration[1647]; + uint8_t systemApiConfiguration[1652]; }; struct BbpsIrNoTnrOuterNodeConfiguration @@ -289,7 +301,7 @@ struct LbffIrNoGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[11]; StaticGraphKernelRes resolutionHistories[13]; StaticGraphKernelBppConfiguration bppInfos[31]; - uint8_t systemApiConfiguration[1532]; + uint8_t systemApiConfiguration[1537]; }; struct IsysPdaf2OuterNodeConfiguration @@ -308,7 +320,7 @@ struct LbffBayerPdaf2OuterNodeConfiguration StaticGraphKernelRes resolutionInfos[13]; StaticGraphKernelRes resolutionHistories[16]; StaticGraphKernelBppConfiguration bppInfos[35]; - uint8_t systemApiConfiguration[1876]; + uint8_t systemApiConfiguration[1881]; }; struct LbffBayerPdaf3OuterNodeConfiguration @@ -318,7 +330,7 @@ struct LbffBayerPdaf3OuterNodeConfiguration StaticGraphKernelRes resolutionInfos[13]; StaticGraphKernelRes resolutionHistories[15]; StaticGraphKernelBppConfiguration bppInfos[34]; - uint8_t systemApiConfiguration[1720]; + uint8_t systemApiConfiguration[1725]; }; struct IsysDolOuterNodeConfiguration @@ -337,7 +349,7 @@ struct LbffDol2InputsOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[12]; StaticGraphKernelRes resolutionHistories[15]; StaticGraphKernelBppConfiguration bppInfos[34]; - uint8_t systemApiConfiguration[1849]; + uint8_t systemApiConfiguration[1854]; }; struct LbffDolSmoothOuterNodeConfiguration @@ -357,7 +369,7 @@ struct LbffDol3InputsOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[13]; StaticGraphKernelRes resolutionHistories[16]; StaticGraphKernelBppConfiguration bppInfos[35]; - uint8_t systemApiConfiguration[2005]; + uint8_t systemApiConfiguration[2010]; }; struct LbffBayerPdaf2WithGmvOuterNodeConfiguration @@ -367,7 +379,7 @@ struct LbffBayerPdaf2WithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[14]; StaticGraphKernelRes resolutionHistories[20]; StaticGraphKernelBppConfiguration bppInfos[39]; - uint8_t systemApiConfiguration[2344]; + uint8_t systemApiConfiguration[2349]; }; struct LbffBayerPdaf3WithGmvOuterNodeConfiguration @@ -377,7 +389,7 @@ struct LbffBayerPdaf3WithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[14]; StaticGraphKernelRes resolutionHistories[19]; StaticGraphKernelBppConfiguration bppInfos[38]; - uint8_t systemApiConfiguration[2188]; + uint8_t systemApiConfiguration[2193]; }; struct LbffRgbIrWithGmvOuterNodeConfiguration @@ -387,7 +399,7 @@ struct LbffRgbIrWithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[14]; StaticGraphKernelRes resolutionHistories[19]; StaticGraphKernelBppConfiguration bppInfos[38]; - uint8_t systemApiConfiguration[2312]; + uint8_t systemApiConfiguration[2317]; }; struct LbffIrWithGmvIrStreamOuterNodeConfiguration @@ -397,7 +409,7 @@ struct LbffIrWithGmvIrStreamOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[12]; StaticGraphKernelRes resolutionHistories[17]; StaticGraphKernelBppConfiguration bppInfos[35]; - uint8_t systemApiConfiguration[2000]; + uint8_t systemApiConfiguration[2005]; }; struct LbffDol2InputsWithGmvOuterNodeConfiguration @@ -407,7 +419,7 @@ struct LbffDol2InputsWithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[13]; StaticGraphKernelRes resolutionHistories[19]; StaticGraphKernelBppConfiguration bppInfos[38]; - uint8_t systemApiConfiguration[2317]; + uint8_t systemApiConfiguration[2322]; }; struct LbffDol3InputsWithGmvOuterNodeConfiguration @@ -417,7 +429,65 @@ struct LbffDol3InputsWithGmvOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[14]; StaticGraphKernelRes resolutionHistories[20]; StaticGraphKernelBppConfiguration bppInfos[39]; - uint8_t systemApiConfiguration[2473]; + uint8_t systemApiConfiguration[2478]; +}; + +struct SwB2bOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionHistories[1]; + StaticGraphKernelBppConfiguration bppInfos[1]; +}; + +struct SwImvOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[2]; + StaticGraphKernelRes resolutionHistories[2]; + StaticGraphKernelBppConfiguration bppInfos[2]; + uint8_t systemApiConfiguration[5]; +}; + +struct SwRemosaicOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[1]; + StaticGraphKernelRes resolutionHistories[1]; + StaticGraphKernelBppConfiguration bppInfos[1]; + uint8_t systemApiConfiguration[5]; +}; + +struct LbffDol2InputsBayerStatOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[12]; + StaticGraphKernelRes resolutionHistories[15]; + StaticGraphKernelBppConfiguration bppInfos[34]; + uint8_t systemApiConfiguration[1854]; +}; + +struct LbffDol3InputsBayerStatOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[13]; + StaticGraphKernelRes resolutionHistories[16]; + StaticGraphKernelBppConfiguration bppInfos[35]; + uint8_t systemApiConfiguration[2010]; +}; + +struct LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[13]; + StaticGraphKernelRes resolutionHistories[19]; + StaticGraphKernelBppConfiguration bppInfos[38]; + uint8_t systemApiConfiguration[2322]; }; struct GraphConfiguration100000 @@ -436,7 +506,8 @@ struct GraphConfiguration100001 LbffBayerWithGmvOuterNodeConfiguration lbffBayerWithGmvOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwGdcOuterNodeConfiguration swGdcOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[20]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[22]; }; struct GraphConfiguration100002 @@ -465,7 +536,8 @@ struct GraphConfiguration100005 LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[18]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[20]; }; struct GraphConfiguration100006 @@ -571,7 +643,9 @@ struct GraphConfiguration100031 IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; LbffDol2InputsOuterNodeConfiguration lbffDol2InputsOuterNodeConfiguration; BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[13]; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[18]; }; struct GraphConfiguration100032 @@ -580,7 +654,9 @@ struct GraphConfiguration100032 IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; LbffDol2InputsOuterNodeConfiguration lbffDol2InputsOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[18]; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[23]; }; struct GraphConfiguration100033 @@ -590,7 +666,9 @@ struct GraphConfiguration100033 LbffDolSmoothOuterNodeConfiguration lbffDolSmoothOuterNodeConfiguration; LbffDol3InputsOuterNodeConfiguration lbffDol3InputsOuterNodeConfiguration; BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[15]; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[20]; }; struct GraphConfiguration100034 @@ -600,7 +678,9 @@ struct GraphConfiguration100034 LbffDolSmoothOuterNodeConfiguration lbffDolSmoothOuterNodeConfiguration; LbffDol3InputsOuterNodeConfiguration lbffDol3InputsOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[20]; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[25]; }; struct GraphConfiguration100035 @@ -677,7 +757,109 @@ struct GraphConfiguration100042 LbffBayerPdaf3OuterNodeConfiguration lbffBayerPdaf3OuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[19]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[21]; +}; + +struct GraphConfiguration100044 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysOuterNodeConfiguration isysOuterNodeConfiguration; + SwB2bOuterNodeConfiguration swB2bOuterNodeConfiguration; + LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwImvOuterNodeConfiguration swImvOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[22]; +}; + +struct GraphConfiguration100050 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysOuterNodeConfiguration isysOuterNodeConfiguration; + SwRemosaicOuterNodeConfiguration swRemosaicOuterNodeConfiguration; + LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwImvOuterNodeConfiguration swImvOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[20]; +}; + +struct GraphConfiguration100051 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysOuterNodeConfiguration isysOuterNodeConfiguration; + LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwImvOuterNodeConfiguration swImvOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[20]; +}; + +struct GraphConfiguration100052 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDol2InputsBayerStatOuterNodeConfiguration lbffDol2InputsBayerStatOuterNodeConfiguration; + BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[18]; +}; + +struct GraphConfiguration100053 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDol2InputsBayerStatOuterNodeConfiguration lbffDol2InputsBayerStatOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[23]; +}; + +struct GraphConfiguration100054 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDolSmoothOuterNodeConfiguration lbffDolSmoothOuterNodeConfiguration; + LbffDol3InputsBayerStatOuterNodeConfiguration lbffDol3InputsBayerStatOuterNodeConfiguration; + BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[20]; +}; + +struct GraphConfiguration100055 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDolSmoothOuterNodeConfiguration lbffDolSmoothOuterNodeConfiguration; + LbffDol3InputsBayerStatOuterNodeConfiguration lbffDol3InputsBayerStatOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[25]; +}; + +struct GraphConfiguration100056 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration lbffDol2InputsWithGmvBayerStatOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwGdcOuterNodeConfiguration swGdcOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[23]; +}; + +struct GraphConfiguration100057 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysDolOuterNodeConfiguration isysDolOuterNodeConfiguration; + LbffDolSmoothOuterNodeConfiguration lbffDolSmoothOuterNodeConfiguration; + LbffDol3InputsWithGmvOuterNodeConfiguration lbffDol3InputsWithGmvOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwGdcOuterNodeConfiguration swGdcOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[25]; }; #pragma pack(pop) @@ -688,6 +870,7 @@ class IsysOuterNode : public OuterNode void Init(IsysOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerOuterNode : public OuterNode { @@ -696,6 +879,7 @@ class LbffBayerOuterNode : public OuterNode void Init(LbffBayerOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsNoTnrOuterNode : public OuterNode { @@ -704,6 +888,7 @@ class BbpsNoTnrOuterNode : public OuterNode void Init(BbpsNoTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerWithGmvOuterNode : public OuterNode { @@ -712,6 +897,7 @@ class LbffBayerWithGmvOuterNode : public OuterNode void Init(LbffBayerWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsWithTnrOuterNode : public OuterNode { @@ -720,6 +906,7 @@ class BbpsWithTnrOuterNode : public OuterNode void Init(BbpsWithTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwGdcOuterNode : public OuterNode { @@ -728,6 +915,16 @@ class SwGdcOuterNode : public OuterNode void Init(SwGdcOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwScalerOuterNode : public OuterNode +{ +public: + SwScalerOuterNode(): OuterNode(){} + void Init(SwScalerOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwNntmOuterNode : public OuterNode { @@ -736,6 +933,7 @@ class SwNntmOuterNode : public OuterNode void Init(SwNntmOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffRgbIrOuterNode : public OuterNode { @@ -744,6 +942,7 @@ class LbffRgbIrOuterNode : public OuterNode void Init(LbffRgbIrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrNoGmvIrStreamOuterNode : public OuterNode { @@ -752,6 +951,7 @@ class LbffIrNoGmvIrStreamOuterNode : public OuterNode void Init(LbffIrNoGmvIrStreamOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsIrWithTnrOuterNode : public OuterNode { @@ -760,6 +960,7 @@ class BbpsIrWithTnrOuterNode : public OuterNode void Init(BbpsIrWithTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerBurstOutNo3AOuterNode : public OuterNode { @@ -768,6 +969,7 @@ class LbffBayerBurstOutNo3AOuterNode : public OuterNode void Init(LbffBayerBurstOutNo3AOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsIrNoTnrOuterNode : public OuterNode { @@ -776,6 +978,7 @@ class BbpsIrNoTnrOuterNode : public OuterNode void Init(BbpsIrNoTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrNoGmvOuterNode : public OuterNode { @@ -784,6 +987,7 @@ class LbffIrNoGmvOuterNode : public OuterNode void Init(LbffIrNoGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class IsysPdaf2OuterNode : public OuterNode { @@ -792,6 +996,7 @@ class IsysPdaf2OuterNode : public OuterNode void Init(IsysPdaf2OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf2OuterNode : public OuterNode { @@ -800,6 +1005,7 @@ class LbffBayerPdaf2OuterNode : public OuterNode void Init(LbffBayerPdaf2OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf3OuterNode : public OuterNode { @@ -808,6 +1014,7 @@ class LbffBayerPdaf3OuterNode : public OuterNode void Init(LbffBayerPdaf3OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class IsysDolOuterNode : public OuterNode { @@ -816,6 +1023,7 @@ class IsysDolOuterNode : public OuterNode void Init(IsysDolOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDol2InputsOuterNode : public OuterNode { @@ -824,6 +1032,7 @@ class LbffDol2InputsOuterNode : public OuterNode void Init(LbffDol2InputsOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDolSmoothOuterNode : public OuterNode { @@ -832,6 +1041,7 @@ class LbffDolSmoothOuterNode : public OuterNode void Init(LbffDolSmoothOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDol3InputsOuterNode : public OuterNode { @@ -840,6 +1050,7 @@ class LbffDol3InputsOuterNode : public OuterNode void Init(LbffDol3InputsOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf2WithGmvOuterNode : public OuterNode { @@ -848,6 +1059,7 @@ class LbffBayerPdaf2WithGmvOuterNode : public OuterNode void Init(LbffBayerPdaf2WithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf3WithGmvOuterNode : public OuterNode { @@ -856,6 +1068,7 @@ class LbffBayerPdaf3WithGmvOuterNode : public OuterNode void Init(LbffBayerPdaf3WithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffRgbIrWithGmvOuterNode : public OuterNode { @@ -864,6 +1077,7 @@ class LbffRgbIrWithGmvOuterNode : public OuterNode void Init(LbffRgbIrWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrWithGmvIrStreamOuterNode : public OuterNode { @@ -872,6 +1086,7 @@ class LbffIrWithGmvIrStreamOuterNode : public OuterNode void Init(LbffIrWithGmvIrStreamOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDol2InputsWithGmvOuterNode : public OuterNode { @@ -880,6 +1095,7 @@ class LbffDol2InputsWithGmvOuterNode : public OuterNode void Init(LbffDol2InputsWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDol3InputsWithGmvOuterNode : public OuterNode { @@ -888,6 +1104,61 @@ class LbffDol3InputsWithGmvOuterNode : public OuterNode void Init(LbffDol3InputsWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwB2bOuterNode : public OuterNode +{ +public: + SwB2bOuterNode(): OuterNode(){} + void Init(SwB2bOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwImvOuterNode : public OuterNode +{ +public: + SwImvOuterNode(): OuterNode(){} + void Init(SwImvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwRemosaicOuterNode : public OuterNode +{ +public: + SwRemosaicOuterNode(): OuterNode(){} + void Init(SwRemosaicOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class LbffDol2InputsBayerStatOuterNode : public OuterNode +{ +public: + LbffDol2InputsBayerStatOuterNode(): OuterNode(){} + void Init(LbffDol2InputsBayerStatOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class LbffDol3InputsBayerStatOuterNode : public OuterNode +{ +public: + LbffDol3InputsBayerStatOuterNode(): OuterNode(){} + void Init(LbffDol3InputsBayerStatOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class LbffDol2InputsWithGmvBayerStatOuterNode : public OuterNode +{ +public: + LbffDol2InputsWithGmvBayerStatOuterNode(): OuterNode(){} + void Init(LbffDol2InputsWithGmvBayerStatOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class imageSubGraphTopology100000 : public GraphTopology { @@ -909,7 +1180,7 @@ class StaticGraph100000 : public IStaticGraphConfig StaticGraph100000(GraphConfiguration100000** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100000(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 254442951; // autogenerated + static const uint32_t hashCode = 2191290611; // autogenerated private: // Configuration @@ -933,14 +1204,15 @@ class StaticGraph100000 : public IStaticGraphConfig class imageSubGraphTopology100001 : public GraphTopology { public: - imageSubGraphTopology100001(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + imageSubGraphTopology100001(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 22, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerWithGmvOuterNode* lbffBayerWithGmvOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwGdcOuterNode* swGdcOuterNode = nullptr; - GraphLink* subGraphLinks[20]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[22]; }; @@ -950,7 +1222,7 @@ class StaticGraph100001 : public IStaticGraphConfig StaticGraph100001(GraphConfiguration100001** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100001(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1895591893; // autogenerated + static const uint32_t hashCode = 911553637; // autogenerated private: // Configuration @@ -961,6 +1233,7 @@ class StaticGraph100001 : public IStaticGraphConfig LbffBayerWithGmvOuterNode _lbffBayerWithGmvOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwGdcOuterNode _swGdcOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -969,7 +1242,7 @@ class StaticGraph100001 : public IStaticGraphConfig imageSubGraphTopology100001 _imageSubGraph; // All graph links - GraphLink _graphLinks[20]; + GraphLink _graphLinks[22]; }; class imageSubGraphTopology100002 : public GraphTopology { @@ -991,7 +1264,7 @@ class StaticGraph100002 : public IStaticGraphConfig StaticGraph100002(GraphConfiguration100002** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100002(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3344665139; // autogenerated + static const uint32_t hashCode = 2257098455; // autogenerated private: // Configuration @@ -1032,7 +1305,7 @@ class StaticGraph100003 : public IStaticGraphConfig StaticGraph100003(GraphConfiguration100003** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100003(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1895591893; // autogenerated + static const uint32_t hashCode = 835453801; // autogenerated private: // Configuration @@ -1057,14 +1330,15 @@ class StaticGraph100003 : public IStaticGraphConfig class imageSubGraphTopology100005 : public GraphTopology { public: - imageSubGraphTopology100005(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 18, sinkMappingConfiguration) {} + imageSubGraphTopology100005(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerOuterNode* lbffBayerOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[18]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[20]; }; @@ -1074,7 +1348,7 @@ class StaticGraph100005 : public IStaticGraphConfig StaticGraph100005(GraphConfiguration100005** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100005(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1332843761; // autogenerated + static const uint32_t hashCode = 149312985; // autogenerated private: // Configuration @@ -1085,6 +1359,7 @@ class StaticGraph100005 : public IStaticGraphConfig LbffBayerOuterNode _lbffBayerOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1093,7 +1368,7 @@ class StaticGraph100005 : public IStaticGraphConfig imageSubGraphTopology100005 _imageSubGraph; // All graph links - GraphLink _graphLinks[18]; + GraphLink _graphLinks[20]; }; class imageSubGraphTopology100006 : public GraphTopology { @@ -1144,7 +1419,7 @@ class StaticGraph100006 : public IStaticGraphConfig StaticGraph100006(GraphConfiguration100006** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100006(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 936158723; // autogenerated + static const uint32_t hashCode = 2296144571; // autogenerated private: // Configuration @@ -1187,7 +1462,7 @@ class StaticGraph100007 : public IStaticGraphConfig StaticGraph100007(GraphConfiguration100007** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100007(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 274832429; // autogenerated + static const uint32_t hashCode = 1987263145; // autogenerated private: // Configuration @@ -1255,7 +1530,7 @@ class StaticGraph100008 : public IStaticGraphConfig StaticGraph100008(GraphConfiguration100008** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100008(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3117872339; // autogenerated + static const uint32_t hashCode = 4070369259; // autogenerated private: // Configuration @@ -1298,7 +1573,7 @@ class StaticGraph100015 : public IStaticGraphConfig StaticGraph100015(GraphConfiguration100015** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100015(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1370545417; // autogenerated + static const uint32_t hashCode = 3321236285; // autogenerated private: // Configuration @@ -1373,7 +1648,7 @@ class StaticGraph100025 : public IStaticGraphConfig StaticGraph100025(GraphConfiguration100025** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100025(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 254442951; // autogenerated + static const uint32_t hashCode = 2191290611; // autogenerated private: // Configuration @@ -1447,7 +1722,7 @@ class StaticGraph100027 : public IStaticGraphConfig StaticGraph100027(GraphConfiguration100027** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100027(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 58414011; // autogenerated + static const uint32_t hashCode = 2863511927; // autogenerated private: // Configuration @@ -1487,7 +1762,7 @@ class StaticGraph100028 : public IStaticGraphConfig StaticGraph100028(GraphConfiguration100028** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100028(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 690933501; // autogenerated + static const uint32_t hashCode = 297092049; // autogenerated private: // Configuration @@ -1527,7 +1802,7 @@ class StaticGraph100029 : public IStaticGraphConfig StaticGraph100029(GraphConfiguration100029** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100029(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1083135791; // autogenerated + static const uint32_t hashCode = 1956517507; // autogenerated private: // Configuration @@ -1567,7 +1842,7 @@ class StaticGraph100030 : public IStaticGraphConfig StaticGraph100030(GraphConfiguration100030** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100030(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 802205825; // autogenerated + static const uint32_t hashCode = 2435910845; // autogenerated private: // Configuration @@ -1591,13 +1866,15 @@ class StaticGraph100030 : public IStaticGraphConfig class imageSubGraphTopology100031 : public GraphTopology { public: - imageSubGraphTopology100031(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 13, sinkMappingConfiguration) {} + imageSubGraphTopology100031(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 18, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; LbffDol2InputsOuterNode* lbffDol2InputsOuterNode = nullptr; BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; - GraphLink* subGraphLinks[13]; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[18]; }; @@ -1607,7 +1884,7 @@ class StaticGraph100031 : public IStaticGraphConfig StaticGraph100031(GraphConfiguration100031** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100031(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 4143670381; // autogenerated + static const uint32_t hashCode = 1681200543; // autogenerated private: // Configuration @@ -1617,6 +1894,8 @@ class StaticGraph100031 : public IStaticGraphConfig IsysDolOuterNode _isysDolOuterNode; LbffDol2InputsOuterNode _lbffDol2InputsOuterNode; BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1625,19 +1904,21 @@ class StaticGraph100031 : public IStaticGraphConfig imageSubGraphTopology100031 _imageSubGraph; // All graph links - GraphLink _graphLinks[13]; + GraphLink _graphLinks[18]; }; class imageSubGraphTopology100032 : public GraphTopology { public: - imageSubGraphTopology100032(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 18, sinkMappingConfiguration) {} + imageSubGraphTopology100032(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 23, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; LbffDol2InputsOuterNode* lbffDol2InputsOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; - GraphLink* subGraphLinks[18]; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[23]; }; @@ -1647,7 +1928,7 @@ class StaticGraph100032 : public IStaticGraphConfig StaticGraph100032(GraphConfiguration100032** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100032(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3009898001; // autogenerated + static const uint32_t hashCode = 611075083; // autogenerated private: // Configuration @@ -1657,6 +1938,8 @@ class StaticGraph100032 : public IStaticGraphConfig IsysDolOuterNode _isysDolOuterNode; LbffDol2InputsOuterNode _lbffDol2InputsOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1665,20 +1948,22 @@ class StaticGraph100032 : public IStaticGraphConfig imageSubGraphTopology100032 _imageSubGraph; // All graph links - GraphLink _graphLinks[18]; + GraphLink _graphLinks[23]; }; class imageSubGraphTopology100033 : public GraphTopology { public: - imageSubGraphTopology100033(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 15, sinkMappingConfiguration) {} + imageSubGraphTopology100033(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; LbffDolSmoothOuterNode* lbffDolSmoothOuterNode = nullptr; LbffDol3InputsOuterNode* lbffDol3InputsOuterNode = nullptr; BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; - GraphLink* subGraphLinks[15]; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[20]; }; @@ -1688,7 +1973,7 @@ class StaticGraph100033 : public IStaticGraphConfig StaticGraph100033(GraphConfiguration100033** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100033(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 321930163; // autogenerated + static const uint32_t hashCode = 1734304817; // autogenerated private: // Configuration @@ -1699,6 +1984,8 @@ class StaticGraph100033 : public IStaticGraphConfig LbffDolSmoothOuterNode _lbffDolSmoothOuterNode; LbffDol3InputsOuterNode _lbffDol3InputsOuterNode; BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1707,20 +1994,22 @@ class StaticGraph100033 : public IStaticGraphConfig imageSubGraphTopology100033 _imageSubGraph; // All graph links - GraphLink _graphLinks[15]; + GraphLink _graphLinks[20]; }; class imageSubGraphTopology100034 : public GraphTopology { public: - imageSubGraphTopology100034(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + imageSubGraphTopology100034(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 25, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; LbffDolSmoothOuterNode* lbffDolSmoothOuterNode = nullptr; LbffDol3InputsOuterNode* lbffDol3InputsOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; - GraphLink* subGraphLinks[20]; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[25]; }; @@ -1730,7 +2019,7 @@ class StaticGraph100034 : public IStaticGraphConfig StaticGraph100034(GraphConfiguration100034** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100034(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1183344631; // autogenerated + static const uint32_t hashCode = 1995162237; // autogenerated private: // Configuration @@ -1741,6 +2030,8 @@ class StaticGraph100034 : public IStaticGraphConfig LbffDolSmoothOuterNode _lbffDolSmoothOuterNode; LbffDol3InputsOuterNode _lbffDol3InputsOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1749,7 +2040,7 @@ class StaticGraph100034 : public IStaticGraphConfig imageSubGraphTopology100034 _imageSubGraph; // All graph links - GraphLink _graphLinks[20]; + GraphLink _graphLinks[25]; }; class rawSubGraphTopology100035 : public GraphTopology { @@ -1840,7 +2131,7 @@ class StaticGraph100037 : public IStaticGraphConfig StaticGraph100037(GraphConfiguration100037** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100037(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 2658466969; // autogenerated + static const uint32_t hashCode = 2427208877; // autogenerated private: // Configuration @@ -1882,7 +2173,7 @@ class StaticGraph100038 : public IStaticGraphConfig StaticGraph100038(GraphConfiguration100038** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100038(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1409639831; // autogenerated + static const uint32_t hashCode = 1204583923; // autogenerated private: // Configuration @@ -1954,7 +2245,7 @@ class StaticGraph100039 : public IStaticGraphConfig StaticGraph100039(GraphConfiguration100039** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100039(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3095922915; // autogenerated + static const uint32_t hashCode = 3381848299; // autogenerated private: // Configuration @@ -2000,7 +2291,7 @@ class StaticGraph100040 : public IStaticGraphConfig StaticGraph100040(GraphConfiguration100040** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100040(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 2936873815; // autogenerated + static const uint32_t hashCode = 288441259; // autogenerated private: // Configuration @@ -2043,7 +2334,7 @@ class StaticGraph100041 : public IStaticGraphConfig StaticGraph100041(GraphConfiguration100041** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100041(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1123654281; // autogenerated + static const uint32_t hashCode = 4095848493; // autogenerated private: // Configuration @@ -2069,14 +2360,15 @@ class StaticGraph100041 : public IStaticGraphConfig class imageSubGraphTopology100042 : public GraphTopology { public: - imageSubGraphTopology100042(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 19, sinkMappingConfiguration) {} + imageSubGraphTopology100042(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerPdaf3OuterNode* lbffBayerPdaf3OuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[19]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[21]; }; @@ -2086,7 +2378,7 @@ class StaticGraph100042 : public IStaticGraphConfig StaticGraph100042(GraphConfiguration100042** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100042(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3444052875; // autogenerated + static const uint32_t hashCode = 2207768899; // autogenerated private: // Configuration @@ -2097,6 +2389,7 @@ class StaticGraph100042 : public IStaticGraphConfig LbffBayerPdaf3OuterNode _lbffBayerPdaf3OuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -2105,7 +2398,407 @@ class StaticGraph100042 : public IStaticGraphConfig imageSubGraphTopology100042 _imageSubGraph; // All graph links - GraphLink _graphLinks[19]; + GraphLink _graphLinks[21]; +}; + +class imageSubGraphTopology100044 : public GraphTopology { + +public: + imageSubGraphTopology100044(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 22, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysOuterNode* isysOuterNode = nullptr; + SwB2bOuterNode* swB2bOuterNode = nullptr; + LbffBayerOuterNode* lbffBayerOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwImvOuterNode* swImvOuterNode = nullptr; + GraphLink* subGraphLinks[22]; + +}; + +class StaticGraph100044 : public IStaticGraphConfig +{ +public: + StaticGraph100044(GraphConfiguration100044** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100044(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 2798404829; // autogenerated + +private: + // Configuration + GraphConfiguration100044* _graphConfigurations; + + /* Outer Nodes */ + IsysOuterNode _isysOuterNode; + SwB2bOuterNode _swB2bOuterNode; + LbffBayerOuterNode _lbffBayerOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwImvOuterNode _swImvOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100044 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[22]; +}; + +class imageSubGraphTopology100050 : public GraphTopology { + +public: + imageSubGraphTopology100050(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysOuterNode* isysOuterNode = nullptr; + LbffBayerOuterNode* lbffBayerOuterNode = nullptr; + SwRemosaicOuterNode* swRemosaicOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwImvOuterNode* swImvOuterNode = nullptr; + GraphLink* subGraphLinks[20]; + +}; + +class StaticGraph100050 : public IStaticGraphConfig +{ +public: + StaticGraph100050(GraphConfiguration100050** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100050(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 3442380973; // autogenerated + +private: + // Configuration + GraphConfiguration100050* _graphConfigurations; + + /* Outer Nodes */ + IsysOuterNode _isysOuterNode; + SwRemosaicOuterNode _swRemosaicOuterNode; + LbffBayerOuterNode _lbffBayerOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwImvOuterNode _swImvOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100050 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[20]; +}; + +class imageSubGraphTopology100051 : public GraphTopology { + +public: + imageSubGraphTopology100051(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysOuterNode* isysOuterNode = nullptr; + LbffBayerOuterNode* lbffBayerOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwImvOuterNode* swImvOuterNode = nullptr; + GraphLink* subGraphLinks[20]; + +}; + +class StaticGraph100051 : public IStaticGraphConfig +{ +public: + StaticGraph100051(GraphConfiguration100051** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100051(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 2326634835; // autogenerated + +private: + // Configuration + GraphConfiguration100051* _graphConfigurations; + + /* Outer Nodes */ + IsysOuterNode _isysOuterNode; + LbffBayerOuterNode _lbffBayerOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwImvOuterNode _swImvOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100051 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[20]; +}; + +class imageSubGraphTopology100052 : public GraphTopology { + +public: + imageSubGraphTopology100052(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 18, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDol2InputsBayerStatOuterNode* lbffDol2InputsBayerStatOuterNode = nullptr; + BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[18]; + +}; + +class StaticGraph100052 : public IStaticGraphConfig +{ +public: + StaticGraph100052(GraphConfiguration100052** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100052(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 1681200543; // autogenerated + +private: + // Configuration + GraphConfiguration100052* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDol2InputsBayerStatOuterNode _lbffDol2InputsBayerStatOuterNode; + BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100052 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[18]; +}; + +class imageSubGraphTopology100053 : public GraphTopology { + +public: + imageSubGraphTopology100053(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 23, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDol2InputsBayerStatOuterNode* lbffDol2InputsBayerStatOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[23]; + +}; + +class StaticGraph100053 : public IStaticGraphConfig +{ +public: + StaticGraph100053(GraphConfiguration100053** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100053(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 611075083; // autogenerated + +private: + // Configuration + GraphConfiguration100053* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDol2InputsBayerStatOuterNode _lbffDol2InputsBayerStatOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100053 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[23]; +}; + +class imageSubGraphTopology100054 : public GraphTopology { + +public: + imageSubGraphTopology100054(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDolSmoothOuterNode* lbffDolSmoothOuterNode = nullptr; + LbffDol3InputsBayerStatOuterNode* lbffDol3InputsBayerStatOuterNode = nullptr; + BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[20]; + +}; + +class StaticGraph100054 : public IStaticGraphConfig +{ +public: + StaticGraph100054(GraphConfiguration100054** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100054(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 1734304817; // autogenerated + +private: + // Configuration + GraphConfiguration100054* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDolSmoothOuterNode _lbffDolSmoothOuterNode; + LbffDol3InputsBayerStatOuterNode _lbffDol3InputsBayerStatOuterNode; + BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100054 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[20]; +}; + +class imageSubGraphTopology100055 : public GraphTopology { + +public: + imageSubGraphTopology100055(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 25, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDolSmoothOuterNode* lbffDolSmoothOuterNode = nullptr; + LbffDol3InputsBayerStatOuterNode* lbffDol3InputsBayerStatOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwNntmOuterNode* swNntmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[25]; + +}; + +class StaticGraph100055 : public IStaticGraphConfig +{ +public: + StaticGraph100055(GraphConfiguration100055** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100055(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 1995162237; // autogenerated + +private: + // Configuration + GraphConfiguration100055* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDolSmoothOuterNode _lbffDolSmoothOuterNode; + LbffDol3InputsBayerStatOuterNode _lbffDol3InputsBayerStatOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100055 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[25]; +}; + +class imageSubGraphTopology100056 : public GraphTopology { + +public: + imageSubGraphTopology100056(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 23, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDol2InputsWithGmvBayerStatOuterNode* lbffDol2InputsWithGmvBayerStatOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwGdcOuterNode* swGdcOuterNode = nullptr; + GraphLink* subGraphLinks[23]; + +}; + +class StaticGraph100056 : public IStaticGraphConfig +{ +public: + StaticGraph100056(GraphConfiguration100056** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100056(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 288441259; // autogenerated + +private: + // Configuration + GraphConfiguration100056* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDol2InputsWithGmvBayerStatOuterNode _lbffDol2InputsWithGmvBayerStatOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwGdcOuterNode _swGdcOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100056 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[23]; +}; + +class imageSubGraphTopology100057 : public GraphTopology { + +public: + imageSubGraphTopology100057(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 25, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysDolOuterNode* isysDolOuterNode = nullptr; + LbffDolSmoothOuterNode* lbffDolSmoothOuterNode = nullptr; + LbffDol3InputsWithGmvOuterNode* lbffDol3InputsWithGmvOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwGdcOuterNode* swGdcOuterNode = nullptr; + GraphLink* subGraphLinks[25]; + +}; + +class StaticGraph100057 : public IStaticGraphConfig +{ +public: + StaticGraph100057(GraphConfiguration100057** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100057(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 4095848493; // autogenerated + +private: + // Configuration + GraphConfiguration100057* _graphConfigurations; + + /* Outer Nodes */ + IsysDolOuterNode _isysDolOuterNode; + LbffDolSmoothOuterNode _lbffDolSmoothOuterNode; + LbffDol3InputsWithGmvOuterNode _lbffDol3InputsWithGmvOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwGdcOuterNode _swGdcOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100057 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[25]; }; #endif \ No newline at end of file diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphBinaryAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphBinaryAutogen.h index 5fdd079..f950a50 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphBinaryAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphBinaryAutogen.h @@ -65,6 +65,10 @@ enum class GraphConfigurationKeyAttributes : uint32_t DvsActive = 0x00000020, PipelineLowLight = 0x00000040, PipelineNormalLight = 0x00000080, + NFov = 0x00000100, + WFov = 0x00000200, + DocScan = 0x00000400, + StillsModeCpHdr = 0x00000800, }; struct GraphConfigurationKey { @@ -89,7 +93,7 @@ struct GraphConfigurationHeader { }; struct BinaryHeader { - uint32_t isSapEnable = 0; + uint32_t sapAttributes = 0; uint32_t binaryCommonHashCode = 0; uint32_t numberOfResolutions = 0; uint32_t numberOfSensorModes = 0; diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.c b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.c index 5b6adf8..e380537 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.c +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.c @@ -27,11 +27,6 @@ #include "Ipu75xaStaticGraphDataPreloadAutogen.h" -int isSapEnable(char* binaryData) -{ - return ((BinaryHeader*)binaryData)->isSapEnable; -} - void parseTable(char* binaryData, GraphHashCodesTable* table) { char* fileOffset = binaryData; diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.h index a15163c..57b34dc 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphDataPreloadAutogen.h @@ -67,7 +67,7 @@ typedef enum typedef struct { - uint32_t isSapEnable; + uint32_t sapAttributes; uint32_t binaryCommonHashCode; uint32_t numberOfResolutions; uint32_t numberOfSensorModes; @@ -96,38 +96,47 @@ typedef struct DataRange }DataRange; -static int distinctGraphsCount = 28; +static int distinctGraphsCount = 37; static GraphHashCode hashCodeLookup[] = { - {0, 0x159079D0}, - {100000, 0xF2A7DC7}, - {100001, 0x70FC6FD5}, - {100002, 0xC75B8A33}, - {100003, 0x70FC6FD5}, - {100005, 0x4F7194F1}, - {100006, 0x37CCA603}, - {100007, 0x10619C2D}, - {100008, 0xB9D6F4D3}, - {100015, 0x51B0DD09}, + {0, 0x327EB4A8}, + {100000, 0x829C70F3}, + {100001, 0x36553465}, + {100002, 0x868896D7}, + {100003, 0x31CC0369}, + {100005, 0x8E655D9}, + {100006, 0x88DC62BB}, + {100007, 0x76733AA9}, + {100008, 0xF29CE7EB}, + {100015, 0xC5F60B3D}, {100016, 0xD089033F}, - {100025, 0xF2A7DC7}, + {100025, 0x829C70F3}, {100026, 0xF9C17401}, - {100027, 0x37B53BB}, - {100028, 0x292ECEFD}, - {100029, 0x408F572F}, - {100030, 0x2FD0B081}, - {100031, 0xF6FB646D}, - {100032, 0xB3676611}, - {100033, 0x133043B3}, - {100034, 0x468867F7}, + {100027, 0xAAADB977}, + {100028, 0x11B543D1}, + {100029, 0x749E1683}, + {100030, 0x91310CBD}, + {100031, 0x6435159F}, + {100032, 0x246C440B}, + {100033, 0x675F6431}, + {100034, 0x76EBC27D}, {100035, 0x5B0632C3}, {100036, 0x5B0632C3}, - {100037, 0x9E74FC99}, - {100038, 0x54056597}, - {100039, 0xB88808E3}, - {100040, 0xAF0D2357}, - {100041, 0x42F99A89}, - {100042, 0xCD48138B} + {100037, 0x90AC44AD}, + {100038, 0x47CC7DF3}, + {100039, 0xC992E8EB}, + {100040, 0x113143AB}, + {100041, 0xF421B02D}, + {100042, 0x8397E143}, + {100044, 0xA6CC44DD}, + {100050, 0xCD2E90AD}, + {100051, 0x8AADA153}, + {100052, 0x6435159F}, + {100053, 0x246C440B}, + {100054, 0x675F6431}, + {100055, 0x76EBC27D}, + {100056, 0x113143AB}, + {100057, 0xF421B02D} }; static FrameFormatDesc formatsDB[] = { @@ -310,7 +319,23 @@ static FrameFormatDesc formatsDB[] = { {"IGIG_GRGB_IGIG_GBGRP", "IGP0", 0x30504749, 8}, {"IGIG_GRGB_IGIG_GBGRP", "IGP1", 0x31504749, 10}, {"IGIG_GRGB_IGIG_GBGRP", "IGP2", 0x32504749, 12}, - {"IGIG_GRGB_IGIG_GBGRP", "IGP3", 0x33504749, 16} + {"IGIG_GRGB_IGIG_GBGRP", "IGP3", 0x33504749, 16}, + {"RGGBPD", "RG0B", 0x42304752, 8}, + {"RGGBPD", "RG1B", 0x42314752, 10}, + {"RGGBPD", "RG2B", 0x42324752, 12}, + {"RGGBPD", "RG3B", 0x42334752, 16}, + {"BGGRPD", "BG0B", 0x42304742, 8}, + {"BGGRPD", "BG1B", 0x42314742, 10}, + {"BGGRPD", "BG2B", 0x42324742, 12}, + {"BGGRPD", "BG3B", 0x42334742, 16}, + {"GBRGPD", "GB0B", 0x42304247, 8}, + {"GBRGPD", "GB1B", 0x42314247, 10}, + {"GBRGPD", "GB2B", 0x42324247, 12}, + {"GBRGPD", "GB3B", 0x42334247, 16}, + {"GRBGPD", "GR0B", 0x42305247, 8}, + {"GRBGPD", "GR1B", 0x42315247, 10}, + {"GRBGPD", "GR2B", 0x42325247, 12}, + {"GRBGPD", "GR3B", 0x42335247, 16} }; #endif/*DATA_RANGE_H_*/ diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.cpp b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.cpp index 1bf3301..6665bf4 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.cpp +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.cpp @@ -492,6 +492,105 @@ StaticGraphStatus StaticGraphReader::GetStaticGraphConfig(GraphConfigurationKey& *graph = new StaticGraph100042( reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); break; + case 100044: + if (StaticGraph100044::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100044( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100050: + if (StaticGraph100050::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100050( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100051: + if (StaticGraph100051::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100051( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100052: + if (StaticGraph100052::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100052( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100053: + if (StaticGraph100053::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100053( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100054: + if (StaticGraph100054::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100054( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100055: + if (StaticGraph100055::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100055( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100056: + if (StaticGraph100056::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100056( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; + case 100057: + if (StaticGraph100057::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100057( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; default: delete[] selectedConfigurationData; delete[] selectedGraphConfigurationHeaders; diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.h index 25403b5..20e328d 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.h @@ -82,7 +82,7 @@ class StaticGraphReader StaticGraphStatus Init(StaticReaderBinaryData& binaryGraphSettings); StaticGraphStatus GetStaticGraphConfig(GraphConfigurationKey& settingsKey, IStaticGraphConfig** graph); std::pair GetGraphConfigurationHeaders() const; - static const uint32_t staticGraphCommonHashCode = 361789904; // autogenerated + static const uint32_t staticGraphCommonHashCode = 847164584; // autogenerated private: void GetSinkMappingConfiguration(GraphConfigurationHeader* baseGraphConfigurationHeader, VirtualSinkMapping* baseSinkMappingConfiguration, GraphConfigurationHeader* selectedGraphConfigurationHeader, VirtualSinkMapping* selectedSinkMappingConfiguration); diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphTypesAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphTypesAutogen.h index 7a1ee0a..0bcc4c5 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphTypesAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphTypesAutogen.h @@ -34,6 +34,7 @@ typedef aic::ImagingKernelGroup StaticGraphNodeKernels; typedef aic::ia_pac_kernel_info StaticGraphPacRunKernel; typedef aic::IaAicFragmentDesc StaticGraphFragmentDesc; +typedef aic::IaAicUpscalerFragDesc StaticGraphUpscalerFragmentDesc; #endif #ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES @@ -60,7 +61,11 @@ enum class NodeResourceId : uint8_t { Bbps = 1, SwIsys = 2, SwGdc = 3, + SwScaler = 4, SwNntm = 5, + SwImv = 6, + SwB2b = 7, + SwRemosaic = 8, }; enum class StaticGraphStatus : uint8_t @@ -94,6 +99,7 @@ enum class HwSink : uint8_t ImageDpSink, GmvMatchOutSink, ProcessedMainSink, + ProcessedSecondarySink, AwbSveOutSink, IrAeOutSink, IrAfStdOutSink, @@ -137,6 +143,7 @@ struct StaticGraphKernelRes { // We add only the fields that are used by tests struct StaticGraphKernelSystemApiIoBuffer1_4 { uint32_t x_output_offset_per_stripe[4]; + uint32_t plane_start_address_per_stripe[12]; }; #endif @@ -227,10 +234,19 @@ struct StaticGraphRunKernel { #ifndef STATIC_GRAPH_USE_IA_AIC_TYPES +struct StaticGraphUpscalerFragmentDesc { + uint16_t fragmentInputCropLeft = 0; + uint16_t fragmentInputCropRight = 0; +}; + struct StaticGraphFragmentDesc { - uint16_t inputWidth = 0; - uint16_t outputWidth = 0; - uint16_t left = 0; + uint16_t fragmentInputWidth = 0; + uint16_t fragmentOutputWidth = 0; + uint16_t fragmentStartX = 0; + union + { + StaticGraphUpscalerFragmentDesc upscalerFragDesc; + }; }; // ia_pac_kernel_info @@ -279,6 +295,7 @@ enum class GraphElementType : uint8_t { ImageDp, GmvMatchOut, ProcessedMain, + ProcessedSecondary, AwbSveOut, IrAeOut, IrAfStdOut, @@ -296,6 +313,7 @@ enum class GraphElementType : uint8_t { LbffBayerWithGmv, BbpsWithTnr, SwGdc, + SwScaler, SwNntm, LbffRgbIr, LbffIrNoGmvIrStream, @@ -316,6 +334,12 @@ enum class GraphElementType : uint8_t { LbffIrWithGmvIrStream, LbffDol2InputsWithGmv, LbffDol3InputsWithGmv, + SwB2b, + SwImv, + SwRemosaic, + LbffDol2InputsBayerStat, + LbffDol3InputsBayerStat, + LbffDol2InputsWithGmvBayerStat, }; enum class LinkType : uint8_t { diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.cpp b/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.cpp index bd095af..a4ddb33 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.cpp +++ b/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.cpp @@ -546,9 +546,87 @@ TerminalDescriptor SW_NNTMTerminalDesc[] = }, }; +TerminalDescriptor SW_IMVTerminalDesc[] = +{ + { + SW_IMV_TERMINAL_CONNECT_INPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_INPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_IN, + 33331, // imv + }, + { + SW_IMV_TERMINAL_CONNECT_OUTPUT_1, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT_1", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 0, // + }, + { + SW_IMV_TERMINAL_CONNECT_OUTPUT_2, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT_2", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 19706, // sw_scaler + }, +}; + +TerminalDescriptor SW_B2BTerminalDesc[] = +{ + { + SW_B2B_TERMINAL_CONNECT_INPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_INPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_IN, + 45372, // b2b + }, + { + SW_B2B_TERMINAL_CONNECT_OUTPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 45372, // b2b + }, +}; + +TerminalDescriptor SW_REMOSAICTerminalDesc[] = +{ + { + SW_REMOSAIC_TERMINAL_CONNECT_INPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_INPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_IN, + 19706, // sw_scaler + }, + { + SW_REMOSAIC_TERMINAL_CONNECT_OUTPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 19706, // sw_scaler + }, +}; + int CountOfSW_ISYSTerminalDesc = sizeof(SW_ISYSTerminalDesc) / sizeof(SW_ISYSTerminalDesc[0]); int CountOfLBFFTerminalDesc = sizeof(LBFFTerminalDesc) / sizeof(LBFFTerminalDesc[0]); int CountOfBBPSTerminalDesc = sizeof(BBPSTerminalDesc) / sizeof(BBPSTerminalDesc[0]); int CountOfSW_GDCTerminalDesc = sizeof(SW_GDCTerminalDesc) / sizeof(SW_GDCTerminalDesc[0]); int CountOfSW_SCALERTerminalDesc = sizeof(SW_SCALERTerminalDesc) / sizeof(SW_SCALERTerminalDesc[0]); int CountOfSW_NNTMTerminalDesc = sizeof(SW_NNTMTerminalDesc) / sizeof(SW_NNTMTerminalDesc[0]); +int CountOfSW_IMVTerminalDesc = sizeof(SW_IMVTerminalDesc) / sizeof(SW_IMVTerminalDesc[0]); +int CountOfSW_B2BTerminalDesc = sizeof(SW_B2BTerminalDesc) / sizeof(SW_B2BTerminalDesc[0]); +int CountOfSW_REMOSAICTerminalDesc = sizeof(SW_REMOSAICTerminalDesc) / sizeof(SW_REMOSAICTerminalDesc[0]); diff --git a/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.h b/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.h index 384d6bc..ad9cf96 100644 --- a/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.h +++ b/modules/ipu_desc/ipu75xa/Ipu75xaTerminalDescriptorAutogen.h @@ -153,12 +153,34 @@ enum SW_NNTMTerminalID SW_NNTM_TERMINAL_CONNECT_OUTPUT_2, }; +enum SW_IMVTerminalID +{ + SW_IMV_TERMINAL_CONNECT_INPUT, + SW_IMV_TERMINAL_CONNECT_OUTPUT_1, + SW_IMV_TERMINAL_CONNECT_OUTPUT_2, +}; + +enum SW_B2BTerminalID +{ + SW_B2B_TERMINAL_CONNECT_INPUT, + SW_B2B_TERMINAL_CONNECT_OUTPUT, +}; + +enum SW_REMOSAICTerminalID +{ + SW_REMOSAIC_TERMINAL_CONNECT_INPUT, + SW_REMOSAIC_TERMINAL_CONNECT_OUTPUT, +}; + extern TerminalDescriptor SW_ISYSTerminalDesc[]; extern TerminalDescriptor LBFFTerminalDesc[]; extern TerminalDescriptor BBPSTerminalDesc[]; extern TerminalDescriptor SW_GDCTerminalDesc[]; extern TerminalDescriptor SW_SCALERTerminalDesc[]; extern TerminalDescriptor SW_NNTMTerminalDesc[]; +extern TerminalDescriptor SW_IMVTerminalDesc[]; +extern TerminalDescriptor SW_B2BTerminalDesc[]; +extern TerminalDescriptor SW_REMOSAICTerminalDesc[]; extern int CountOfSW_ISYSTerminalDesc; extern int CountOfLBFFTerminalDesc; @@ -166,3 +188,6 @@ extern int CountOfBBPSTerminalDesc; extern int CountOfSW_GDCTerminalDesc; extern int CountOfSW_SCALERTerminalDesc; extern int CountOfSW_NNTMTerminalDesc; +extern int CountOfSW_IMVTerminalDesc; +extern int CountOfSW_B2BTerminalDesc; +extern int CountOfSW_REMOSAICTerminalDesc; diff --git a/modules/ipu_desc/ipu7x/FragmentsConfigurator.cpp b/modules/ipu_desc/ipu7x/FragmentsConfigurator.cpp new file mode 100644 index 0000000..ab40be6 --- /dev/null +++ b/modules/ipu_desc/ipu7x/FragmentsConfigurator.cpp @@ -0,0 +1,735 @@ +/* +* INTEL CONFIDENTIAL +* Copyright (c) 2022 Intel Corporation +* All Rights Reserved. +* +* The source code contained or described herein and all documents related to +* the source code ("Material") are owned by Intel Corporation or its +* suppliers or licensors. Title to the Material remains with Intel +* Corporation or its suppliers and licensors. The Material may contain trade +* secrets and proprietary and confidential information of Intel Corporation +* and its suppliers and licensors, and is protected by worldwide copyright +* and trade secret laws and treaty provisions. No part of the Material may be +* used, copied, reproduced, modified, published, uploaded, posted, +* transmitted, distributed, or disclosed in any way without Intel's prior +* express written permission. +* +* No license under any patent, copyright, trade secret or other intellectual +* property right is granted to or conferred upon you by disclosure or +* delivery of the Materials, either expressly, by implication, inducement, +* estoppel or otherwise. Any license under such intellectual property rights +* must be express and approved by Intel in writing. +* +* Unless otherwise agreed by Intel in writing, you may not remove or alter +* this notice or any other notice embedded in Materials by Intel or Intels +* suppliers or licensors in any way. +*/ +#include "FragmentsConfigurator.h" + +Ipu8FragmentsConfigurator::Ipu8FragmentsConfigurator(IStaticGraphConfig* staticGraph, OuterNode* node, uint32_t upscalerWidthGranularity) + : _staticGraph(staticGraph), _node(node), _upscalerWidthGranularity(upscalerWidthGranularity) +{ +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configureFragments() +{ + if (_staticGraph == nullptr || _node == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + // Reset status + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + _node->fragmentVanishStatus[stripe] = VanishOption::Full; + } + + for (uint32_t j = 0; j < _node->nodeKernels.kernelCount; j++) + { + StaticGraphRunKernel* runKernel = &_node->nodeKernels.kernelList[j].run_kernel; + StaticGraphFragmentDesc* kernelFragments = _node->nodeKernels.kernelList[j].fragment_descs; + + // Take previous kernel as reference, unless we will change it below. + StaticGraphFragmentDesc* prevKernelFragments = j == 0 ? nullptr : _node->nodeKernels.kernelList[j - 1].fragment_descs; + uint32_t prevKernelUuid = j == 0 ? 0 : _node->nodeKernels.kernelList[j - 1].run_kernel.kernel_uuid; + + uint32_t referenceKernel = GraphResolutionConfiguratorHelper::getReferenceKernel(runKernel->kernel_uuid); + + if (referenceKernel != 0) + { + // Special reference kernel + for (uint32_t k = 0; k < _node->nodeKernels.kernelCount; k++) + { + if (_node->nodeKernels.kernelList[k].run_kernel.kernel_uuid == referenceKernel) + { + prevKernelFragments = _node->nodeKernels.kernelList[k].fragment_descs; + prevKernelUuid = referenceKernel; + break; + } + } + } + + // Find the handling function for this kernel + GraphResolutionConfiguratorKernelRole kernelRole = GraphResolutionConfiguratorHelper::getKernelRole(runKernel->kernel_uuid); + + switch (kernelRole) + { + case GraphResolutionConfiguratorKernelRole::DownScaler: + { + configFragmentsDownscaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::EspaCropper: + { + configFragmentsCropper(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::UpScaler: + { + configFragmentsUpscaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::Output: + { + configFragmentsOutput(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::TnrScaler: + { + configFragmentsTnrScaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments); + break; + } + + case GraphResolutionConfiguratorKernelRole::TnrFeederFull: + case GraphResolutionConfiguratorKernelRole::TnrFeederSmall: + { + configFragmentsTnrFeeder(runKernel, kernelFragments, kernelRole); + break; + } + + case GraphResolutionConfiguratorKernelRole::NonRcb: + { + // Before zoom kernels - take prev kernel fragments as-is + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + } + + default: + { + // No action for other kernels + break; + } + } + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsDownscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactorW = static_cast(resInfo->output_width) / (resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right); + auto scaleFactorH = static_cast(resInfo->output_height) / (resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom); + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + int rightCrop = stripe == static_cast(_node->numberOfFragments - 1) ? resInfo->input_crop.right : 0; + + double value = (static_cast(kernelFragments[stripe].fragmentInputWidth - rightCrop) * scaleFactor) / 4; + kernelFragments[stripe].fragmentOutputWidth = static_cast(floor(value)) * 4; + + // Start of output is rounded up since this is what b2i_ds does (Creates pixels starting from the pixel after) + value = (scaleFactor * kernelFragments[stripe].fragmentStartX) / 2; + _outputStartX[runKernel->kernel_uuid][stripe] = static_cast(ceil(value)) * 2; + } + + return StaticGraphStatus::SG_OK; +} + +void Ipu8FragmentsConfigurator::vanishStripe(uint8_t stripe, uint32_t runKerenlUuid, StaticGraphFragmentDesc* kernelFragments, VanishOption vanishOption) +{ + _node->fragmentVanishStatus[stripe] = vanishOption; + kernelFragments[stripe] = {}; + _outputStartX[runKerenlUuid][stripe] = 0; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsCropper(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + // prev kernel is the downscaler + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + // No cropping in DS, cropping is done by ESPA cropper + + int32_t leftPixel = runKernel->resolution_info->input_crop.left; + int32_t rightPixel = static_cast(runKernel->resolution_info->input_width - runKernel->resolution_info->input_crop.right); + + int32_t leftNonVanishedStripe = 0; + int32_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + std::vector xOffset(_node->numberOfFragments, 0); + + for (int8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (leftPixel + VANISH_MIN >= kernelFragments[stripe].fragmentStartX + kernelFragments[stripe].fragmentInputWidth) + { + // This stripe is cropped out, vanish it! + // Note that we set output width to 0 for ESPA cropper and forward. But Stripe vanishes much eairlier in pipe, and these infos are not updated. + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (rightPixel <= kernelFragments[stripe].fragmentStartX + VANISH_MIN) + { + // This stripe is cropped out, vanish it! + // Note that we set output width to 0 for ESPA cropper and forward. But Stripe vanishes much eairlier in pipe, and these infos are not updated. + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + + for (int32_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + int32_t leftCrop = runKernel->resolution_info->input_crop.left > kernelFragments[stripe].fragmentStartX ? + runKernel->resolution_info->input_crop.left - kernelFragments[stripe].fragmentStartX : 0; + int32_t rightCrop = runKernel->resolution_info->input_crop.right > (runKernel->resolution_info->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) ? + runKernel->resolution_info->input_crop.right - (runKernel->resolution_info->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) : 0; + + // Save for sys api + xOffset[stripe] = static_cast(leftCrop); + + // ESPA crop is after the down scaling and it must output resolution that divides by 8 for tnr scalers. + int32_t stripeZoomCrop = leftCrop + rightCrop; + + int outputWidth = (int)kernelFragments[stripe].fragmentOutputWidth - stripeZoomCrop; + if (outputWidth < 0) + { + return StaticGraphStatus::SG_ERROR; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(outputWidth); + + // For start point, we need to remove the left cropping only for stripes 1 and on + uint16_t outputStartX = static_cast(kernelFragments[stripe].fragmentStartX > runKernel->resolution_info->input_crop.left) ? + static_cast(kernelFragments[stripe].fragmentStartX - runKernel->resolution_info->input_crop.left) : 0; + + _outputStartX[runKernel->kernel_uuid][stripe] = outputStartX; + + if (kernelFragments[stripe].fragmentOutputWidth % 8 != 0) + { + uint16_t pixelsToCrop = kernelFragments[stripe].fragmentOutputWidth % 8; + + // Additional crop on the right, affects only output width + kernelFragments[stripe].fragmentOutputWidth -= pixelsToCrop; + + if (stripe == rightNonVanishedStripe) + { + // Last stripe - crop from left + _outputStartX[runKernel->kernel_uuid][stripe] += pixelsToCrop; + xOffset[stripe] += pixelsToCrop; + } + } + } + + // Update system API offsets + +#ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES + if (runKernel->system_api.size != ((GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)) + (sizeof(StaticGraphKernelSystemApiIoBuffer1_4)))) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } +#endif + + auto systemApiHeader = static_cast(runKernel->system_api.data); + if (systemApiHeader->systemApiUuid != GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid()) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } + + StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast + (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); + + for (uint8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + systemApi->x_output_offset_per_stripe[stripe] = xOffset[stripe]; + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsUpscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + if (runKernel->resolution_info->input_width == runKernel->resolution_info->output_width && + runKernel->resolution_info->input_height == runKernel->resolution_info->output_height && + runKernel->resolution_info->input_crop.left == 0 && + runKernel->resolution_info->input_crop.right == 0 && + runKernel->resolution_info->input_crop.top == 0 && + runKernel->resolution_info->input_crop.bottom == 0) + { + // Upscaler bypassed + return StaticGraphStatus::SG_OK; + } + + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactorW = static_cast(resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / resInfo->output_width; + auto scaleFactorH = static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / resInfo->output_height; + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + uint32_t upscalerWidthGranularity = _upscalerWidthGranularity; + uint16_t inputUnits = static_cast((resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / upscalerWidthGranularity); + + // We would like to keep upscalerWidthGranularity as large as possible in order to minimize the number of pixels that cannot be used for upscaling + // (upscalerWidthGranularity is divided to stripes, so the larger it is the more accurately we can divide) + while (inputUnits % 2 == 0) + { + inputUnits /= 2; + upscalerWidthGranularity *= 2; + } + + int32_t leftPixel = runKernel->resolution_info->input_crop.left; + int32_t rightPixel = static_cast(runKernel->resolution_info->input_width - runKernel->resolution_info->input_crop.right); + + uint8_t leftNonVanishedStripe = 0; + uint8_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + for (int8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + if (leftPixel >= kernelFragments[stripe].fragmentStartX + kernelFragments[stripe].fragmentInputWidth) + { + // This stripe is cropped out, vanish it! + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + if (rightPixel <= kernelFragments[stripe].fragmentStartX) + { + // This stripe is cropped out, vanish it! + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + + for (uint8_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + int32_t leftCrop = resInfo->input_crop.left > kernelFragments[stripe].fragmentStartX ? + resInfo->input_crop.left - kernelFragments[stripe].fragmentStartX : 0; + int32_t rightCrop = resInfo->input_crop.right > (resInfo->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) ? + resInfo->input_crop.right - (resInfo->input_width - kernelFragments[stripe].fragmentStartX - kernelFragments[stripe].fragmentInputWidth) : 0; + + int32_t stripeZoomCrop = leftCrop + rightCrop; + + // Calculate the step, proportional to the part of input to upscaler that this stripe is working on + uint16_t inputWidthAfterZoomCrop = static_cast(kernelFragments[stripe].fragmentInputWidth - stripeZoomCrop); + + uint16_t pixelsToCrop = 0; + uint16_t maxInputWidth = static_cast(UPSCALER_MAX_OUTPUT_WIDTH * scaleFactor); + if (inputWidthAfterZoomCrop > maxInputWidth) + { + pixelsToCrop = inputWidthAfterZoomCrop - maxInputWidth; + inputWidthAfterZoomCrop = maxInputWidth; + } + + uint16_t stripeStepW = GRA_ROUND_DOWN(static_cast(static_cast(inputWidthAfterZoomCrop) / (resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) * upscalerWidthGranularity), 2); + uint16_t inputWidthAfterTotalCrop = stripeStepW * inputUnits; + + if (inputWidthAfterTotalCrop < 16) + { + // Too little left after cropping, vanish this stripe + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterTnr); + continue; + } + + pixelsToCrop += (inputWidthAfterZoomCrop - inputWidthAfterTotalCrop); + + kernelFragments[stripe].fragmentOutputWidth = static_cast(GRA_ROUND(static_cast(inputWidthAfterTotalCrop) / scaleFactor)); + + // Validate output width + if (static_cast(inputWidthAfterTotalCrop) / kernelFragments[stripe].fragmentOutputWidth != + static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / resInfo->output_height) + { + // Output width is not valid, return error + return StaticGraphStatus::SG_ERROR; + } + + if (stripe == leftNonVanishedStripe && stripe != rightNonVanishedStripe) + { + // Crop on the right + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = 0; + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = pixelsToCrop; + } + else if (stripe == rightNonVanishedStripe && stripe != leftNonVanishedStripe) + { + // Crop on the left + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = pixelsToCrop; + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = 0; + } + else + { + // Crop both sides + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft = GRA_ROUND_DOWN(static_cast(pixelsToCrop / 2), 2); + kernelFragments[stripe].upscalerFragDesc.fragmentInputCropRight = pixelsToCrop - kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft; + } + + uint16_t outputStartX = static_cast(kernelFragments[stripe].fragmentStartX > resInfo->input_crop.left ? + kernelFragments[stripe].fragmentStartX - resInfo->input_crop.left : 0); + + outputStartX += kernelFragments[stripe].upscalerFragDesc.fragmentInputCropLeft; + + outputStartX = GRA_ROUND_UP(static_cast(ceil(static_cast(outputStartX) / scaleFactor)), 2); + + _outputStartX[runKernel->kernel_uuid][stripe] = outputStartX; + } + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsOutput(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + int16_t leftNonVanishedStripe = 0; + int16_t rightNonVanishedStripe = _node->numberOfFragments - 1; + + for (int16_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::Full) + { + // Not vanished + leftNonVanishedStripe = stripe; + break; + } + } + + for (int16_t stripe = _node->numberOfFragments - 1; stripe >= 0; stripe--) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::Full) + { + // Not vanished + rightNonVanishedStripe = stripe; + break; + } + } + + // Remove overlaps between stripes + FormatType bufferFormat = GraphResolutionConfiguratorHelper::getFormatForDrainer(runKernel->kernel_uuid); + std::vector newOutputStartX = std::vector(_node->numberOfFragments, 0); + + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + if (stripe == leftNonVanishedStripe) // first stripe + { + newOutputStartX[stripe] = 0; + } + else //middle or last stripe + { + newOutputStartX[stripe] = + (_outputStartX[runKernel->kernel_uuid][stripe] + _outputStartX[runKernel->kernel_uuid][stripe-1] + kernelFragments[stripe-1].fragmentOutputWidth) / 4 * 2; + + // Align to format restrictions if TNR drainer & data is 10-bit packed + newOutputStartX[stripe] = alignToFormatRestrictions(newOutputStartX[stripe], bufferFormat); + } + } + + _outputStartX[runKernel->kernel_uuid] = newOutputStartX; + + // Data Width is calculated according to data starts + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + if (stripe == rightNonVanishedStripe) // last stripe + { + kernelFragments[stripe].fragmentOutputWidth = static_cast(runKernel->resolution_info->input_width - _outputStartX[runKernel->kernel_uuid][stripe]); + } + else // first or middle stripe + { + if (_outputStartX[runKernel->kernel_uuid][stripe + 1] <= _outputStartX[runKernel->kernel_uuid][stripe]) + { + return StaticGraphStatus::SG_ERROR; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(_outputStartX[runKernel->kernel_uuid][stripe+1] - _outputStartX[runKernel->kernel_uuid][stripe]); + } + } + + // Update system API offsets +#ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES + if (runKernel->system_api.size != ((GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)) + (sizeof(StaticGraphKernelSystemApiIoBuffer1_4)))) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } +#endif + + auto systemApiHeader = static_cast(runKernel->system_api.data); + if (systemApiHeader->systemApiUuid != GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid()) + { + // TODO log error + return StaticGraphStatus::SG_ERROR; + } + + StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast + (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); + + for (int16_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + systemApi->x_output_offset_per_stripe[stripe] = 0; + + for (uint8_t plane = 0; plane < 3; plane++) + { + systemApi->plane_start_address_per_stripe[stripe * 3 + plane] = 0; + } + } + + for (int16_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++) + { + uint32_t sumOfPrevWidths = 0; + + for (int16_t s = leftNonVanishedStripe; s < stripe; s++) + { + sumOfPrevWidths += kernelFragments[s].fragmentOutputWidth; + } + + // OutputOffsetPerStripe: Sum(prev output widths) + input_crop.left - stripe.startX + systemApi->x_output_offset_per_stripe[stripe] = + sumOfPrevWidths + runKernel->resolution_info->input_crop.left - kernelFragments[stripe].fragmentStartX; + + // PlaneOffsetStartAddressPerStripe: Sum(prev output widths) * DataSize + for (uint8_t plane = 0; plane < 2; plane++) + { + systemApi->plane_start_address_per_stripe[stripe * 3 + plane] = getPlaneStartAddress(sumOfPrevWidths, bufferFormat, plane); + } + } + + return StaticGraphStatus::SG_OK; +} + +uint32_t Ipu8FragmentsConfigurator::getPlaneStartAddress(uint32_t sumOfPrevWidths, FormatType formatType, uint8_t plane) +{ + // Calculate according to format BPP. + uint32_t bitsPerElement = 8; + uint32_t elementsPerCacheLine = 64; + uint8_t numberOfPlanes = 3; + + if (formatType == FormatType::YUV420_8_SP_P) + { + // 8-bit packed (OFS output) + bitsPerElement = 8; + elementsPerCacheLine = 64; + numberOfPlanes = 2; + } + else if (formatType == FormatType::YUV420_10_SP_P) + { + // 10-bit packed (TNR ref) + bitsPerElement = 10; + elementsPerCacheLine = 50; + numberOfPlanes = 2; + } + else if (formatType == FormatType::META_8) + { + // 8-bit meta data (TNR recursice similarity) + bitsPerElement = 8; + elementsPerCacheLine = 64; + numberOfPlanes = 1; + } + else + { + // Format not supported + // Log error + return 0; + } + + if (plane >= numberOfPlanes) + { + // Plane does not exist + return 0; + } + + // Offset is calculated by taking whole cache lines and then adding the remaining pixles and translate to bytes. + uint32_t wholeCacheLines = sumOfPrevWidths / elementsPerCacheLine; + uint32_t remainingPixels = sumOfPrevWidths % elementsPerCacheLine; + + if ((remainingPixels * bitsPerElement) % 8 != 0) + { + // Log error + return 0; + } + + return wholeCacheLines * 64 + (remainingPixels * bitsPerElement) / 8; +} + +uint16_t Ipu8FragmentsConfigurator::alignToFormatRestrictions(uint16_t size, FormatType bufferFormat) +{ + if (bufferFormat != FormatType::YUV420_10_SP_P) + { + return size; + } + + uint16_t elementsPerCacheLine = 50; + + uint16_t remainingPixels = size % elementsPerCacheLine; + uint16_t pixelsToRemove = remainingPixels % 4; + + return size - pixelsToRemove; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsTnrScaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, + uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments) +{ + if (kernelFragments == nullptr || prevKernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + + copyFragments(runKernel, prevKernelFragments, prevKernelUuid, kernelFragments); + + auto resInfo = runKernel->resolution_info; + + auto scaleFactor = static_cast(resInfo->output_width) / (resInfo->input_width); + + for (int32_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] != VanishOption::Full) + { + continue; + } + + kernelFragments[stripe].fragmentOutputWidth = static_cast(kernelFragments[stripe].fragmentInputWidth * scaleFactor); + + // Start of output is rounded up since this is what b2i_ds does (Creates pixels starting from the pixel after) + _outputStartX[runKernel->kernel_uuid][stripe] = static_cast(ceil(scaleFactor * kernelFragments[stripe].fragmentStartX / 2)) * 2; + } + + // Save stripes for feeder configuration + _tnrScalerFragments = kernelFragments; + _tnrScalerUuid = runKernel->kernel_uuid; + + return StaticGraphStatus::SG_OK; +} + +StaticGraphStatus Ipu8FragmentsConfigurator::configFragmentsTnrFeeder(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, GraphResolutionConfiguratorKernelRole kernelRole) +{ + if (kernelFragments == nullptr) + { + return StaticGraphStatus::SG_ERROR; + } + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + for (uint8_t stripe = 0; stripe < _node->numberOfFragments; stripe++) + { + if (_node->fragmentVanishStatus[stripe] == VanishOption::AfterStats) + { + vanishStripe(stripe, runKernel->kernel_uuid, kernelFragments, VanishOption::AfterStats); + continue; + } + + if (kernelRole == GraphResolutionConfiguratorKernelRole::TnrFeederFull) + { + // TNR Full resolution + kernelFragments[stripe].fragmentOutputWidth = _tnrScalerFragments[stripe].fragmentInputWidth; + kernelFragments[stripe].fragmentStartX = _tnrScalerFragments[stripe].fragmentStartX; + _outputStartX[runKernel->kernel_uuid][stripe] = _tnrScalerFragments[stripe].fragmentStartX; + } + else // GraphResolutionConfiguratorKernelRole::TnrFeederSmall + { + // TNR Small resolution + kernelFragments[stripe].fragmentOutputWidth = _tnrScalerFragments[stripe].fragmentOutputWidth; + kernelFragments[stripe].fragmentStartX = _outputStartX[_tnrScalerUuid][stripe]; + _outputStartX[runKernel->kernel_uuid][stripe] = _outputStartX[_tnrScalerUuid][stripe]; + } + } + + return StaticGraphStatus::SG_OK; +} + +void Ipu8FragmentsConfigurator::copyFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* prevKernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* kernelFragments) +{ + if (prevKernelFragments == nullptr || kernelFragments == nullptr) + { + return; + } + + _outputStartX[runKernel->kernel_uuid] = std::vector(_node->numberOfFragments, 0); + + if (_outputStartX.find(prevKernelUuid) == _outputStartX.end()) + { + // This is the main DS, we start from it, no need to copy + return; + } + + for (uint32_t i = 0; i < _node->numberOfFragments; i++) + { + kernelFragments[i].fragmentInputWidth = prevKernelFragments[i].fragmentOutputWidth; + kernelFragments[i].fragmentOutputWidth = prevKernelFragments[i].fragmentOutputWidth; + kernelFragments[i].fragmentStartX = _outputStartX[prevKernelUuid][i]; + kernelFragments[i].upscalerFragDesc.fragmentInputCropLeft = 0; + kernelFragments[i].upscalerFragDesc.fragmentInputCropRight = 0; + + _outputStartX[runKernel->kernel_uuid][i] = kernelFragments[i].fragmentStartX; + } +} diff --git a/modules/ipu_desc/ipu7x/FragmentsConfigurator.h b/modules/ipu_desc/ipu7x/FragmentsConfigurator.h new file mode 100644 index 0000000..f3c6c9a --- /dev/null +++ b/modules/ipu_desc/ipu7x/FragmentsConfigurator.h @@ -0,0 +1,65 @@ +/* +* INTEL CONFIDENTIAL +* Copyright (c) 2022 Intel Corporation +* All Rights Reserved. +* +* The source code contained or described herein and all documents related to +* the source code ("Material") are owned by Intel Corporation or its +* suppliers or licensors. Title to the Material remains with Intel +* Corporation or its suppliers and licensors. The Material may contain trade +* secrets and proprietary and confidential information of Intel Corporation +* and its suppliers and licensors, and is protected by worldwide copyright +* and trade secret laws and treaty provisions. No part of the Material may be +* used, copied, reproduced, modified, published, uploaded, posted, +* transmitted, distributed, or disclosed in any way without Intel's prior +* express written permission. +* +* No license under any patent, copyright, trade secret or other intellectual +* property right is granted to or conferred upon you by disclosure or +* delivery of the Materials, either expressly, by implication, inducement, +* estoppel or otherwise. Any license under such intellectual property rights +* must be express and approved by Intel in writing. +* +* Unless otherwise agreed by Intel in writing, you may not remove or alter +* this notice or any other notice embedded in Materials by Intel or Intels +* suppliers or licensors in any way. +*/ +#pragma once +#include "GraphResolutionConfiguratorInclude.h" +#include + +class Ipu8FragmentsConfigurator +{ +public: + + static const int32_t VANISH_MIN = 16; + static const int32_t UPSCALER_MAX_OUTPUT_WIDTH = 4672; + Ipu8FragmentsConfigurator(IStaticGraphConfig* staticGraph, OuterNode* node, uint32_t upscalerWidthGranularity); + + StaticGraphStatus configureFragments(); + +private: + // Stripe Actions - each filter will perform one action according to its role + StaticGraphStatus configFragmentsDownscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsCropper(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsUpscaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsOutput(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsTnrScaler(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* prevKernelFragments); + StaticGraphStatus configFragmentsTnrFeeder(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* kernelFragments, GraphResolutionConfiguratorKernelRole kernelRole); + + void copyFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* prevKernelFragments, uint32_t prevKernelUuid, StaticGraphFragmentDesc* kernelFragments); + void vanishStripe(uint8_t stripe, uint32_t runKerenlUuid, StaticGraphFragmentDesc* kernelFragments, VanishOption vanishOption); + uint32_t getPlaneStartAddress(uint32_t sumOfPrevWidths, FormatType formatType, uint8_t plane); + uint16_t alignToFormatRestrictions(uint16_t size, FormatType bufferFormat); + + OuterNode* _node = nullptr; + IStaticGraphConfig* _staticGraph = nullptr; + + // Fragments binaries do not contain output start x, so we keep them here + std::map> _outputStartX; + uint32_t _upscalerWidthGranularity = 1; + + // Save TNR resolutions for feeder configurations + StaticGraphFragmentDesc* _tnrScalerFragments = nullptr; + uint32_t _tnrScalerUuid = 0; +}; diff --git a/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.cpp b/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.cpp index 49b5b6e..bd5dbb9 100644 --- a/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.cpp +++ b/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.cpp @@ -30,6 +30,10 @@ #include #include +#if SUPPORT_FRAGMENTS == 1 +#include "FragmentsConfigurator.h" +#endif + #define GRA_CONVERT_TO_RADIANS(degreeAngle) ((double)((degreeAngle)*M_PI/180.0)) /* * External Interfaces @@ -122,10 +126,20 @@ sensorMode->verticalCropOffset - sensorMode->croppedImageHeight; // Input crop to scaler includes sensor, so we need to remove it - _originalCropInputToScaler.top = static_cast((_originalCropInputToScaler.top - static_cast(_sensorVerticalCropTop)) * _sensorHorizontalScaling); - _originalCropInputToScaler.bottom = static_cast((_originalCropInputToScaler.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorHorizontalScaling); - _originalCropInputToScaler.left = static_cast((_originalCropInputToScaler.left - static_cast(_sensorHorizontalCropLeft)) * _sensorVerticalScaling); - _originalCropInputToScaler.right = static_cast((_originalCropInputToScaler.right - static_cast(_sensorHorizontalCropRight)) * _sensorVerticalScaling); + _originalCropInputToScaler.left = static_cast((_originalCropInputToScaler.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); + _originalCropInputToScaler.right = static_cast((_originalCropInputToScaler.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); + _originalCropInputToScaler.top = static_cast((_originalCropInputToScaler.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); + _originalCropInputToScaler.bottom = static_cast((_originalCropInputToScaler.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); + + _originalCropScalerToOutput.left = static_cast(_originalCropScalerToOutput.left * _sensorHorizontalScaling); + _originalCropScalerToOutput.right = static_cast(_originalCropScalerToOutput.right * _sensorHorizontalScaling); + _originalCropScalerToOutput.top = static_cast(_originalCropScalerToOutput.top * _sensorVerticalScaling); + _originalCropScalerToOutput.bottom = static_cast(_originalCropScalerToOutput.bottom * _sensorVerticalScaling); + + _originalCropScalerToOutput.left -= cropperRunKernel->resolution_info->input_crop.left; + _originalCropScalerToOutput.right -= cropperRunKernel->resolution_info->input_crop.right; + _originalCropScalerToOutput.top -= cropperRunKernel->resolution_info->input_crop.top; + _originalCropScalerToOutput.bottom -= cropperRunKernel->resolution_info->input_crop.bottom; } /* @@ -204,77 +218,79 @@ StaticGraphStatus GraphResolutionConfigurator::updateStaticGraphConfig(const Reg { return StaticGraphStatus::SG_ERROR; } - - // Key resolution index - uint32_t keyResIndex = 0; - if (isCenteredZoom == true) + if (roi.fromInput == false) { - ZoomKeyResolutions* zoomKeyResolutions = nullptr; - if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + // Key resolution index + uint32_t keyResIndex = 0; + if (isCenteredZoom == true) { - return StaticGraphStatus::SG_ERROR; - } + ZoomKeyResolutions* zoomKeyResolutions = nullptr; + if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Get key resolution for this ROI - // Special case for factor 1, this means there is no zoom, so we select index 0 - if (userRoi.zoomFactor == 1.0) - { - keyResIndex = 0; - } - else if (getZoomKeyResolutionIndex(zoomKeyResolutions, sensorRoi, keyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; - } + // Get key resolution for this ROI + // Special case for factor 1, this means there is no zoom, so we select index 0 + if (userRoi.zoomFactor == 1.0) + { + keyResIndex = 0; + } + else if (getZoomKeyResolutionIndex(zoomKeyResolutions, sensorRoi, keyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Update the static configuration according to the key resolution index - // Copy the original kernels configuration a _kernels - if (_staticGraph->updateConfiguration(keyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; + // Update the static configuration according to the key resolution index + // Copy the original kernels configuration a _kernels + if (_staticGraph->updateConfiguration(keyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } - } - else - { - if (_staticGraph->updateConfiguration() != StaticGraphStatus::SG_OK) + else { - return StaticGraphStatus::SG_ERROR; + if (_staticGraph->updateConfiguration() != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } - } - // Get key resolution for previous ROI - uint32_t prevKeyResIndex = 0; + // Get key resolution for previous ROI + uint32_t prevKeyResIndex = 0; - if (prevIsCenteredZoom == true) - { - ZoomKeyResolutions* zoomKeyResolutions = nullptr; - if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + if (prevIsCenteredZoom == true) { - return StaticGraphStatus::SG_ERROR; - } + ZoomKeyResolutions* zoomKeyResolutions = nullptr; + if (_staticGraph->getZoomKeyResolutions(&zoomKeyResolutions) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - SensorRoi prevSensorRoi; - if (getSensorRoi(prevUserRoi, prevSensorRoi) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; - } + SensorRoi prevSensorRoi; + if (getSensorRoi(prevUserRoi, prevSensorRoi) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } - // Special case for factor 1, this means there is no zoom, so we select index 0 - if (prevUserRoi.zoomFactor == 1.0) - { - prevKeyResIndex = 0; - } - else if (getZoomKeyResolutionIndex(zoomKeyResolutions, prevSensorRoi, prevKeyResIndex) != StaticGraphStatus::SG_OK) - { - return StaticGraphStatus::SG_ERROR; + // Special case for factor 1, this means there is no zoom, so we select index 0 + if (prevUserRoi.zoomFactor == 1.0) + { + prevKeyResIndex = 0; + } + else if (getZoomKeyResolutionIndex(zoomKeyResolutions, prevSensorRoi, prevKeyResIndex) != StaticGraphStatus::SG_OK) + { + return StaticGraphStatus::SG_ERROR; + } } + // Update whether if key resolution has changed + isKeyResolutionChanged = (keyResIndex == prevKeyResIndex) ? false : true; } - // Update whether if key resolution has changed - isKeyResolutionChanged = (keyResIndex == prevKeyResIndex) ? false : true; // // Step #2 Dynamic update according to this ROI // - return updateRunKernelOfScalers(sensorRoi); + return updateRunKernelOfScalers(roi.fromInput,sensorRoi); } #endif @@ -289,14 +305,26 @@ StaticGraphStatus GraphResolutionConfigurator::getSensorRoi(const RegionOfIntere return StaticGraphStatus::SG_ERROR; } - auto outputRunKernel = getRunKernel(_outputRunKernelCoord); - if (userRoi.fromInput == true) { - // Not supported - return StaticGraphStatus::SG_ERROR; + if (userRoi.zoomFactor == 1 && userRoi.panFactor == 0) + { + auto cropRunKernel = getRunKernel(_cropperRunKernelCoord); + sensorRoi.width = cropRunKernel->resolution_info->output_width; + sensorRoi.height = cropRunKernel->resolution_info->output_height; + sensorRoi.cropLeft = cropRunKernel->resolution_info->input_crop.left; + sensorRoi.cropRight = cropRunKernel->resolution_info->input_crop.right; + sensorRoi.cropTop = GRA_ROUND_DOWN(std::min(cropRunKernel->resolution_history->input_height- cropRunKernel->resolution_info->output_height, std::max(0, static_cast(static_cast(cropRunKernel->resolution_history->input_height * userRoi.tiltFactor)))), 2); + sensorRoi.cropBottom = cropRunKernel->resolution_info->input_height - cropRunKernel->resolution_info->output_height - sensorRoi.cropTop; + // Not supported + return StaticGraphStatus::SG_OK; + } + else + { + return StaticGraphStatus::SG_ERROR; + } } - + auto outputRunKernel = getRunKernel(_outputRunKernelCoord); // Calculate ROI on output, using original output since user ROI is relative to full output ROI (not after some zoom was performed) StaticGraphKernelRes* outputRunKernelResolution = outputRunKernel->resolution_info; if (outputRunKernelResolution == nullptr) @@ -331,91 +359,118 @@ StaticGraphStatus GraphResolutionConfigurator::getSensorRoi(const RegionOfIntere return StaticGraphStatus::SG_OK; } -StaticGraphStatus GraphResolutionConfigurator::updateRunKernelOfScalers(SensorRoi& roi) +StaticGraphStatus GraphResolutionConfigurator::updateRunKernelOfScalers(bool fromInput, SensorRoi& roi) { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - auto downscalerRunKernel = getRunKernel(_downscalerRunKernelCoord); auto upscalerRunKernel = getRunKernel(_upscalerRunKernelCoord); auto cropperRunKernel = getRunKernel(_cropperRunKernelCoord); - uint32_t inputWidth = downscalerRunKernel->resolution_info->input_width; - uint32_t inputHeight = downscalerRunKernel->resolution_info->input_height; - - uint32_t outputWidth = cropperRunKernel->resolution_info->output_width; - uint32_t outputHeight = cropperRunKernel->resolution_info->output_height; - - StaticGraphKernelResCrop downscalerCropHistory; - downscalerCropHistory.left = static_cast((downscalerRunKernel->resolution_history->input_crop.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); - downscalerCropHistory.right = static_cast((downscalerRunKernel->resolution_history->input_crop.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); - downscalerCropHistory.top = static_cast((downscalerRunKernel->resolution_history->input_crop.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); - downscalerCropHistory.bottom = static_cast((downscalerRunKernel->resolution_history->input_crop.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); - - // If ROI is larger than scaler's output resolution - we downscale - if (roi.width >= outputWidth) + if (fromInput) { - // Only down scaler is active - if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, - outputWidth, outputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + cropperRunKernel->resolution_info->input_crop.top = roi.cropTop; + cropperRunKernel->resolution_info->input_crop.bottom = roi.cropBottom; + + // Update resolution history for relevant kernels + for (auto& runKernelForUpdate : _kernelsForUpdate) { - ret = StaticGraphStatus::SG_ERROR; + // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. + StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); + if (updateRunKernelResolutionHistory(runKernelPtr, cropperRunKernel, false) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } } - - updateRunKernelPassThrough(upscalerRunKernel, outputWidth, outputHeight); - - // When downscaling, cropper is not a part of dynamic scaling, even if it was a part of static configuration. - updateRunKernelPassThrough(cropperRunKernel, outputWidth, outputHeight); } else { - // Configure downscaler and upscaler according to upscaler constraints - // Update upscaler info, according constraints. Returns the expected input width and height for upscaler. - uint32_t upscalerActualInputWidth; - uint32_t upscalerActualInputHeight; - uint32_t upscalerActualOutputWidth; - uint32_t upscalerActualOutputHeight; - if (updateRunKernelUpScaler(upscalerRunKernel, roi.width, roi.height, outputWidth, outputHeight, - upscalerActualInputWidth, upscalerActualInputHeight, - upscalerActualOutputWidth, upscalerActualOutputHeight) != StaticGraphStatus::SG_OK) + uint32_t inputWidth = downscalerRunKernel->resolution_info->input_width; + uint32_t inputHeight = downscalerRunKernel->resolution_info->input_height; + + uint32_t outputWidth = cropperRunKernel->resolution_info->output_width; + uint32_t outputHeight = cropperRunKernel->resolution_info->output_height; + + StaticGraphKernelResCrop downscalerCropHistory; + downscalerCropHistory.left = static_cast((downscalerRunKernel->resolution_history->input_crop.left - static_cast(_sensorHorizontalCropLeft)) * _sensorHorizontalScaling); + downscalerCropHistory.right = static_cast((downscalerRunKernel->resolution_history->input_crop.right - static_cast(_sensorHorizontalCropRight)) * _sensorHorizontalScaling); + downscalerCropHistory.top = static_cast((downscalerRunKernel->resolution_history->input_crop.top - static_cast(_sensorVerticalCropTop)) * _sensorVerticalScaling); + downscalerCropHistory.bottom = static_cast((downscalerRunKernel->resolution_history->input_crop.bottom - static_cast(_sensorVerticalCropBottom)) * _sensorVerticalScaling); + if (roi.width == outputWidth || roi.height == outputHeight) { - ret = StaticGraphStatus::SG_ERROR; + updateRunKernelPassThrough(downscalerRunKernel, inputWidth, inputHeight); + updateRunKernelPassThrough(upscalerRunKernel, inputWidth, inputHeight); + // Update ESPA crop if required + updateRunKernelFinalCropper(cropperRunKernel, inputWidth, inputHeight, outputWidth, outputHeight); } - - // Update DS cropping and downscale according to the resolution the upscaler requires. - if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, - upscalerActualInputWidth, upscalerActualInputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + // If ROI is larger than scaler's output resolution - we downscale + else if (roi.width > outputWidth) { - ret = StaticGraphStatus::SG_ERROR; + // Only down scaler is active + if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, + outputWidth, outputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + + updateRunKernelPassThrough(upscalerRunKernel, outputWidth, outputHeight); + + // When downscaling, cropper is not a part of dynamic scaling, even if it was a part of static configuration. + updateRunKernelPassThrough(cropperRunKernel, outputWidth, outputHeight); + } + else + { + // Configure downscaler and upscaler according to upscaler constraints + + // Update upscaler info, according constraints. Returns the expected input width and height for upscaler. + uint32_t upscalerActualInputWidth; + uint32_t upscalerActualInputHeight; + uint32_t upscalerActualOutputWidth; + uint32_t upscalerActualOutputHeight; + if (updateRunKernelUpScaler(upscalerRunKernel, roi.width, roi.height, outputWidth, outputHeight, + upscalerActualInputWidth, upscalerActualInputHeight, + upscalerActualOutputWidth, upscalerActualOutputHeight) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Now that we're done, if downscaler is not doing any scaling, it is better to let it be bypassed and move the cropping to upscaler - updateCroppingScaler(downscalerRunKernel, upscalerRunKernel); + // Update DS cropping and downscale according to the resolution the upscaler requires. + if (updateRunKernelDownScaler(downscalerRunKernel, roi, inputWidth, inputHeight, + upscalerActualInputWidth, upscalerActualInputHeight, &downscalerCropHistory) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Update ESPA crop if required - updateRunKernelFinalCropper(cropperRunKernel, upscalerActualOutputWidth, upscalerActualOutputHeight, outputWidth, outputHeight); - } + // Now that we're done, if downscaler is not doing any scaling, it is better to let it be bypassed and move the cropping to upscaler + updateCroppingScaler(downscalerRunKernel, upscalerRunKernel); - // Update resolution histories according to decisions made above - if (updateRunKernelResolutionHistory(upscalerRunKernel, downscalerRunKernel) != StaticGraphStatus::SG_OK) - { - ret = StaticGraphStatus::SG_ERROR; - } + // Update ESPA crop if required + updateRunKernelFinalCropper(cropperRunKernel, upscalerActualOutputWidth, upscalerActualOutputHeight, outputWidth, outputHeight); + } - if (updateRunKernelResolutionHistory(cropperRunKernel, upscalerRunKernel) != StaticGraphStatus::SG_OK) - { - ret = StaticGraphStatus::SG_ERROR; - } + // Update resolution histories according to decisions made above + if (updateRunKernelResolutionHistory(upscalerRunKernel, downscalerRunKernel) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } - // Update resolution history for relevant kernels - for (auto& runKernelForUpdate : _kernelsForUpdate) - { - // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. - StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); - if (updateRunKernelResolutionHistory(runKernelPtr, upscalerRunKernel, false) != StaticGraphStatus::SG_OK) + if (updateRunKernelResolutionHistory(cropperRunKernel, upscalerRunKernel) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } + + // Update resolution history for relevant kernels + for (auto& runKernelForUpdate : _kernelsForUpdate) + { + // We update all histories according to upscaler... ignoring any cropping from now on, even if we configured ESPA cropper. + // Anna - I don't know why cropping was ignored. I think it should be after cropping + StaticGraphRunKernel* runKernelPtr = getRunKernel(runKernelForUpdate); + if (updateRunKernelResolutionHistory(runKernelPtr, cropperRunKernel, false) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + } } return ret; @@ -717,11 +772,11 @@ StaticGraphStatus GraphResolutionConfigurator::updateRunKernelFinalCropper(Stati runKernel->resolution_info->output_width = outputWidth; runKernel->resolution_info->output_height = outputHeight; - // Crop on the right & bottom in order not to influence resolution history - runKernel->resolution_info->input_crop.left = 0; - runKernel->resolution_info->input_crop.right = inputWidth - outputWidth; - runKernel->resolution_info->input_crop.top = 0; - runKernel->resolution_info->input_crop.bottom = inputHeight - outputHeight; + // Crop symmetrically + runKernel->resolution_info->input_crop.left = GRA_ROUND_DOWN(static_cast((inputWidth - outputWidth) / 2.0), 2); + runKernel->resolution_info->input_crop.right = inputWidth - outputWidth - runKernel->resolution_info->input_crop.left; + runKernel->resolution_info->input_crop.top = GRA_ROUND_DOWN(static_cast((inputHeight - outputHeight) / 2.0), 2); + runKernel->resolution_info->input_crop.bottom = inputHeight - outputHeight - runKernel->resolution_info->input_crop.top; return StaticGraphStatus::SG_OK; } @@ -734,6 +789,16 @@ StaticGraphStatus GraphResolutionConfigurator::updateCroppingScaler(StaticGraphR int32_t heightAfterCtop = downscalerRunKernel->resolution_info->input_height - downscalerRunKernel->resolution_info->input_crop.top - downscalerRunKernel->resolution_info->input_crop.bottom; + int32_t extraPixelsWidth = (downscalerRunKernel->resolution_info->input_width - downscalerRunKernel->resolution_info->input_crop.left - downscalerRunKernel->resolution_info->input_crop.right)- + downscalerRunKernel->resolution_info->output_width; + + widthAfterCtop -= extraPixelsWidth % 4; + + int32_t extraPixelsHeight = (downscalerRunKernel->resolution_info->input_width - downscalerRunKernel->resolution_info->input_crop.left - downscalerRunKernel->resolution_info->input_crop.right) - + downscalerRunKernel->resolution_info->output_width; + + heightAfterCtop -= extraPixelsHeight % 4; + if (widthAfterCtop == downscalerRunKernel->resolution_info->output_width && heightAfterCtop == downscalerRunKernel->resolution_info->output_height) { @@ -1026,8 +1091,8 @@ StaticGraphStatus GraphResolutionConfigurator::undoSensorScaleRipAngle(int32_t& StaticGraphStatus GraphResolutionConfigurator::sensorCropOrScaleExist(bool& sensor_crop_or_scale_exist) { sensor_crop_or_scale_exist = false; - if ((abs(_sensorHorizontalScaling - 1.0F) < 0.01F) || - (abs(_sensorVerticalScaling - 1.0F) < 0.01F) || + if ((abs(_sensorHorizontalScaling - 1.0F) > 0.01F) || + (abs(_sensorVerticalScaling - 1.0F) > 0.01F) || (_sensorHorizontalCropLeft > 0) || (_sensorHorizontalCropRight > 0) || (_sensorVerticalCropTop > 0) || @@ -1056,7 +1121,8 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon initRunKernel(GraphResolutionConfiguratorKernelRole::UpScaler, _upscalerRunKernel) != StaticGraphStatus::SG_OK || initRunKernel(GraphResolutionConfiguratorKernelRole::EspaCropper, _cropperRunKernel) != StaticGraphStatus::SG_OK || initOutputRunKernel() != StaticGraphStatus::SG_OK || - initKernelsForUpdate() != StaticGraphStatus::SG_OK) + initKernelsForUpdate() != StaticGraphStatus::SG_OK || + _node == nullptr) { _staticGraph = nullptr; return; @@ -1079,7 +1145,17 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon _upscalerStepW *= 2; _upscalerStepH *= 2; - // Save original values for kernels that are being updated + // Due to upscaler constraints, we should avoid having too many units. + // Number of pixels that cannot be used when upscaling a stripe may be up to ~ 2*units + // For details: https://hsdes.intel.com/appstore/article-one/#/article/15018342122 + // This affects the number of possible zoom steps, but for large resolutions it is OK to enlarge the step + while (outputWidth / _upscalerStepW > 70) + { + _upscalerStepW *= 2; + _upscalerStepH *= 2; + } + + // Save original values for kernels that are being updated _originalCropOfDownScaler = _downscalerRunKernel->resolution_info->input_crop; _originalCropOfEspaCropper = _cropperRunKernel->resolution_info->input_crop; @@ -1106,12 +1182,36 @@ Ipu8GraphResolutionConfigurator::Ipu8GraphResolutionConfigurator(IStaticGraphCon return; } - if (sensorMode->horizontalScalingDenominator) { + if (sensorMode->horizontalScalingDenominator) + { _sensorHorizontalScaling = static_cast(sensorMode->horizontalScalingNumerator) / sensorMode->horizontalScalingDenominator; } - if (sensorMode->verticalScalingDenominator) { + + if (sensorMode->verticalScalingDenominator) + { _sensorVerticalScaling = static_cast(sensorMode->verticalScalingNumerator) / sensorMode->verticalScalingDenominator; } + +#if SUPPORT_FRAGMENTS == 1 + if (_node != nullptr && _node->GetNumberOfFragments() > 1) + { + _fragmentsConfigurator = new Ipu8FragmentsConfigurator(_staticGraph, _node, _upscalerStepW); + } +#endif +} + +Ipu8GraphResolutionConfigurator::~Ipu8GraphResolutionConfigurator() +{ + _kernelsForUpdateAfterCropper.clear(); + _kernelsForUpdateAfterUpscaler.clear(); + +#if SUPPORT_FRAGMENTS == 1 + if (_fragmentsConfigurator != nullptr) + { + delete _fragmentsConfigurator; + _fragmentsConfigurator = nullptr; + } +#endif } StaticGraphStatus Ipu8GraphResolutionConfigurator::initRunKernel(GraphResolutionConfiguratorKernelRole role, StaticGraphRunKernel*& runKernel) @@ -1139,6 +1239,10 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::initRunKernel(uint32_t kernel if (node->nodeKernels.kernelList[j].run_kernel.kernel_uuid == kernelUuid) { runKernel = &node->nodeKernels.kernelList[j].run_kernel; + if (node->type == NodeTypes::Cb) + { + _node = node; + } return StaticGraphStatus::SG_OK; } } @@ -1216,6 +1320,21 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::initKernelsForUpdate() } } + std::vector> smurfUuids; + GraphResolutionConfiguratorHelper::getSmurfRunKernelUuid(smurfUuids); + + for (auto& smurfUuid : smurfUuids) + { + StaticGraphRunKernel* runKernel; + StaticGraphRunKernel* deviceRunKernel; + if (initRunKernel(smurfUuid.first, runKernel) == StaticGraphStatus::SG_OK && + initRunKernel(smurfUuid.second, deviceRunKernel) == StaticGraphStatus::SG_OK) + { + std::pair runKernelPair = std::make_pair(runKernel, deviceRunKernel); + _smurfKernels.push_back(runKernelPair); + } + } + return StaticGraphStatus::SG_OK; } @@ -1306,11 +1425,6 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - //uint32_t fragments = 1; - //auto downscalerFragments = getKernelFragments(_downscalerRunKernelCoord); - //auto upscalerFragments = getKernelFragments(_upscalerRunKernelCoord); - //auto cropperFragments = getKernelFragments(_cropperRunKernelCoord); - uint32_t inputWidth = _downscalerRunKernel->resolution_info->input_width; uint32_t inputHeight = _downscalerRunKernel->resolution_info->input_height; @@ -1323,17 +1437,20 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso if (roi.width >= outputWidth) { // Only down scaler is active - if (updateRunKernelDownScaler(_downscalerRunKernel, roi, outputWidth, outputHeight) != StaticGraphStatus::SG_OK) + uint32_t dsOutputWidth = outputWidth; + uint32_t dsOutputHeight = outputHeight; + + if (updateRunKernelDownScaler(_downscalerRunKernel, roi, dsOutputWidth, dsOutputHeight) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } - // Pass-through. Must call cropper function in order to update the system API. StaticGraphKernelResCrop EmptyCrop = { 0, 0, 0, 0 }; - if (updateRunKernelCropper(_cropperRunKernel, roi, outputWidth, outputHeight, outputWidth, outputHeight, EmptyCrop) != StaticGraphStatus::SG_OK) + if (updateRunKernelCropper(_cropperRunKernel, roi, dsOutputWidth, dsOutputHeight, outputWidth, outputHeight, downscalerCropHist) != StaticGraphStatus::SG_OK) { ret = StaticGraphStatus::SG_ERROR; } + updateRunKernelPassThrough(_upscalerRunKernel, outputWidth, outputHeight); } else @@ -1385,32 +1502,66 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelOfScalers(Reso } } - // :TODO: Striping Support - // Currently we assume one stripe. - //updateKernelFragments(_downscalerRunKernel, downscalerFragments, fragments); - //updateKernelFragments(_upscalerRunKernel, upscalerFragments, fragments); - //updateKernelFragments(_cropperRunKernel, cropperFragments, fragments); + // After resolution history was updated, re-configure SAP devices to get the correct FOV + // We do not change the sap feeders configuration, only update the crop & scale of smurfs + for (auto& runKernelForUpdate : _smurfKernels) + { + if (updateRunKernelSmurf(runKernelForUpdate.first, runKernelForUpdate.second) != StaticGraphStatus::SG_OK) + { + ret = StaticGraphStatus::SG_ERROR; + } + } if (ret == StaticGraphStatus::SG_OK) { ret = SanityCheck(); } + if (_fragmentsConfigurator != nullptr) + { + // Configure fragments according to the new zoomed run kernels information + _fragmentsConfigurator->configureFragments(); + } + return ret; } -StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, - uint32_t outputWidth, uint32_t outputHeight) +StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t& outputWidth, uint32_t& outputHeight) { StaticGraphStatus ret = StaticGraphStatus::SG_OK; - runKernel->resolution_info->output_width = outputWidth; - runKernel->resolution_info->output_height = outputHeight; + if (_fragmentsConfigurator == nullptr) + { + // No fragments, crop to ROI and downscale to output resolution + runKernel->resolution_info->output_width = outputWidth; + runKernel->resolution_info->output_height = outputHeight; - runKernel->resolution_info->input_crop.left = roi.left; - runKernel->resolution_info->input_crop.right = roi.right; - runKernel->resolution_info->input_crop.top = roi.top; - runKernel->resolution_info->input_crop.bottom = roi.bottom; + runKernel->resolution_info->input_crop.left = roi.left; + runKernel->resolution_info->input_crop.right = roi.right; + runKernel->resolution_info->input_crop.top = roi.top; + runKernel->resolution_info->input_crop.bottom = roi.bottom; + } + else + { + // Fragments, leave the crop to espa crop, configure according to desired scale factor + // Since ESPA can only crop, make sure new output sizes are larger or equal to requested sizes + auto resInfo = runKernel->resolution_info; + + // If we have frgments, downscaler cannot perform left cropping + auto scaleFactorW = static_cast(roi.width) / outputWidth; + auto scaleFactorH = static_cast(roi.height) / outputHeight; + auto scaleFactor = std::max(scaleFactorW, scaleFactorH); + + runKernel->resolution_info->input_crop = _originalCropOfDownScaler; + + runKernel->resolution_info->output_width = std::max(outputWidth, + GRA_ROUND_UP(static_cast(ceil(static_cast(resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / scaleFactor)), 4)); + runKernel->resolution_info->output_height = std::max(outputHeight, + GRA_ROUND_UP(static_cast(ceil(static_cast(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / scaleFactor)), 2)); + + outputWidth = runKernel->resolution_info->output_width; + outputHeight = runKernel->resolution_info->output_height; + } return ret; } @@ -1433,23 +1584,6 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static runKernel->resolution_info->input_crop.bottom = 0; // In certain cases need to adjust negative and/or odd crop values. - if (downscalerCropHist.left < 0) - { - downscalerCropHist.left = 0; - } - if (downscalerCropHist.right < 0) - { - downscalerCropHist.right = 0; - } - if (downscalerCropHist.top < 0) - { - downscalerCropHist.top = 0; - } - if (downscalerCropHist.bottom < 0) - { - downscalerCropHist.bottom = 0; - } - if (downscalerCropHist.left & 1) { downscalerCropHist.left = downscalerCropHist.left - 1; @@ -1470,29 +1604,30 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static // Configure to crop the required amount. First try to use the original DS cropping (Remove padding) int32_t totalHorizontalCrop = inputWidth - outputWidth; - int32_t originalDsPadding = downscalerCropHist.left < 0 ? -downscalerCropHist.left : 0; - if (totalHorizontalCrop >= originalDsPadding && originalDsPadding > 0) + int32_t originalDsCrop = downscalerCropHist.left < 0 ? -downscalerCropHist.left : 0; + if (totalHorizontalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.left = originalDsPadding; - totalHorizontalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.left = originalDsCrop; + totalHorizontalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.left = 0; } - originalDsPadding = downscalerCropHist.right < 0 ? -downscalerCropHist.right : 0; - if (totalHorizontalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.right < 0 ? -downscalerCropHist.right : 0; + if (totalHorizontalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.right = originalDsPadding; - totalHorizontalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.right = originalDsCrop; + totalHorizontalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.right = 0; } // Now crop symmetrically to TNR size if any more cropping is required + // :TODO: fix this for PTZ with striping since should take roi into account runKernel->resolution_info->input_crop.left += GRA_ROUND_DOWN(static_cast(static_cast(totalHorizontalCrop)) / 2, 2); - runKernel->resolution_info->input_crop.right += GRA_ROUND_UP(static_cast(static_cast(totalHorizontalCrop)) / 2, 2); + runKernel->resolution_info->input_crop.right += (totalHorizontalCrop - GRA_ROUND_DOWN(static_cast(static_cast(totalHorizontalCrop)) / 2, 2)); if (roi.left < static_cast(runKernel->resolution_info->input_crop.left)) { @@ -1508,29 +1643,30 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static // Configure to crop the required amount. First try to use the original DS cropping (Remove padding) int32_t totalVerticalCrop = inputHeight - outputHeight; - originalDsPadding = downscalerCropHist.top < 0 ? -downscalerCropHist.top : 0; - if (totalVerticalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.top < 0 ? -downscalerCropHist.top : 0; + if (totalVerticalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.top = originalDsPadding; - totalVerticalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.top = originalDsCrop; + totalVerticalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.top = 0; } - originalDsPadding = downscalerCropHist.bottom < 0 ? -downscalerCropHist.bottom : 0; - if (totalVerticalCrop >= originalDsPadding && originalDsPadding > 0) + originalDsCrop = downscalerCropHist.bottom < 0 ? -downscalerCropHist.bottom : 0; + if (totalVerticalCrop >= originalDsCrop && originalDsCrop > 0) { - runKernel->resolution_info->input_crop.bottom = originalDsPadding; - totalVerticalCrop -= originalDsPadding; + runKernel->resolution_info->input_crop.bottom = originalDsCrop; + totalVerticalCrop -= originalDsCrop; // Padding was handled, no need to handle again downscalerCropHist.bottom = 0; } // Now crop symmetrically to TNR size if any more cropping is required + // :TODO: fix this for PTZ with striping since should take roi into account runKernel->resolution_info->input_crop.top += GRA_ROUND_DOWN(static_cast(static_cast(totalVerticalCrop)) / 2, 2); - runKernel->resolution_info->input_crop.bottom += GRA_ROUND_UP(static_cast(static_cast(totalVerticalCrop)) / 2, 2); + runKernel->resolution_info->input_crop.bottom += (totalVerticalCrop - GRA_ROUND_DOWN(static_cast(static_cast(totalVerticalCrop)) / 2, 2)); if (roi.top < static_cast(runKernel->resolution_info->input_crop.top)) { @@ -1559,6 +1695,8 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelCropper(Static return StaticGraphStatus::SG_ERROR; } + // The following will update the system API for single stripe. In case there are additional stripes system API will + // be configured by FrgamentsConfigurator. StaticGraphKernelSystemApiIoBuffer1_4* systemApi = reinterpret_cast (static_cast(runKernel->system_api.data) + GRA_ROUND_UP(sizeof(SystemApiRecordHeader), 4)); @@ -1591,13 +1729,15 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelUpScaler(Stati uint32_t actualCropW = units * _upscalerStepW; uint32_t actualCropH = units * _upscalerStepH; - uint32_t deltaW = GRA_ROUND_DOWN((totalCropW - actualCropW) / 2, 2); - uint32_t deltaH = GRA_ROUND_DOWN((totalCropH - actualCropH) / 2, 2); + uint32_t deltaLeft = GRA_ROUND_DOWN((totalCropW - actualCropW) / 2, 2); + uint32_t deltaRight = totalCropW - actualCropW - deltaLeft; + uint32_t deltaTop = GRA_ROUND_DOWN((totalCropH - actualCropH) / 2, 2); + uint32_t deltaBottom = totalCropH - actualCropH - deltaTop; - runKernel->resolution_info->input_crop.left = roi.left - cropperKernelCrop.left - deltaW; - runKernel->resolution_info->input_crop.right = actualCropW - runKernel->resolution_info->input_crop.left; - runKernel->resolution_info->input_crop.top = roi.top - cropperKernelCrop.top - deltaH; - runKernel->resolution_info->input_crop.bottom = actualCropH - runKernel->resolution_info->input_crop.top; + runKernel->resolution_info->input_crop.left = roi.left - cropperKernelCrop.left - deltaLeft; + runKernel->resolution_info->input_crop.right = roi.right - cropperKernelCrop.right - deltaRight; + runKernel->resolution_info->input_crop.top = roi.top - cropperKernelCrop.top - deltaTop; + runKernel->resolution_info->input_crop.bottom = roi.bottom - cropperKernelCrop.bottom - deltaBottom; if (runKernel->resolution_info->input_crop.left < 0) { @@ -1623,34 +1763,36 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelUpScaler(Stati return ret; } -StaticGraphFragmentDesc* Ipu8GraphResolutionConfigurator::getKernelFragments(RunKernelCoords& coord) +StaticGraphStatus Ipu8GraphResolutionConfigurator::updateRunKernelSmurf(StaticGraphRunKernel* smurfRunKernel, StaticGraphRunKernel* deviceRunKernel) { - GraphTopology* graphTopology = nullptr; - StaticGraphStatus status = _staticGraph->getGraphTopology(&graphTopology); + StaticGraphStatus ret = StaticGraphStatus::SG_OK; - if (status != StaticGraphStatus::SG_OK) { - return nullptr; + auto resInfo = smurfRunKernel->resolution_info; + if (resInfo->input_width == 0 || resInfo->input_height == 0) + { + return StaticGraphStatus::SG_OK; } - auto node = graphTopology->links[coord.nodeInd]->destNode; - return node->nodeKernels.kernelList[coord.kernelInd].fragment_descs; -} + // We need to reach new history for device, without the crop already done by feeder. + // The hist of the smurf is the crop already being done by feeder, mutliplied by segmap factor (without smurf factor which changes) + StaticGraphKernelResCrop smurfNewCrop; + smurfNewCrop.left = deviceRunKernel->resolution_history->input_crop.left - smurfRunKernel->resolution_history->input_crop.left; + smurfNewCrop.right = deviceRunKernel->resolution_history->input_crop.right - smurfRunKernel->resolution_history->input_crop.right; + smurfNewCrop.top = deviceRunKernel->resolution_history->input_crop.top - smurfRunKernel->resolution_history->input_crop.top; + smurfNewCrop.bottom = deviceRunKernel->resolution_history->input_crop.bottom - smurfRunKernel->resolution_history->input_crop.bottom; -StaticGraphStatus Ipu8GraphResolutionConfigurator::updateKernelFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* fragmentsDesc, uint32_t fragments) -{ - if (runKernel == nullptr || fragmentsDesc == nullptr) - { - return StaticGraphStatus::SG_ERROR; - } + // Now calculate how much is left for the smurf to crop + // Translate from history units to device units + double newInputToDeviceFactor = static_cast(deviceRunKernel->resolution_history->input_width - deviceRunKernel->resolution_history->input_crop.left - deviceRunKernel->resolution_history->input_crop.right) / + deviceRunKernel->resolution_history->output_width; - if (fragments == 1) - { - // Nothing to do - return StaticGraphStatus::SG_OK; - } + // Now translate from history units to smurf output (device) + smurfRunKernel->resolution_info->output_crop.left = static_cast(smurfNewCrop.left / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.right = static_cast(smurfNewCrop.right / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.top = static_cast(smurfNewCrop.top / newInputToDeviceFactor); + smurfRunKernel->resolution_info->output_crop.bottom = static_cast(smurfNewCrop.bottom / newInputToDeviceFactor); - // Add support here - return StaticGraphStatus::SG_OK; + return ret; } StaticGraphStatus Ipu8GraphResolutionConfigurator::SanityCheck() @@ -1691,12 +1833,12 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::SanityCheck() int32_t widthAfterCrop = _downscalerRunKernel->resolution_info->input_width - _downscalerRunKernel->resolution_info->input_crop.left - _downscalerRunKernel->resolution_info->input_crop.right; int32_t heightAfterCrop = _downscalerRunKernel->resolution_info->input_height - _downscalerRunKernel->resolution_info->input_crop.top - _downscalerRunKernel->resolution_info->input_crop.bottom; - if (widthAfterCrop < 0 || widthAfterCrop < _downscalerRunKernel->resolution_info->output_width || - heightAfterCrop < 0 || heightAfterCrop < _downscalerRunKernel->resolution_info->output_height || - static_cast(widthAfterCrop) / _downscalerRunKernel->resolution_info->output_width > 16) - { - return StaticGraphStatus::SG_ERROR; - } + if (widthAfterCrop < 0 || widthAfterCrop < _downscalerRunKernel->resolution_info->output_width || + heightAfterCrop < 0 || heightAfterCrop < _downscalerRunKernel->resolution_info->output_height || + static_cast(widthAfterCrop) / _downscalerRunKernel->resolution_info->output_width > 16) + { + return StaticGraphStatus::SG_ERROR; + } // Make sure US is actually up scaling widthAfterCrop = _upscalerRunKernel->resolution_info->input_width - _upscalerRunKernel->resolution_info->input_crop.left - _upscalerRunKernel->resolution_info->input_crop.right; @@ -1852,4 +1994,4 @@ StaticGraphStatus Ipu8GraphResolutionConfigurator::getStatsRoiFromSensorRoi(cons return StaticGraphStatus::SG_OK; } -#endif +#endif \ No newline at end of file diff --git a/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.h b/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.h index 12d7f6d..21ddfb1 100644 --- a/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.h +++ b/modules/ipu_desc/ipu7x/GraphResolutionConfigurator.h @@ -26,10 +26,13 @@ */ #pragma once #include +#include +#include #define _USE_MATH_DEFINES #define GRA_ROUND_UP(a,b) (((a) + ((b)-1)) / (b) * (b)) #define GRA_ROUND_DOWN(a,b) ((a) / (b) * (b)) +#define GRA_ROUND(a) (((double)(a) > 0.0) ? floor((double)(a) + 0.5) : ceil((double)(a) - 0.5)) // ROI in user level class RegionOfInterest @@ -73,7 +76,13 @@ enum class GraphResolutionConfiguratorKernelRole : uint8_t { UpScaler, DownScaler, - EspaCropper + EspaCropper, + NonRcb, + Output, + TnrScaler, + TnrFeederFull, + TnrFeederSmall, + None }; class RunKernelCoords @@ -138,7 +147,7 @@ class GraphResolutionConfigurator #if SUPPORT_KEY_RESOLUTIONS == 1 StaticGraphStatus getZoomKeyResolutionIndex(ZoomKeyResolutions* zoomKeyResolutions, SensorRoi sensorRoi, uint32_t& selectedIndex); #endif - StaticGraphStatus updateRunKernelOfScalers(SensorRoi& roi); + StaticGraphStatus updateRunKernelOfScalers(bool fromInput, SensorRoi& roi); StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, SensorRoi& roi, uint32_t inputWidth, uint32_t inputHeight, uint32_t outputWidth, uint32_t outputHeight, StaticGraphKernelResCrop* originalScalerCrop); @@ -161,15 +170,13 @@ class GraphResolutionConfigurator StaticGraphKernelResCrop _originalCropScalerToOutput = { 0,0,0,0 }; }; +class Ipu8FragmentsConfigurator; + class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator { public: Ipu8GraphResolutionConfigurator(IStaticGraphConfig* staticGraph); - ~Ipu8GraphResolutionConfigurator() - { - _kernelsForUpdateAfterCropper.clear(); - _kernelsForUpdateAfterUpscaler.clear(); - } + ~Ipu8GraphResolutionConfigurator(); StaticGraphStatus updateStaticGraphConfig(const RegionOfInterest& roi, bool isCenteredZoom); @@ -185,18 +192,16 @@ class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator StaticGraphStatus initOutputRunKernel(); StaticGraphStatus initKernelsForUpdate(); - StaticGraphFragmentDesc* getKernelFragments(RunKernelCoords& coord); - // Calculate ROI in dimensions of pipe downscaler input. StaticGraphStatus getDownscalerInputRoi(const RegionOfInterest& userRoi, ResolutionRoi& pipeInputRoi); StaticGraphStatus updateRunKernelOfScalers(ResolutionRoi& roi); - StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t outputWidth, uint32_t outputHeight); + StaticGraphStatus updateRunKernelDownScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t& outputWidth, uint32_t& outputHeight); StaticGraphStatus updateRunKernelUpScaler(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, StaticGraphKernelResCrop& cropperKernelCrop, uint32_t outputWidth, uint32_t outputHeight); StaticGraphStatus updateRunKernelCropper(StaticGraphRunKernel* runKernel, ResolutionRoi& roi, uint32_t inputWidth, uint32_t inputHeight, uint32_t outputWidth, uint32_t outputHeight, StaticGraphKernelResCrop& downscalerCropHist); - StaticGraphStatus updateKernelFragments(StaticGraphRunKernel* runKernel, StaticGraphFragmentDesc* fragmentsDesc, uint32_t fragments); + StaticGraphStatus updateRunKernelSmurf(StaticGraphRunKernel* smurfRunKernel, StaticGraphRunKernel* deviceRunKernel); StaticGraphStatus SanityCheck(); StaticGraphStatus SanityCheckCrop(StaticGraphKernelResCrop* crop); @@ -215,5 +220,9 @@ class Ipu8GraphResolutionConfigurator : public GraphResolutionConfigurator StaticGraphRunKernel* _outputRunKernel; std::vector _kernelsForUpdateAfterCropper; std::vector _kernelsForUpdateAfterUpscaler; -}; + std::vector> _smurfKernels; + // For striping + OuterNode* _node = nullptr; + Ipu8FragmentsConfigurator* _fragmentsConfigurator = nullptr; +}; diff --git a/modules/ipu_desc/ipu7x/GraphResolutionConfiguratorInclude.h b/modules/ipu_desc/ipu7x/GraphResolutionConfiguratorInclude.h index 1eceba9..30bb063 100644 --- a/modules/ipu_desc/ipu7x/GraphResolutionConfiguratorInclude.h +++ b/modules/ipu_desc/ipu7x/GraphResolutionConfiguratorInclude.h @@ -39,6 +39,10 @@ #include "Ipu8StaticGraphAutogen.h" #include "Ipu8StaticGraphTypesAutogen.h" #include "Ipu8GraphResolutionConfiguratorAutogen.h" +#elif defined(GRC_IPU9) +#include "Ipu9StaticGraphAutogen.h" +#include "Ipu9StaticGraphTypesAutogen.h" +#include "Ipu9GraphResolutionConfiguratorAutogen.h" #else #include "StaticGraphAutogen.h" #include "StaticGraphTypesAutogen.h" diff --git a/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.cpp b/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.cpp index cb0fea1..21638b1 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.cpp +++ b/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.cpp @@ -59,19 +59,24 @@ uint32_t GraphResolutionConfiguratorHelper::getRunKernelUuidOfOutput(HwSink hwSi case 100038: // Bayer_WithPdaf3_WithDvs_WithTnr case 100039: // RgbIr_NoPdaf_WithDvs_WithTnr return 5637; // gdc7_1 + case 100002: // Bayer_NoPdaf_NoDvs_WithTnr + case 100041: // Bayer_NoPdaf_NoDvs_WithTnr_WithVai + case 100042: // Bayer_NoPdaf_NoDvs_WithTnr_WithImv + return 19706; // sw_scaler case 100005: // Bayer_NoPdaf_WithNntm_WithTnr case 100040: // Bayer_WithPdaf3_WithNntm_WithTnr return 46539; // nntm_1_0 case 100031: // Dol2Inputs_NoGmv_NoTnr - if (links[16]->isActive) return 40423; // tm_app - if (links[19]->isActive) return 46539; // nntm_1_0 + if (links[16]->isActive) return 37003; // tm_app + if (links[20]->isActive) return 46539; // nntm_1_0 break; case 100032: // Dol2Inputs_NoDvs_WithTnr - if (links[21]->isActive) return 40423; // tm_app - if (links[24]->isActive) return 46539; // nntm_1_0 + if (links[21]->isActive) return 37003; // tm_app + if (links[25]->isActive) return 46539; // nntm_1_0 break; } break; + case HwSink::ProcessedSecondarySink: return 19706; // sw_scaler case HwSink::AeOutSink: return 55073; // aestatistics_2_1 } @@ -84,6 +89,7 @@ StaticGraphStatus GraphResolutionConfiguratorHelper::getRunKernelUuidForResHisto // Must take only one from each resolution history index, since in static graph they all share the same // resolution history instance + kernelUuids.push_back(40915); // odr_output_ps_1_1 kernelUuids.push_back(55391); // odr_output_me_1_1 kernelUuids.push_back(44984); // slim_tnr_spatial_bifd_yuvn_regs_1_1 @@ -101,12 +107,41 @@ StaticGraphStatus GraphResolutionConfiguratorHelper::getRunKernelUuidForResHisto kernelUuids.push_back(6326); // tnr_sp_bc_bifd_yuv4n_regs_1_1 kernelUuids.push_back(27830); // slim_tnr_fp_blend_bifd_yuvnm1_regs_1_1 kernelUuids.push_back(5637); // gdc7_1 + kernelUuids.push_back(19706); // sw_scaler kernelUuids.push_back(46539); // nntm_1_0 - kernelUuids.push_back(40423); // tm_app + kernelUuids.push_back(37003); // tm_app return StaticGraphStatus::SG_OK; } uint32_t GraphResolutionConfiguratorHelper::getRunKernelIoBufferSystemApiUuid() { return 50058; -} \ No newline at end of file +} + +GraphResolutionConfiguratorKernelRole GraphResolutionConfiguratorHelper::getKernelRole(uint32_t kernelUuid) +{ + (void) kernelUuid; + return GraphResolutionConfiguratorKernelRole::NonRcb; +} + +uint32_t GraphResolutionConfiguratorHelper::getReferenceKernel(uint32_t kernelUuid) +{ + (void) kernelUuid; + return 0; +} + +FormatType GraphResolutionConfiguratorHelper::getFormatForDrainer(uint32_t kernelUuid) +{ + (void) kernelUuid; + return FormatType::YUV420_8_SP_P; +} + +StaticGraphStatus GraphResolutionConfiguratorHelper::getSmurfRunKernelUuid(std::vector>& kernelUuids) +{ + kernelUuids.clear(); + + std::pair smurfPair; + + return StaticGraphStatus::SG_OK; +} + diff --git a/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.h index e22be43..5eb8156 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xGraphResolutionConfiguratorAutogen.h @@ -33,10 +33,13 @@ class GraphResolutionConfiguratorHelper { public: - GraphResolutionConfiguratorHelper(); static uint32_t getRunKernelUuid(GraphResolutionConfiguratorKernelRole role); static uint32_t getRunKernelUuidOfOutput(HwSink hwSink, int32_t graphId, GraphLink** links); static StaticGraphStatus getRunKernelUuidForResHistoryUpdate(std::vector& kernelUuids); static uint32_t getRunKernelIoBufferSystemApiUuid(); + static GraphResolutionConfiguratorKernelRole getKernelRole(uint32_t kernelUuid); + static uint32_t getReferenceKernel(uint32_t kernelUuid); + static FormatType getFormatForDrainer(uint32_t kernelUuid); + static StaticGraphStatus getSmurfRunKernelUuid(std::vector>& kernelUuids); }; diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.cpp b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.cpp index 4a760b5..92b86f1 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.cpp +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.cpp @@ -441,6 +441,27 @@ void SwGdcOuterNode::Init(SwGdcOuterNodeConfiguration** selectedGraphConfigurati setInnerNode(None); } +void SwScalerOuterNode::Init(SwScalerOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(7, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[1] = {19706 /*sw_scaler*/}; + uint64_t kernelsRcbBitmap = 0x1; // { sw_scaler[0] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{sw_scaler}[0] } + + uint8_t systemApisSizes[1] = {5 /*sw_scaler*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + void SwNntmOuterNode::Init(SwNntmOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) { OuterNode::Init(6, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); @@ -585,6 +606,27 @@ void BbpsIrNoTnrOuterNode::Init(BbpsIrNoTnrOuterNodeConfiguration** selectedGrap setInnerNode(None); } +void LbffIrNo2ANoGmvOuterNode::Init(LbffIrNo2ANoGmvOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(0, NodeTypes::Cb, 26, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[26] = {52164 /*ifd_pipe_1_1*/, 11700 /*bxt_blc*/, 10326 /*linearization2_0*/, 6070 /*ifd_lsc_1_1*/, 2144 /*lsc_1_2*/, 33714 /*gd_dpc_2_2*/, 5144 /*wb_1_1*/, 21777 /*bnlm_3_3*/, 48695 /*bxt_demosaic*/, 13708 /*vcsc_2_0_b*/, 54721 /*gltm_2_0*/, 58858 /*xnr_5_2*/, 36035 /*vcr_3_1*/, 36029 /*glim_2_0*/, 13026 /*acm_1_1*/, 57496 /*gammatm_v3*/, 31704 /*bxt_csc*/, 15021 /*rgbs_grid_1_1*/, 20739 /*b2i_ds_1_0_1*/, 25569 /*upscaler_1_0*/, 36213 /*lbff_crop_espa_1_1*/, 33723 /*tnr_scale_lb*/, 40915 /*odr_output_ps_1_1*/, 55391 /*odr_output_me_1_1*/, 20731 /*odr_awb_std_1_1*/, 54176 /*odr_awb_sat_1_1*/}; + uint64_t kernelsRcbBitmap = 0xFE0001; // { ifd_pipe_1_1[0], rgbs_grid_1_1[17], b2i_ds_1_0_1[18], upscaler_1_0[19], lbff_crop_espa_1_1[20], tnr_scale_lb[21], odr_output_ps_1_1[22], odr_output_me_1_1[23] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x3B8001A; // {{ifd_pipe_1_1}[0], {bxt_blc, linearization2_0}[1], {ifd_lsc_1_1}[2], {lsc_1_2, gd_dpc_2_2, wb_1_1, bnlm_3_3, bxt_demosaic, vcsc_2_0_b, gltm_2_0, xnr_5_2, vcr_3_1, glim_2_0, acm_1_1, gammatm_v3, bxt_csc, rgbs_grid_1_1, b2i_ds_1_0_1}[3], {upscaler_1_0}[4], {lbff_crop_espa_1_1}[5], {tnr_scale_lb, odr_output_ps_1_1}[6], {odr_output_me_1_1}[7], {odr_awb_std_1_1}[8], {odr_awb_sat_1_1}[9] } + + uint8_t systemApisSizes[26] = {156 /*ifd_pipe_1_1*/, 5 /*bxt_blc*/, 5 /*linearization2_0*/, 156 /*ifd_lsc_1_1*/, 40 /*lsc_1_2*/, 0 /*gd_dpc_2_2*/, 0 /*wb_1_1*/, 5 /*bnlm_3_3*/, 0 /*bxt_demosaic*/, 0 /*vcsc_2_0_b*/, 0 /*gltm_2_0*/, 0 /*xnr_5_2*/, 0 /*vcr_3_1*/, 0 /*glim_2_0*/, 0 /*acm_1_1*/, 5 /*gammatm_v3*/, 0 /*bxt_csc*/, 24 /*rgbs_grid_1_1*/, 0 /*b2i_ds_1_0_1*/, 0 /*upscaler_1_0*/, 156 /*lbff_crop_espa_1_1*/, 0 /*tnr_scale_lb*/, 156 /*odr_output_ps_1_1*/, 156 /*odr_output_me_1_1*/, 156 /*odr_awb_std_1_1*/, 156 /*odr_awb_sat_1_1*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + void LbffIrNoGmvOuterNode::Init(LbffIrNoGmvOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) { OuterNode::Init(0, NodeTypes::Cb, 31, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); @@ -754,7 +796,7 @@ void SwGtmOuterNode::Init(SwGtmOuterNodeConfiguration** selectedGraphConfigurati { OuterNode::Init(5, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); - uint16_t kernelsUuids[1] = {40423 /*tm_app*/}; + uint16_t kernelsUuids[1] = {37003 /*tm_app*/}; uint64_t kernelsRcbBitmap = 0x0; // { } uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{tm_app}[0] } @@ -887,13 +929,34 @@ void SwVaiOuterNode::Init(SwVaiOuterNodeConfiguration** selectedGraphConfigurati uint64_t kernelsRcbBitmap = 0x1; // { sw_scaler[0] } uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{sw_scaler}[0] } - uint8_t systemApisSizes[1] = {0 /*sw_scaler*/}; + uint8_t systemApisSizes[1] = {5 /*sw_scaler*/}; for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) { nodeKernels.kernelList = kernelListOptions[i]; - InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, nullptr); + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); + } + + // set default inner Node + setInnerNode(None); +} + +void SwImvOuterNode::Init(SwImvOuterNodeConfiguration** selectedGraphConfiguration, uint32_t nodeKernelConfigurationsOptionsCount) +{ + OuterNode::Init(9, NodeTypes::Sw, 1, nodeKernelConfigurationsOptionsCount, selectedGraphConfiguration[0]->tuningMode, selectedGraphConfiguration[0]->streamId, 0); + + uint16_t kernelsUuids[1] = {19706 /*sw_scaler*/}; + uint64_t kernelsRcbBitmap = 0x1; // { sw_scaler[0] } + uint64_t kernelsResolutionHistoryGroupBitmap = 0x0; // {{sw_scaler}[0] } + + uint8_t systemApisSizes[1] = {5 /*sw_scaler*/}; + + for (uint32_t i = 0; i < kernelConfigurationsOptionsCount; ++i) + { + nodeKernels.kernelList = kernelListOptions[i]; + + InitRunKernels(kernelsUuids, kernelsRcbBitmap, selectedGraphConfiguration[i]->resolutionInfos, kernelsResolutionHistoryGroupBitmap, selectedGraphConfiguration[i]->resolutionHistories, selectedGraphConfiguration[i]->bppInfos, systemApisSizes, selectedGraphConfiguration[i]->systemApiConfiguration); } // set default inner Node @@ -1128,6 +1191,7 @@ void LbffBayerOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1280,6 +1344,7 @@ void BbpsNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1712,6 +1777,7 @@ void LbffBayerWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOpti } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1877,6 +1943,7 @@ void BbpsWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void SwGdcOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -1886,6 +1953,13 @@ void SwGdcOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) (void)nodeInnerOptions; } +void SwScalerOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + + // No inner nodes + (void)nodeInnerOptions; +} + void SwNntmOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) { @@ -2336,6 +2410,7 @@ void LbffRgbIrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrNoGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -2564,6 +2639,7 @@ void LbffIrNoGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerO } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsIrWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -2729,6 +2805,7 @@ void BbpsIrWithTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerBurstOutNo3AOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3533,6 +3610,7 @@ void LbffBayerBurstOutNo3AOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void BbpsIrNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3685,6 +3763,213 @@ void BbpsIrNoTnrOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + +} + +void LbffIrNo2ANoGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + // Kernel default enablement + for (uint32_t j = 0; j < kernelConfigurationsOptionsCount; ++j) + { + for (uint8_t i = 0; i < 26; ++i) + { + kernelListOptions[j][i].run_kernel.enable = 1; + } + + // Pass-through kernels + kernelListOptions[j][6].run_kernel.enable = 0; // wb_1_1 + kernelListOptions[j][8].run_kernel.enable = 0; // bxt_demosaic + kernelListOptions[j][14].run_kernel.enable = 0; // acm_1_1 + } + + const InnerNodeOptionsFlags nodeRelevantInnerOptions = nodeInnerOptions & (no3A | noLbOutputPs | noLbOutputMe); + bitmaps = HwBitmaps(); // reset HW bitmaps + uint64_t disabledRunKernelsBitmap = 0x0; + if (nodeRelevantInnerOptions == (no3A)) + { + // HW bitmaps + // RBM - 0x0000000000000000000001EA01404403 + bitmaps.rbm[0] = 0x1404403; + bitmaps.rbm[1] = 0x1EA; + // DEB - 0x0000000000000000000001FFFE80003F + bitmaps.deb[0] = 0xFE80003F; + bitmaps.deb[1] = 0x1FF; + // TEB - 0x000000000000601F + bitmaps.teb[0] = 0x601F; + // REB - 0x00000000000000000000000001D830FB + bitmaps.reb[0] = 0x1D830FB; + + // Kernels disablement + // 17 rgbs_grid_1_1- inner node disablement + // 24 odr_awb_std_1_1- inner node disablement + // 25 odr_awb_sat_1_1- inner node disablement + disabledRunKernelsBitmap = 0x3020000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x00000000000000000000016A07404403 + bitmaps.rbm[0] = 0x7404403; + bitmaps.rbm[1] = 0x16A; + // DEB - 0x00000000000000000000017FFE80623F + bitmaps.deb[0] = 0xFE80623F; + bitmaps.deb[1] = 0x17F; + // TEB - 0x000000000000231F + bitmaps.teb[0] = 0x231F; + // REB - 0x00000000000000000000000001D8F0FB + bitmaps.reb[0] = 0x1D8F0FB; + + // Kernels disablement + // 22 odr_output_ps_1_1- inner node disablement + disabledRunKernelsBitmap = 0x400000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs)) + { + // HW bitmaps + // RBM - 0x00000000000000000000016A01404403 + bitmaps.rbm[0] = 0x1404403; + bitmaps.rbm[1] = 0x16A; + // DEB - 0x00000000000000000000017FFE80003F + bitmaps.deb[0] = 0xFE80003F; + bitmaps.deb[1] = 0x17F; + // TEB - 0x000000000000201F + bitmaps.teb[0] = 0x201F; + // REB - 0x00000000000000000000000001D830FB + bitmaps.reb[0] = 0x1D830FB; + + // Kernels disablement + // 17 rgbs_grid_1_1- inner node disablement + // 22 odr_output_ps_1_1- inner node disablement + // 24 odr_awb_std_1_1- inner node disablement + // 25 odr_awb_sat_1_1- inner node disablement + disabledRunKernelsBitmap = 0x3420000; + } + else if (nodeRelevantInnerOptions == (noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x0000000000000000000000EA07404403 + bitmaps.rbm[0] = 0x7404403; + bitmaps.rbm[1] = 0xEA; + // DEB - 0x0000000000000000000000BFFE80623F + bitmaps.deb[0] = 0xFE80623F; + bitmaps.deb[1] = 0xBF; + // TEB - 0x000000000000431F + bitmaps.teb[0] = 0x431F; + // REB - 0x00000000000000000000000001D8F0FB + bitmaps.reb[0] = 0x1D8F0FB; + + // Kernels disablement + // 21 tnr_scale_lb- inner node disablement + // 23 odr_output_me_1_1- inner node disablement + disabledRunKernelsBitmap = 0xA00000; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x0000000000000000000000EA01404403 + bitmaps.rbm[0] = 0x1404403; + bitmaps.rbm[1] = 0xEA; + // DEB - 0x0000000000000000000000BFFE80003F + bitmaps.deb[0] = 0xFE80003F; + bitmaps.deb[1] = 0xBF; + // TEB - 0x000000000000401F + bitmaps.teb[0] = 0x401F; + // REB - 0x00000000000000000000000001D830FB + bitmaps.reb[0] = 0x1D830FB; + + // Kernels disablement + // 17 rgbs_grid_1_1- inner node disablement + // 21 tnr_scale_lb- inner node disablement + // 23 odr_output_me_1_1- inner node disablement + // 24 odr_awb_std_1_1- inner node disablement + // 25 odr_awb_sat_1_1- inner node disablement + disabledRunKernelsBitmap = 0x3A20000; + } + else if (nodeRelevantInnerOptions == (noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000006404403 + bitmaps.rbm[0] = 0x6404403; + // DEB - 0x0000000000000000000000000000623F + bitmaps.deb[0] = 0x623F; + // TEB - 0x000000000000031F + bitmaps.teb[0] = 0x31F; + // REB - 0x0000000000000000000000000000F0FB + bitmaps.reb[0] = 0xF0FB; + + // Kernels disablement + // 6 wb_1_1- inner node disablement + // 7 bnlm_3_3- inner node disablement + // 8 bxt_demosaic- inner node disablement + // 9 vcsc_2_0_b- inner node disablement + // 10 gltm_2_0- inner node disablement + // 11 xnr_5_2- inner node disablement + // 12 vcr_3_1- inner node disablement + // 13 glim_2_0- inner node disablement + // 14 acm_1_1- inner node disablement + // 15 gammatm_v3- inner node disablement + // 16 bxt_csc- inner node disablement + // 18 b2i_ds_1_0_1- inner node disablement + // 19 upscaler_1_0- inner node disablement + // 20 lbff_crop_espa_1_1- inner node disablement + // 21 tnr_scale_lb- inner node disablement + // 22 odr_output_ps_1_1- inner node disablement + // 23 odr_output_me_1_1- inner node disablement + disabledRunKernelsBitmap = 0xFDFFC0; + } + else if (nodeRelevantInnerOptions == (no3A | noLbOutputPs | noLbOutputMe)) + { + // HW bitmaps + // RBM - 0x00000000000000000000000000000000 + // DEB - 0x00000000000000000000000000000000 + // TEB - 0x0000000000000000 + // REB - 0x00000000000000000000000000000000 + + // Kernels disablement + // 0 ifd_pipe_1_1- inner node disablement + // 1 bxt_blc- inner node disablement + // 2 linearization2_0- inner node disablement + // 3 ifd_lsc_1_1- inner node disablement + // 4 lsc_1_2- inner node disablement + // 5 gd_dpc_2_2- inner node disablement + // 6 wb_1_1- inner node disablement + // 7 bnlm_3_3- inner node disablement + // 8 bxt_demosaic- inner node disablement + // 9 vcsc_2_0_b- inner node disablement + // 10 gltm_2_0- inner node disablement + // 11 xnr_5_2- inner node disablement + // 12 vcr_3_1- inner node disablement + // 13 glim_2_0- inner node disablement + // 14 acm_1_1- inner node disablement + // 15 gammatm_v3- inner node disablement + // 16 bxt_csc- inner node disablement + // 17 rgbs_grid_1_1- inner node disablement + // 18 b2i_ds_1_0_1- inner node disablement + // 19 upscaler_1_0- inner node disablement + // 20 lbff_crop_espa_1_1- inner node disablement + // 21 tnr_scale_lb- inner node disablement + // 22 odr_output_ps_1_1- inner node disablement + // 23 odr_output_me_1_1- inner node disablement + // 24 odr_awb_std_1_1- inner node disablement + // 25 odr_awb_sat_1_1- inner node disablement + disabledRunKernelsBitmap = 0x3FFFFFF; + } + else // default inner node + { + // RBM - 0x0000000000000000000001EA07404403 + bitmaps.rbm[0] = 0x7404403; + bitmaps.rbm[1] = 0x1EA; + // DEB - 0x0000000000000000000001FFFE80623F + bitmaps.deb[0] = 0xFE80623F; + bitmaps.deb[1] = 0x1FF; + // TEB - 0x000000000000631F + bitmaps.teb[0] = 0x631F; + // REB - 0x00000000000000000000000001D8F0FB + bitmaps.reb[0] = 0x1D8F0FB; + } + + SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrNoGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -3910,6 +4195,7 @@ void LbffIrNoGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void IsysPdaf2OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -4380,6 +4666,7 @@ void LbffBayerPdaf2OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerPdaf3OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -4831,6 +5118,7 @@ void LbffBayerPdaf3OuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOption } SetDisabledKernels(disabledRunKernelsBitmap); + } void IsysDolOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -5068,6 +5356,7 @@ void LbffDolOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) } SetDisabledKernels(disabledRunKernelsBitmap); + } void SwGtmOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -5994,6 +6283,7 @@ void LbffBayerPdaf2WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffBayerPdaf3WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -6893,6 +7183,7 @@ void LbffBayerPdaf3WithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffRgbIrWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -7778,6 +8069,7 @@ void LbffRgbIrWithGmvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOpti } SetDisabledKernels(disabledRunKernelsBitmap); + } void LbffIrWithGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -8215,6 +8507,7 @@ void LbffIrWithGmvIrStreamOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInne } SetDisabledKernels(disabledRunKernelsBitmap); + } void SwVaiOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) @@ -8224,6 +8517,13 @@ void SwVaiOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) (void)nodeInnerOptions; } +void SwImvOuterNode::setInnerNode(InnerNodeOptionsFlags nodeInnerOptions) +{ + + // No inner nodes + (void)nodeInnerOptions; +} + /* * Graph 100000 */ @@ -8504,6 +8804,7 @@ StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphCon LbffBayerWithGmvOuterNodeConfiguration** lbffBayerWithGmvOuterNodeConfigurationOptions = new LbffBayerWithGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -8512,17 +8813,20 @@ StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphCon lbffBayerWithGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerWithGmvOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerWithGmvOuterNode.Init(lbffBayerWithGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerWithGmvOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swGdcOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -8700,7 +9004,23 @@ StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphCon link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 21; ++i) + link = &_graphLinks[21]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -8724,6 +9044,7 @@ StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphCon _imageSubGraph.lbffBayerWithGmvOuterNode = &_lbffBayerWithGmvOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -8733,6 +9054,7 @@ StaticGraph100001::StaticGraph100001(GraphConfiguration100001** selectedGraphCon _imageSubGraph.lbffBayerWithGmvOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -8764,6 +9086,11 @@ StaticGraphStatus StaticGraph100001::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -8852,7 +9179,7 @@ StaticGraphStatus imageSubGraphTopology100001::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 21; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -8885,6 +9212,7 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -8892,15 +9220,18 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -9036,7 +9367,23 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon link->dest = GraphElementType::ImagePpp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 16; ++i) + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 18; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -9059,6 +9406,7 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon _imageSubGraph.isysOuterNode = &_isysOuterNode; _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -9067,6 +9415,7 @@ StaticGraph100002::StaticGraph100002(GraphConfiguration100002** selectedGraphCon _imageSubGraph.isysOuterNode->contextId = 0; _imageSubGraph.lbffBayerOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swScalerOuterNode->contextId = 3; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -9093,6 +9442,11 @@ StaticGraphStatus StaticGraph100002::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -9125,6 +9479,7 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod // active public options according to sink mapping if ( subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; @@ -9162,6 +9517,7 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_scaler:terminal_connect_input subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noPpp); // bbps_WithTnr:bbps_ofs_pp_yuvn_odr -> image_ppp @@ -9175,7 +9531,7 @@ StaticGraphStatus imageSubGraphTopology100002::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 16; i++) + for (uint32_t i = 0; i < 18; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -9601,6 +9957,7 @@ StaticGraph100004::StaticGraph100004(GraphConfiguration100004** selectedGraphCon LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwGdcOuterNodeConfiguration** swGdcOuterNodeConfigurationOptions = new SwGdcOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -9609,17 +9966,20 @@ StaticGraph100004::StaticGraph100004(GraphConfiguration100004** selectedGraphCon lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swGdcOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGdcOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swGdcOuterNode.Init(swGdcOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swGdcOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -9780,7 +10140,23 @@ StaticGraph100004::StaticGraph100004(GraphConfiguration100004** selectedGraphCon link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 19; ++i) + link = &_graphLinks[19]; + link->src = GraphElementType::SwGdc; + link->srcNode = &_swGdcOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -9804,6 +10180,7 @@ StaticGraph100004::StaticGraph100004(GraphConfiguration100004** selectedGraphCon _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swGdcOuterNode = &_swGdcOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -9813,6 +10190,7 @@ StaticGraph100004::StaticGraph100004(GraphConfiguration100004** selectedGraphCon _imageSubGraph.lbffBayerOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; _imageSubGraph.swGdcOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -9844,6 +10222,11 @@ StaticGraphStatus StaticGraph100004::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -9930,7 +10313,7 @@ StaticGraphStatus imageSubGraphTopology100004::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 19; i++) + for (uint32_t i = 0; i < 21; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -9963,6 +10346,7 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -9971,17 +10355,20 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -10142,7 +10529,23 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 19; ++i) + link = &_graphLinks[19]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -10166,6 +10569,7 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -10175,6 +10579,7 @@ StaticGraph100005::StaticGraph100005(GraphConfiguration100005** selectedGraphCon _imageSubGraph.lbffBayerOuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -10206,6 +10611,11 @@ StaticGraphStatus StaticGraph100005::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -10292,7 +10702,7 @@ StaticGraphStatus imageSubGraphTopology100005::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 19; i++) + for (uint32_t i = 0; i < 21; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -12384,6 +12794,256 @@ StaticGraphStatus imageSubGraphTopology100016::configInnerNodes(SubGraphInnerNod return StaticGraphStatus::SG_OK; } +/* + * Graph 100024 + */ +StaticGraph100024::StaticGraph100024(GraphConfiguration100024** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100024, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100024[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffIrNo2ANoGmvOuterNodeConfiguration** lbffIrNo2ANoGmvOuterNodeConfigurationOptions = new LbffIrNo2ANoGmvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffIrNo2ANoGmvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffIrNo2ANoGmvOuterNodeConfiguration; + bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffIrNo2ANoGmvOuterNode.Init(lbffIrNo2ANoGmvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffIrNo2ANoGmvOuterNodeConfigurationOptions; + delete[] bbpsNoTnrOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffIrNo2ANoGmv; + link->destNode = &_lbffIrNo2ANoGmvOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffIrNo2ANoGmv; + link->destNode = &_lbffIrNo2ANoGmvOuterNode; + link->destTerminalId = 3; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffIrNo2ANoGmv; + link->srcNode = &_lbffIrNo2ANoGmvOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffIrNo2ANoGmv; + link->srcNode = &_lbffIrNo2ANoGmvOuterNode; + link->srcTerminalId = 9; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffIrNo2ANoGmv; + link->srcNode = &_lbffIrNo2ANoGmvOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::BbpsNoTnr; + link->destNode = &_bbpsNoTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[6]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[8]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 16; + link->dest = GraphElementType::ImagePpp; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 9; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffIrNo2ANoGmvOuterNode = &_lbffIrNo2ANoGmvOuterNode; + _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffIrNo2ANoGmvOuterNode->contextId = 1; + _imageSubGraph.bbpsNoTnrOuterNode->contextId = 2; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100024::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffIrNo2ANoGmvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsNoTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100024::~StaticGraph100024() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100024::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffIrNo2ANoGmv initial inner node configuration + */ + InnerNodeOptionsFlags lbffIrNo2ANoGmvInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffIrNo2ANoGmvInnerOptions |= (noGmv | noBurstCapture | noIr | noLbOutputMe | noPdaf); + // active public options according to sink mapping + // always active private inner options + lbffIrNo2ANoGmvInnerOptions |= (noLbOutputMe); + + /* + * Setting Node bbpsNoTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsNoTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[6]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[7]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noDp; + } + if ( + subGraphLinks[8]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsNoTnrInnerOptions |= noPpp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffIrNo2ANoGmvInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp | noPpp)) == (noMp | noDp | noPpp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffIrNo2ANoGmvOuterNode->setInnerNode(lbffIrNo2ANoGmvInnerOptions); + bbpsNoTnrOuterNode->setInnerNode(bbpsNoTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffIrNo2ANoGmvInnerOptions & no3A); // lbff_Ir_No2A_NoGmv:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[4]->isActive = !(lbffIrNo2ANoGmvInnerOptions & no3A); // lbff_Ir_No2A_NoGmv:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[6]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[7]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[8]->isActive = !(bbpsNoTnrInnerOptions & noPpp); // bbps_NoTnr:bbps_ofs_pp_yuvn_odr -> image_ppp + + /* + * Link enablement by private inner options + */ + subGraphLinks[5]->isActive = !(lbffIrNo2ANoGmvInnerOptions & noLbOutputPs); // lbff_Ir_No2A_NoGmv:terminal_connect_ps_output -> bbps_NoTnr:bbps_slim_spatial_yuvn_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 9; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + return StaticGraphStatus::SG_OK; +} + /* * Graph 100025 */ @@ -13992,6 +14652,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon BbpsNoTnrOuterNodeConfiguration** bbpsNoTnrOuterNodeConfigurationOptions = new BbpsNoTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwGtmOuterNodeConfiguration** swGtmOuterNodeConfigurationOptions = new SwGtmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -14002,6 +14663,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon bbpsNoTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsNoTnrOuterNodeConfiguration; swGtmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGtmOuterNodeConfiguration; swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); @@ -14010,6 +14672,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon _bbpsNoTnrOuterNode.Init(bbpsNoTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swGtmOuterNode.Init(swGtmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysDolOuterNodeConfigurationOptions; delete[] swDolOuterNodeConfigurationOptions; @@ -14017,6 +14680,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon delete[] bbpsNoTnrOuterNodeConfigurationOptions; delete[] swGtmOuterNodeConfigurationOptions; delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -14155,15 +14819,24 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon link->type = LinkType::Node2Sink; link = &_graphLinks[17]; - link->src = GraphElementType::BbpsNoTnr; - link->srcNode = &_bbpsNoTnrOuterNode; - link->srcTerminalId = 14; + link->src = GraphElementType::SwGtm; + link->srcNode = &_swGtmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::BbpsNoTnr; + link->srcNode = &_bbpsNoTnrOuterNode; + link->srcTerminalId = 14; link->dest = GraphElementType::SwNntm; link->destNode = &_swNntmOuterNode; link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[18]; + link = &_graphLinks[19]; link->src = GraphElementType::BbpsNoTnr; link->srcNode = &_bbpsNoTnrOuterNode; link->srcTerminalId = 15; @@ -14172,14 +14845,30 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[19]; + link = &_graphLinks[20]; link->src = GraphElementType::SwNntm; link->srcNode = &_swNntmOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 20; ++i) + link = &_graphLinks[21]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[22]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 23; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -14204,6 +14893,7 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon _imageSubGraph.lbffDolOuterNode = &_lbffDolOuterNode; _imageSubGraph.bbpsNoTnrOuterNode = &_bbpsNoTnrOuterNode; _imageSubGraph.swGtmOuterNode = &_swGtmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; // choose the selected sub graph @@ -14215,7 +14905,8 @@ StaticGraph100031::StaticGraph100031(GraphConfiguration100031** selectedGraphCon _imageSubGraph.lbffDolOuterNode->contextId = 2; _imageSubGraph.bbpsNoTnrOuterNode->contextId = 3; _imageSubGraph.swGtmOuterNode->contextId = 4; - _imageSubGraph.swNntmOuterNode->contextId = 5; + _imageSubGraph.swScalerOuterNode->contextId = 5; + _imageSubGraph.swNntmOuterNode->contextId = 6; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -14257,6 +14948,11 @@ StaticGraphStatus StaticGraph100031::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -14292,7 +14988,7 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod if ( subGraphLinks[11]->linkConfiguration->bufferSize == 0 && subGraphLinks[14]->linkConfiguration->bufferSize == 0 && - subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + subGraphLinks[18]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noMp; @@ -14300,7 +14996,7 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod if ( subGraphLinks[12]->linkConfiguration->bufferSize == 0 && subGraphLinks[15]->linkConfiguration->bufferSize == 0 && - subGraphLinks[18]->linkConfiguration->bufferSize == 0 && + subGraphLinks[19]->linkConfiguration->bufferSize == 0 && true) { bbpsNoTnrInnerOptions |= noDp; @@ -14332,10 +15028,10 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod subGraphLinks[9]->isActive = !(lbffDolInnerOptions & no3A); // lbff_Dol:terminal_connect_awb_sat_output -> awb_sat_out subGraphLinks[11]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> image_mp subGraphLinks[14]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_gtm:terminal_connect_input - subGraphLinks[17]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[18]->isActive = !(bbpsNoTnrInnerOptions & noMp); // bbps_NoTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[12]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> image_dp subGraphLinks[15]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_gtm:terminal_connect_input - subGraphLinks[18]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[19]->isActive = !(bbpsNoTnrInnerOptions & noDp); // bbps_NoTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[13]->isActive = !(bbpsNoTnrInnerOptions & noPpp); // bbps_NoTnr:bbps_ofs_pp_yuvn_odr -> image_ppp /* @@ -14347,7 +15043,7 @@ StaticGraphStatus imageSubGraphTopology100031::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 20; i++) + for (uint32_t i = 0; i < 23; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -14374,6 +15070,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwGtmOuterNodeConfiguration** swGtmOuterNodeConfigurationOptions = new SwGtmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -14384,6 +15081,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swGtmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swGtmOuterNodeConfiguration; swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysDolOuterNode.Init(isysDolOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); @@ -14392,6 +15090,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swGtmOuterNode.Init(swGtmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysDolOuterNodeConfigurationOptions; delete[] swDolOuterNodeConfigurationOptions; @@ -14399,6 +15098,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swGtmOuterNodeConfigurationOptions; delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -14585,6 +15285,15 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->type = LinkType::Node2Sink; link = &_graphLinks[22]; + link->src = GraphElementType::SwGtm; + link->srcNode = &_swGtmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[23]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 14; @@ -14593,7 +15302,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[23]; + link = &_graphLinks[24]; link->src = GraphElementType::BbpsWithTnr; link->srcNode = &_bbpsWithTnrOuterNode; link->srcTerminalId = 15; @@ -14602,14 +15311,30 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon link->destTerminalId = 0; link->type = LinkType::Node2Node; - link = &_graphLinks[24]; + link = &_graphLinks[25]; link->src = GraphElementType::SwNntm; link->srcNode = &_swNntmOuterNode; link->srcTerminalId = 1; link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 25; ++i) + link = &_graphLinks[26]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[27]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 28; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -14634,6 +15359,7 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon _imageSubGraph.lbffDolOuterNode = &_lbffDolOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swGtmOuterNode = &_swGtmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; // choose the selected sub graph @@ -14645,7 +15371,8 @@ StaticGraph100032::StaticGraph100032(GraphConfiguration100032** selectedGraphCon _imageSubGraph.lbffDolOuterNode->contextId = 2; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; _imageSubGraph.swGtmOuterNode->contextId = 4; - _imageSubGraph.swNntmOuterNode->contextId = 5; + _imageSubGraph.swScalerOuterNode->contextId = 5; + _imageSubGraph.swNntmOuterNode->contextId = 6; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -14687,6 +15414,11 @@ StaticGraphStatus StaticGraph100032::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -14720,7 +15452,7 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod if ( subGraphLinks[16]->linkConfiguration->bufferSize == 0 && subGraphLinks[19]->linkConfiguration->bufferSize == 0 && - subGraphLinks[22]->linkConfiguration->bufferSize == 0 && + subGraphLinks[23]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; @@ -14728,7 +15460,7 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod if ( subGraphLinks[17]->linkConfiguration->bufferSize == 0 && subGraphLinks[20]->linkConfiguration->bufferSize == 0 && - subGraphLinks[23]->linkConfiguration->bufferSize == 0 && + subGraphLinks[24]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noDp; @@ -14761,10 +15493,10 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod subGraphLinks[9]->isActive = !(lbffDolInnerOptions & no3A); // lbff_Dol:terminal_connect_awb_sat_output -> awb_sat_out subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp subGraphLinks[19]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_gtm:terminal_connect_input - subGraphLinks[22]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[23]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp subGraphLinks[20]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_gtm:terminal_connect_input - subGraphLinks[23]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input + subGraphLinks[24]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_nntm:terminal_connect_input subGraphLinks[18]->isActive = !(bbpsWithTnrInnerOptions & noPpp); // bbps_WithTnr:bbps_ofs_pp_yuvn_odr -> image_ppp /* @@ -14777,7 +15509,7 @@ StaticGraphStatus imageSubGraphTopology100032::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 25; i++) + for (uint32_t i = 0; i < 28; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -16763,6 +17495,7 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon LbffBayerPdaf3OuterNodeConfiguration** lbffBayerPdaf3OuterNodeConfigurationOptions = new LbffBayerPdaf3OuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; SwNntmOuterNodeConfiguration** swNntmOuterNodeConfigurationOptions = new SwNntmOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -16771,17 +17504,20 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon lbffBayerPdaf3OuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerPdaf3OuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; swNntmOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swNntmOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerPdaf3OuterNode.Init(lbffBayerPdaf3OuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swNntmOuterNode.Init(swNntmOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] lbffBayerPdaf3OuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; delete[] swNntmOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -16942,7 +17678,23 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon link->dest = GraphElementType::ProcessedMain; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 19; ++i) + link = &_graphLinks[19]; + link->src = GraphElementType::SwNntm; + link->srcNode = &_swNntmOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -16966,6 +17718,7 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon _imageSubGraph.lbffBayerPdaf3OuterNode = &_lbffBayerPdaf3OuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; _imageSubGraph.swNntmOuterNode = &_swNntmOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -16975,6 +17728,7 @@ StaticGraph100040::StaticGraph100040(GraphConfiguration100040** selectedGraphCon _imageSubGraph.lbffBayerPdaf3OuterNode->contextId = 1; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; _imageSubGraph.swNntmOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -17006,6 +17760,11 @@ StaticGraphStatus StaticGraph100040::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -17088,7 +17847,7 @@ StaticGraphStatus imageSubGraphTopology100040::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 19; i++) + for (uint32_t i = 0; i < 21; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -17121,6 +17880,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon SwVaiOuterNodeConfiguration** swVaiOuterNodeConfigurationOptions = new SwVaiOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) { @@ -17129,17 +17889,20 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon swVaiOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swVaiOuterNodeConfiguration; lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; } _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _swVaiOuterNode.Init(swVaiOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); delete[] isysOuterNodeConfigurationOptions; delete[] swVaiOuterNodeConfigurationOptions; delete[] lbffBayerOuterNodeConfigurationOptions; delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; // Use default configuration updateConfiguration(0); @@ -17284,7 +18047,23 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon link->dest = GraphElementType::ImagePpp; link->type = LinkType::Node2Sink; - for (uint8_t i = 0; i < 17; ++i) + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 19; ++i) { // apply link configuration. select configuration with maximal size uint32_t selectedLinkConfig = 0; @@ -17308,6 +18087,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; _imageSubGraph.swVaiOuterNode = &_swVaiOuterNode; _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; // choose the selected sub graph _selectedGraphTopology = &_imageSubGraph; @@ -17317,6 +18097,7 @@ StaticGraph100041::StaticGraph100041(GraphConfiguration100041** selectedGraphCon _imageSubGraph.lbffBayerOuterNode->contextId = 1; _imageSubGraph.swVaiOuterNode->contextId = 2; _imageSubGraph.bbpsWithTnrOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; // Apply a default inner nodes configuration for the selected sub graph SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; if(_selectedGraphTopology != nullptr) @@ -17348,6 +18129,11 @@ StaticGraphStatus StaticGraph100041::updateConfiguration(uint32_t selectedIndex) { return res; } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } return StaticGraphStatus::SG_OK; } @@ -17380,6 +18166,7 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod // active public options according to sink mapping if ( subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && true) { bbpsWithTnrInnerOptions |= noMp; @@ -17417,6 +18204,7 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_scaler:terminal_connect_input subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noPpp); // bbps_WithTnr:bbps_ofs_pp_yuvn_odr -> image_ppp @@ -17430,7 +18218,7 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod * Disable links with zero buffer size * (used for post processing when not all links are being used) */ - for (uint32_t i = 0; i < 17; i++) + for (uint32_t i = 0; i < 19; i++) { if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) { @@ -17449,3 +18237,392 @@ StaticGraphStatus imageSubGraphTopology100041::configInnerNodes(SubGraphInnerNod return StaticGraphStatus::SG_OK; } +/* + * Graph 100042 + */ +StaticGraph100042::StaticGraph100042(GraphConfiguration100042** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId) : + IStaticGraphConfig(selectedSensorMode, sinkMappingConfiguration, 100042, selectedSettingsId, zoomKeyResolutions), + + _imageSubGraph(_sinkMappingConfiguration) +{ + // Construct outer nodes + _graphConfigurations = new GraphConfiguration100042[kernelConfigurationsOptionsCount]; + IsysOuterNodeConfiguration** isysOuterNodeConfigurationOptions = new IsysOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + LbffBayerOuterNodeConfiguration** lbffBayerOuterNodeConfigurationOptions = new LbffBayerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + BbpsWithTnrOuterNodeConfiguration** bbpsWithTnrOuterNodeConfigurationOptions = new BbpsWithTnrOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwImvOuterNodeConfiguration** swImvOuterNodeConfigurationOptions = new SwImvOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + SwScalerOuterNodeConfiguration** swScalerOuterNodeConfigurationOptions = new SwScalerOuterNodeConfiguration*[kernelConfigurationsOptionsCount]; + + for (uint32_t i=0; i < kernelConfigurationsOptionsCount; ++i) + { + _graphConfigurations[i] = *selectedGraphConfiguration[i]; + isysOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].isysOuterNodeConfiguration; + lbffBayerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].lbffBayerOuterNodeConfiguration; + bbpsWithTnrOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].bbpsWithTnrOuterNodeConfiguration; + swImvOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swImvOuterNodeConfiguration; + swScalerOuterNodeConfigurationOptions[i] = &_graphConfigurations[i].swScalerOuterNodeConfiguration; + } + + _isysOuterNode.Init(isysOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _lbffBayerOuterNode.Init(lbffBayerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _bbpsWithTnrOuterNode.Init(bbpsWithTnrOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swImvOuterNode.Init(swImvOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + _swScalerOuterNode.Init(swScalerOuterNodeConfigurationOptions, kernelConfigurationsOptionsCount); + + delete[] isysOuterNodeConfigurationOptions; + delete[] lbffBayerOuterNodeConfigurationOptions; + delete[] bbpsWithTnrOuterNodeConfigurationOptions; + delete[] swImvOuterNodeConfigurationOptions; + delete[] swScalerOuterNodeConfigurationOptions; + + // Use default configuration + updateConfiguration(0); + + // Declare all the links in the graph + GraphLink* link = nullptr; + link = &_graphLinks[0]; + link->src = GraphElementType::Sensor; + link->dest = GraphElementType::Isys; + link->destNode = &_isysOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Source2Node; + + link = &_graphLinks[1]; + link->src = GraphElementType::LscBuffer; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 4; + link->type = LinkType::Source2Node; + + link = &_graphLinks[2]; + link->src = GraphElementType::Isys; + link->srcNode = &_isysOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::LbffBayer; + link->destNode = &_lbffBayerOuterNode; + link->destTerminalId = 3; + link->type = LinkType::Node2Node; + + link = &_graphLinks[3]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 6; + link->dest = GraphElementType::AeOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[4]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 7; + link->dest = GraphElementType::AfStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[5]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::AwbStdOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[6]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 9; + link->dest = GraphElementType::AwbSatOut; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[7]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 9; + link->type = LinkType::Node2Node; + + link = &_graphLinks[8]; + link->src = GraphElementType::LbffBayer; + link->srcNode = &_lbffBayerOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 7; + link->type = LinkType::Node2Node; + + link = &_graphLinks[9]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 12; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 10; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[10]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 13; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 5; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[11]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 11; + link->type = LinkType::Node2Self; + + link = &_graphLinks[12]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 8; + link->dest = GraphElementType::BbpsWithTnr; + link->destNode = &_bbpsWithTnrOuterNode; + link->destTerminalId = 6; + link->type = LinkType::Node2Self; + link->frameDelay = 1U; + + link = &_graphLinks[13]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::ImageMp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[14]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::ImageDp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[15]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 16; + link->dest = GraphElementType::ImagePpp; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[16]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 14; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[17]; + link->src = GraphElementType::BbpsWithTnr; + link->srcNode = &_bbpsWithTnrOuterNode; + link->srcTerminalId = 15; + link->dest = GraphElementType::SwImv; + link->destNode = &_swImvOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[18]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedMain; + link->type = LinkType::Node2Sink; + + link = &_graphLinks[19]; + link->src = GraphElementType::SwImv; + link->srcNode = &_swImvOuterNode; + link->srcTerminalId = 2; + link->dest = GraphElementType::SwScaler; + link->destNode = &_swScalerOuterNode; + link->destTerminalId = 0; + link->type = LinkType::Node2Node; + + link = &_graphLinks[20]; + link->src = GraphElementType::SwScaler; + link->srcNode = &_swScalerOuterNode; + link->srcTerminalId = 1; + link->dest = GraphElementType::ProcessedSecondary; + link->type = LinkType::Node2Sink; + + for (uint8_t i = 0; i < 21; ++i) + { + // apply link configuration. select configuration with maximal size + uint32_t selectedLinkConfig = 0; + uint32_t maxSize = _graphConfigurations[0].linkConfigurations[i].bufferSize; + for (uint32_t j = 1; j < kernelConfigurationsOptionsCount; j++) + { + if (_graphConfigurations[j].linkConfigurations[i].bufferSize > maxSize) + { + maxSize = _graphConfigurations[j].linkConfigurations[i].bufferSize; + selectedLinkConfig = j; + } + } + _graphLinks[i].linkConfiguration = &_graphConfigurations[selectedLinkConfig].linkConfigurations[i]; + + // Assign link to sub-graph + _imageSubGraph.links[i] = &_graphLinks[i]; + } + + // add nodes for sub graph + _imageSubGraph.isysOuterNode = &_isysOuterNode; + _imageSubGraph.lbffBayerOuterNode = &_lbffBayerOuterNode; + _imageSubGraph.bbpsWithTnrOuterNode = &_bbpsWithTnrOuterNode; + _imageSubGraph.swImvOuterNode = &_swImvOuterNode; + _imageSubGraph.swScalerOuterNode = &_swScalerOuterNode; + + // choose the selected sub graph + _selectedGraphTopology = &_imageSubGraph; + + // logical node IDs + _imageSubGraph.isysOuterNode->contextId = 0; + _imageSubGraph.lbffBayerOuterNode->contextId = 1; + _imageSubGraph.bbpsWithTnrOuterNode->contextId = 2; + _imageSubGraph.swImvOuterNode->contextId = 3; + _imageSubGraph.swScalerOuterNode->contextId = 4; + // Apply a default inner nodes configuration for the selected sub graph + SubGraphInnerNodeConfiguration defaultInnerNodeConfiguration; + if(_selectedGraphTopology != nullptr) + { + _selectedGraphTopology->configInnerNodes(defaultInnerNodeConfiguration); + } +} + +StaticGraphStatus StaticGraph100042::updateConfiguration(uint32_t selectedIndex) +{ + StaticGraphStatus res = StaticGraphStatus::SG_OK; + res = _isysOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _lbffBayerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _bbpsWithTnrOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swImvOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + res = _swScalerOuterNode.UpdateKernelsSelectedConfiguration(selectedIndex); + if (res != StaticGraphStatus::SG_OK) + { + return res; + } + return StaticGraphStatus::SG_OK; +} + +StaticGraph100042::~StaticGraph100042() +{ + delete[] _graphConfigurations; + delete _zoomKeyResolutions.zoomKeyResolutionOptions; +} + +StaticGraphStatus imageSubGraphTopology100042::configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) +{ + + /* + * Init sub graphs inner nodes configuration base on user request + */ + InnerNodeOptionsFlags imagePublicInnerNodeConfiguration = GetInnerOptions(subGraphInnerNodeConfiguration.imageInnerOptions); + + /* + * Setting Node lbffBayer initial inner node configuration + */ + InnerNodeOptionsFlags lbffBayerInnerOptions = imagePublicInnerNodeConfiguration; + // always active public inner options + lbffBayerInnerOptions |= (noGmv | noBurstCapture | noIr | noPdaf); + // active public options according to sink mapping + + /* + * Setting Node bbpsWithTnr initial inner node configuration + */ + InnerNodeOptionsFlags bbpsWithTnrInnerOptions = imagePublicInnerNodeConfiguration; + // active public options according to sink mapping + if ( + subGraphLinks[13]->linkConfiguration->bufferSize == 0 && + subGraphLinks[16]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noMp; + } + if ( + subGraphLinks[14]->linkConfiguration->bufferSize == 0 && + subGraphLinks[17]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noDp; + } + if ( + subGraphLinks[15]->linkConfiguration->bufferSize == 0 && + true) + { + bbpsWithTnrInnerOptions |= noPpp; + } + + /* + * Configuring inner nodes according to the selected inner options + */ + lbffBayerInnerOptions |= noLbOutputPs & (-((imagePublicInnerNodeConfiguration & (noMp | noDp | noPpp)) == (noMp | noDp | noPpp))); + lbffBayerInnerOptions |= noLbOutputMe & (-((imagePublicInnerNodeConfiguration & (noMp | noDp | noPpp)) == (noMp | noDp | noPpp))); + + /* + * Set the selected inner nodes to the outer nodes + */ + lbffBayerOuterNode->setInnerNode(lbffBayerInnerOptions); + bbpsWithTnrOuterNode->setInnerNode(bbpsWithTnrInnerOptions); + + /* + * Link enablement by public inner options + */ + subGraphLinks[3]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_ae_output -> ae_out + subGraphLinks[4]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_af_std_output -> af_std_out + subGraphLinks[5]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_std_output -> awb_std_out + subGraphLinks[6]->isActive = !(lbffBayerInnerOptions & no3A); // lbff_Bayer:terminal_connect_awb_sat_output -> awb_sat_out + subGraphLinks[13]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> image_mp + subGraphLinks[16]->isActive = !(bbpsWithTnrInnerOptions & noMp); // bbps_WithTnr:bbps_ofs_mp_yuvn_odr -> sw_imv:terminal_connect_input + subGraphLinks[14]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> image_dp + subGraphLinks[17]->isActive = !(bbpsWithTnrInnerOptions & noDp); // bbps_WithTnr:bbps_ofs_dp_yuvn_odr -> sw_imv:terminal_connect_input + subGraphLinks[15]->isActive = !(bbpsWithTnrInnerOptions & noPpp); // bbps_WithTnr:bbps_ofs_pp_yuvn_odr -> image_ppp + + /* + * Link enablement by private inner options + */ + subGraphLinks[7]->isActive = !(lbffBayerInnerOptions & noLbOutputPs); // lbff_Bayer:terminal_connect_ps_output -> bbps_WithTnr:bbps_slim_spatial_yuvn_ifd + subGraphLinks[8]->isActive = !(lbffBayerInnerOptions & noLbOutputMe); // lbff_Bayer:terminal_connect_me_output -> bbps_WithTnr:bbps_tnr_bc_yuv4n_ifd + + /* + * Disable links with zero buffer size + * (used for post processing when not all links are being used) + */ + for (uint32_t i = 0; i < 21; i++) + { + if (subGraphLinks[i]->linkConfiguration->bufferSize == 0) + { + subGraphLinks[i]->isActive = false; + } + } + + /* + * Link enablement by inner options combinations + */ + subGraphLinks[9]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp|noPpp)) != (noMp|noDp|noPpp); // bbps_WithTnr:bbps_tnr_blend_yuvn_odr -> bbps_WithTnr:bbps_slim_tnr_blend_yuvnm1_ifd + subGraphLinks[10]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp|noPpp)) != (noMp|noDp|noPpp); // bbps_WithTnr:bbps_tnr_scale_yuv4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_yuv4nm1_ifd + subGraphLinks[11]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp|noPpp)) != (noMp|noDp|noPpp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_tnr_blend_rs4n_ifd + subGraphLinks[12]->isActive = (bbpsWithTnrInnerOptions & (noMp|noDp|noPpp)) != (noMp|noDp|noPpp); // bbps_WithTnr:bbps_tnr_bc_rs4n_odr -> bbps_WithTnr:bbps_slim_tnr_bc_rs4nm1_ifd + + return StaticGraphStatus::SG_OK; +} + diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.h index f33eb5a..7e29d8f 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphAutogen.h @@ -36,6 +36,8 @@ #define SUPPORT_KEY_RESOLUTIONS 1 +#define SUPPORT_FRAGMENTS 0 + enum InnerNodeOption { None = 0, @@ -65,18 +67,18 @@ class OuterNode { /** * \brief resourceId - represents the physical ID of the node, e.g. cb_id for CB node. */ - uint8_t resourceId; + uint8_t resourceId = 0; /** * \brief contextId - represents the logical Id of the node according to the use-case. * Same physical nodes in given graph topology will have a different contextId */ uint8_t contextId = 0; - NodeTypes type; + NodeTypes type = NodeTypes::Cb; HwBitmaps bitmaps; - StaticGraphNodeKernels nodeKernels; + StaticGraphNodeKernels nodeKernels = {}; - uint8_t numberOfFragments; + uint8_t numberOfFragments = 0; OuterNode() {} ~OuterNode(); @@ -225,6 +227,16 @@ struct SwGdcOuterNodeConfiguration StaticGraphKernelBppConfiguration bppInfos[1]; }; +struct SwScalerOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[1]; + StaticGraphKernelRes resolutionHistories[1]; + StaticGraphKernelBppConfiguration bppInfos[1]; + uint8_t systemApiConfiguration[5]; +}; + struct SwNntmOuterNodeConfiguration { uint32_t streamId = 0; @@ -284,6 +296,16 @@ struct BbpsIrNoTnrOuterNodeConfiguration uint8_t systemApiConfiguration[624]; }; +struct LbffIrNo2ANoGmvOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[8]; + StaticGraphKernelRes resolutionHistories[10]; + StaticGraphKernelBppConfiguration bppInfos[26]; + uint8_t systemApiConfiguration[1176]; +}; + struct LbffIrNoGmvOuterNodeConfiguration { uint32_t streamId = 0; @@ -405,6 +427,17 @@ struct SwVaiOuterNodeConfiguration StaticGraphKernelRes resolutionInfos[1]; StaticGraphKernelRes resolutionHistories[1]; StaticGraphKernelBppConfiguration bppInfos[1]; + uint8_t systemApiConfiguration[5]; +}; + +struct SwImvOuterNodeConfiguration +{ + uint32_t streamId = 0; + uint8_t tuningMode = 0; + StaticGraphKernelRes resolutionInfos[1]; + StaticGraphKernelRes resolutionHistories[1]; + StaticGraphKernelBppConfiguration bppInfos[1]; + uint8_t systemApiConfiguration[5]; }; struct GraphConfiguration100000 @@ -423,7 +456,8 @@ struct GraphConfiguration100001 LbffBayerWithGmvOuterNodeConfiguration lbffBayerWithGmvOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwGdcOuterNodeConfiguration swGdcOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[21]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[23]; }; struct GraphConfiguration100002 @@ -432,7 +466,8 @@ struct GraphConfiguration100002 IsysOuterNodeConfiguration isysOuterNodeConfiguration; LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[16]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[18]; }; struct GraphConfiguration100003 @@ -452,7 +487,8 @@ struct GraphConfiguration100004 LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwGdcOuterNodeConfiguration swGdcOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[19]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[21]; }; struct GraphConfiguration100005 @@ -462,7 +498,8 @@ struct GraphConfiguration100005 LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[19]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[21]; }; struct GraphConfiguration100006 @@ -510,6 +547,15 @@ struct GraphConfiguration100016 StaticGraphLinkConfiguration linkConfigurations[4]; }; +struct GraphConfiguration100024 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysOuterNodeConfiguration isysOuterNodeConfiguration; + LbffIrNo2ANoGmvOuterNodeConfiguration lbffIrNo2ANoGmvOuterNodeConfiguration; + BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[9]; +}; + struct GraphConfiguration100025 { VirtualSinkMapping sinkMappingConfiguration; @@ -571,7 +617,8 @@ struct GraphConfiguration100031 BbpsNoTnrOuterNodeConfiguration bbpsNoTnrOuterNodeConfiguration; SwGtmOuterNodeConfiguration swGtmOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[20]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[23]; }; struct GraphConfiguration100032 @@ -583,7 +630,8 @@ struct GraphConfiguration100032 BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwGtmOuterNodeConfiguration swGtmOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[25]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[28]; }; struct GraphConfiguration100035 @@ -639,7 +687,8 @@ struct GraphConfiguration100040 LbffBayerPdaf3OuterNodeConfiguration lbffBayerPdaf3OuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; SwNntmOuterNodeConfiguration swNntmOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[19]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[21]; }; struct GraphConfiguration100041 @@ -649,7 +698,19 @@ struct GraphConfiguration100041 SwVaiOuterNodeConfiguration swVaiOuterNodeConfiguration; LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; - StaticGraphLinkConfiguration linkConfigurations[17]; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[19]; +}; + +struct GraphConfiguration100042 +{ + VirtualSinkMapping sinkMappingConfiguration; + IsysOuterNodeConfiguration isysOuterNodeConfiguration; + LbffBayerOuterNodeConfiguration lbffBayerOuterNodeConfiguration; + BbpsWithTnrOuterNodeConfiguration bbpsWithTnrOuterNodeConfiguration; + SwImvOuterNodeConfiguration swImvOuterNodeConfiguration; + SwScalerOuterNodeConfiguration swScalerOuterNodeConfiguration; + StaticGraphLinkConfiguration linkConfigurations[21]; }; #pragma pack(pop) @@ -660,6 +721,7 @@ class IsysOuterNode : public OuterNode void Init(IsysOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerOuterNode : public OuterNode { @@ -668,6 +730,7 @@ class LbffBayerOuterNode : public OuterNode void Init(LbffBayerOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsNoTnrOuterNode : public OuterNode { @@ -676,6 +739,7 @@ class BbpsNoTnrOuterNode : public OuterNode void Init(BbpsNoTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerWithGmvOuterNode : public OuterNode { @@ -684,6 +748,7 @@ class LbffBayerWithGmvOuterNode : public OuterNode void Init(LbffBayerWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsWithTnrOuterNode : public OuterNode { @@ -692,6 +757,7 @@ class BbpsWithTnrOuterNode : public OuterNode void Init(BbpsWithTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwGdcOuterNode : public OuterNode { @@ -700,6 +766,16 @@ class SwGdcOuterNode : public OuterNode void Init(SwGdcOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwScalerOuterNode : public OuterNode +{ +public: + SwScalerOuterNode(): OuterNode(){} + void Init(SwScalerOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwNntmOuterNode : public OuterNode { @@ -708,6 +784,7 @@ class SwNntmOuterNode : public OuterNode void Init(SwNntmOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffRgbIrOuterNode : public OuterNode { @@ -716,6 +793,7 @@ class LbffRgbIrOuterNode : public OuterNode void Init(LbffRgbIrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrNoGmvIrStreamOuterNode : public OuterNode { @@ -724,6 +802,7 @@ class LbffIrNoGmvIrStreamOuterNode : public OuterNode void Init(LbffIrNoGmvIrStreamOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsIrWithTnrOuterNode : public OuterNode { @@ -732,6 +811,7 @@ class BbpsIrWithTnrOuterNode : public OuterNode void Init(BbpsIrWithTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerBurstOutNo3AOuterNode : public OuterNode { @@ -740,6 +820,7 @@ class LbffBayerBurstOutNo3AOuterNode : public OuterNode void Init(LbffBayerBurstOutNo3AOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class BbpsIrNoTnrOuterNode : public OuterNode { @@ -748,6 +829,16 @@ class BbpsIrNoTnrOuterNode : public OuterNode void Init(BbpsIrNoTnrOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class LbffIrNo2ANoGmvOuterNode : public OuterNode +{ +public: + LbffIrNo2ANoGmvOuterNode(): OuterNode(){} + void Init(LbffIrNo2ANoGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrNoGmvOuterNode : public OuterNode { @@ -756,6 +847,7 @@ class LbffIrNoGmvOuterNode : public OuterNode void Init(LbffIrNoGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class IsysPdaf2OuterNode : public OuterNode { @@ -764,6 +856,7 @@ class IsysPdaf2OuterNode : public OuterNode void Init(IsysPdaf2OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf2OuterNode : public OuterNode { @@ -772,6 +865,7 @@ class LbffBayerPdaf2OuterNode : public OuterNode void Init(LbffBayerPdaf2OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf3OuterNode : public OuterNode { @@ -780,6 +874,7 @@ class LbffBayerPdaf3OuterNode : public OuterNode void Init(LbffBayerPdaf3OuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class IsysDolOuterNode : public OuterNode { @@ -788,6 +883,7 @@ class IsysDolOuterNode : public OuterNode void Init(IsysDolOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwDolOuterNode : public OuterNode { @@ -796,6 +892,7 @@ class SwDolOuterNode : public OuterNode void Init(SwDolOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffDolOuterNode : public OuterNode { @@ -804,6 +901,7 @@ class LbffDolOuterNode : public OuterNode void Init(LbffDolOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwGtmOuterNode : public OuterNode { @@ -812,6 +910,7 @@ class SwGtmOuterNode : public OuterNode void Init(SwGtmOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf2WithGmvOuterNode : public OuterNode { @@ -820,6 +919,7 @@ class LbffBayerPdaf2WithGmvOuterNode : public OuterNode void Init(LbffBayerPdaf2WithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffBayerPdaf3WithGmvOuterNode : public OuterNode { @@ -828,6 +928,7 @@ class LbffBayerPdaf3WithGmvOuterNode : public OuterNode void Init(LbffBayerPdaf3WithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffRgbIrWithGmvOuterNode : public OuterNode { @@ -836,6 +937,7 @@ class LbffRgbIrWithGmvOuterNode : public OuterNode void Init(LbffRgbIrWithGmvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class LbffIrWithGmvIrStreamOuterNode : public OuterNode { @@ -844,6 +946,7 @@ class LbffIrWithGmvIrStreamOuterNode : public OuterNode void Init(LbffIrWithGmvIrStreamOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class SwVaiOuterNode : public OuterNode { @@ -852,6 +955,16 @@ class SwVaiOuterNode : public OuterNode void Init(SwVaiOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + +}; +class SwImvOuterNode : public OuterNode +{ +public: + SwImvOuterNode(): OuterNode(){} + void Init(SwImvOuterNodeConfiguration** selectedGraphConfigurations, uint32_t kernelConfigurationsOptionsCount); + + void setInnerNode(InnerNodeOptionsFlags nodeInnerOptions); + }; class imageSubGraphTopology100000 : public GraphTopology { @@ -897,14 +1010,15 @@ class StaticGraph100000 : public IStaticGraphConfig class imageSubGraphTopology100001 : public GraphTopology { public: - imageSubGraphTopology100001(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} + imageSubGraphTopology100001(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 23, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerWithGmvOuterNode* lbffBayerWithGmvOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwGdcOuterNode* swGdcOuterNode = nullptr; - GraphLink* subGraphLinks[21]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[23]; }; @@ -914,7 +1028,7 @@ class StaticGraph100001 : public IStaticGraphConfig StaticGraph100001(GraphConfiguration100001** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100001(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3890884975; // autogenerated + static const uint32_t hashCode = 4211786267; // autogenerated private: // Configuration @@ -925,6 +1039,7 @@ class StaticGraph100001 : public IStaticGraphConfig LbffBayerWithGmvOuterNode _lbffBayerWithGmvOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwGdcOuterNode _swGdcOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -933,19 +1048,20 @@ class StaticGraph100001 : public IStaticGraphConfig imageSubGraphTopology100001 _imageSubGraph; // All graph links - GraphLink _graphLinks[21]; + GraphLink _graphLinks[23]; }; class imageSubGraphTopology100002 : public GraphTopology { public: - imageSubGraphTopology100002(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 16, sinkMappingConfiguration) {} + imageSubGraphTopology100002(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 18, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerOuterNode* lbffBayerOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; - GraphLink* subGraphLinks[16]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[18]; }; @@ -955,7 +1071,7 @@ class StaticGraph100002 : public IStaticGraphConfig StaticGraph100002(GraphConfiguration100002** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100002(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 420795545; // autogenerated + static const uint32_t hashCode = 2359075509; // autogenerated private: // Configuration @@ -965,6 +1081,7 @@ class StaticGraph100002 : public IStaticGraphConfig IsysOuterNode _isysOuterNode; LbffBayerOuterNode _lbffBayerOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -973,7 +1090,7 @@ class StaticGraph100002 : public IStaticGraphConfig imageSubGraphTopology100002 _imageSubGraph; // All graph links - GraphLink _graphLinks[16]; + GraphLink _graphLinks[18]; }; class imageSubGraphTopology100003 : public GraphTopology { @@ -1021,14 +1138,15 @@ class StaticGraph100003 : public IStaticGraphConfig class imageSubGraphTopology100004 : public GraphTopology { public: - imageSubGraphTopology100004(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 19, sinkMappingConfiguration) {} + imageSubGraphTopology100004(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerOuterNode* lbffBayerOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwGdcOuterNode* swGdcOuterNode = nullptr; - GraphLink* subGraphLinks[19]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[21]; }; @@ -1038,7 +1156,7 @@ class StaticGraph100004 : public IStaticGraphConfig StaticGraph100004(GraphConfiguration100004** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100004(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3446052961; // autogenerated + static const uint32_t hashCode = 2537139917; // autogenerated private: // Configuration @@ -1049,6 +1167,7 @@ class StaticGraph100004 : public IStaticGraphConfig LbffBayerOuterNode _lbffBayerOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwGdcOuterNode _swGdcOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1057,20 +1176,21 @@ class StaticGraph100004 : public IStaticGraphConfig imageSubGraphTopology100004 _imageSubGraph; // All graph links - GraphLink _graphLinks[19]; + GraphLink _graphLinks[21]; }; class imageSubGraphTopology100005 : public GraphTopology { public: - imageSubGraphTopology100005(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 19, sinkMappingConfiguration) {} + imageSubGraphTopology100005(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerOuterNode* lbffBayerOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[19]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[21]; }; @@ -1080,7 +1200,7 @@ class StaticGraph100005 : public IStaticGraphConfig StaticGraph100005(GraphConfiguration100005** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100005(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 4056595; // autogenerated + static const uint32_t hashCode = 21815; // autogenerated private: // Configuration @@ -1091,6 +1211,7 @@ class StaticGraph100005 : public IStaticGraphConfig LbffBayerOuterNode _lbffBayerOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1099,7 +1220,7 @@ class StaticGraph100005 : public IStaticGraphConfig imageSubGraphTopology100005 _imageSubGraph; // All graph links - GraphLink _graphLinks[19]; + GraphLink _graphLinks[21]; }; class imageSubGraphTopology100006 : public GraphTopology { @@ -1360,6 +1481,46 @@ class StaticGraph100016 : public IStaticGraphConfig GraphLink _graphLinks[4]; }; +class imageSubGraphTopology100024 : public GraphTopology { + +public: + imageSubGraphTopology100024(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 9, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysOuterNode* isysOuterNode = nullptr; + LbffIrNo2ANoGmvOuterNode* lbffIrNo2ANoGmvOuterNode = nullptr; + BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; + GraphLink* subGraphLinks[9]; + +}; + +class StaticGraph100024 : public IStaticGraphConfig +{ +public: + StaticGraph100024(GraphConfiguration100024** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100024(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 4016039499; // autogenerated + +private: + // Configuration + GraphConfiguration100024* _graphConfigurations; + + /* Outer Nodes */ + IsysOuterNode _isysOuterNode; + LbffIrNo2ANoGmvOuterNode _lbffIrNo2ANoGmvOuterNode; + BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100024 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[9]; +}; + class imageSubGraphTopology100025 : public GraphTopology { public: @@ -1597,7 +1758,7 @@ class StaticGraph100030 : public IStaticGraphConfig class imageSubGraphTopology100031 : public GraphTopology { public: - imageSubGraphTopology100031(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 20, sinkMappingConfiguration) {} + imageSubGraphTopology100031(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 23, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; @@ -1605,8 +1766,9 @@ class imageSubGraphTopology100031 : public GraphTopology { LbffDolOuterNode* lbffDolOuterNode = nullptr; BbpsNoTnrOuterNode* bbpsNoTnrOuterNode = nullptr; SwGtmOuterNode* swGtmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[20]; + GraphLink* subGraphLinks[23]; }; @@ -1616,7 +1778,7 @@ class StaticGraph100031 : public IStaticGraphConfig StaticGraph100031(GraphConfiguration100031** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100031(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 4222804565; // autogenerated + static const uint32_t hashCode = 3106659657; // autogenerated private: // Configuration @@ -1629,6 +1791,7 @@ class StaticGraph100031 : public IStaticGraphConfig BbpsNoTnrOuterNode _bbpsNoTnrOuterNode; SwGtmOuterNode _swGtmOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1637,13 +1800,13 @@ class StaticGraph100031 : public IStaticGraphConfig imageSubGraphTopology100031 _imageSubGraph; // All graph links - GraphLink _graphLinks[20]; + GraphLink _graphLinks[23]; }; class imageSubGraphTopology100032 : public GraphTopology { public: - imageSubGraphTopology100032(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 25, sinkMappingConfiguration) {} + imageSubGraphTopology100032(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 28, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysDolOuterNode* isysDolOuterNode = nullptr; @@ -1651,8 +1814,9 @@ class imageSubGraphTopology100032 : public GraphTopology { LbffDolOuterNode* lbffDolOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwGtmOuterNode* swGtmOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[25]; + GraphLink* subGraphLinks[28]; }; @@ -1662,7 +1826,7 @@ class StaticGraph100032 : public IStaticGraphConfig StaticGraph100032(GraphConfiguration100032** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100032(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 1667794249; // autogenerated + static const uint32_t hashCode = 2018657077; // autogenerated private: // Configuration @@ -1675,6 +1839,7 @@ class StaticGraph100032 : public IStaticGraphConfig BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwGtmOuterNode _swGtmOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1683,7 +1848,7 @@ class StaticGraph100032 : public IStaticGraphConfig imageSubGraphTopology100032 _imageSubGraph; // All graph links - GraphLink _graphLinks[25]; + GraphLink _graphLinks[28]; }; class rawSubGraphTopology100035 : public GraphTopology { @@ -1917,14 +2082,15 @@ class StaticGraph100039 : public IStaticGraphConfig class imageSubGraphTopology100040 : public GraphTopology { public: - imageSubGraphTopology100040(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 19, sinkMappingConfiguration) {} + imageSubGraphTopology100040(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerPdaf3OuterNode* lbffBayerPdaf3OuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; SwNntmOuterNode* swNntmOuterNode = nullptr; - GraphLink* subGraphLinks[19]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[21]; }; @@ -1934,7 +2100,7 @@ class StaticGraph100040 : public IStaticGraphConfig StaticGraph100040(GraphConfiguration100040** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100040(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3111846513; // autogenerated + static const uint32_t hashCode = 3226663293; // autogenerated private: // Configuration @@ -1945,6 +2111,7 @@ class StaticGraph100040 : public IStaticGraphConfig LbffBayerPdaf3OuterNode _lbffBayerPdaf3OuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; SwNntmOuterNode _swNntmOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1953,20 +2120,21 @@ class StaticGraph100040 : public IStaticGraphConfig imageSubGraphTopology100040 _imageSubGraph; // All graph links - GraphLink _graphLinks[19]; + GraphLink _graphLinks[21]; }; class imageSubGraphTopology100041 : public GraphTopology { public: - imageSubGraphTopology100041(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 17, sinkMappingConfiguration) {} + imageSubGraphTopology100041(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 19, sinkMappingConfiguration) {} StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; IsysOuterNode* isysOuterNode = nullptr; LbffBayerOuterNode* lbffBayerOuterNode = nullptr; SwVaiOuterNode* swVaiOuterNode = nullptr; BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; - GraphLink* subGraphLinks[17]; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[19]; }; @@ -1976,7 +2144,7 @@ class StaticGraph100041 : public IStaticGraphConfig StaticGraph100041(GraphConfiguration100041** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); ~StaticGraph100041(); StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); - static const uint32_t hashCode = 3244574897; // autogenerated + static const uint32_t hashCode = 4127645209; // autogenerated private: // Configuration @@ -1987,6 +2155,7 @@ class StaticGraph100041 : public IStaticGraphConfig SwVaiOuterNode _swVaiOuterNode; LbffBayerOuterNode _lbffBayerOuterNode; BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwScalerOuterNode _swScalerOuterNode; /* Topology @@ -1995,7 +2164,51 @@ class StaticGraph100041 : public IStaticGraphConfig imageSubGraphTopology100041 _imageSubGraph; // All graph links - GraphLink _graphLinks[17]; + GraphLink _graphLinks[19]; +}; + +class imageSubGraphTopology100042 : public GraphTopology { + +public: + imageSubGraphTopology100042(VirtualSinkMapping* sinkMappingConfiguration) : GraphTopology(subGraphLinks, 21, sinkMappingConfiguration) {} + StaticGraphStatus configInnerNodes(SubGraphInnerNodeConfiguration& subGraphInnerNodeConfiguration) override; + + IsysOuterNode* isysOuterNode = nullptr; + LbffBayerOuterNode* lbffBayerOuterNode = nullptr; + BbpsWithTnrOuterNode* bbpsWithTnrOuterNode = nullptr; + SwImvOuterNode* swImvOuterNode = nullptr; + SwScalerOuterNode* swScalerOuterNode = nullptr; + GraphLink* subGraphLinks[21]; + +}; + +class StaticGraph100042 : public IStaticGraphConfig +{ +public: + StaticGraph100042(GraphConfiguration100042** selectedGraphConfiguration, uint32_t kernelConfigurationsOptionsCount, ZoomKeyResolutions* zoomKeyResolutions, VirtualSinkMapping* sinkMappingConfiguration, SensorMode* selectedSensorMode, int32_t selectedSettingsId); + ~StaticGraph100042(); + StaticGraphStatus updateConfiguration(uint32_t selectedIndex=0); + static const uint32_t hashCode = 1820896393; // autogenerated + +private: + // Configuration + GraphConfiguration100042* _graphConfigurations; + + /* Outer Nodes */ + IsysOuterNode _isysOuterNode; + LbffBayerOuterNode _lbffBayerOuterNode; + BbpsWithTnrOuterNode _bbpsWithTnrOuterNode; + SwImvOuterNode _swImvOuterNode; + SwScalerOuterNode _swScalerOuterNode; + + /* + Topology + */ + // Sub Graphs definition + imageSubGraphTopology100042 _imageSubGraph; + + // All graph links + GraphLink _graphLinks[21]; }; #endif \ No newline at end of file diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphBinaryAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphBinaryAutogen.h index 9a5b4c2..d0ab551 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphBinaryAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphBinaryAutogen.h @@ -66,6 +66,7 @@ enum class GraphConfigurationKeyAttributes : uint32_t PipelineNormalLight = 0x00000080, VaiActive = 0x00000100, StillsModeCpHdr = 0x00000200, + ImvDewarpActive = 0x00000400, }; struct GraphConfigurationKey { @@ -91,7 +92,7 @@ struct GraphConfigurationHeader { }; struct BinaryHeader { - uint32_t isSapEnable = 0; + uint32_t sapAttributes = 0; uint32_t binaryCommonHashCode = 0; uint32_t numberOfResolutions = 0; uint32_t numberOfSensorModes = 0; diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.c b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.c index 6835325..f54fc69 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.c +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.c @@ -27,11 +27,6 @@ #include "Ipu7xStaticGraphDataPreloadAutogen.h" -int isSapEnable(char* binaryData) -{ - return ((BinaryHeader*)binaryData)->isSapEnable; -} - void parseTable(char* binaryData, GraphHashCodesTable* table) { char* fileOffset = binaryData; diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.h index 06d5494..067ea99 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphDataPreloadAutogen.h @@ -67,7 +67,7 @@ typedef enum typedef struct { - uint32_t isSapEnable; + uint32_t sapAttributes; uint32_t binaryCommonHashCode; uint32_t numberOfResolutions; uint32_t numberOfSensorModes; @@ -96,36 +96,38 @@ typedef struct DataRange }DataRange; -static int distinctGraphsCount = 26; +static int distinctGraphsCount = 28; static GraphHashCode hashCodeLookup[] = { - {0, 0x2408066D}, + {0, 0xCBD6F5}, {100000, 0xF9CD2BC5}, - {100001, 0xE7EA316F}, - {100002, 0x1914D499}, + {100001, 0xFB0AC21B}, + {100002, 0x8C9CA2B5}, {100003, 0x2852BB37}, - {100004, 0xCD669861}, - {100005, 0x3DE613}, + {100004, 0x9739AECD}, + {100005, 0x5537}, {100006, 0xA9B58C63}, {100007, 0xC041EA69}, {100008, 0x203F07B3}, {100015, 0x6D7619FD}, {100016, 0x7CF22081}, + {100024, 0xEF5FE64B}, {100025, 0xF9CD2BC5}, {100026, 0x2E0F31C1}, {100027, 0x1E188769}, {100028, 0xFEE9967}, {100029, 0xDA687535}, {100030, 0x5E3042B3}, - {100031, 0xFBB2E255}, - {100032, 0x63688549}, + {100031, 0xB92BDD49}, + {100032, 0x78524335}, {100035, 0x28230C83}, {100036, 0x28230C83}, {100037, 0xCE22B6FB}, {100038, 0xE7B8AD65}, {100039, 0x7B1EE4DB}, - {100040, 0xB97B0271}, - {100041, 0xC16448B1} + {100040, 0xC052F97D}, + {100041, 0xF606DE19}, + {100042, 0x6C88AC89} }; static FrameFormatDesc formatsDB[] = { @@ -308,7 +310,23 @@ static FrameFormatDesc formatsDB[] = { {"IGIG_GRGB_IGIG_GBGRP", "IGP0", 0x30504749, 8}, {"IGIG_GRGB_IGIG_GBGRP", "IGP1", 0x31504749, 10}, {"IGIG_GRGB_IGIG_GBGRP", "IGP2", 0x32504749, 12}, - {"IGIG_GRGB_IGIG_GBGRP", "IGP3", 0x33504749, 16} + {"IGIG_GRGB_IGIG_GBGRP", "IGP3", 0x33504749, 16}, + {"RGGBPD", "RG0B", 0x42304752, 8}, + {"RGGBPD", "RG1B", 0x42314752, 10}, + {"RGGBPD", "RG2B", 0x42324752, 12}, + {"RGGBPD", "RG3B", 0x42334752, 16}, + {"BGGRPD", "BG0B", 0x42304742, 8}, + {"BGGRPD", "BG1B", 0x42314742, 10}, + {"BGGRPD", "BG2B", 0x42324742, 12}, + {"BGGRPD", "BG3B", 0x42334742, 16}, + {"GBRGPD", "GB0B", 0x42304247, 8}, + {"GBRGPD", "GB1B", 0x42314247, 10}, + {"GBRGPD", "GB2B", 0x42324247, 12}, + {"GBRGPD", "GB3B", 0x42334247, 16}, + {"GRBGPD", "GR0B", 0x42305247, 8}, + {"GRBGPD", "GR1B", 0x42315247, 10}, + {"GRBGPD", "GR2B", 0x42325247, 12}, + {"GRBGPD", "GR3B", 0x42335247, 16} }; #endif/*DATA_RANGE_H_*/ diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.cpp b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.cpp index e63df26..56c2287 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.cpp +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.cpp @@ -305,6 +305,17 @@ StaticGraphStatus StaticGraphReader::GetStaticGraphConfig(GraphConfigurationKey& *graph = new StaticGraph100016( reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); break; + case 100024: + if (StaticGraph100024::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100024( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; case 100025: if (StaticGraph100025::hashCode != selectedGraphConfigurationHeader->graphHashCode) { @@ -470,6 +481,17 @@ StaticGraphStatus StaticGraphReader::GetStaticGraphConfig(GraphConfigurationKey& *graph = new StaticGraph100041( reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); break; + case 100042: + if (StaticGraph100042::hashCode != selectedGraphConfigurationHeader->graphHashCode) + { + STATIC_GRAPH_LOG("Graph %d hash code is not matching the settings. Binary should be re-created.", selectedGraphConfigurationHeader->graphId); + delete[] selectedConfigurationData; + delete[] selectedGraphConfigurationHeaders; + return StaticGraphStatus::SG_ERROR; + } + *graph = new StaticGraph100042( + reinterpret_cast(selectedConfigurationData), selectedConfigurationsCount, &_zoomKeyResolutions, &selectedSinkMappingConfiguration, &_sensorModes[selectedGraphConfigurationHeader->sensorModeIndex], selectedGraphConfigurationHeader->settingId); + break; default: delete[] selectedConfigurationData; delete[] selectedGraphConfigurationHeaders; diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.h index 6819e5e..3d88e46 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphReaderAutogen.h @@ -82,7 +82,7 @@ class StaticGraphReader StaticGraphStatus Init(StaticReaderBinaryData& binaryGraphSettings); StaticGraphStatus GetStaticGraphConfig(GraphConfigurationKey& settingsKey, IStaticGraphConfig** graph); std::pair GetGraphConfigurationHeaders() const; - static const uint32_t staticGraphCommonHashCode = 604505709; // autogenerated + static const uint32_t staticGraphCommonHashCode = 13358837; // autogenerated private: void GetSinkMappingConfiguration(GraphConfigurationHeader* baseGraphConfigurationHeader, VirtualSinkMapping* baseSinkMappingConfiguration, GraphConfigurationHeader* selectedGraphConfigurationHeader, VirtualSinkMapping* selectedSinkMappingConfiguration); diff --git a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphTypesAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphTypesAutogen.h index 8a8ece5..8449861 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xStaticGraphTypesAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xStaticGraphTypesAutogen.h @@ -34,6 +34,7 @@ typedef aic::ImagingKernelGroup StaticGraphNodeKernels; typedef aic::ia_pac_kernel_info StaticGraphPacRunKernel; typedef aic::IaAicFragmentDesc StaticGraphFragmentDesc; +typedef aic::IaAicUpscalerFragDesc StaticGraphUpscalerFragmentDesc; #endif #ifdef STATIC_GRAPH_USE_IA_LEGACY_TYPES @@ -63,7 +64,9 @@ enum class NodeResourceId : uint8_t { SwGdc = 4, SwGtm = 5, SwNntm = 6, + SwScaler = 7, SwVai = 8, + SwImv = 9, }; enum class StaticGraphStatus : uint8_t @@ -99,6 +102,7 @@ enum class HwSink : uint8_t ImagePppSink, GmvMatchOutSink, ProcessedMainSink, + ProcessedSecondarySink, AwbSveOutSink, IrAeOutSink, IrAfStdOutSink, @@ -142,6 +146,7 @@ struct StaticGraphKernelRes { // We add only the fields that are used by tests struct StaticGraphKernelSystemApiIoBuffer1_4 { uint32_t x_output_offset_per_stripe[4]; + uint32_t plane_start_address_per_stripe[12]; }; #endif @@ -233,10 +238,19 @@ struct StaticGraphRunKernel { #ifndef STATIC_GRAPH_USE_IA_AIC_TYPES +struct StaticGraphUpscalerFragmentDesc { + uint16_t fragmentInputCropLeft = 0; + uint16_t fragmentInputCropRight = 0; +}; + struct StaticGraphFragmentDesc { - uint16_t inputWidth = 0; - uint16_t outputWidth = 0; - uint16_t left = 0; + uint16_t fragmentInputWidth = 0; + uint16_t fragmentOutputWidth = 0; + uint16_t fragmentStartX = 0; + union + { + StaticGraphUpscalerFragmentDesc upscalerFragDesc; + }; }; // ia_pac_kernel_info @@ -286,6 +300,7 @@ enum class GraphElementType : uint8_t { ImagePpp, GmvMatchOut, ProcessedMain, + ProcessedSecondary, AwbSveOut, IrAeOut, IrAfStdOut, @@ -303,12 +318,14 @@ enum class GraphElementType : uint8_t { LbffBayerWithGmv, BbpsWithTnr, SwGdc, + SwScaler, SwNntm, LbffRgbIr, LbffIrNoGmvIrStream, BbpsIrWithTnr, LbffBayerBurstOutNo3A, BbpsIrNoTnr, + LbffIrNo2ANoGmv, LbffIrNoGmv, IsysPdaf2, LbffBayerPdaf2, @@ -322,6 +339,7 @@ enum class GraphElementType : uint8_t { LbffRgbIrWithGmv, LbffIrWithGmvIrStream, SwVai, + SwImv, }; enum class LinkType : uint8_t { diff --git a/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.cpp b/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.cpp index 4894c27..031d92e 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.cpp +++ b/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.cpp @@ -497,7 +497,7 @@ TerminalDescriptor SW_GTMTerminalDesc[] = PAC_BUFFER_TYPE_NONE, TERMINAL_BUFFER_TYPE_DATA, TERMINAL_DIR_IN, - 40423, // tm_app + 37003, // tm_app }, { SW_GTM_TERMINAL_CONNECT_OUTPUT_1, @@ -594,6 +594,37 @@ TerminalDescriptor SW_VAITerminalDesc[] = }, }; +TerminalDescriptor SW_IMVTerminalDesc[] = +{ + { + SW_IMV_TERMINAL_CONNECT_INPUT, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_INPUT", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_IN, + 19706, // sw_scaler + }, + { + SW_IMV_TERMINAL_CONNECT_OUTPUT_1, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT_1", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 0, // + }, + { + SW_IMV_TERMINAL_CONNECT_OUTPUT_2, + TERMINAL_TYPE_CONNECT, + "TERMINAL_CONNECT_OUTPUT_2", + PAC_BUFFER_TYPE_NONE, + TERMINAL_BUFFER_TYPE_DATA, + TERMINAL_DIR_OUT, + 0, // + }, +}; + int CountOfSW_ISYSTerminalDesc = sizeof(SW_ISYSTerminalDesc) / sizeof(SW_ISYSTerminalDesc[0]); int CountOfLBFFTerminalDesc = sizeof(LBFFTerminalDesc) / sizeof(LBFFTerminalDesc[0]); int CountOfBBPSTerminalDesc = sizeof(BBPSTerminalDesc) / sizeof(BBPSTerminalDesc[0]); @@ -603,3 +634,4 @@ int CountOfSW_GTMTerminalDesc = sizeof(SW_GTMTerminalDesc) / sizeof(SW_GTMTermin int CountOfSW_NNTMTerminalDesc = sizeof(SW_NNTMTerminalDesc) / sizeof(SW_NNTMTerminalDesc[0]); int CountOfSW_SCALERTerminalDesc = sizeof(SW_SCALERTerminalDesc) / sizeof(SW_SCALERTerminalDesc[0]); int CountOfSW_VAITerminalDesc = sizeof(SW_VAITerminalDesc) / sizeof(SW_VAITerminalDesc[0]); +int CountOfSW_IMVTerminalDesc = sizeof(SW_IMVTerminalDesc) / sizeof(SW_IMVTerminalDesc[0]); diff --git a/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.h b/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.h index 4b69697..45fa3ef 100644 --- a/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.h +++ b/modules/ipu_desc/ipu7x/Ipu7xTerminalDescriptorAutogen.h @@ -169,6 +169,13 @@ enum SW_VAITerminalID SW_VAI_TERMINAL_CONNECT_OUTPUT, }; +enum SW_IMVTerminalID +{ + SW_IMV_TERMINAL_CONNECT_INPUT, + SW_IMV_TERMINAL_CONNECT_OUTPUT_1, + SW_IMV_TERMINAL_CONNECT_OUTPUT_2, +}; + extern TerminalDescriptor SW_ISYSTerminalDesc[]; extern TerminalDescriptor LBFFTerminalDesc[]; extern TerminalDescriptor BBPSTerminalDesc[]; @@ -178,6 +185,7 @@ extern TerminalDescriptor SW_GTMTerminalDesc[]; extern TerminalDescriptor SW_NNTMTerminalDesc[]; extern TerminalDescriptor SW_SCALERTerminalDesc[]; extern TerminalDescriptor SW_VAITerminalDesc[]; +extern TerminalDescriptor SW_IMVTerminalDesc[]; extern int CountOfSW_ISYSTerminalDesc; extern int CountOfLBFFTerminalDesc; @@ -188,3 +196,4 @@ extern int CountOfSW_GTMTerminalDesc; extern int CountOfSW_NNTMTerminalDesc; extern int CountOfSW_SCALERTerminalDesc; extern int CountOfSW_VAITerminalDesc; +extern int CountOfSW_IMVTerminalDesc; diff --git a/modules/v4l2/v4l2_device.h b/modules/v4l2/v4l2_device.h index 9140934..0c9ea94 100644 --- a/modules/v4l2/v4l2_device.h +++ b/modules/v4l2/v4l2_device.h @@ -18,8 +18,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CAMERA_INCLUDE_CAMERA_V4L2_DEVICE_H_ -#define CAMERA_INCLUDE_CAMERA_V4L2_DEVICE_H_ +#pragma once #include #include @@ -550,4 +549,3 @@ class V4L2Subdevice final : public V4L2Device { }; } // namespace icamera -#endif //CAMERA_INCLUDE_CAMERA_V4L2_DEVICE_H_ diff --git a/modules/v4l2/v4l2_subdevice.cc b/modules/v4l2/v4l2_subdevice.cc index 3313a55..a120db9 100644 --- a/modules/v4l2/v4l2_subdevice.cc +++ b/modules/v4l2/v4l2_subdevice.cc @@ -74,7 +74,7 @@ int V4L2Subdevice::SetFormat(const struct v4l2_subdev_format& format) { LOG1("@%s", __func__); if ((state_ != SubdevState::OPEN) && (state_ != SubdevState::CONFIGURED)) { - LOGE("%s: Invaild Device status: %d", __func__, state_); + LOGE("%s: Invalid Device status: %d", __func__, state_); return -EINVAL; } @@ -93,7 +93,7 @@ int V4L2Subdevice::GetFormat(struct v4l2_subdev_format* format) { LOG1("@%s", __func__); if ((state_ != SubdevState::OPEN) && (state_ != SubdevState::CONFIGURED)) { - LOGE("%s: Invaild Device status: %d", __func__, state_); + LOGE("%s: Invalid Device status: %d", __func__, state_); return -EINVAL; } @@ -131,7 +131,7 @@ int V4L2Subdevice::SetSelection(const struct v4l2_subdev_selection& selection) { LOG1("@%s", __func__); if ((state_ != SubdevState::OPEN) && (state_ != SubdevState::CONFIGURED)) { - LOGE("%s: Invaild Device status: %d", __func__, state_); + LOGE("%s: Invalid Device status: %d", __func__, state_); return -EINVAL; } diff --git a/modules/v4l2/v4l2_video_node.cc b/modules/v4l2/v4l2_video_node.cc index 83e82f3..b0d2a26 100644 --- a/modules/v4l2/v4l2_video_node.cc +++ b/modules/v4l2/v4l2_video_node.cc @@ -675,7 +675,7 @@ int V4L2VideoNode::SetupBuffers(size_t num_buffers, bool is_cached, enum v4l2_me LOG1("@%s", __func__); if (num_buffers == 0 || !buffers || !buffers->empty()) { - LOGE("%s: Device node %s num_buffers or buffer invaild.", __func__, name_.c_str()); + LOGE("%s: Device node %s num_buffers or buffer invalid.", __func__, name_.c_str()); return -EINVAL; } diff --git a/src/3a/AiqCore.cpp b/src/3a/AiqCore.cpp index 7d708f7..b4784b4 100644 --- a/src/3a/AiqCore.cpp +++ b/src/3a/AiqCore.cpp @@ -131,7 +131,8 @@ void AiqCore::init() { mIntel3AParameter->init(); - CLEAR(mLastAeResult), mAeRunTime = 0U; + CLEAR(mLastAeResult); + mAeRunTime = 0U; mAwbRunTime = 0U; mAiqRunTime = 0U; } @@ -225,7 +226,7 @@ int AiqCore::updateParameter(const aiq_parameter_t& param) { // In still frame use force update by setting convergence time to 0. // in other cases use tunings. - mSaParams.manual_convergence_time = (param.frameUsage == FRAME_USAGE_STILL) ? 0.0 : -1.0; + mSaParams.manual_convergence_time = (param.frameUsage == FRAME_USAGE_STILL) ? 0.0F : -1.0F; mIntel3AParameter->updateParameter(param); mAeForceLock = param.aeForceLock; @@ -421,7 +422,7 @@ int AiqCore::runAEC(int64_t ccaId, cca::cca_ae_results* aeResults) { if (mAeForceLock && (mIntel3AParameter->mAeMode != AE_MODE_MANUAL) && (mAeRunTime != 0U) && (!mIntel3AParameter->mAeParams.is_bypass)) { - // Use manual setttings if AE had been locked + // Use manual settings if AE had been locked mIntel3AParameter->mAeParams.manual_exposure_time_us[0] = mLockedExposureTimeUs; mIntel3AParameter->mAeParams.manual_iso[0] = mLockedIso; } @@ -472,7 +473,7 @@ void AiqCore::focusDistanceResult(const cca::cca_af_results* afResults, float* a // This allows the diopters to have 2 decimal values *afDistanceDiopters = 100.0 * 1000.0 * (1.0 / static_cast(afResults->next_focus_distance)); - *afDistanceDiopters = ceil(*afDistanceDiopters); + *afDistanceDiopters = static_cast(ceil(*afDistanceDiopters)); // Divide by 100 for final result. *afDistanceDiopters = *afDistanceDiopters / 100; } @@ -548,10 +549,14 @@ int AiqCore::reFormatLensShadingMap(const LSCGrid& inputLscGrid, float* dstLscGr // for ia_aiq_bayer_order_grbg, the four block is G, R, B, G const size_t size = inputLscGrid.height * inputLscGrid.width; for (size_t i = 0U; i < size; i++) { - *dstLscGridRGGB++ = inputLscGrid.gridR[i]; - *dstLscGridRGGB++ = inputLscGrid.gridGr[i]; - *dstLscGridRGGB++ = inputLscGrid.gridGb[i]; - *dstLscGridRGGB++ = inputLscGrid.gridB[i]; + *dstLscGridRGGB = inputLscGrid.gridR[i]; + dstLscGridRGGB++; + *dstLscGridRGGB = inputLscGrid.gridGr[i]; + dstLscGridRGGB++; + *dstLscGridRGGB = inputLscGrid.gridGb[i]; + dstLscGridRGGB++; + *dstLscGridRGGB = inputLscGrid.gridB[i]; + dstLscGridRGGB++; } return OK; @@ -584,7 +589,7 @@ int AiqCore::storeLensShadingMap(const LSCGrid& inputLscGrid, const LSCGrid& res AiqUtils::resize2dArray(inputLscGrid.gridB, width, height, resizeLscGrid.gridB, destWidth, destHeight); LOG2("resize the 2D array cost %dus", - static_cast(((CameraUtils::systemTime() - startTime) / 1000))); + static_cast(((CameraUtils::systemTime() - startTime) / 1000U))); LOG2("%s:resize lens shading map from [%d,%d] to [%d,%d]", __func__, width, height, destWidth, destHeight); diff --git a/src/3a/AiqCore.h b/src/3a/AiqCore.h index 347a16f..47152ed 100644 --- a/src/3a/AiqCore.h +++ b/src/3a/AiqCore.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_CORE_H -#define AIQ_CORE_H +#pragma once #include #include @@ -136,7 +135,7 @@ class AiqCore { bool bypassAe(const aiq_parameter_t& param); bool bypassAf(const aiq_parameter_t& param); bool bypassAwb(const aiq_parameter_t& param); - // return ture if skip algo running + // return true if skip algo running bool skipAlgoRunning(RunRateInfo* info, int algo, bool converged); // return true if run rate is larger than config run rate bool checkRunRate(float configRunningRate, const RunRateInfo* info); @@ -204,5 +203,3 @@ class AiqCore { }; } /* namespace icamera */ - -#endif // AIQ_CORE_H diff --git a/src/3a/AiqEngine.cpp b/src/3a/AiqEngine.cpp index 0fd4302..a2e348f 100644 --- a/src/3a/AiqEngine.cpp +++ b/src/3a/AiqEngine.cpp @@ -123,13 +123,13 @@ int AiqEngine::run3A(int64_t ccaId, int64_t applyingSeq, int64_t frameNumber, in if (aiqRun) { mAiqRunningHistory.aiqResult = aiqResult; mAiqRunningHistory.ccaId = ccaId; - mAiqRunningHistory.statsSequnce = aiqStats != nullptr ? aiqStats->mSequence : -1; + mAiqRunningHistory.statsSequence = aiqStats != nullptr ? aiqStats->mSequence : -1; } if (effectSeq != nullptr) { *effectSeq = mAiqResultStorage->getAiqResult()->mSequence; - LOG2("%s, effect sequence %ld, statsSequnce %ld", __func__, *effectSeq, - mAiqRunningHistory.statsSequnce); + LOG2("%s, effect sequence %ld, statsSequence %ld", __func__, *effectSeq, + mAiqRunningHistory.statsSequence); } PlatformData::saveMakernoteData(mCameraId, dataContext->mAiqParams.makernoteMode, @@ -152,7 +152,7 @@ void AiqEngine::handleEvent(EventData eventData) { int AiqEngine::prepareStatsParams(const aiq_parameter_t& aiqParams, cca::cca_stats_params* statsParams, - AiqStatistics* aiqStatistics, AiqResult* aiqResult) { + const AiqStatistics* aiqStatistics, AiqResult* aiqResult) { LOG2("%s, sequence %ld", __func__, aiqStatistics->mSequence); // update face detection related parameters @@ -209,8 +209,8 @@ int AiqEngine::prepareStatsParams(const aiq_parameter_t& aiqParams, statsParams->dvs_stats_width = resolution.output_width; } - statsParams->frame_id = aiqResult != nullptr ? aiqResult->mFrameId : -1; - statsParams->frame_timestamp = timestamp; + statsParams->frame_id = aiqResult != nullptr ? aiqResult->mFrameId : 0; + statsParams->frame_timestamp = static_cast(timestamp); statsParams->camera_orientation = ia_aiq_camera_orientation_unknown; } while (0); @@ -239,7 +239,7 @@ void AiqEngine::setAiqResult(const aiq_parameter_t& aiqParams, AiqResult* aiqRes mLensManager->setLensResult(aiqResult->mAfResults, aiqResult->mSequence, aiqParams); } -int AiqEngine::getSkippingNum(AiqResult* aiqResult) { +int AiqEngine::getSkippingNum(const AiqResult* aiqResult) { int skipNum = 0; if (!mFirstAiqRunning) { @@ -256,7 +256,7 @@ int AiqEngine::getSkippingNum(AiqResult* aiqResult) { return skipNum; } -bool AiqEngine::needRun3A(AiqStatistics* aiqStatistics, int64_t ccaId) { +bool AiqEngine::needRun3A(const AiqStatistics* aiqStatistics, int64_t ccaId) { // Force to run 3a for per-frame control case if (mAiqRunningForPerframe) { return true; @@ -277,8 +277,8 @@ bool AiqEngine::needRun3A(AiqStatistics* aiqStatistics, int64_t ccaId) { return false; } - if (mAiqRunningHistory.statsSequnce == aiqStatistics->mSequence) { - LOG2("no new stats skip, statsSequnce = %ld", aiqStatistics->mSequence); + if (mAiqRunningHistory.statsSequence == aiqStatistics->mSequence) { + LOG2("no new stats skip, statsSequence = %ld", aiqStatistics->mSequence); return false; } else if (mSensorManager->getCurrentExposureAppliedDelay() > kMaxExposureAppliedDelay) { LOG2("exposure setting applied delay is too larger, skip it"); diff --git a/src/3a/AiqEngine.h b/src/3a/AiqEngine.h index f0c05c6..90ac87f 100644 --- a/src/3a/AiqEngine.h +++ b/src/3a/AiqEngine.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_ENGINE_H -#define AIQ_ENGINE_H - +#pragma once #include "AiqCore.h" #include "AiqResult.h" #include "AiqResultStorage.h" @@ -76,19 +74,19 @@ class AiqEngine : public EventListener { /** * \brief handle event */ - void handleEvent(EventData eventData); + virtual void handleEvent(EventData eventData); int prepareStatsParams(const aiq_parameter_t& aiqParams, - cca::cca_stats_params* statsParams, AiqStatistics* aiqStatistics, + cca::cca_stats_params* statsParams, const AiqStatistics* aiqStatistics, AiqResult* aiqResult); // Handle AIQ results except Exposure results which are handled in setSensorExposure void setAiqResult(const aiq_parameter_t& aiqParams, AiqResult* aiqResult, bool skip); void setSensorExposure(AiqResult* aiqResult, int64_t applyingSeq = -1); - int getSkippingNum(AiqResult* aiqResult); + int getSkippingNum(const AiqResult* aiqResult); - bool needRun3A(AiqStatistics* aiqStatistics, int64_t ccaId); + bool needRun3A(const AiqStatistics* aiqStatistics, int64_t ccaId); enum AiqState { AIQ_STATE_IDLE = 0, @@ -132,7 +130,7 @@ class AiqEngine : public EventListener { struct AiqRunningHistory { AiqResult* aiqResult; int64_t ccaId; - int64_t statsSequnce; + int64_t statsSequence; }; AiqRunningHistory mAiqRunningHistory; @@ -142,4 +140,3 @@ class AiqEngine : public EventListener { } /* namespace icamera */ -#endif // AIQ_ENGINE_H diff --git a/src/3a/AiqResult.h b/src/3a/AiqResult.h index 1c9c7ff..87c19cf 100644 --- a/src/3a/AiqResult.h +++ b/src/3a/AiqResult.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_RESULT_H -#define AIQ_RESULT_H +#pragma once #include "AiqUtils.h" #include "AiqSetting.h" @@ -74,5 +73,3 @@ class AiqResult { }; } /* namespace icamera */ - -#endif // AIQ_RESULT_H diff --git a/src/3a/AiqResultStorage.h b/src/3a/AiqResultStorage.h index 58a0d1b..35f0d37 100644 --- a/src/3a/AiqResultStorage.h +++ b/src/3a/AiqResultStorage.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_RESULT_STORAGE_H -#define AIQ_RESULT_STORAGE_H +#pragma once #include @@ -66,10 +65,10 @@ class AiqResultStorage { * * param[in] int64_t sequence: specify which aiq result is needed. * - * return 1. when sequence id is -1 or not provided, the lastest result will be returned. + * return 1. when sequence id is -1 or not provided, the latest result will be returned. * 2. when sequence id is larger than -1, the result with gaven sequence id will be returned. * 3. if cannot find in result storage, it means either sequence id is too old and its - * result was overrided, or the sequence id is too new, and its result has not been + * result was overridden, or the sequence id is too new, and its result has not been * saved into storage yet. For both cases, nullptr will be returned. */ const AiqResult* getAiqResult(int64_t sequence = -1); @@ -99,7 +98,7 @@ class AiqResultStorage { const AiqStatistics* getAndLockAiqStatistics(); /** - * \brief Clear the mInUse flag of all the AIQ statitics in internal storage. + * \brief Clear the mInUse flag of all the AIQ statistics in internal storage. */ void unLockAiqStatistics(); @@ -145,5 +144,3 @@ class AiqResultStorage { }; } //namespace icamera - -#endif // AIQ_RESULT_STORAGE_H diff --git a/src/3a/AiqSetting.h b/src/3a/AiqSetting.h index 1c63788..3b547e5 100644 --- a/src/3a/AiqSetting.h +++ b/src/3a/AiqSetting.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_SETTING_H -#define AIQ_SETTING_H +#pragma once #include "CameraTypes.h" #include "ParamDataType.h" @@ -117,5 +116,3 @@ struct aiq_parameter_t { }; } /* namespace icamera */ - -#endif // AIG_SETTING_H diff --git a/src/3a/AiqUnit.cpp b/src/3a/AiqUnit.cpp index 59c2a6c..85b721a 100644 --- a/src/3a/AiqUnit.cpp +++ b/src/3a/AiqUnit.cpp @@ -33,7 +33,8 @@ AiqUnit::AiqUnit(int cameraId, SensorHwCtrl *sensorHw, LensHw *lensHw) : mCameraId(cameraId), mAiqUnitState(AIQ_UNIT_NOT_INIT), mOperationMode(CAMERA_STREAM_CONFIGURATION_MODE_NORMAL), - mCcaInitialized(false) { + mCcaInitialized(false), + mActiveStreamCount(0U) { mAiqEngine = new AiqEngine(cameraId, sensorHw, lensHw); } @@ -75,19 +76,31 @@ int AiqUnit::configure(const stream_config_t *streamList) { AutoMutex l(mAiqUnitLock); LOG1("@%s", mCameraId, __func__); + std::vector configModes; + PlatformData::getConfigModesByOperationMode(mCameraId, streamList->operation_mode, + configModes); + if ((mAiqUnitState == AIQ_UNIT_CONFIGURED) && (mOperationMode == streamList->operation_mode)) { - LOG2("%s: already configured in the same mode: %d", __func__, mOperationMode); - return OK; - } + std::vector streamIds; + if (configModes.empty() == false) { + std::shared_ptr graphConfig = + CameraContext::getInstance(mCameraId)->getGraphConfig(configModes[0]); + if (graphConfig != nullptr) { + graphConfig->graphGetStreamIds(streamIds, false); + } + } - if ((mAiqUnitState != AIQ_UNIT_INIT) && (mAiqUnitState != AIQ_UNIT_STOP)) { + if (streamIds.size() == mActiveStreamCount) { + LOG2("%s: already configured in the same mode: %d", __func__, mOperationMode); + return OK; + } + } else if ((mAiqUnitState != AIQ_UNIT_INIT) && (mAiqUnitState != AIQ_UNIT_STOP)) { LOGW("%s: configure in wrong state: %d", __func__, mAiqUnitState); return BAD_VALUE; + } else { + LOG2("%s: configure CCA handle", __func__); } - std::vector configModes; - PlatformData::getConfigModesByOperationMode(mCameraId, streamList->operation_mode, - configModes); const int ret = initIntelCcaHandle(configModes); CheckAndLogError(ret < 0, BAD_VALUE, "@%s failed to create intel cca handle", __func__); @@ -97,12 +110,11 @@ int AiqUnit::configure(const stream_config_t *streamList) { } int AiqUnit::initIntelCcaHandle(const std::vector &configModes) { - if (mCcaInitialized) { - return OK; - } + deinitIntelCcaHandle(); LOG1("@%s", mCameraId, __func__); mTuningModes.clear(); + std::vector streamIds; for (const auto &cfg : configModes) { TuningMode tuningMode; int ret = PlatformData::getTuningModeByConfigMode(mCameraId, cfg, tuningMode); @@ -163,7 +175,7 @@ int AiqUnit::initIntelCcaHandle(const std::vector &configModes) { std::shared_ptr graphConfig = CameraContext::getInstance(mCameraId)->getGraphConfig(cfg); if (graphConfig != nullptr) { - std::vector streamIds; + streamIds.clear(); graphConfig->graphGetStreamIds(streamIds, false); params->aic_stream_ids.count = streamIds.size(); CheckAndLogError(streamIds.size() > cca::MAX_STREAM_NUM, UNKNOWN_ERROR, @@ -192,6 +204,7 @@ int AiqUnit::initIntelCcaHandle(const std::vector &configModes) { dumpCcaInitParam(*params); } + mActiveStreamCount = streamIds.size(); mCcaInitialized = true; return OK; } @@ -231,6 +244,7 @@ void AiqUnit::deinitIntelCcaHandle() { } mCcaInitialized = false; + mActiveStreamCount = 0U; } int AiqUnit::start() { diff --git a/src/3a/AiqUnit.h b/src/3a/AiqUnit.h index 60c795e..9dca2cf 100644 --- a/src/3a/AiqUnit.h +++ b/src/3a/AiqUnit.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_UNIT_H -#define AIQ_UNIT_H - +#pragma once #ifdef IPA_SANDBOXING #include "CcaClient.h" #else @@ -77,27 +75,27 @@ class AiqUnit : public AiqUnitBase { /** * \brief Init 3a related objects */ - void init(); + virtual void init(); /** * \brief Deinit 3a related objects */ - void deinit(); + virtual void deinit(); /** * \brief configure 3a engine with stream configuration */ - int configure(const stream_config_t *streamList); + virtual int configure(const stream_config_t *streamList); /** * \brief Start 3a Engine */ - int start(); + virtual int start(); /** * \brief Stop 3a Engine */ - void stop(); + virtual void stop(); /** * \brief Run 3a to get new 3a settings. @@ -111,17 +109,17 @@ class AiqUnit : public AiqUnitBase { * * Return 0 if the operation succeeds. */ - int run3A(int64_t ccaId, int64_t applyingSeq, int64_t frameNumber, int64_t* effectSeq); + virtual int run3A(int64_t ccaId, int64_t applyingSeq, int64_t frameNumber, int64_t* effectSeq); /** * \brief Get software EventListener */ - std::vector getSofEventListener(); + virtual std::vector getSofEventListener(); /** * \brief Get stats EventListener */ - std::vector getStatsEventListener(); + virtual std::vector getStatsEventListener(); private: DISALLOW_COPY_AND_ASSIGN(AiqUnit); @@ -152,8 +150,8 @@ class AiqUnit : public AiqUnitBase { std::vector mTuningModes; bool mCcaInitialized; + size_t mActiveStreamCount; }; } /* namespace icamera */ -#endif // AIQ_UNIT_H diff --git a/src/3a/AiqUtils.cpp b/src/3a/AiqUtils.cpp index 4ed2f15..4f9ec24 100644 --- a/src/3a/AiqUtils.cpp +++ b/src/3a/AiqUtils.cpp @@ -102,6 +102,7 @@ void AiqUtils::dumpAfResults(const cca::cca_af_results& afResult) { case ia_aiq_af_status_idle: default: LOG3("AF state idle"); + break; } } @@ -173,36 +174,46 @@ void AiqUtils::dumpSaResults(const cca::cca_sa_results& saResult) { } int AiqUtils::convertError(ia_err iaErr) { + int ret; switch (iaErr) { case ia_err_none: - return OK; + ret = OK; + break; case ia_err_general: - return UNKNOWN_ERROR; + ret = UNKNOWN_ERROR; + break; case ia_err_nomemory: - return NO_MEMORY; + ret = NO_MEMORY; + break; case ia_err_data: - return BAD_VALUE; + ret = BAD_VALUE; + break; case ia_err_internal: - return INVALID_OPERATION; + ret = INVALID_OPERATION; + break; case ia_err_argument: - return BAD_VALUE; + ret = BAD_VALUE; + break; default: - return UNKNOWN_ERROR; + ret = UNKNOWN_ERROR; + break; } + return ret; } /** * Convert SensorFrameParams defined in PlatformData to ia_aiq_frame_params in aiq */ void AiqUtils::convertToAiqFrameParam(const SensorFrameParams &sensor, ia_aiq_frame_params &aiq) { - aiq.cropped_image_height = sensor.cropped_image_height; - aiq.cropped_image_width = sensor.cropped_image_width; - aiq.horizontal_crop_offset = sensor.horizontal_crop_offset; - aiq.horizontal_scaling_denominator = sensor.horizontal_scaling_denominator; - aiq.horizontal_scaling_numerator = sensor.horizontal_scaling_numerator; - aiq.vertical_crop_offset = sensor.vertical_crop_offset; - aiq.vertical_scaling_denominator = sensor.vertical_scaling_denominator; - aiq.vertical_scaling_numerator = sensor.vertical_scaling_numerator; + aiq.cropped_image_height = static_cast(sensor.cropped_image_height); + aiq.cropped_image_width = static_cast(sensor.cropped_image_width); + aiq.horizontal_crop_offset = static_cast(sensor.horizontal_crop_offset); + aiq.horizontal_scaling_denominator = + static_cast(sensor.horizontal_scaling_denominator); + aiq.horizontal_scaling_numerator = static_cast(sensor.horizontal_scaling_numerator); + aiq.vertical_crop_offset = static_cast(sensor.vertical_crop_offset); + aiq.vertical_scaling_denominator = static_cast(sensor.vertical_scaling_denominator); + aiq.vertical_scaling_numerator = static_cast(sensor.vertical_scaling_numerator); } camera_coordinate_t AiqUtils::convertCoordinateSystem(const camera_coordinate_system_t& srcSystem, @@ -252,7 +263,7 @@ camera_window_t AiqUtils::convertToIaWindow(const camera_coordinate_system_t& sr * Map user input manual gain(0, 255) to (AWB_GAIN_NORMALIZED_START, AWB_GAIN_NORMALIZED_END) */ float AiqUtils::normalizeAwbGain(int gain) { - gain = CLIP(gain, AWB_GAIN_MAX, AWB_GAIN_MIN); + gain = CLIP(gain, static_cast(AWB_GAIN_MAX), static_cast(AWB_GAIN_MIN)); return static_cast(AWB_GAIN_NORMALIZED_START) + (static_cast(gain) - AWB_GAIN_MIN) * static_cast(AWB_GAIN_RANGE_NORMALIZED) / @@ -260,7 +271,8 @@ float AiqUtils::normalizeAwbGain(int gain) { } int AiqUtils::convertToUserAwbGain(float normalizedGain) { - normalizedGain = CLIP(normalizedGain, AWB_GAIN_NORMALIZED_START, AWB_GAIN_NORMALIZED_END); + normalizedGain = CLIP(normalizedGain, static_cast(AWB_GAIN_NORMALIZED_START), + static_cast(AWB_GAIN_NORMALIZED_END)); return AWB_GAIN_MIN + (normalizedGain - AWB_GAIN_NORMALIZED_START) * \ AWB_GAIN_RANGE_USER / AWB_GAIN_RANGE_NORMALIZED; } @@ -315,26 +327,34 @@ float AiqUtils::convertSpeedModeToTimeForHDR(camera_converge_speed_t mode) { * Convert frame usage to ia_aiq_frame_use */ ia_aiq_frame_use AiqUtils::convertFrameUsageToIaFrameUsage(int frameUsage) { + ia_aiq_frame_use ret; switch (frameUsage) { case FRAME_USAGE_VIDEO: - return ia_aiq_frame_use_video; + ret = ia_aiq_frame_use_video; + break; case FRAME_USAGE_STILL: - return ia_aiq_frame_use_still; + ret = ia_aiq_frame_use_still; + break; case FRAME_USAGE_CONTINUOUS: - return ia_aiq_frame_use_continuous; + ret = ia_aiq_frame_use_continuous; + break; + default: + ret = ia_aiq_frame_use_preview; + break; } - return ia_aiq_frame_use_preview; + return ret; } void AiqUtils::applyTonemapGamma(float gamma, cca::cca_gbce_params* results) { CheckAndLogError(gamma < EPSILON, VOID_VALUE, "Bad gamma %f", gamma); - CheckAndLogError(!results, VOID_VALUE, "gbce results nullptr"); + CheckAndLogError(results == nullptr, VOID_VALUE, "gbce results nullptr"); int lutSize = results->gamma_lut_size; CheckAndLogError(lutSize < MIN_TONEMAP_POINTS, VOID_VALUE, "Bad gamma lut size (%d) in gbce results", lutSize); for (int i = 0; i < lutSize; i++) { - results->g_gamma_lut[i] = pow(i / static_cast(lutSize), 1 / gamma); + results->g_gamma_lut[i] = + static_cast(pow(i / static_cast(lutSize), 1 / gamma)); } MEMCPY_S(results->b_gamma_lut, lutSize * sizeof(float), diff --git a/src/3a/AiqUtils.h b/src/3a/AiqUtils.h index 146d651..a28db6e 100644 --- a/src/3a/AiqUtils.h +++ b/src/3a/AiqUtils.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef AIQ_UTILS_H -#define AIQ_UTILS_H +#pragma once #include "CameraTypes.h" #include "ParamDataType.h" @@ -161,5 +160,3 @@ template int resize2dArray( float calculateHyperfocalDistance(const cca::cca_cmc &cmc); } // namespace AiqUtils } // namespace icamera - -#endif // AIQ_UTILS_H diff --git a/src/3a/I3AControlFactory.h b/src/3a/I3AControlFactory.h index 0f4eb7e..8d9a752 100644 --- a/src/3a/I3AControlFactory.h +++ b/src/3a/I3AControlFactory.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef I3A_CONTROL_FACTORY_H -#define I3A_CONTROL_FACTORY_H +#pragma once #include "AiqUnit.h" #include "SensorHwCtrl.h" @@ -43,5 +42,3 @@ class I3AControlFactory { }; } /* namespace icamera */ - -#endif // I3A_CONTROL_FACTORY_H diff --git a/src/3a/LensManager.h b/src/3a/LensManager.h index 5364ba1..f911557 100644 --- a/src/3a/LensManager.h +++ b/src/3a/LensManager.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef LENS_MANAGER_H -#define LENS_MANAGER_H +#pragma once #include @@ -69,7 +68,7 @@ class LensManager { private: DISALLOW_COPY_AND_ASSIGN(LensManager); - void setFocusPosition(int focusPostion); + void setFocusPosition(int focusPosition); private: int mCameraId; @@ -85,5 +84,3 @@ class LensManager { }; } /* namespace icamera */ - -#endif // LENS_MANAGER_H diff --git a/src/3a/MakerNote.h b/src/3a/MakerNote.h index 87ddc8a..a47dcb2 100644 --- a/src/3a/MakerNote.h +++ b/src/3a/MakerNote.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef MAKER_NOTE_H -#define MAKER_NOTE_H - +#pragma once #include #include #include @@ -126,4 +124,3 @@ class MakerNote { } // namespace icamera -#endif // MAKER_NOTE_H diff --git a/src/3a/SensorManager.cpp b/src/3a/SensorManager.cpp index 9377ae9..7ab99b7 100644 --- a/src/3a/SensorManager.cpp +++ b/src/3a/SensorManager.cpp @@ -220,9 +220,9 @@ uint32_t SensorManager::updateSensorExposure(SensorExpGroup sensorExposures, int } if (effectSeq > 0) { - int sensorSeq = mLastSofSequence + mExposureDataMap.size() + 1; + int sensorSeq = mLastSofSequence + static_cast(mExposureDataMap.size()) + 1; if ((applyingSeq > 0) && (applyingSeq == mLastSofSequence)) { - sensorSeq = applyingSeq; + sensorSeq = static_cast(applyingSeq); mSensorHwCtrl->setFrameDuration(exposureData.lineLengthPixels, exposureData.frameLengthLines); mSensorHwCtrl->setExposure(exposureData.coarseExposures, exposureData.fineExposures); @@ -326,18 +326,24 @@ int SensorManager::getSensorModeData(ia_aiq_exposure_sensor_descriptor& sensorDa status = mSensorHwCtrl->getActivePixelArraySize(width, height, pixelCode); CheckAndLogError(status != OK, status, "Failed to get active pixel array size ret:%d", status); - int pixel_periods_per_line, line_periods_per_field; + int pixel_periods_per_line; + int line_periods_per_field; status = mSensorHwCtrl->getFrameDuration(pixel_periods_per_line, line_periods_per_field); CheckAndLogError(status != OK, status, "Failed to get frame Durations ret:%d", status); - sensorData.pixel_periods_per_line = CLIP(pixel_periods_per_line, USHRT_MAX, 0); - sensorData.line_periods_per_field = CLIP(line_periods_per_field, USHRT_MAX, 0); + sensorData.pixel_periods_per_line = CLIP(pixel_periods_per_line, USHRT_MAX, + static_cast(0)); + sensorData.line_periods_per_field = CLIP(line_periods_per_field, USHRT_MAX, + static_cast(0)); - int coarse_int_time_min, integration_step = 0, integration_max = 0; + int coarse_int_time_min; + int integration_step = 0; + int integration_max = 0; status = mSensorHwCtrl->getExposureRange(coarse_int_time_min, integration_max, integration_step); CheckAndLogError(status != OK, status, "Failed to get Exposure Range ret:%d", status); - sensorData.coarse_integration_time_min = CLIP(coarse_int_time_min, USHRT_MAX, 0); + sensorData.coarse_integration_time_min = CLIP(coarse_int_time_min, USHRT_MAX, + static_cast(0)); sensorData.coarse_integration_time_max_margin = PlatformData::getCITMaxMargin(mCameraId); // fine integration is not supported by v4l2 diff --git a/src/3a/SensorManager.h b/src/3a/SensorManager.h index adfa15f..e6549b6 100644 --- a/src/3a/SensorManager.h +++ b/src/3a/SensorManager.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef SENSOR_MANAGER_H -#define SENSOR_MANAGER_H - +#pragma once #include #include "iutils/Thread.h" @@ -104,9 +102,9 @@ class SensorManager { int mAnalogGainDelay; // Analog gain delay comparing exposure int mDigitalGainDelay; // Digital gain delay comparing exposure - // fisrt: sequence id, second: analog gain vector + // first: sequence id, second: analog gain vector std::map> mAnalogGainMap; - // fisrt: sequence id, second: digital gain vector + // first: sequence id, second: digital gain vector std::map> mDigitalGainMap; typedef struct { std::vector coarseExposures; @@ -122,4 +120,3 @@ class SensorManager { } /* namespace icamera */ -#endif // SENSOR_MANAGER_H diff --git a/src/3a/intel3a/Intel3AParameter.cpp b/src/3a/intel3a/Intel3AParameter.cpp index 3a1a24b..f76c01b 100644 --- a/src/3a/intel3a/Intel3AParameter.cpp +++ b/src/3a/intel3a/Intel3AParameter.cpp @@ -35,11 +35,11 @@ #include "modules/algowrapper/IntelCca.h" #endif -namespace icamera { - #define VALID_COLOR_GAINS(colorGains) \ ((colorGains[0] > 0) && (colorGains[1] > 0) && (colorGains[2] > 0) && (colorGains[3] > 0)) +namespace icamera { + Intel3AParameter::Intel3AParameter(int cameraId) : mCameraId(cameraId), mTestPatternMode(TEST_PATTERN_OFF), @@ -186,7 +186,7 @@ void Intel3AParameter::updateAeResult(cca::cca_ae_results* aeResult) const { float Intel3AParameter::convertdBGainToISO(float sensitivityGain, int baseIso) const { // Convert db Gain to ISO - float manualGain = pow(10, (sensitivityGain / 20)); + float manualGain = static_cast(pow(10, (sensitivityGain / 20))); manualGain *= static_cast(baseIso); return manualGain; } @@ -258,7 +258,8 @@ void Intel3AParameter::setManualExposure(const aiq_parameter_t& param) { camera_range_t range = {}; if (PlatformData::getSupportAeExposureTimeRange(mCameraId, param.sceneMode, range) == OK) { - manualExpTimeUs = CLIP(manualExpTimeUs, range.max, range.min); + manualExpTimeUs = CLIP(manualExpTimeUs, static_cast(range.max), + static_cast(range.min)); } for (unsigned int i = 0U; i < mAeParams.num_exposures - 1; i++) { @@ -280,7 +281,7 @@ void Intel3AParameter::setManualGain(const aiq_parameter_t& param) { // Convert db to sensor analog gain. for (unsigned int i = 0U; i < mAeParams.num_exposures; i++) { - mAeParams.manual_analog_gain[i] = pow(10, (manualGain / 20)); + mAeParams.manual_analog_gain[i] = static_cast(pow(10, (manualGain / 20))); } } @@ -469,7 +470,7 @@ void Intel3AParameter::updateAwbResult(cca::cca_awb_results* awbResult) { const float MAX_PER_G = static_cast(AWB_GAIN_NORMALIZED_START) / static_cast(AWB_GAIN_NORMALIZED_END); - const float MIN_PER_G = 1.0 / MAX_PER_G; + const float MIN_PER_G = static_cast(1.0 / MAX_PER_G); if (mUseManualAwbGain) { awbResult->accurate_b_per_g = CLIP((normalizedB / normalizedG), MAX_PER_G, MIN_PER_G); @@ -602,7 +603,8 @@ void Intel3AParameter::updateAfParameter(const aiq_parameter_t& param) { } mAfParams.lens_position = param.lensPosition; - mAfParams.lens_movement_start_timestamp = param.lensMovementStartTimestamp; + mAfParams.lens_movement_start_timestamp = + static_cast(param.lensMovementStartTimestamp); mAfParams.frame_use = AiqUtils::convertFrameUsageToIaFrameUsage(param.frameUsage); // Trigger @@ -681,6 +683,7 @@ void Intel3AParameter::updateAfParameterForAfTriggerStart() { // Continue the current scan and check the af result later break; default: + // No such AF mode and do nothing break; } } @@ -696,11 +699,12 @@ void Intel3AParameter::updateAfParameterForAfTriggerCancel() { mAfParams.focus_mode = ia_aiq_af_operation_mode_infinity; break; default: + // Do not need to update focus mode break; } } -void Intel3AParameter::fillAfTriggerResult(cca::cca_af_results* afResults) { +void Intel3AParameter::fillAfTriggerResult(const cca::cca_af_results* afResults) { if ((afResults == nullptr) || (!mAfForceLock)) { return; } @@ -715,6 +719,7 @@ void Intel3AParameter::fillAfTriggerResult(cca::cca_af_results* afResults) { (afResults->status != ia_aiq_af_status_extended_search); break; default: + // No need to update lock break; } } diff --git a/src/3a/intel3a/Intel3AParameter.h b/src/3a/intel3a/Intel3AParameter.h index 5767e3b..6f8bb05 100644 --- a/src/3a/intel3a/Intel3AParameter.h +++ b/src/3a/intel3a/Intel3AParameter.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef INTEL_3A_PARAMETER_H -#define INTEL_3A_PARAMETER_H +#pragma once #include "AiqSetting.h" #include "AiqUtils.h" @@ -40,7 +39,7 @@ class Intel3AParameter { void updateAwbResult(cca::cca_awb_results* awbResult); void updatePaResult(cca::cca_pa_params* paResult); - void fillAfTriggerResult(cca::cca_af_results* afResults); + void fillAfTriggerResult(const cca::cca_af_results* afResults); private: void initAeParameter(); @@ -98,5 +97,3 @@ class Intel3AParameter { }; } /* namespace icamera */ - -#endif // INTEL_3A_PARAMETER_H diff --git a/src/core/BufferInterface.h b/src/core/BufferInterface.h new file mode 100644 index 0000000..bb458db --- /dev/null +++ b/src/core/BufferInterface.h @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2025 Intel Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "CameraBuffer.h" +#include "CameraEvent.h" + +/** + * These are the abstract Classes for buffer communication between different class of HAL + */ +namespace icamera { + +class BufferProducer; + +/** + * BufferConsumer listens on the onBufferAvailable event from the producer by + * calling setBufferProducer + */ +class BufferConsumer { + public: + virtual ~BufferConsumer() {} + virtual int onBufferAvailable(uuid port, const std::shared_ptr& camBuffer) = 0; + virtual void setBufferProducer(BufferProducer* producer) = 0; +}; + +/** + * BufferProcuder get the buffers from consumer by "qbuf". + * Notify the consumer by calling the onBufferAvailable interface of consumer. + * The consumer must be registered by "addFrameAvailableListener" before getting + * any buffer done notification. + */ +class BufferProducer : public EventSource { + public: + explicit BufferProducer(int memType = V4L2_MEMORY_USERPTR); + virtual int qbuf(uuid port, const std::shared_ptr& camBuffer) = 0; + virtual int allocateMemory(uuid port, const std::shared_ptr& camBuffer) = 0; + virtual void addFrameAvailableListener(BufferConsumer* listener) = 0; + virtual void removeFrameAvailableListener(BufferConsumer* listener) = 0; + int getMemoryType(void) const { return mMemType; } + + private: + int mMemType; +}; + +} // namespace icamera diff --git a/src/core/BufferQueue.cpp b/src/core/BufferQueue.cpp index 348b6d7..888a97c 100644 --- a/src/core/BufferQueue.cpp +++ b/src/core/BufferQueue.cpp @@ -27,7 +27,9 @@ BufferProducer::BufferProducer(int memType) : mMemType(memType) { LOG1("@%s BufferProducer %p created mMemType: %d", __func__, this, mMemType); } -BufferQueue::BufferQueue() : mBufferProducer(nullptr) { +BufferQueue::BufferQueue() + : mBufferProducer(nullptr), + mThreadWaiting(true) { LOG1("@%s BufferQueue %p created", __func__, this); } @@ -51,7 +53,7 @@ int BufferQueue::queueInputBuffer(uuid port, const std::shared_ptr return OK; } -int BufferQueue::onFrameAvailable(uuid port, const std::shared_ptr& camBuffer) { +int BufferQueue::onBufferAvailable(uuid port, const std::shared_ptr& camBuffer) { AutoMutex l(mBufferQueueLock); return queueInputBuffer(port, camBuffer); @@ -142,6 +144,10 @@ void BufferQueue::getFrameInfo(std::map& inputInfo, outputInfo = mOutputFrameInfo; } +void BufferQueue::setThreadWaiting(bool waiting) { + mThreadWaiting = waiting; +} + int BufferQueue::waitFreeBuffersInQueue(std::unique_lock& lock, std::map >& buffer, std::map& bufferQueue, @@ -156,6 +162,10 @@ int BufferQueue::waitFreeBuffersInQueue(std::unique_lock& lock, const std::cv_status status = mFrameAvailableSignal.wait_for( lock, std::chrono::nanoseconds(timeout)); + if (!mThreadWaiting) { + return -1; // Already stopped + } + if (status == std::cv_status::timeout) { return TIMED_OUT; } @@ -163,6 +173,7 @@ int BufferQueue::waitFreeBuffersInQueue(std::unique_lock& lock, if (cameraBufQ.empty()) { return NOT_ENOUGH_DATA; } + // Wake up from the buffer available buffer[port] = cameraBufQ.front(); } @@ -209,8 +220,12 @@ int BufferQueue::getFreeBuffersInQueue(std::map >& continue; } for (auto& it : mBufferConsumerList) { - it->onFrameAvailable(port, outBuf); + it->onBufferAvailable(port, outBuf); } } } diff --git a/src/core/BufferQueue.h b/src/core/BufferQueue.h index 6aa4f0b..2e11a7b 100644 --- a/src/core/BufferQueue.h +++ b/src/core/BufferQueue.h @@ -14,56 +14,21 @@ * limitations under the License. */ -#ifndef BUFFER_QUEUE_H -#define BUFFER_QUEUE_H +#pragma once #include #include #include +#include "BufferInterface.h" #include "CameraBuffer.h" #include "CameraEvent.h" #include "iutils/Errors.h" #include "iutils/Thread.h" #include "StageDescriptor.h" -/** - * These are the abstract Classes for buffer communication between different class of HAL - */ namespace icamera { -class BufferProducer; - -/** - * BufferConsumer listens on the onFrameAvailable event from the producer by - * calling setBufferProducer - */ -class BufferConsumer { - public: - virtual ~BufferConsumer() {} - virtual int onFrameAvailable(uuid port, const std::shared_ptr& camBuffer) = 0; - virtual void setBufferProducer(BufferProducer* producer) = 0; -}; - -/** - * BufferProcuder get the buffers from consumer by "qbuf". - * Notfiy the consumer by calling the onFramAvaible interface of consumer. - * The consumer must be registered by "addFrameAvailableListener" before getting - * any buffer done notification. - */ -class BufferProducer : public EventSource { - public: - explicit BufferProducer(int memType = V4L2_MEMORY_USERPTR); - virtual int qbuf(uuid port, const std::shared_ptr& camBuffer) = 0; - virtual int allocateMemory(uuid port, const std::shared_ptr& camBuffer) = 0; - virtual void addFrameAvailableListener(BufferConsumer* listener) = 0; - virtual void removeFrameAvailableListener(BufferConsumer* listener) = 0; - int getMemoryType(void) const { return mMemType; } - - private: - int mMemType; -}; - class BufferQueue : public BufferConsumer, public BufferProducer, public EventListener { public: BufferQueue(); @@ -74,7 +39,7 @@ class BufferQueue : public BufferConsumer, public BufferProducer, public EventLi * * Push the CameraBuffer to InputQueue and send a signal if needed */ - virtual int onFrameAvailable(uuid port, const std::shared_ptr& camBuffer); + virtual int onBufferAvailable(uuid port, const std::shared_ptr& camBuffer); /** * \brief Register the BufferProducer @@ -161,7 +126,11 @@ class BufferQueue : public BufferConsumer, public BufferProducer, public EventLi */ int allocProducerBuffers(int camId, int bufNum); - protected: + /** + * \brief set thread waiting + */ + void setThreadWaiting(bool waiting); + BufferProducer* mBufferProducer; std::vector mBufferConsumerList; @@ -178,10 +147,10 @@ class BufferQueue : public BufferConsumer, public BufferProducer, public EventLi Mutex mBufferQueueLock; std::condition_variable mFrameAvailableSignal; + bool mThreadWaiting; // true if the thread is running, false if stopped + private: int queueInputBuffer(uuid port, const std::shared_ptr& camBuffer); }; } // namespace icamera - -#endif // BUFFER_QUEUE_H diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 8f1ef04..acd6d9e 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -27,7 +27,6 @@ set(CORE_SRCS # IPU7_SOURCE_FILE_S set(CORE_SRCS ${CORE_SRCS} - ${CORE_DIR}/CameraBufferPool.cpp ${CORE_DIR}/CameraDevice.cpp ${CORE_DIR}/CameraContext.cpp ${CORE_DIR}/CameraStream.cpp @@ -41,14 +40,6 @@ set(CORE_SRCS ) # IPU7_SOURCE_FILE_E -# FRAME_SYNC_S - set(CORE_SRCS - ${CORE_SRCS} - ${CORE_DIR}/SyncManager.cpp - CACHE INTERNAL "core sources" - ) -# FRAME_SYNC_E - # CSI_META_S set(CORE_SRCS ${CORE_SRCS} diff --git a/src/core/CameraBuffer.cpp b/src/core/CameraBuffer.cpp index d78d084..83e305f 100644 --- a/src/core/CameraBuffer.cpp +++ b/src/core/CameraBuffer.cpp @@ -233,6 +233,7 @@ void CameraBuffer::freeMemory() { default: LOGE("Free camera buffer failed, due to memory %d type is not implemented yet.", mV.Memory()); + break; } } @@ -339,7 +340,7 @@ void CameraBuffer::updateUserBuffer(void) { mU->s.field = getField(); // Use valid setting sequence to align shutter/parameter with buffer - mU->sequence = (mSettingSequence < 0) ? getSequence() : mSettingSequence; + mU->sequence = (mSettingSequence < 0) ? getSequence() : static_cast(mSettingSequence); } void CameraBuffer::updateFlags(void) { @@ -351,8 +352,8 @@ void CameraBuffer::updateFlags(void) { if (((mU->flags & BUFFER_FLAG_SW_READ) != 0U) || ((mU->flags & BUFFER_FLAG_SW_WRITE) != 0U)) { set = false; } - - mV.SetFlags(set ? (mV.Flags() | flag) : (mV.Flags() & (~flag))); + const auto f = static_cast(mV.Flags()); + mV.SetFlags(set ? (f | flag) : (f & (~flag))); } bool CameraBuffer::isFlagsSet(uint32_t flag) const { @@ -360,29 +361,37 @@ bool CameraBuffer::isFlagsSet(uint32_t flag) const { } int CameraBuffer::getFd() { + int ret = -1; switch (mV.Memory()) { case V4L2_MEMORY_USERPTR: - return mV.Fd(0); + ret = mV.Fd(0); + break; case V4L2_MEMORY_DMABUF: case V4L2_MEMORY_MMAP: - return mU->dmafd; + ret = mU->dmafd; + break; default: LOGE("iomode %d is not supported yet.", mV.Memory()); - return -1; + break; } + return ret; } void* CameraBuffer::getBufferAddr() { + void* ret = nullptr; switch (mV.Memory()) { case V4L2_MEMORY_USERPTR: - return reinterpret_cast(mV.Userptr(0)); + ret = reinterpret_cast(mV.Userptr(0)); + break; case V4L2_MEMORY_DMABUF: case V4L2_MEMORY_MMAP: - return mU->addr; + ret = mU->addr; + break; default: LOGE("%s: Not supported memory type %u", __func__, mV.Memory()); - return nullptr; + break; } + return ret; } CameraBufferMapper::CameraBufferMapper(std::shared_ptr buffer) diff --git a/src/core/CameraBuffer.h b/src/core/CameraBuffer.h index 562da3c..8ecbf50 100644 --- a/src/core/CameraBuffer.h +++ b/src/core/CameraBuffer.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_BUFFER_H -#define CAMERA_BUFFER_H +#pragma once #include #include @@ -46,11 +45,9 @@ class CameraBuffer { static std::shared_ptr create(int srcWidth, int srcHeight, int size, int srcFmt, int index, void* buffer); - public: CameraBuffer(int memory, uint32_t size, int index); virtual ~CameraBuffer(); - public: // user buffer information int getWidth() const { return mU->s.width; } int getHeight() const { return mU->s.height; } @@ -133,7 +130,6 @@ class CameraBuffer { // Buffers are allocated the buffers by Camera int allocateMemory(V4L2VideoNode* vDevice = nullptr); - public: static void* mapDmaBufferAddr(int fd, unsigned int bufferSize); static void unmapDmaBufferAddr(void* addr, unsigned int bufferSize); @@ -199,5 +195,3 @@ class CameraBufferMapper { }; } // namespace icamera - -#endif // CAMERA_BUFFER_H diff --git a/src/core/CameraBufferPool.cpp b/src/core/CameraBufferPool.cpp deleted file mode 100644 index f0f5916..0000000 --- a/src/core/CameraBufferPool.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2022-2025 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG CameraBufferPool - -#include "CameraBufferPool.h" -#include "iutils/Utils.h" -#include "iutils/CameraLog.h" - -namespace icamera { - -CameraBufferPool::CameraBufferPool() { - LOG2("@%s", __func__); -} - -CameraBufferPool::~CameraBufferPool() { - LOG2("@%s", __func__); - destroyBufferPool(); -} - -status_t CameraBufferPool::createBufferPool(int cameraId, uint32_t numBufs, - const stream_t& stream) { - LOG1("@%s number of buffers:%d", __func__, numBufs); - std::lock_guard l(mLock); - mBuffers.clear(); - - for (uint32_t i = 0U; i < numBufs; i++) { - std::shared_ptr buffer = CameraBuffer::create(stream.memType, - stream.size, i, stream.format, stream.width, stream.height); - if (!buffer) { - mBuffers.clear(); - LOGE("failed to alloc %d internal buffers", i); - return NO_MEMORY; - } - - // Initialize the buffer status to free - mBuffers[buffer] = false; - } - - return OK; -} - -void CameraBufferPool::destroyBufferPool() { - LOG1("@%s Internal buffers size:%zu", __func__, mBuffers.size()); - - std::lock_guard l(mLock); - mBuffers.clear(); -} - -std::shared_ptr CameraBufferPool::acquireBuffer() { - std::lock_guard l(mLock); - for (auto& buf : mBuffers) { - if (!buf.second) { - buf.second = true; - return buf.first; - } - } - - LOGE("%s all the internal buffers are busy", __func__); - return nullptr; -} - -void CameraBufferPool::returnBuffer(std::shared_ptr buffer) { - std::lock_guard l(mLock); - for (auto& buf : mBuffers) { - if (buf.second && (buf.first == buffer)) { - buf.second = false; - return; - } - } - - LOGE("%s, the internal buffer addr:%p not found", __func__, buffer->getBufferAddr()); -} -} // namespace icamera diff --git a/src/core/CameraBufferPool.h b/src/core/CameraBufferPool.h deleted file mode 100644 index 3df77f0..0000000 --- a/src/core/CameraBufferPool.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2022-2025 Intel Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef CAMERA_BUFFER_POOL_H -#define CAMERA_BUFFER_POOL_H - -#include -#include - -#include "CameraBuffer.h" -#include "iutils/Errors.h" - -namespace icamera { - -/** - * \class CameraBufferPool - * - * This class is used to manage a memory pool based on CameraBuffer - * It needs to follow the calling sequence: - * createBufferPool -> acquireBuffer -> returnBuffer - */ -class CameraBufferPool { - public: - CameraBufferPool(); - ~CameraBufferPool(); - - status_t createBufferPool(int cameraId, uint32_t numBufs, const stream_t& stream); - void destroyBufferPool(); - std::shared_ptr acquireBuffer(); - void returnBuffer(std::shared_ptr buffer); - - private: - std::unordered_map, bool> mBuffers; - // first: CameraBuffer, second: true as buffer in used - std::mutex mLock; // lock the mBuffers -}; -} // namespace icamera - -#endif // CAMERA_BUFFER_POOL_H diff --git a/src/core/CameraContext.cpp b/src/core/CameraContext.cpp index 1e517a4..b6bb8fd 100644 --- a/src/core/CameraContext.cpp +++ b/src/core/CameraContext.cpp @@ -187,7 +187,8 @@ DataContext* CameraContext::getReprocessingDataContextBySeq(int64_t sequence) { auto it = mSeqToDataContextMap.upper_bound(sequence); if (it != mSeqToDataContextMap.begin()) { - *mDataContext[mCurrentIndex] = *(--it)->second; + --it; + *mDataContext[mCurrentIndex] = *(it)->second; } mDataContext[mCurrentIndex]->setSequence(sequence); mSeqToDataContextMap[sequence] = mDataContext[mCurrentIndex]; diff --git a/src/core/CameraContext.h b/src/core/CameraContext.h index c4bb57d..d7d88f4 100644 --- a/src/core/CameraContext.h +++ b/src/core/CameraContext.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_CONTEXT_H -#define CAMERA_CONTEXT_H +#pragma once #include #include @@ -174,5 +173,3 @@ class CameraContext { }; /* CameraContext */ } /* namespace icamera */ - -#endif // CAMERA_CONTEXT_H diff --git a/src/core/CameraDevice.cpp b/src/core/CameraDevice.cpp index 9bde18e..0c97709 100644 --- a/src/core/CameraDevice.cpp +++ b/src/core/CameraDevice.cpp @@ -94,7 +94,9 @@ CameraDevice::~CameraDevice() { mRequestThread->removeListener(EVENT_PROCESS_REQUEST, this); - for (int i = 0; i < MAX_STREAM_NUMBER; i++) delete mStreams[i]; + for (int i = 0; i < MAX_STREAM_NUMBER; i++) { + delete mStreams[i]; + } if (mGcMgr != nullptr) { delete mGcMgr; @@ -246,7 +248,7 @@ void CameraDevice::bindListeners() { } void CameraDevice::unbindListeners() { - if (mProcessingUnit) { + if (mProcessingUnit != nullptr) { vector statsListenerList = m3AControl->getStatsEventListener(); for (auto statsListener : statsListenerList) { mProcessingUnit->removeListener(EVENT_PSYS_STATS_BUF_READY, statsListener); @@ -323,7 +325,7 @@ int CameraDevice::configure(stream_config_t* streamList) { * 2. Config the graph * 3. Assign port for each stream * 4. Create the CameraStream classes - * 5. Create the procesor + * 5. Create the processor * 6. Bind the CameraStream to processor */ int inputRawStreamId = -1, preStreamIdForFace = -1, inputYuvStreamId = -1; @@ -388,12 +390,12 @@ int CameraDevice::configure(stream_config_t* streamList) { const int graphId = gc->getGraphId(); if (mScheduler != nullptr) { ret = mScheduler->configurate(graphId); - CheckAndLogError(ret != OK, ret, "@%s Faield to configure H-Scheduler", __func__); + CheckAndLogError(ret != OK, ret, "@%s Failed to configure H-Scheduler", __func__); } } ret = assignPortForStreams(streamList, inputRawStreamId, inputYuvStreamId, totalStream); - CheckAndLogError(ret < 0, ret, "@%s Faield to assign port for streams", __func__); + CheckAndLogError(ret < 0, ret, "@%s Failed to assign port for streams", __func__); ret = createStreams(streamList, totalStream); CheckAndLogError(ret < 0, ret, "@%s Failed to create streams", __func__); @@ -437,7 +439,7 @@ int CameraDevice::configure(stream_config_t* streamList) { CheckAndLogError(mProcessingUnit == nullptr, UNKNOWN_ERROR, "@%s Failed to create ProcessingUnit", __func__); - if (mProcessingUnit) { + if (mProcessingUnit != nullptr) { std::map outputConfigs; for (const auto& item : mStreamIdToPortMap) { outputConfigs[item.second] = ((item.first > 0) && (item.first == mFdStream.id)) ? @@ -524,17 +526,6 @@ std::map CameraDevice::selectProducerConfig(const stream_config_ } PlatformData::selectISysFormat(mCameraId, iSysFmt); - // Use the ISYS output if it's provided in media config section of config file. - stream_t mainConfig = PlatformData::getISysOutputByPort(mCameraId, MAIN_INPUT_PORT_UID); - mainConfig.memType = biggestStream.memType; - mainConfig.field = biggestStream.field; - - if ((mainConfig.width != 0) && (mainConfig.height != 0)) { - producerConfigs[MAIN_INPUT_PORT_UID] = mainConfig; - LOG2("%s: mcId %d, select the biggest stream", __func__, mcId); - return producerConfigs; - } - // Filter the ISYS best resolution with input stream const int inputWidth = mInputConfig.width; const int inputHeight = mInputConfig.height; @@ -549,6 +540,9 @@ std::map CameraDevice::selectProducerConfig(const stream_config_ } // Update the height according to the field(interlaced). + stream_t mainConfig = {}; + mainConfig.memType = biggestStream.memType; + mainConfig.field = biggestStream.field; mainConfig.format = PlatformData::getISysFormat(mCameraId); mainConfig.width = producerRes.width; mainConfig.height = CameraUtils::getInterlaceHeight(mainConfig.field, producerRes.height); @@ -596,7 +590,7 @@ bool CameraDevice::isProcessorNeeded(const stream_config_t* streamList, return false; } -int CameraDevice::createStreams(stream_config_t* streamList, int configuredStreamNum) { +int CameraDevice::createStreams(const stream_config_t* streamList, int configuredStreamNum) { LOG1("@%s", mCameraId, __func__); const int streamCounts = streamList->num_streams; @@ -624,7 +618,7 @@ int CameraDevice::createStreams(stream_config_t* streamList, int configuredStrea * 1. Checking if the streams is supported or not * 2. According resolution and format to store the streamId in descending order. */ -int CameraDevice::analyzeStream(stream_config_t* streamList, int* inputRawStreamId, +int CameraDevice::analyzeStream(const stream_config_t* streamList, int* inputRawStreamId, int* preStreamIdForFace, int* inputYuvStreamId) { LOG1("@%s", mCameraId, __func__); @@ -634,7 +628,7 @@ int CameraDevice::analyzeStream(stream_config_t* streamList, int* inputRawStream for (int i = 0; i < streamList->num_streams; i++) { stream_t& stream = streamList->streams[i]; stream.id = i; - stream.max_buffers = PlatformData::getMaxRequestsInHAL(mCameraId); + stream.max_buffers = PlatformData::getMaxPipelineDepth(mCameraId); if (stream.streamType == CAMERA_STREAM_INPUT) { CheckAndLogError(*inputRawStreamId >= 0, BAD_VALUE, "Don't support two INPUT streams!"); @@ -804,7 +798,7 @@ int CameraDevice::stop() { return OK; } -// No Lock for this fuction as it doesn't update any class member +// No Lock for this function as it doesn't update any class member int CameraDevice::allocateMemory(camera_buffer_t* ubuffer) { PERF_CAMERA_ATRACE(); LOG1("@%s", mCameraId, __func__); @@ -828,8 +822,10 @@ int CameraDevice::dqbuf(int streamId, camera_buffer_t** ubuffer) { PERF_CAMERA_ATRACE(); LOG2("@%s, stream id:%d", mCameraId, __func__, streamId); - int ret = mRequestThread->waitFrame(streamId, ubuffer); - while (ret == TIMED_OUT) ret = mRequestThread->waitFrame(streamId, ubuffer); + int ret; + do { + ret = mRequestThread->waitFrame(streamId, ubuffer); + } while (ret == TIMED_OUT); if (ret == NO_INIT) { return ret; diff --git a/src/core/CameraDevice.h b/src/core/CameraDevice.h index df18897..f197960 100644 --- a/src/core/CameraDevice.h +++ b/src/core/CameraDevice.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_DEVICE_H -#define CAMERA_DEVICE_H - +#pragma once #include "AiqUnit.h" #include "CameraStream.h" #include "IProcessingUnitFactory.h" @@ -62,7 +60,7 @@ class RequestThread; * | -> PsysProcessor | -> CameraStream (For still YUV) * * The buffer notification between the Class is based on Interface defined - * in BufferQueue. The upstream element use "onFrameAvailable" message to notfiy + * in BufferQueue. The upstream element use "onBufferAvailable" message to notfiy * downstream elements that the buffers are ready for further processing * * Following singleton instances are created and maintained by CameraDevice @@ -82,7 +80,7 @@ class CameraDevice : public EventListener { * CsiMeta // CSI_META_E * 2.Register listener if enable AIQ - * 3.Set the defualt parameters + * 3.Set the default parameters * * \return OK if succeed, other value indicates failed */ @@ -92,7 +90,7 @@ class CameraDevice : public EventListener { * \brief Camera device class deinit * * 1.Change the state - * 2.Destory the listeners + * 2.Destroy the listeners * 3.Delete the streams * 4.Deinit the Related classes. */ @@ -117,7 +115,7 @@ class CameraDevice : public EventListener { int stop(); /** - * \brief Allocate momery according to user buffer + * \brief Allocate memory according to user buffer * * 1. Convert user buffer to CameraBuffer and push it into UserBufferQueue * 2. Calling CameraStream class to allocateMemory. @@ -186,11 +184,11 @@ class CameraDevice : public EventListener { StreamSource* createBufferProducer(); std::map selectProducerConfig(const stream_config_t* streamList, int mcId); bool isProcessorNeeded(const stream_config_t* streamList, const stream_t& producerConfig) const; - int analyzeStream(stream_config_t* streamList, int* inputStreamId, int* preStreamIdForFace, - int* inputYuvStreamId); - int assignPortForStreams(const stream_config_t* streamList, int inputStreamId, + int analyzeStream(const stream_config_t* streamList, int* inputRawStreamId, + int* preStreamIdForFace, int* inputYuvStreamId); + int assignPortForStreams(const stream_config_t* streamList, int inputRawStreamId, int inputYuvStreamId, int configuredStreamNum); - int createStreams(stream_config_t* streamList, int configuredStreamNum); + int createStreams(const stream_config_t* streamList, int configuredStreamNum); int bindStreams(stream_config_t* streamList); void deleteStreams(); @@ -207,7 +205,7 @@ class CameraDevice : public EventListener { // The second phase of qbuf(), done in RequestThread int handleQueueBuffer(int bufferNum, camera_buffer_t** ubuffer, int64_t sequence); - void handleEvent(EventData eventData); + virtual void handleEvent(EventData eventData); int startLocked(); int stopLocked(); @@ -260,4 +258,3 @@ class CameraDevice : public EventListener { } // namespace icamera -#endif // CAMERA_DEVICE_H diff --git a/src/core/CameraEvent.h b/src/core/CameraEvent.h index 7d1cbd3..fe258ca 100644 --- a/src/core/CameraEvent.h +++ b/src/core/CameraEvent.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_EVENT_H -#define CAMERA_EVENT_H +#pragma once #include #include @@ -54,5 +53,3 @@ class EventSource { }; } // namespace icamera - -#endif // CAMERA_EVENT_H diff --git a/src/core/CameraStream.cpp b/src/core/CameraStream.cpp index 4cb87ec..a886c4f 100644 --- a/src/core/CameraStream.cpp +++ b/src/core/CameraStream.cpp @@ -154,7 +154,7 @@ void CameraStream::setBufferProducer(BufferProducer* producer) { } } -int CameraStream::onFrameAvailable(uuid port, const shared_ptr& camBuffer) { +int CameraStream::onBufferAvailable(uuid port, const shared_ptr& camBuffer) { // Ignore if the buffer is not for this stream. if (mPort != port) { return OK; diff --git a/src/core/CameraStream.h b/src/core/CameraStream.h index 108a229..a7da642 100644 --- a/src/core/CameraStream.h +++ b/src/core/CameraStream.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_STREAM_H -#define CAMERA_STREAM_H - +#pragma once #include "ParamDataType.h" #include "BufferQueue.h" #include "CameraBuffer.h" @@ -69,7 +67,7 @@ class CameraStream : public BufferConsumer, public EventSource { * * \return OK if succeed and BAD_VALUE if failed */ - int allocateMemory(camera_buffer_t* buffer); + int allocateMemory(camera_buffer_t* ubuffer); /** * \brief Register the mBufferProducer @@ -79,7 +77,7 @@ class CameraStream : public BufferConsumer, public EventSource { /** * \brief The notify when polled or processed one frame buffer */ - virtual int onFrameAvailable(uuid port, const std::shared_ptr& camBuffer); + virtual int onBufferAvailable(uuid port, const std::shared_ptr& camBuffer); private: std::shared_ptr userBufferToCameraBuffer(camera_buffer_t* ubuffer); @@ -99,4 +97,3 @@ class CameraStream : public BufferConsumer, public EventSource { } // namespace icamera -#endif // CAMERA_STREAM_H diff --git a/src/core/CaptureUnit.cpp b/src/core/CaptureUnit.cpp index 2d91d4b..1640742 100644 --- a/src/core/CaptureUnit.cpp +++ b/src/core/CaptureUnit.cpp @@ -105,20 +105,17 @@ int CaptureUnit::createDevices() { LOG1("%s", mCameraId, __func__); destroyDevices(); - const uuid kDefaultPort = INVALID_PORT; - const uuid portOfMainDevice = findDefaultPort(mOutputFrameInfo); - const stream_t& kDefaultStream = mOutputFrameInfo.at(portOfMainDevice); - const VideoNodeType nodeType = VIDEO_GENERIC; - mDevices.push_back(new MainDevice(mCameraId, nodeType, this)); - // targetPorts specifies the desired port for the device. // But the real port which will be used is deciced whether // the port is provided by the consumer. vector targetPorts; - targetPorts.push_back(portOfMainDevice); + targetPorts.push_back(MAIN_INPUT_PORT_UID); + // Configure has checked the main port is valid. + mDevices.push_back(new MainDevice(mCameraId, VIDEO_GENERIC, this)); // Open and configure the devices. The stream and port that are used by the device is // decided by whether consumer has provided such info, use the default one if not. + const stream_t& kDefaultStream = mOutputFrameInfo.at(MAIN_INPUT_PORT_UID); for (uint8_t i = 0U; i < mDevices.size(); i++) { DeviceBase* device = mDevices[i]; @@ -129,7 +126,7 @@ int CaptureUnit::createDevices() { const bool hasPort = mOutputFrameInfo.find(kTargetPort) != mOutputFrameInfo.end(); const stream_t& stream = hasPort ? mOutputFrameInfo.at(kTargetPort) : kDefaultStream; - ret = device->configure(hasPort ? kTargetPort : kDefaultPort, stream, mMaxBufferNum); + ret = device->configure(hasPort ? kTargetPort : INVALID_PORT, stream, mMaxBufferNum); CheckAndLogError(ret != OK, ret, "Configure device(%s) failed:%d", device->getName(), ret); } @@ -248,17 +245,19 @@ int CaptureUnit::configure(const map& outputFrames) { (mState != CAPTURE_CONFIGURE) && (mState != CAPTURE_INIT) && (mState != CAPTURE_STOP), INVALID_OPERATION, "@%s: Configure in wrong state %d", __func__, mState); - const uuid port = findDefaultPort(outputFrames); - const stream_t& mainStream = outputFrames.at(port); + // Check if the main port is supported. MAIN_INPUT_PORT_UID is the default port for + // the main device. + bool isSupportPortId = IsSupportPort(MAIN_INPUT_PORT_UID, outputFrames); + CheckAndLogError(!isSupportPortId, BAD_VALUE, "No main port for output frames."); + mOutputFrameInfo = outputFrames; for (const auto& item : outputFrames) { LOG1("%s, port:%d, w:%d, h:%d, f:%s", mCameraId, __func__, item.first, item.second.width, item.second.height, CameraUtils::format2string(item.second.format).c_str()); } - mOutputFrameInfo = outputFrames; - + const stream_t& mainStream = outputFrames.at(MAIN_INPUT_PORT_UID); /* media ctl setup */ MediaCtlConf* mediaCtl = PlatformData::getMediaCtlConf(mCameraId); CheckAndLogError(mediaCtl == nullptr, BAD_VALUE, @@ -284,13 +283,12 @@ int CaptureUnit::configure(const map& outputFrames) { return OK; } -uuid CaptureUnit::findDefaultPort(const map& frames) const { - for (uint32_t i = 0U; i < MAX_STREAM_NUMBER; i++) { - if (frames.find(INPUT_STREAM_PORT_UID(i)) != frames.end()) { - return INPUT_STREAM_PORT_UID(i); - } +bool CaptureUnit::IsSupportPort(uuid port, const std::map& frames) { + if (frames.find(port) != frames.end()) { + return true; } - return INVALID_PORT; + + return false; } int CaptureUnit::allocateMemory(uuid port, const std::shared_ptr& camBuffer) { @@ -339,6 +337,10 @@ int CaptureUnit::queueAllBuffers() { break; } + if (ret == DEV_BUSY) { + return DEV_BUSY; + } + CheckAndLogError(ret != OK, ret, "queueBuffer fails, dev:%s, ret:%d", device->getName(), ret); if (predictSequence == -1) { @@ -357,11 +359,9 @@ int CaptureUnit::processPendingBuffers() { LOG2("%s: buffers in device:%d", __func__, mDevices.front()->getBufferNumInDevice()); while (mDevices.front()->getBufferNumInDevice() < mMaxBuffersInDevice) { - bool hasPendingBuffer = true; for (auto device : mDevices) { if (!device->hasPendingBuffer()) { // Do not queue buffer when one of the devices has no pending buffers. - hasPendingBuffer = false; return OK; } } @@ -370,6 +370,11 @@ int CaptureUnit::processPendingBuffers() { if (mExitPending) { break; } + + if (ret == DEV_BUSY) { + return OK; + } + CheckAndLogError(ret != OK, ret, "Failed to queue buffers, ret=%d", ret); } diff --git a/src/core/CaptureUnit.h b/src/core/CaptureUnit.h index eb5fced..00a850b 100644 --- a/src/core/CaptureUnit.h +++ b/src/core/CaptureUnit.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef CAPTURE_UNIT_H -#define CAPTURE_UNIT_H - +#pragma once #include #include @@ -82,16 +80,16 @@ class CaptureUnit : public StreamSource, public DeviceCallback { virtual void removeAllFrameAvailableListener(); /** - * \brief CaptureUnit initialze + * \brief CaptureUnit initialize */ virtual int init(); /** * \brief CaptureUnit deinit * - * 1. Destory all the buffer pool + * 1. Destroy all the buffer pool * 2. Deinit the v4l2 device - * 3. Destory the poll thread + * 3. Destroy the poll thread */ virtual void deinit(); @@ -129,12 +127,11 @@ class CaptureUnit : public StreamSource, public DeviceCallback { virtual void removeListener(EventType eventType, EventListener* eventListener); // Overwrite DeviceCallback API - void onDequeueBuffer(); + virtual void onDequeueBuffer(); int createDevices(); void destroyDevices(); DeviceBase* findDeviceByPort(uuid port); - uuid findDefaultPort(const std::map& frames) const; int streamOn(); void streamOff(); @@ -143,7 +140,10 @@ class CaptureUnit : public StreamSource, public DeviceCallback { int processPendingBuffers(); int queueAllBuffers(); - private: + private: + bool IsSupportPort(uuid port, const std::map& frames); + + private: PollThread* mPollThread; int mFlushFd[2]; // Flush file descriptor @@ -172,4 +172,3 @@ class CaptureUnit : public StreamSource, public DeviceCallback { } // namespace icamera -#endif // CAPTURE_UNIT_H diff --git a/src/core/CsiMetaDevice.cpp b/src/core/CsiMetaDevice.cpp index 487cc73..e01ec83 100644 --- a/src/core/CsiMetaDevice.cpp +++ b/src/core/CsiMetaDevice.cpp @@ -135,7 +135,7 @@ int CsiMetaDevice::initEmdMetaData() { mEmbeddedMetaData.csiMetaFormat = V4L2_FMT_IPU_ISYS_META; // for embedded meta data, width is equal with bytes per line mEmbeddedMetaData.width = bpl; - // for compatible, set 1 as default, if the *.xml have configed it, use the config value repalce + // for compatible, set 1 as default, if the *.xml have configured it, use the config value repalce mEmbeddedMetaData.height = 1; ret = PlatformData::getVideoNodeNameByType(mCameraId, VIDEO_CSI_META, videoNodeName); if (ret == OK) { diff --git a/src/core/DeviceBase.cpp b/src/core/DeviceBase.cpp index d9be01e..dfc0b22 100644 --- a/src/core/DeviceBase.cpp +++ b/src/core/DeviceBase.cpp @@ -23,9 +23,6 @@ #include "CameraEventType.h" #include "PlatformData.h" -// FRAME_SYNC_S -#include "SyncManager.h" -// FRAME_SYNC_E #include "V4l2DeviceFactory.h" #include "iutils/CameraDump.h" #include "iutils/CameraLog.h" @@ -69,12 +66,6 @@ DeviceBase::~DeviceBase() { int DeviceBase::openDevice() { LOG1("%s, device:%s", mCameraId, __func__, mName); - // FRAME_SYNC_S - if (PlatformData::isEnableFrameSyncCheck(mCameraId)) { - SyncManager::getInstance()->updateSyncCamNum(); - } - // FRAME_SYNC_E - return mDevice->Open(O_RDWR); } @@ -157,7 +148,7 @@ int DeviceBase::queueBuffer(int64_t sequence) { AutoMutex l(mBufferLock); if (mBufferQueuing) { LOG2("buffer is queuing"); - return OK; + return DEV_BUSY; } if (mPendingBuffers.empty()) { @@ -222,7 +213,7 @@ int DeviceBase::dequeueBuffer() { PERF_CAMERA_ATRACE_PARAM3("grabFrame SeqID", camBuffer->getSequence(), "csi2_port", camBuffer->getCsi2Port(), "virtual_channel", - camBuffer->getVirtualChannel()); + camBuffer->getVirtualChannel()); (void)onDequeueBuffer(camBuffer); // Skip initial frames if needed. @@ -272,23 +263,6 @@ shared_ptr DeviceBase::getFirstDeviceBuffer() { return mBuffersInDevice.empty() ? nullptr : mBuffersInDevice.front(); } -// FRAME_SYNC_S -bool DeviceBase::skipFrameAfterSyncCheck(int64_t sequence) { - // For multi-camera sensor, to check whether the frame synced or not - int count = 0; - const int timeoutDuration = gSlowlyRunRatio != 0 ? (gSlowlyRunRatio * 1000000) : 1000; - const int maxCheckTimes = 10; // 10 times - while (!SyncManager::getInstance()->isSynced(mCameraId, sequence)) { - usleep(timeoutDuration); - count++; - if (count > maxCheckTimes) { - return true; - } - } - return false; -} -// FRAME_SYNC_E - void DeviceBase::popBufferFromDevice() { AutoMutex l(mBufferLock); if (mBuffersInDevice.empty()) { @@ -330,25 +304,11 @@ int MainDevice::createBufferPool(const stream_t& config) { struct v4l2_format v4l2fmt; v4l2fmt.fmt.pix_mp.field = config.field; - if (PlatformData::isCSIFrontEndCapture(DeviceBase::mCameraId)) { - const int planesNum = CameraUtils::getNumOfPlanes(config.format); - LOG1("@%s Num of planes: %d, mCameraId:%d", __func__, planesNum, DeviceBase::mCameraId); - - v4l2fmt.fmt.pix_mp.width = config.width; - v4l2fmt.fmt.pix_mp.height = config.height; - v4l2fmt.fmt.pix_mp.num_planes = planesNum; - v4l2fmt.fmt.pix_mp.pixelformat = config.format; - for (int i = 0; i < v4l2fmt.fmt.pix_mp.num_planes; i++) { - v4l2fmt.fmt.pix_mp.plane_fmt[i].bytesperline = config.width; - v4l2fmt.fmt.pix_mp.plane_fmt[i].sizeimage = 0; - } - } else { - v4l2fmt.fmt.pix.width = config.width; - v4l2fmt.fmt.pix.height = config.height; - v4l2fmt.fmt.pix.pixelformat = config.format; - v4l2fmt.fmt.pix.bytesperline = config.width; - v4l2fmt.fmt.pix.sizeimage = 0; - } + v4l2fmt.fmt.pix.width = config.width; + v4l2fmt.fmt.pix.height = config.height; + v4l2fmt.fmt.pix.pixelformat = config.format; + v4l2fmt.fmt.pix.bytesperline = config.width; + v4l2fmt.fmt.pix.sizeimage = 0; v4l2fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; V4L2Format tmpbuf{v4l2fmt}; @@ -388,16 +348,18 @@ int MainDevice::onDequeueBuffer(shared_ptr buffer) { DeviceBase::dumpFrame(buffer); for (auto& consumer : DeviceBase::mConsumers) { - consumer->onFrameAvailable(DeviceBase::mPort, buffer); + consumer->onBufferAvailable(DeviceBase::mPort, buffer); } - EventData frameData; - frameData.type = EVENT_ISYS_FRAME; - frameData.buffer = nullptr; - frameData.data.frame.sequence = buffer->getSequence(); - frameData.data.frame.timestamp.tv_sec = buffer->getTimestamp().tv_sec; - frameData.data.frame.timestamp.tv_usec = buffer->getTimestamp().tv_usec; - notifyListeners(frameData); + if (DeviceBase::mPort == MAIN_INPUT_PORT_UID) { + EventData frameData; + frameData.type = EVENT_ISYS_FRAME; + frameData.buffer = nullptr; + frameData.data.frame.sequence = buffer->getSequence(); + frameData.data.frame.timestamp.tv_sec = buffer->getTimestamp().tv_sec; + frameData.data.frame.timestamp.tv_usec = buffer->getTimestamp().tv_usec; + notifyListeners(frameData); + } return OK; } @@ -407,26 +369,13 @@ bool MainDevice::needQueueBack(shared_ptr buffer) { const V4L2Buffer& vbuf = buffer->getV4L2Buffer(); // Check for STR2MMIO Error from kernel space - if ((vbuf.Flags() & static_cast(V4L2_BUF_FLAG_ERROR)) && + if (((vbuf.Flags() & static_cast(V4L2_BUF_FLAG_ERROR)) != 0U) && (PlatformData::isSkipFrameOnSTR2MMIOErr(this->mCameraId))) { // On STR2MMIO error, enqueue this buffer back to V4L2 before notifying the // listener/consumer and return needSkipFrame = true; LOGW("%s: buffer error", buffer->getSequence(), __func__); } - // FRAME_SYNC_S - if (PlatformData::isEnableFrameSyncCheck(DeviceBase::mCameraId)) { - struct camera_buf_info sharedCamBufInfo; - sharedCamBufInfo.sequence = buffer->getSequence(); - sharedCamBufInfo.sof_ts = buffer->getTimestamp(); - SyncManager::getInstance()->updateCameraBufInfo(DeviceBase::mCameraId, &sharedCamBufInfo); - if (DeviceBase::skipFrameAfterSyncCheck(buffer->getSequence())) { - LOG1("@%s: dropped due to frame not sync", DeviceBase::mCameraId, - buffer->getSequence(), __func__); - needSkipFrame = true; - } - } - // FRAME_SYNC_E return needSkipFrame; } } // namespace icamera diff --git a/src/core/DeviceBase.h b/src/core/DeviceBase.h index 2c72a2f..d9c1d21 100644 --- a/src/core/DeviceBase.h +++ b/src/core/DeviceBase.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef DEVICE_BASE_H -#define DEVICE_BASE_H - +#pragma once #include #include #include @@ -124,7 +122,7 @@ class DeviceBase : public EventSource { VideoNodeDirection mNodeDirection; const char* mName; V4L2VideoNode* mDevice; // The device used to queue/dequeue buffers. - int64_t mLatestSequence; // Track the latest bufffer sequence from driver. + int64_t mLatestSequence; // Track the latest buffer sequence from driver. bool mNeedSkipFrame; // True if the frame/buffer needs to be skipped. int mFrameSkipNum; // How many frames need to be skipped after stream on. DeviceCallback* mDeviceCB; @@ -169,10 +167,9 @@ class MainDevice : public DeviceBase { ~MainDevice(); private: - int createBufferPool(const stream_t& config); - int onDequeueBuffer(std::shared_ptr buffer); - bool needQueueBack(std::shared_ptr buffer); + virtual int createBufferPool(const stream_t& config); + virtual int onDequeueBuffer(std::shared_ptr buffer); + virtual bool needQueueBack(std::shared_ptr buffer); }; } // namespace icamera -#endif // DEVICE_BASE_H diff --git a/src/core/FileSource.cpp b/src/core/FileSource.cpp index 206358e..187f91d 100644 --- a/src/core/FileSource.cpp +++ b/src/core/FileSource.cpp @@ -334,7 +334,7 @@ void FileSource::notifyFrame(std::map> buffe for (auto & port : mOutputPorts) { if (buffers.find(port) != buffers.end()) { LOG2("Notify frame to consumer for port:%x", port); - consumer->onFrameAvailable(port, buffers[port]); + consumer->onBufferAvailable(port, buffers[port]); } } } diff --git a/src/core/FileSource.h b/src/core/FileSource.h index 89bc888..ece8f02 100644 --- a/src/core/FileSource.h +++ b/src/core/FileSource.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef FILE_SOURCE_H -#define FILE_SOURCE_H +#pragma once #include "StreamSource.h" #include "iutils/Thread.h" @@ -36,29 +35,29 @@ namespace icamera { * The value of cameraInjectFile MUST be ended with ".xml". * 3. The third mode which can inject files in sequence by specifying injection folder path. * How to enable: export cameraInjectFile="Injection Folder" - * ("Injection Folder" is the specifyed injection folder path you want to run file injection) + * ("Injection Folder" is the specified injection folder path you want to run file injection) */ class FileSource : public StreamSource { public: explicit FileSource(int cameraId); ~FileSource(); - int init(); - void deinit(); - int configure(const std::map& outputFrames); - int start(); - int stop(); + virtual int init(); + virtual void deinit(); + virtual int configure(const std::map& outputFrames); + virtual int start(); + virtual int stop(); virtual int qbuf(uuid port, const std::shared_ptr& camBuffer); virtual void addFrameAvailableListener(BufferConsumer* listener); virtual void removeFrameAvailableListener(BufferConsumer* listener); - void removeAllFrameAvailableListener(); - int allocateMemory(uuid port, const std::shared_ptr& camBuffer) { return OK; } + virtual void removeAllFrameAvailableListener(); + virtual int allocateMemory(uuid port, const std::shared_ptr& camBuffer) { return OK; } // Overwrite EventSource APIs to avoid calling its parent's implementation. - void registerListener(EventType eventType, EventListener* eventListener); - void removeListener(EventType eventType, EventListener* eventListener); + virtual void registerListener(EventType eventType, EventListener* eventListener); + virtual void removeListener(EventType eventType, EventListener* eventListener); private: bool produce(); @@ -83,7 +82,7 @@ class FileSource : public StreamSource { } private: - bool threadLoop() { return mFileSrc->produce(); } + virtual bool threadLoop() { return mFileSrc->produce(); } }; ProduceThread* mProduceThread; @@ -184,5 +183,3 @@ class FileSourceFromDir { }; } // namespace icamera - -#endif // FILE_SOURCE_H diff --git a/src/core/IProcessingUnitFactory.h b/src/core/IProcessingUnitFactory.h index 849b0d4..134a704 100644 --- a/src/core/IProcessingUnitFactory.h +++ b/src/core/IProcessingUnitFactory.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef IPROCESSING_UNIT_FACTORY_H -#define IPROCESSING_UNIT_FACTORY_H +#pragma once #include "AiqUnit.h" #include "CameraScheduler.h" @@ -41,5 +40,3 @@ class IProcessingUnitFactory { std::shared_ptr scheduler); }; } // namespace icamera - -#endif // IPROCESSING_UNIT_FACTORY_H diff --git a/src/core/IpuPacAdaptor.cpp b/src/core/IpuPacAdaptor.cpp index 8cc64b3..a8aad3f 100644 --- a/src/core/IpuPacAdaptor.cpp +++ b/src/core/IpuPacAdaptor.cpp @@ -79,7 +79,7 @@ int IpuPacAdaptor::reinitAic(const int32_t aicId) { const ia_err iaErr = mIntelCca->reinitAic(aicId); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to reinit aic, aicId: %d", __func__, aicId); + "%s, Failed to reinit aic, aicId: %d", __func__, aicId); return OK; } @@ -120,11 +120,16 @@ status_t IpuPacAdaptor::pacConfig(int streamId, const cca::cca_aic_config& aicCo const ia_err iaErr = mIntelCca->configAic(aicConfig, kernelOffset, offsetPtr, *termCfg, streamId, statsBufToTermIds); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to configure pac, streamId: %d", __func__, streamId); + "%s, Failed to configure pac, streamId: %d", __func__, streamId); return OK; } +void IpuPacAdaptor::clearAicResult() { + AutoMutex l(mPacAdaptorLock); + mPacRunHistMap.clear(); +} + void* IpuPacAdaptor::allocateBuffer(int streamId, uint8_t contextId, uint32_t termId, size_t size) { AutoMutex l(mPacAdaptorLock); @@ -191,7 +196,7 @@ status_t IpuPacAdaptor::registerBuffer(int streamId, const cca::cca_aic_terminal const ia_err iaErr = mIntelCca->registerAicBuf(termCfg, streamId); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to register pac buffer, streamId: %d", __func__, streamId); + "%s, Failed to register pac buffer, streamId: %d", __func__, streamId); return OK; } @@ -229,7 +234,7 @@ status_t IpuPacAdaptor::storeTerminalResult(int64_t sequence, int32_t streamId) __func__, streamId, data.first.second, index); const ia_err iaErr = mIntelCca->getAicBuf(ccaTermConfig, streamId); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to getAicBuf. streamId: %d, contextId: %d", + "%s, Failed to getAicBuf. streamId: %d, contextId: %d", sequence, __func__, streamId, data.first.second); index = 0; @@ -307,7 +312,7 @@ void IpuPacAdaptor::applyMediaFormat(const AiqResult* aiqResult, *mediaFormat = media_format_custom; LOG2("%s: a linear gamma curve. curveX: %f, curveY: %f", __func__, curveX, curveY); } else if (abs(curveY - pow(curveX, (1 / 2.2))) < EPSILON) { - // Its a standard 2_2 gamma curves + // It's a standard 2_2 gamma curves *mediaFormat = media_format_bt709_8b; LOG2("%s: a 2.2 gamma curve. curveX: %f, curveY: %f", __func__, curveX, curveY); } else { @@ -445,7 +450,7 @@ status_t IpuPacAdaptor::updateResolutionSettings(int streamId, const ia_err iaErr = mIntelCca->updateConfigurationResolutions(aicConfig, streamId, isKeyResChanged); CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to configure pac, streamId: %d", __func__, streamId); + "%s, Failed to configure pac, streamId: %d", __func__, streamId); return OK; } @@ -532,22 +537,22 @@ status_t IpuPacAdaptor::decodeStats(int streamId, uint8_t contextId, int64_t seq } const ia_err iaErr = mIntelCca->decodeStats(contextId, sequenceId, streamId, outStats); - CheckAndLogError(iaErr != ia_err_none, UNKNOWN_ERROR, - "%s, Faield to decode stats. streamId: %d, contextId: %d", - sequenceId, __func__, streamId, contextId); - - if (statsUsed) { - AiqStatistics* aiqStatistics = mAiqResultStorage->acquireAiqStatistics(); - aiqStatistics->mSequence = sequenceId; - aiqStatistics->mTimestamp = timestamp; - aiqStatistics->mTuningMode = TUNING_MODE_VIDEO; - - mAiqResultStorage->updateAiqStatistics(sequenceId); + if (iaErr == ia_err::ia_err_none) { + if (statsUsed) { + AiqStatistics* aiqStatistics = mAiqResultStorage->acquireAiqStatistics(); + aiqStatistics->mSequence = sequenceId; + aiqStatistics->mTimestamp = timestamp; + aiqStatistics->mTuningMode = TUNING_MODE_VIDEO; + + mAiqResultStorage->updateAiqStatistics(sequenceId); + } + mLastStatsSequence = sequenceId; + } else { + LOGE("%s, Failed to decode stats. streamId: %d, contextId: %d", sequenceId, + __func__, streamId, contextId); } - mLastStatsSequence = sequenceId; mPacRunHistMap[pacItem] = true; - if (mPacRunHistMap.size() >= MAX_CACHE_PAC_HIST) { for (auto iter = mPacRunHistMap.begin(); iter != mPacRunHistMap.end(); iter++) { if (iter->second) { @@ -557,7 +562,7 @@ status_t IpuPacAdaptor::decodeStats(int streamId, uint8_t contextId, int64_t seq } } - return OK; + return (iaErr == ia_err_none) ? OK : UNKNOWN_ERROR; } } // namespace icamera diff --git a/src/core/IpuPacAdaptor.h b/src/core/IpuPacAdaptor.h index af7b0d9..c60836f 100644 --- a/src/core/IpuPacAdaptor.h +++ b/src/core/IpuPacAdaptor.h @@ -54,6 +54,8 @@ class IpuPacAdaptor { int init(std::vector streamIds); int reinitAic(const int32_t aicId); int deinit(); + void clearAicResult(); + status_t pacConfig(int streamId, const cca::cca_aic_config& aicConfig, const cca::cca_aic_kernel_offset& kernelOffset, uint32_t* offsetPtr, cca::cca_aic_terminal_config* termCfg, const int32_t* statsBufToTermIds); diff --git a/src/core/LensHw.h b/src/core/LensHw.h index d94603e..600a49d 100644 --- a/src/core/LensHw.h +++ b/src/core/LensHw.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef LENS_HW_H -#define LENS_HW_H +#pragma once #include @@ -49,5 +48,3 @@ class LensHw { }; // class LensHW } // namespace icamera - -#endif // LENS_HW_H diff --git a/src/core/MockPSysDevice.cpp b/src/core/MockPSysDevice.cpp index 5ead3de..5d5582b 100644 --- a/src/core/MockPSysDevice.cpp +++ b/src/core/MockPSysDevice.cpp @@ -36,8 +36,9 @@ MockPSysDevice::MockPSysDevice(int cameraId) : PSysDevice(cameraId) { } MockPSysDevice::~MockPSysDevice() { - mPollThread->exit(); mExitPending = true; + mPollThread->exit(); + mTaskReadyCondition.notify_one(); mPollThread->wait(); delete mPollThread; @@ -54,41 +55,56 @@ void MockPSysDevice::registerPSysDeviceCallback(uint8_t contextId, IPSysDeviceCa } int MockPSysDevice::addTask(const PSysTask& task) { - std::lock_guard l(mDataLock); - mTasksMap[task.sequence].insert(task.nodeCtxId); - for (const auto& item : task.terminalBuffers) { if (task.sequence < kStartingFrameCount && item.second.handle > 0) { char* addr = reinterpret_cast(::mmap(nullptr, item.second.size, PROT_READ | PROT_WRITE, MAP_SHARED, item.second.handle, 0)); - if (mFileSource) + if (mFileSource) { mFileSource->fillFrameBuffer(addr, item.second.size, task.sequence); - else + } else { memset(addr, 0x99, item.second.size); + } munmap(addr, item.second.size); } } + { + std::unique_lock lock(mDataLock); + mTasksMap[task.sequence].insert(task.nodeCtxId); + + mTaskReadyCondition.notify_one(); + } return OK; } int MockPSysDevice::poll() { - std::lock_guard l(mDataLock); if (mExitPending) { return -1; } - if (!mTasksMap.empty()) { - auto it = mTasksMap.begin(); - auto sec = it->second.begin(); + auto task = mTasksMap.begin(); + { + std::unique_lock lock(mDataLock); + if (mTasksMap.empty()) { + const std::cv_status ret = + mTaskReadyCondition.wait_for(lock, std::chrono::nanoseconds(2000000000)); + if (mTasksMap.empty() || (ret == std::cv_status::timeout)) { + return 0; + } + } + task = mTasksMap.begin(); + } - LOG2("%s, task.nodeCtxId %u, task.sequence %ld", __func__, *sec, it->first); - mPSysDeviceCallbackMap[*sec]->bufferDone(it->first); + auto sec = task->second.begin(); + LOG2("%s, task.nodeCtxId %u, task.sequence %ld", __func__, *sec, task->first); + mPSysDeviceCallbackMap[*sec]->bufferDone(task->first); - it->second.erase(sec); - if (it->second.empty()) { - mTasksMap.erase(it); + { + std::unique_lock lock(mDataLock); + task->second.erase(sec); + if (task->second.empty()) { + mTasksMap.erase(task); } } diff --git a/src/core/MockPSysDevice.h b/src/core/MockPSysDevice.h index c14e7a2..4123092 100644 --- a/src/core/MockPSysDevice.h +++ b/src/core/MockPSysDevice.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation. + * Copyright (C) 2024-2025 Intel Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ class MockPSysDevice : public PSysDevice { virtual ~MockPSysDevice(); virtual int init() override; + virtual void deinit() override {} virtual void registerPSysDeviceCallback(uint8_t contextId, IPSysDeviceCallback* callback) override; @@ -58,12 +59,14 @@ class MockPSysDevice : public PSysDevice { virtual int poll() override; private: - static const int kStartingFrameCount = 100; + static const int kStartingFrameCount = 20; icamera::FileSourceFromDir* mFileSource; - const char* PNP_INJECTION_NAME = "/run/camera/libcamera/"; + const char* PNP_INJECTION_NAME = "/data/cameraPnp/libcamera"; PollThread* mPollThread; + std::condition_variable mTaskReadyCondition; bool mExitPending = false; + int mFd = 0; std::mutex mDataLock; std::unordered_map mPSysDeviceCallbackMap; diff --git a/src/core/PSysDevice.cpp b/src/core/PSysDevice.cpp index 5cdce9e..a489d73 100644 --- a/src/core/PSysDevice.cpp +++ b/src/core/PSysDevice.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "CameraLog.h" #include "Errors.h" @@ -30,14 +31,15 @@ namespace icamera { -const char* DRIVER_NAME = "/dev/ipu7-psys0"; +static const char* DRIVER_NAME = "/dev/ipu7-psys0"; PSysDevice::PSysDevice(int cameraId) : mPollThread(nullptr), mExitPending(false), mCameraId(cameraId), mFd(-1), - mGraphId(INVALID_GRAPH_ID) { + mGraphId(INVALID_GRAPH_ID), + mEventFd(-1) { LOG1("<%id> Construct PSysDevice", mCameraId); CLEAR(mFrameId); @@ -48,6 +50,8 @@ PSysDevice::PSysDevice(int cameraId) } mPollThread = new PollThread(this); + + mEventFd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK); } PSysDevice::~PSysDevice() { @@ -66,8 +70,6 @@ PSysDevice::~PSysDevice() { } } - mPollThread->exit(); - mExitPending = true; mPollThread->wait(); delete mPollThread; @@ -76,6 +78,24 @@ PSysDevice::~PSysDevice() { for (uint8_t i = 0U; i < MAX_GRAPH_NODES; i++) { delete[] mTaskBuffers[i]; } + + if (mEventFd >= 0) { + close(mEventFd); + } +} + +void PSysDevice::deinit() { + mPollThread->exit(); + mExitPending = true; + + // Wake up poll thread + if (mEventFd >= 0) { + const uint64_t value = 1U; + const ssize_t ret = write(mEventFd, &value, sizeof(value)); + if (ret < 0) { + LOGW("Failed to interrupt event %s", strerror(errno)); + } + } } int PSysDevice::init() { @@ -160,7 +180,7 @@ int PSysDevice::closeGraph() { CheckAndLogError(ret != 0, INVALID_OPERATION, "Failed to close graph %s", strerror(errno)); mGraphId = INVALID_GRAPH_ID; } - + CLEAR(mFrameId); return OK; } @@ -216,20 +236,20 @@ int PSysDevice::wait(ipu_psys_event& event) { void PSysDevice::updatePsysBufMap(TerminalBuffer* buf) { std::lock_guard l(mDataLock); - if (buf->flags & IPU_BUFFER_FLAG_USERPTR) { + if ((buf->flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { mPtrToTermBufMap[buf->userPtr] = *buf; - } else if (buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) { + } else if ((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) != 0U) { mFdToTermBufMap[static_cast(buf->handle)] = *buf; } } -void PSysDevice::erasePsysBufMap(TerminalBuffer* buf) { +void PSysDevice::erasePsysBufMap(const TerminalBuffer* buf) { std::lock_guard l(mDataLock); - if (buf->flags & IPU_BUFFER_FLAG_USERPTR) { + if ((buf->flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { if (mPtrToTermBufMap.find(buf->userPtr) != mPtrToTermBufMap.end()) { mPtrToTermBufMap.erase(buf->userPtr); } - } else if (buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) { + } else if ((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) != 0U) { if (mFdToTermBufMap.find(static_cast(buf->handle)) != mFdToTermBufMap.end()) { mFdToTermBufMap.erase(static_cast(buf->handle)); } @@ -238,12 +258,12 @@ void PSysDevice::erasePsysBufMap(TerminalBuffer* buf) { bool PSysDevice::getPsysBufMap(TerminalBuffer* buf) { std::lock_guard l(mDataLock); - if (buf->flags & IPU_BUFFER_FLAG_USERPTR) { + if ((buf->flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { if (mPtrToTermBufMap.find(buf->userPtr) != mPtrToTermBufMap.end()) { buf->psysBuf = mPtrToTermBufMap[buf->userPtr].psysBuf; return true; } - } else if (buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) { + } else if ((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) != 0U) { if (mFdToTermBufMap.find(static_cast(buf->handle)) != mFdToTermBufMap.end()) { buf->psysBuf = mFdToTermBufMap[static_cast(buf->handle)].psysBuf; return true; @@ -255,7 +275,7 @@ bool PSysDevice::getPsysBufMap(TerminalBuffer* buf) { int PSysDevice::registerBuffer(TerminalBuffer* buf) { CheckAndLogError(mFd < 0, INVALID_OPERATION, "psys device wasn't opened"); - CheckAndLogError(!buf, INVALID_OPERATION, "buf is nullptr"); + CheckAndLogError(buf == nullptr, INVALID_OPERATION, "buf is nullptr"); // If already registered, just return if (getPsysBufMap(buf)) { @@ -264,26 +284,26 @@ int PSysDevice::registerBuffer(TerminalBuffer* buf) { int ret = OK; buf->psysBuf.len = buf->size; - if (buf->flags & IPU_BUFFER_FLAG_USERPTR) { + if ((buf->flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { buf->psysBuf.base.userptr = buf->userPtr; buf->psysBuf.flags |= IPU_BUFFER_FLAG_USERPTR; ret = ioctl(mFd, static_cast(IPU_IOC_GETBUF), &buf->psysBuf); CheckAndLogError(ret != 0, INVALID_OPERATION, "Failed to get buffer %s", strerror(errno)); - if (!(buf->psysBuf.flags & IPU_BUFFER_FLAG_DMA_HANDLE)) { + if ((buf->psysBuf.flags & IPU_BUFFER_FLAG_DMA_HANDLE) == 0U) { LOGW("IOC_GETBUF succeed but did not return dma handle"); return INVALID_OPERATION; - } else if (buf->psysBuf.flags & IPU_BUFFER_FLAG_USERPTR) { + } else if ((buf->psysBuf.flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { LOGW("IOC_GETBUF succeed but did not consume the userptr flag"); return INVALID_OPERATION; } - } else if (buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) { + } else if ((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) != 0U) { buf->psysBuf.base.fd = static_cast(buf->handle); buf->psysBuf.flags |= IPU_BUFFER_FLAG_DMA_HANDLE; } - if (buf->flags & IPU_BUFFER_FLAG_NO_FLUSH) { + if ((buf->flags & IPU_BUFFER_FLAG_NO_FLUSH) != 0U) { buf->psysBuf.flags |= IPU_BUFFER_FLAG_NO_FLUSH; } @@ -303,17 +323,17 @@ int PSysDevice::registerBuffer(TerminalBuffer* buf) { return OK; } -void PSysDevice::unregisterBuffer(TerminalBuffer* buf) { +void PSysDevice::unregisterBuffer(const TerminalBuffer* buf) { if (mFd < 0) { LOGE("psys device wasn't opened"); return; } - if (!buf) { + if (buf == nullptr) { LOGE("buf is nullptr"); return; } - if ((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) && (!buf->isExtDmaBuf)) { + if (((buf->flags & IPU_BUFFER_FLAG_DMA_HANDLE) != 0U) && (!buf->isExtDmaBuf)) { LOGW("cannot unmap buffer fd %d", buf->psysBuf.base.fd); return; } @@ -324,7 +344,7 @@ void PSysDevice::unregisterBuffer(TerminalBuffer* buf) { LOGW("Failed to unmap buffer %s", strerror(errno)); } - if (buf->flags & IPU_BUFFER_FLAG_USERPTR) { + if ((buf->flags & IPU_BUFFER_FLAG_USERPTR) != 0U) { ret = close(buf->psysBuf.base.fd); if (ret < 0) { LOGE("Failed to close fd %d, error %s", buf->psysBuf.base.fd, strerror(errno)); @@ -341,9 +361,16 @@ void PSysDevice::registerPSysDeviceCallback(uint8_t contextId, IPSysDeviceCallba int PSysDevice::poll(short events, int timeout) { - struct pollfd fds = { mFd, events, 0 }; + std::vector pollfds; + pollfds.reserve(1 + ((mEventFd >= 0) ? 1 : 0)); + + pollfds.push_back({ mFd, events, 0 }); - return ::poll(&fds, 1, timeout); + if (mEventFd >= 0) { + pollfds.push_back({ mEventFd, POLLIN, 0 }); + } + + return ::poll(pollfds.data(), pollfds.size(), timeout); } void PSysDevice::handleEvent(const ipu_psys_event& event) { @@ -375,7 +402,12 @@ void PSysDevice::handleEvent(const ipu_psys_event& event) { } int PSysDevice::poll() { - int ret = poll(POLLIN | POLLHUP | POLLERR, kEventTimeout * SLOWLY_MULTIPLIER); + if (mExitPending) { + return NO_INIT; + } + + int ret = poll(static_cast(POLLIN | POLLHUP | POLLERR), + kEventTimeout * SLOWLY_MULTIPLIER); if (mExitPending) { return NO_INIT; diff --git a/src/core/PSysDevice.h b/src/core/PSysDevice.h index 8fc3ff5..6e64454 100644 --- a/src/core/PSysDevice.h +++ b/src/core/PSysDevice.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef PSYS_DEVICE_H -#define PSYS_DEVICE_H - +#pragma once #include #include #include @@ -97,6 +95,7 @@ class PSysDevice { virtual ~PSysDevice(); virtual int init(); + virtual void deinit(); virtual void registerPSysDeviceCallback(uint8_t contextId, IPSysDeviceCallback* callback); virtual int addGraph(const PSysGraph& graph); @@ -104,7 +103,7 @@ class PSysDevice { virtual int addTask(const PSysTask& task); virtual int registerBuffer(TerminalBuffer* buf); - virtual void unregisterBuffer(TerminalBuffer* buf); + virtual void unregisterBuffer(const TerminalBuffer* buf); virtual int poll(); @@ -113,7 +112,7 @@ class PSysDevice { int poll(short events, int timeout); void handleEvent(const ipu_psys_event& event); void updatePsysBufMap(TerminalBuffer* buf); - void erasePsysBufMap(TerminalBuffer* buf); + void erasePsysBufMap(const TerminalBuffer* buf); bool getPsysBufMap(TerminalBuffer* buf); private: @@ -131,6 +130,8 @@ class PSysDevice { int32_t mFd; int mGraphId; + int32_t mEventFd; + uint8_t mFrameId[MAX_NODE_NUM]; std::mutex mDataLock; int64_t mFrameIdToSeqMap[MAX_NODE_NUM][MAX_TASK_NUM]; @@ -144,4 +145,3 @@ class PSysDevice { } /* namespace icamera */ -#endif // PSYS_DEVICE_H diff --git a/src/core/ProcessingUnit.cpp b/src/core/ProcessingUnit.cpp index 9c27650..c6ff31a 100644 --- a/src/core/ProcessingUnit.cpp +++ b/src/core/ProcessingUnit.cpp @@ -146,6 +146,7 @@ int ProcessingUnit::start() { } IProcessingUnit::mThreadRunning = true; + BufferQueue::setThreadWaiting(true); mProcessThread->start(); ret = mPipeManager->start(); @@ -154,9 +155,6 @@ int ProcessingUnit::start() { auto cameraContext = CameraContext::getInstance(mCameraId); auto dataContext = cameraContext->getDataContextBySeq(0); (void)setParameters(dataContext); - AutoWMutex wl(mIspSettingsLock); - // Predict to run AIC with video pipe for the first frame - mPipeManager->prepareIpuParams(&mIspSettings); return OK; } @@ -166,6 +164,7 @@ void ProcessingUnit::stop() { mPipeManager->stop(); IProcessingUnit::mThreadRunning = false; + BufferQueue::setThreadWaiting(false); mProcessThread->exit(); { @@ -180,6 +179,7 @@ void ProcessingUnit::stop() { mProcessThread->wait(); + mRawBufferMap.clear(); // Thread is not running. It is safe to clear the Queue BufferQueue::clearBufferQueues(); } @@ -229,6 +229,7 @@ int ProcessingUnit::setParameters(const DataContext* dataContext) { break; default: mIspSettings.eeSetting.strength = static_cast(EXTREME_STRENGTH_LEVEL2); + break; } LOG2("%s: ISP EE setting, level: %d, strength: %d", __func__, @@ -267,7 +268,7 @@ int ProcessingUnit::setParameters(const DataContext* dataContext) { mIspSettings.videoStabilization = (dataContext->mAiqParams.videoStabilizationMode == VIDEO_STABILIZATION_MODE_ON); - LOG2("%s: Video stablilization enabled:%d", __func__, mIspSettings.videoStabilization); + LOG2("%s: Video stabilization enabled:%d", __func__, mIspSettings.videoStabilization); mIspSettings.zoom = dataContext->zoomRegion; @@ -363,7 +364,8 @@ int ProcessingUnit::processNewFrame() { } // set timeout only when there are already pending tasks in the Queue int64_t timeout = mSequencesInflight.size() > 0 ? kQueueTimeout : 0; - ret = BufferQueue::waitFreeBuffersInQueue(lock, srcBuffers, BufferQueue::mInputQueue, timeout); + ret = BufferQueue::waitFreeBuffersInQueue(lock, srcBuffers, BufferQueue::mInputQueue, + timeout); if (!this->mThreadRunning) { return -1; // Already stopped @@ -399,7 +401,14 @@ int ProcessingUnit::processNewFrame() { CheckAndLogError(ret != OK, UNKNOWN_ERROR, "%s, Failed to process frame", __func__); } - if (!mSequencesInflight.empty()) { + bool execute = true; + { + std::lock_guard lock(mBufferQueueLock); + // Do not trigger scheduler if no pending task + execute = !mSequencesInflight.empty(); + } + + if (execute) { std::string source; mScheduler->executeNode(source, inputSequence); } @@ -407,7 +416,7 @@ int ProcessingUnit::processNewFrame() { return OK; } -int ProcessingUnit::handleYuvReprocessing(CameraBufferPortMap* buffersMap) { +int ProcessingUnit::handleYuvReprocessing(const CameraBufferPortMap* buffersMap) { CheckAndLogError(buffersMap->empty(), UNKNOWN_ERROR, "%s, the input or output buffer is empty", __func__); @@ -441,7 +450,7 @@ int ProcessingUnit::handleYuvReprocessing(CameraBufferPortMap* buffersMap) { // handle buffer done for normal YUV output sendPsysRequestEvent(&dstBuffers, bufSequence, timestamp, EVENT_PSYS_REQUEST_BUF_READY); - // Prepare the task input paramerters including input and output buffers, settings etc. + // Prepare the task input parameters including input and output buffers, settings etc. PipeTaskData taskParam; taskParam.mTuningMode = mTuningMode; taskParam.mInputBuffers = srcBuffers; @@ -514,7 +523,7 @@ void ProcessingUnit::handleRawReprocessing(CameraBufferPortMap* srcBuffers, // Return opaque RAW buffer for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(rawPort, rawOutputBuffer); + it->onBufferAvailable(rawPort, rawOutputBuffer); } // Remove input stream from dstBuffers map @@ -536,7 +545,7 @@ void ProcessingUnit::handleRawReprocessing(CameraBufferPortMap* srcBuffers, // Return opaque RAW buffer for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(rawPort, rawOutputBuffer); + it->onBufferAvailable(rawPort, rawOutputBuffer); } *hasRawOutput = true; @@ -590,7 +599,7 @@ void ProcessingUnit::returnRawBuffer() { AutoMutex lock(mBufferMapLock); // If too many buffers are holden in mRawQueue, return back to producer if (mRawBufferMap.size() > (PlatformData::getMaxRawDataNum(mCameraId) - - PlatformData::getMaxRequestsInHAL(mCameraId))) { + PlatformData::getMaxPipelineDepth(mCameraId))) { auto it = mRawBufferMap.cbegin(); { AutoMutex l(mBufferQueueLock); @@ -756,7 +765,7 @@ status_t ProcessingUnit::prepareTask(CameraBufferPortMap* srcBuffers, return OK; } -void ProcessingUnit::extractZslInfo(CameraBufferPortMap* dstBuffers, bool& reprocess, +void ProcessingUnit::extractZslInfo(const CameraBufferPortMap* dstBuffers, bool& reprocess, CameraBufferPortMap& videoBuf, CameraBufferPortMap& stillBuf, int64_t& zslSequence) { for (const auto& item : *dstBuffers) { @@ -894,11 +903,11 @@ void ProcessingUnit::dispatchTask(CameraBufferPortMap& inBuf, CameraBufferPortMa { std::unique_lock lock(mBufferQueueLock); mSequencesInflight.insert(currentSequence); + LOG2("@%s, fake task %d, pending task: %zu", mCameraId, currentSequence, + __func__, fakeTask, mSequencesInflight.size()); } // End of lock mBufferQueueLock - LOG2("@%s, fake task %d, pending task: %zu", mCameraId, currentSequence, __func__, - fakeTask, mSequencesInflight.size()); - // Prepare the task input paramerters including input and output buffers, settings etc. + // Prepare the task input parameters including input and output buffers, settings etc. PipeTaskData taskParam; taskParam.mTuningMode = mTuningMode; taskParam.mInputBuffers = inBuf; @@ -944,7 +953,7 @@ void ProcessingUnit::onBufferDone(int64_t sequence, uuid port, if (!needSkipOutputFrame(sequence)) { for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(port, camBuffer); + it->onBufferAvailable(port, camBuffer); } } } @@ -1004,13 +1013,13 @@ void ProcessingUnit::onTaskDone(const PipeTaskData& result) { if (result.mYuvTask) { auto iter = result.mInputBuffers.find(YUV_REPROCESSING_INPUT_PORT_ID); if (iter == result.mInputBuffers.end()) { - LOGW("@%s can't find YUV reprocesing input buffer", + LOGW("@%s can't find YUV reprocessing input buffer", mCameraId, sequence, __func__); return; } // Return YUV reprocessing input buffer for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(YUV_REPROCESSING_INPUT_PORT_ID, iter->second); + it->onBufferAvailable(YUV_REPROCESSING_INPUT_PORT_ID, iter->second); } return; } @@ -1032,7 +1041,7 @@ void ProcessingUnit::onTaskDone(const PipeTaskData& result) { if ((src.second->getStreamUsage() != CAMERA_STREAM_OPAQUE_RAW) && (src.second->getStreamType() == CAMERA_STREAM_INPUT)) { for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(src.first, src.second); + it->onBufferAvailable(src.first, src.second); } } else { mBufferProducer->qbuf(src.first, src.second); @@ -1073,7 +1082,7 @@ void ProcessingUnit::outputRawImage(shared_ptr& srcBuf, // Send output buffer to its consumer for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(mRawPort, dstBuf); + it->onBufferAvailable(mRawPort, dstBuf); } } } // namespace icamera diff --git a/src/core/ProcessingUnit.h b/src/core/ProcessingUnit.h index 4341d64..037dde8 100644 --- a/src/core/ProcessingUnit.h +++ b/src/core/ProcessingUnit.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef PROCESSING_UNIT_H -#define PROCESSING_UNIT_H - +#pragma once #include #include @@ -58,7 +56,7 @@ class ProcessingUnit : public IProcessingUnit, public PipeManagerCallback { DISALLOW_COPY_AND_ASSIGN(ProcessingUnit); private: - int processNewFrame(); + virtual int processNewFrame(); std::shared_ptr allocStatsBuffer(int index); status_t prepareTask(CameraBufferPortMap* srcBuffers, CameraBufferPortMap* dstBuffers); @@ -73,7 +71,7 @@ class ProcessingUnit : public IProcessingUnit, public PipeManagerCallback { void outputRawImage(std::shared_ptr& srcBuf, std::shared_ptr& dstBuf); - status_t handleYuvReprocessing(CameraBufferPortMap* buffersMap); + status_t handleYuvReprocessing(const CameraBufferPortMap* buffersMap); void handleRawReprocessing(CameraBufferPortMap* srcBuffers, CameraBufferPortMap* dstBuffers, bool* allBufDone, bool* hasRawOutput, bool* hasRawInput); bool isBufferHoldForRawReprocess(int64_t sequence); @@ -88,7 +86,7 @@ class ProcessingUnit : public IProcessingUnit, public PipeManagerCallback { void handleExtraTasksForTnr(int64_t sequence, CameraBufferPortMap* dstBuffers, const AiqResult* aiqResult); - void extractZslInfo(CameraBufferPortMap* dstBuffers, bool& reprocess, + void extractZslInfo(const CameraBufferPortMap* dstBuffers, bool& reprocess, CameraBufferPortMap& videoBuf, CameraBufferPortMap& stillBuf, int64_t& zslSequence); void handleZslReprocessing(int64_t sequence, const CameraBufferPortMap& videoBuf, @@ -142,4 +140,3 @@ class ProcessingUnit : public IProcessingUnit, public PipeManagerCallback { } // namespace icamera -#endif // PROCESSING_UNIT_H diff --git a/src/core/RequestThread.cpp b/src/core/RequestThread.cpp index 656b25f..ebf1308 100644 --- a/src/core/RequestThread.cpp +++ b/src/core/RequestThread.cpp @@ -186,7 +186,7 @@ int RequestThread::processRequest(int bufferNum, camera_buffer_t **ubuffer) { mState = PROCESSING; } - mRequestTriggerEvent |= NEW_REQUEST; + mRequestTriggerEvent |= static_cast(NEW_REQUEST); mRequestSignal.notify_one(); return OK; } @@ -257,7 +257,7 @@ void RequestThread::handleEvent(EventData eventData) { } // Just in case too many requests are pending in mPendingRequests. if (!mPendingRequests.empty()) { - mRequestTriggerEvent |= NEW_FRAME; + mRequestTriggerEvent |= static_cast(NEW_FRAME); mRequestSignal.notify_one(); } } @@ -269,7 +269,7 @@ void RequestThread::handleEvent(EventData eventData) { if (mBlockRequest) { mBlockRequest = false; } - mRequestTriggerEvent |= NEW_STATS; + mRequestTriggerEvent |= static_cast(NEW_STATS); mRequestSignal.notify_one(); } break; @@ -277,7 +277,7 @@ void RequestThread::handleEvent(EventData eventData) { { AutoMutex l(mPendingReqLock); mLastSofSeq = eventData.data.sync.sequence; - mRequestTriggerEvent |= NEW_SOF; + mRequestTriggerEvent |= static_cast(NEW_SOF); mRequestSignal.notify_one(); } break; @@ -309,7 +309,7 @@ void RequestThread::handleEvent(EventData eventData) { fakeRequest.mBuffer[0] = &mFakeReqBuf; mFakeReqBuf.sequence = -1; mPendingRequests.push_back(fakeRequest); - mRequestTriggerEvent |= NEW_REQUEST; + mRequestTriggerEvent |= static_cast(NEW_REQUEST); mRequestSignal.notify_one(); } } @@ -358,7 +358,7 @@ bool RequestThread::threadLoop() { if (blockRequest()) { LOG2("Pending request processing, mBlockRequest %d, Req in processing %d", mBlockRequest, mRequestsInProcessing); - mRequestTriggerEvent = NONE_EVENT; + mRequestTriggerEvent = static_cast(NONE_EVENT); return true; } } @@ -375,17 +375,18 @@ bool RequestThread::threadLoop() { } else if (((mRequestTriggerEvent & static_cast(NEW_STATS)) != 0U) && (mLastSofSeq >= mLastAppliedSeq)) { applyingSeq = mLastSofSeq + 1; - } else if (((mRequestTriggerEvent & (NEW_REQUEST | NEW_FRAME)) != 0U) && + } else if (((mRequestTriggerEvent & (static_cast(NEW_REQUEST) + | static_cast(NEW_FRAME))) != 0U) && (mRequestsInProcessing == 0U)) { applyingSeq = mLastSofSeq + 1; } else { - mRequestTriggerEvent = NONE_EVENT; + mRequestTriggerEvent = static_cast(NONE_EVENT); return true; } mLastAppliedSeq = applyingSeq; if ((mLastAppliedSeq + PlatformData::getExposureLag(mCameraId)) <= mLastEffectSeq) { - mRequestTriggerEvent = NONE_EVENT; + mRequestTriggerEvent = static_cast(NONE_EVENT); LOG2("%s, skip processing request for AE delay issue", __func__); return true; } @@ -404,14 +405,18 @@ bool RequestThread::threadLoop() { handleRequest(request, applyingSeq); { AutoMutex l(mPendingReqLock); - mRequestTriggerEvent = NONE_EVENT; + mRequestTriggerEvent = static_cast(NONE_EVENT); } } return true; } void RequestThread::handleRequest(CameraRequest& request, int64_t applyingSeq) { - int64_t effectSeq = mLastEffectSeq + 1; + int64_t effectSeq = 0; + { + std::lock_guard l(mPendingReqLock); + effectSeq = mLastEffectSeq + 1; + } // Reprocessing case, don't run 3A. if (IS_INPUT_BUFFER(request.mBuffer[0]->timestamp, request.mBuffer[0]->sequence)) { effectSeq = request.mBuffer[0]->sequence; @@ -422,7 +427,8 @@ void RequestThread::handleRequest(CameraRequest& request, int64_t applyingSeq) { { AutoMutex l(mPendingReqLock); if (mState != EXIT) { - ccaId = ++mLastCcaId; + ++mLastCcaId; + ccaId = mLastCcaId; } } diff --git a/src/core/RequestThread.h b/src/core/RequestThread.h index ca285fb..8a6e028 100644 --- a/src/core/RequestThread.h +++ b/src/core/RequestThread.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef REQUEST_THREAD_H -#define REQUEST_THREAD_H - +#pragma once #include #include #include @@ -38,7 +36,7 @@ class RequestThread : public Thread, public EventSource, public EventListener { void requestStart(); void requestStop(); - void handleEvent(EventData eventData); + virtual void handleEvent(EventData eventData); /** * \Clear pending requests. @@ -67,13 +65,13 @@ class RequestThread : public Thread, public EventSource, public EventListener { int configure(const stream_config_t *streamList); private: - void run() { + virtual void run() { bool ret = true; while (ret) { ret = threadLoop(); } } - bool threadLoop(); + virtual bool threadLoop(); int mCameraId; AiqUnitBase *m3AControl; @@ -149,4 +147,3 @@ class RequestThread : public Thread, public EventSource, public EventListener { } //namespace icamera -#endif // REQUEST_THREAD_H diff --git a/src/core/SensorHwCtrl.cpp b/src/core/SensorHwCtrl.cpp index 369566c..65d26b7 100644 --- a/src/core/SensorHwCtrl.cpp +++ b/src/core/SensorHwCtrl.cpp @@ -163,7 +163,10 @@ int SensorHwCtrl::setExposure(const vector& coarseExposures, LOG2("%s coarseExposure=%d fineExposure=%d", __func__, coarseExposures[0], fineExposures[0]); LOG2("SENSORCTRLINFO: exposure_value=%d", coarseExposures[0]); - return mPixelArraySubdev->SetControl(V4L2_CID_EXPOSURE, coarseExposures[0]); + int status = mPixelArraySubdev->SetControl(V4L2_CID_EXPOSURE, coarseExposures[0]); + CheckAndLogError((status != 0), status, "failed to set exposure %d.", coarseExposures[0]); + + return OK; } // CRL_MODULE_S @@ -230,7 +233,7 @@ int SensorHwCtrl::setAnalogGains(const vector& analogGains) { // CRL_MODULE_S if (analogGains.size() > 1) { - if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_CONVERTION_AG) { + if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_CONVERSION_AG) { return setConversionGain(analogGains); } else if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_DIRECT_AG) { LOG2("sensor multi conversion gain"); @@ -240,7 +243,10 @@ int SensorHwCtrl::setAnalogGains(const vector& analogGains) { // CRL_MODULE_E LOG2("%s analogGain=%d", __func__, analogGains[0]); - return mPixelArraySubdev->SetControl(V4L2_CID_ANALOGUE_GAIN, analogGains[0]); + int status = mPixelArraySubdev->SetControl(V4L2_CID_ANALOGUE_GAIN, analogGains[0]); + CheckAndLogError((status != 0), status, "failed to set analog gain %d.", analogGains[0]); + + return OK; } int SensorHwCtrl::setDigitalGains(const vector& digitalGains) { @@ -250,7 +256,7 @@ int SensorHwCtrl::setDigitalGains(const vector& digitalGains) { // CRL_MODULE_S if (digitalGains.size() > 1) { - if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_CONVERTION_AG) { + if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_CONVERSION_AG) { return setMultiDigitalGain(digitalGains); } else if (PlatformData::getSensorGainType(mCameraId) == SENSOR_MULTI_DG_AND_DIRECT_AG) { LOG2("sensor multi conversion gain"); @@ -269,7 +275,10 @@ int SensorHwCtrl::setDigitalGains(const vector& digitalGains) { // CRL_MODULE_E LOG2("%s digitalGain=%d", __func__, digitalGains[0]); - return mPixelArraySubdev->SetControl(V4L2_CID_DIGITAL_GAIN, digitalGains[0]); + int status = mPixelArraySubdev->SetControl(V4L2_CID_DIGITAL_GAIN, digitalGains[0]); + CheckAndLogError((status != 0), status, "failed to set digitalGain gain %d.", digitalGains[0]); + + return OK; } // CRL_MODULE_S @@ -390,12 +399,12 @@ int SensorHwCtrl::setFrameLengthLines(int fll) { int SensorHwCtrl::setFrameDuration(int llp, int fll) { HAL_TRACE_CALL(CAMERA_DEBUG_LOG_LEVEL2); - CheckAndLogError(!mPixelArraySubdev, NO_INIT, "pixel array sub device is not set"); + CheckAndLogError(mPixelArraySubdev == nullptr, NO_INIT, "pixel array sub device is not set"); LOG2("@%s, llp:%d, fll:%d", __func__, llp, fll); /* only set them to driver when llp or fll is not 0 */ if (llp != 0) { - (void)setLineLengthPixels(llp); + (void)setLineLengthPixels(llp); } if (fll != 0) { diff --git a/src/core/SensorHwCtrl.h b/src/core/SensorHwCtrl.h index 70adb69..1963eb3 100644 --- a/src/core/SensorHwCtrl.h +++ b/src/core/SensorHwCtrl.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef SENSOR_HW_CTRL_H -#define SENSOR_HW_CTRL_H - +#pragma once #include #include @@ -122,28 +120,27 @@ class DummySensor : public SensorHwCtrl { DummySensor(int cameraId) : SensorHwCtrl(cameraId, nullptr, nullptr) {} ~DummySensor() {} - int setTestPatternMode(int32_t testPatternMode) { return OK; } + virtual int setTestPatternMode(int32_t testPatternMode) { return OK; } int setDevice(V4L2Subdevice* pixelArraySubdev) { return OK; } - int getPixelRate(int& pixelRate) { return OK; } - int setExposure(const std::vector& coarseExposures, + virtual int getPixelRate(int& pixelRate) { return OK; } + virtual int setExposure(const std::vector& coarseExposures, const std::vector& fineExposures) { return OK; } - int setAnalogGains(const std::vector& analogGains) { return OK; } - int setDigitalGains(const std::vector& digitalGains) { return OK; } - int setFrameDuration(int llp, int fll) { return OK; } - int getFrameDuration(int& llp, int& fll) { return OK; } - int getVBlank(int& vblank) { return OK; } - int getActivePixelArraySize(int& width, int& height, int& code) { return OK; } - int getExposureRange(int& exposureMin, int& exposureMax, int& exposureStep) { return OK; } + virtual int setAnalogGains(const std::vector& analogGains) { return OK; } + virtual int setDigitalGains(const std::vector& digitalGains) { return OK; } + virtual int setFrameDuration(int llp, int fll) { return OK; } + virtual int getFrameDuration(int& llp, int& fll) { return OK; } + virtual int getVBlank(int& vblank) { return OK; } + virtual int getActivePixelArraySize(int& width, int& height, int& code) { return OK; } + virtual int getExposureRange(int& exposureMin, int& exposureMax, int& exposureStep) { return OK; } // HDR_FEATURE_S - int setWdrMode(int mode) { return OK; } + virtual int setWdrMode(int mode) { return OK; } // HDR_FEATURE_E // CRL_MODULE_S - int setFrameRate(float fps) { return OK; } + virtual int setFrameRate(float fps) { return OK; } // CRL_MODULE_E }; } // namespace icamera -#endif // SENSOR_HW_CTRL_H diff --git a/src/core/SofSource.h b/src/core/SofSource.h index ad76fa8..62150ef 100644 --- a/src/core/SofSource.h +++ b/src/core/SofSource.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef SOF_SOURCE_H -#define SOF_SOURCE_H - +#pragma once #include #include @@ -51,4 +49,3 @@ class SofSource : public EventSource { } // namespace icamera -#endif // SOF_SOURCE_H diff --git a/src/core/SwImageProcessor.cpp b/src/core/SwImageProcessor.cpp index de28ad7..811ba85 100644 --- a/src/core/SwImageProcessor.cpp +++ b/src/core/SwImageProcessor.cpp @@ -131,7 +131,7 @@ int SwImageProcessor::processNewFrame() { static_cast(cInBuffer->getBufferAddr()), cInBuffer->getBufferSize(), cInBuffer->getFormat(), static_cast(cOutBuffer->getBufferAddr()), cOutBuffer->getBufferSize(), cOutBuffer->getFormat()); - CheckAndLogError((ret < 0), ret, "format convertion failed with %d", ret); + CheckAndLogError((ret < 0), ret, "format conversion failed with %d", ret); if (CameraDump::isDumpTypeEnable(DUMP_SW_IMG_PROC_OUTPUT)) { CameraDump::dumpImage(mCameraId, cOutBuffer, M_SWIPOP); @@ -142,7 +142,7 @@ int SwImageProcessor::processNewFrame() { // Notify listener: No lock here: mBufferConsumerList will not updated in this state for (auto& it : BufferQueue::mBufferConsumerList) { - it->onFrameAvailable(port, cOutBuffer); + it->onBufferAvailable(port, cOutBuffer); } } diff --git a/src/core/SwImageProcessor.h b/src/core/SwImageProcessor.h index d2c5d4d..0ac6738 100644 --- a/src/core/SwImageProcessor.h +++ b/src/core/SwImageProcessor.h @@ -14,15 +14,13 @@ * limitations under the License. */ -#ifndef SW_IMAGE_PROCESSOR_H -#define SW_IMAGE_PROCESSOR_H - +#pragma once #include "IProcessingUnit.h" namespace icamera { /** - * SwImageProcessor runs the Image Process Alogirhtm in the CPU. + * SwImageProcessor runs the Image Process Algorithm in the CPU. * It implements the BufferConsumer and BufferProducer Interface * This class is for debug purpose when the PsysProcess is not ready. */ @@ -38,7 +36,7 @@ class SwImageProcessor: public IProcessingUnit { virtual void stop(); private: - int processNewFrame(); + virtual int processNewFrame(); private: int mCameraId; @@ -46,4 +44,3 @@ class SwImageProcessor: public IProcessingUnit { } //namespace icamera -#endif // SW_IMAGE_PROCESSOR_H diff --git a/src/core/SyncManager.cpp b/src/core/SyncManager.cpp deleted file mode 100644 index 1108ba0..0000000 --- a/src/core/SyncManager.cpp +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (C) 2018-2025 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG SyncManager - -#include "SyncManager.h" - -#include -#include - -#include "iutils/CameraLog.h" - -namespace icamera { -SyncManager* SyncManager::sInstance = nullptr; -Mutex SyncManager::sLock; - -#define SEC_TO_MS(sec) ((sec) * (1000)) -#define USEC_TO_MS(usec) ((usec) / (1000)) - -const int32_t max_vc_sync_count = 128; - -SyncManager* SyncManager::getInstance() { - AutoMutex lock(sLock); - if (sInstance == nullptr) { - sInstance = new SyncManager(); - } - - return sInstance; -} - -void SyncManager::releaseInstance() { - AutoMutex lock(sLock); - - if (sInstance != nullptr) { - delete sInstance; - sInstance = nullptr; - } -} - -SyncManager::SyncManager() { - LOG1("@%s", __func__); - AutoMutex lock(mLock); - for (int i = 0; i < MAX_CAMERA_NUMBER; i++) { - for (int j = 0; j < MAX_BUFFER_COUNT; j++) { - mCameraBufInfo[i][j].sequence = -1; - CLEAR(mCameraBufInfo[i][j].sof_ts); - } - } - - mTotalSyncCamNum = 0; - for (int i = 0; i < MAX_CAMERA_NUMBER; i++) mVcSyncCount[i] = 0; -} - -SyncManager::~SyncManager() { - LOG1("@%s", __func__); -} - -bool SyncManager::isSynced(int cameraId, int64_t sequence) { - LOG2("@%s", __func__); - const int TIME_DIFF_MS = 2; - bool sync = true; - const int index = sequence % MAX_BUFFER_COUNT; - - AutoMutex lock(mLock); - camera_buf_info bufInfo = mCameraBufInfo[cameraId][index]; - - int syncNum = 0; - bool isSync[MAX_CAMERA_NUMBER]; - long frameSyncedMs[MAX_CAMERA_NUMBER]; - const long curFrameMs = USEC_TO_MS(bufInfo.sof_ts.tv_usec) + SEC_TO_MS(bufInfo.sof_ts.tv_sec); - - // first step: To check whether the current frame is synced with others camera channel - // if timestamp difference <= 2ms, then think the frame is synced - for (int i = 0; i < MAX_CAMERA_NUMBER; i++) { - isSync[i] = false; - frameSyncedMs[i] = 0; - if ((mCameraBufInfo[i][0].sequence == -1) || (i == cameraId)) { - continue; - } - for (int j = 0; j < MAX_BUFFER_COUNT; j++) { - if (mCameraBufInfo[i][j].sequence >= 0) { - camera_buf_info& temp = mCameraBufInfo[i][j]; - const long tempFrameMs = - USEC_TO_MS(temp.sof_ts.tv_usec) + SEC_TO_MS(temp.sof_ts.tv_sec); - if (abs(tempFrameMs - curFrameMs) <= TIME_DIFF_MS) { - isSync[syncNum] = true; - frameSyncedMs[syncNum] = tempFrameMs; - syncNum++; - break; - } - } - } - } - // second step: if current frame is synced with frames from other cameraID, - // to check whether other 3 channel frames synced or not - if (syncNum >= mTotalSyncCamNum - 1) { - for (int i = 0; i < mTotalSyncCamNum - 1; i++) { - if (isSync[i]) { - if ((i + 1 < mTotalSyncCamNum - 1) && - abs(frameSyncedMs[i] - frameSyncedMs[i + 1]) <= TIME_DIFF_MS) { - sync &= true; - } else if ((i + 1 == mTotalSyncCamNum - 1) && - abs(frameSyncedMs[i] - frameSyncedMs[0]) <= TIME_DIFF_MS) { - sync &= true; - } else { - sync &= false; - } - } - } - } else { - sync = false; - } - LOG2("Id:%d, sof_ts:%ldms, sequence:%ld sync %d", cameraId, curFrameMs, sequence, sync); - return sync; -} - -void SyncManager::updateCameraBufInfo(int cameraId, camera_buf_info* info) { - LOG2("@%s", __func__); - const int index = info->sequence % MAX_BUFFER_COUNT; - AutoMutex lock(mLock); - mCameraBufInfo[cameraId][index] = *info; -} - -void SyncManager::updateSyncCamNum() { - AutoMutex l(mLock); - CheckAndLogError(mTotalSyncCamNum >= MAX_CAMERA_NUMBER, VOID_VALUE, "Too many cameras"); - mTotalSyncCamNum++; -} - -bool SyncManager::vcSynced(int vc) { - CheckAndLogError(vc >= MAX_CAMERA_NUMBER, false, "vc %d error", vc); - - AutoMutex l(mVcSyncLock); - int count = mVcSyncCount[vc]; - int minCount = INT_MAX; - int maxCount = 0; - - for (int i = 0; i < mTotalSyncCamNum; i++) { - minCount = std::min(minCount, mVcSyncCount[i]); - maxCount = std::max(maxCount, mVcSyncCount[i]); - } - - // Check again if status is circling back to 0. - // Most of time handling code won't be executed because condition is false. - if (maxCount - minCount > max_vc_sync_count / 2) { - minCount = max_vc_sync_count; - maxCount = 0; - for (int i = 0; i < mTotalSyncCamNum; i++) { - count = - (mVcSyncCount[i] + max_vc_sync_count) % (max_vc_sync_count + max_vc_sync_count / 4); - minCount = std::min(minCount, count); - maxCount = std::max(maxCount, count); - } - count = - (mVcSyncCount[vc] + max_vc_sync_count) % (max_vc_sync_count + max_vc_sync_count / 4); - } - - if (count > minCount) { - LOG2("vc %d ready: false", vc); - return false; - } - - return true; -} - -void SyncManager::updateVcSyncCount(int vc) { - CheckAndLogError(vc >= MAX_CAMERA_NUMBER, VOID_VALUE, "vc %d error", vc); - AutoMutex l(mVcSyncLock); - mVcSyncCount[vc] = (mVcSyncCount[vc] + 1) % (max_vc_sync_count + 1); -} - -void SyncManager::printVcSyncCount(void) { - AutoMutex l(mVcSyncLock); - for (int i = 0; i < mTotalSyncCamNum; i++) LOG2("[%d]", mVcSyncCount[i]); -} - -} // namespace icamera diff --git a/src/core/SyncManager.h b/src/core/SyncManager.h deleted file mode 100644 index 7f58189..0000000 --- a/src/core/SyncManager.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2018-2025 Intel Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYNC_MANAGER_H -#define SYNC_MANAGER_H - -#include "PlatformData.h" - -namespace icamera { - -struct camera_buf_info { - int64_t sequence; - struct timeval sof_ts; -}; - -class SyncManager { - private: - // Prevent to create multiple instances - SyncManager(); - ~SyncManager(); - - public: - /** - * releaseInstance - * This function must be called when the hal is destroyed. - */ - static void releaseInstance(); - static SyncManager* getInstance(); - - bool isSynced(int cameraId, int64_t sequence); - void updateCameraBufInfo(int cameraId, camera_buf_info* info); - - void updateSyncCamNum(); - - bool vcSynced(int vc); - void updateVcSyncCount(int vc); - void printVcSyncCount(); - - private: - static SyncManager* sInstance; - static Mutex sLock; - Mutex mLock; - struct camera_buf_info mCameraBufInfo[MAX_CAMERA_NUMBER][MAX_BUFFER_COUNT]; - - int mVcSyncCount[MAX_CAMERA_NUMBER]; - Mutex mVcSyncLock; - int mTotalSyncCamNum; -}; - -} /* namespace icamera */ - -#endif // SYNC_MANAGER_H diff --git a/src/core/processingUnit/CBStage.cpp b/src/core/processingUnit/CBStage.cpp index 4b7db97..7375181 100644 --- a/src/core/processingUnit/CBStage.cpp +++ b/src/core/processingUnit/CBStage.cpp @@ -64,7 +64,7 @@ int CBStage::init() { CheckAndLogError(ret != OK, ret, "Failed to get payload descriptor"); ret = CBLayoutUtils::getCbTerminalDescriptors(mResourceId, sTerminalDesc, mTerminalDescCount); - CheckAndLogError(ret != OK, ret, "Failded to get terminal descriptor"); + CheckAndLogError(ret != OK, ret, "Failed to get terminal descriptor"); // Use share memory buffers for sandboxing const size_t size = diff --git a/src/core/processingUnit/FaceStage.cpp b/src/core/processingUnit/FaceStage.cpp old mode 100644 new mode 100755 index c176913..4afdc56 --- a/src/core/processingUnit/FaceStage.cpp +++ b/src/core/processingUnit/FaceStage.cpp @@ -29,7 +29,6 @@ FaceStage::FaceStage(int cameraId, int streamId, const stream_t& stream, bool is : CameraStream(cameraId, streamId, stream), ISchedulerNode("face"), mStreamInfo(stream), - mInternalBufferPool(nullptr), mIsPrivate(isPrivate), mFaceDetection(nullptr) { LOG1("%s, mIsPrivate: %d, width: %d, height: %d", __func__, mIsPrivate, @@ -38,10 +37,20 @@ FaceStage::FaceStage(int cameraId, int streamId, const stream_t& stream, bool is mFaceDetection = std::unique_ptr( IFaceDetection::createFaceDetection(mCameraId, stream.width, stream.height)); - if (mIsPrivate || (!mIsPrivate && !PlatformData::runFaceWithSyncMode(mCameraId))) { - mInternalBufferPool = std::unique_ptr(new CameraBufferPool()); - mStreamInfo.memType = mFaceDetection->getMemoryType(); - mInternalBufferPool->createBufferPool(mCameraId, MAX_BUFFER_COUNT, mStreamInfo); + if (mIsPrivate || !PlatformData::runFaceWithSyncMode(mCameraId)) { + for (int i = 0; i < MAX_BUFFER_COUNT; i++) { + std::shared_ptr buffer = CameraBuffer::create( + mFaceDetection->getMemoryType(), stream.size, i, stream.format, stream.width, + stream.height); + if (buffer == nullptr) { + while (mAvailableBufferQ.empty() == false) { + mAvailableBufferQ.pop(); + } + LOGE("failed to alloc %d internal buffers", i); + break; + } + mAvailableBufferQ.push(buffer); + } } } @@ -52,14 +61,23 @@ FaceStage::~FaceStage() { int FaceStage::start() { LOG1("@%s, %p, mIsPrivate: %d", mCameraId, __func__, this, mIsPrivate); + if ((mIsPrivate || !PlatformData::runFaceWithSyncMode(mCameraId))) { + if (mAvailableBufferQ.empty()) { + return NO_MEMORY; + } + } + return OK; } int FaceStage::stop() { CameraStream::stop(); - if (mInternalBufferPool) { - mInternalBufferPool->destroyBufferPool(); + while (mPendingBufferQ.empty() == false) { + const auto buffer = mPendingBufferQ.front(); + mPendingBufferQ.pop(); + + mAvailableBufferQ.push(buffer); } return OK; @@ -74,11 +92,11 @@ int FaceStage::qbuf(camera_buffer_t* ubuffer, int64_t sequence, bool addExtraBuf if (mIsPrivate) { shared_ptr camBuffer = nullptr; if (addExtraBuf) { + AutoMutex l(mBufferPoolLock); // use the internal buffer pool for private stream - CheckAndLogError(!mInternalBufferPool, ret, "no buffer pool for private stream"); + CheckAndLogError(mAvailableBufferQ.empty(), ret, "no buffer pool for private stream"); - camBuffer = mInternalBufferPool->acquireBuffer(); - CheckAndLogError(!camBuffer, ret, "%s, No available internal buffer", __func__); + camBuffer = mAvailableBufferQ.front(); LOG2("@%s, mStreamId:%d, CameraBuffer:%p for port:%d, addr:%p", mCameraId, sequence, __func__, mStreamId, camBuffer.get(), mPort, camBuffer->getBufferAddr()); @@ -94,6 +112,8 @@ int FaceStage::qbuf(camera_buffer_t* ubuffer, int64_t sequence, bool addExtraBuf ret = mBufferProducer->qbuf(mPort, camBuffer); if (ret == OK) { AutoMutex l(mBufferPoolLock); + mAvailableBufferQ.pop(); + mBufferInProcessing++; LOG2("%s, mIsPrivate: %d, buffer in processing: %d", __func__, mIsPrivate, mBufferInProcessing); @@ -107,24 +127,6 @@ int FaceStage::qbuf(camera_buffer_t* ubuffer, int64_t sequence, bool addExtraBuf return ret; } -shared_ptr FaceStage::copyToInternalBuffer( - const shared_ptr& camBuffer) { - CheckAndLogError(!mInternalBufferPool, nullptr, - "%s, no buffer pool for face detection", __func__); - - shared_ptr faceBuffer = mInternalBufferPool->acquireBuffer(); - CheckAndLogError(!faceBuffer, nullptr, "%s, No available internal buffer", __func__); - - CameraBufferMapper mapper(camBuffer); - CheckAndLogError(!camBuffer->getBufferAddr(), nullptr, - "%s, Failed to get addr for camBuffer", __func__); - - MEMCPY_S(faceBuffer->getBufferAddr(), faceBuffer->getBufferSize(), - camBuffer->getBufferAddr(), camBuffer->getBufferSize()); - - return faceBuffer; -} - bool FaceStage::isFaceEnabled(int64_t sequence) { auto cameraContext = CameraContext::getInstance(mCameraId); auto dataContext = cameraContext->getDataContextBySeq(sequence); @@ -135,7 +137,7 @@ bool FaceStage::isFaceEnabled(int64_t sequence) { return false; } -int FaceStage::onFrameAvailable(uuid port, const shared_ptr& camBuffer) { +int FaceStage::onBufferAvailable(uuid port, const shared_ptr& camBuffer) { // Ignore if the buffer is not for this stream. if (mPort != port) { return OK; @@ -162,9 +164,7 @@ int FaceStage::onFrameAvailable(uuid port, const shared_ptr& camBu if (this->mBufferInProcessing > 0) { this->mBufferInProcessing--; } - if (mInternalBufferPool != nullptr) { - mInternalBufferPool->returnBuffer(camBuffer); - } + mAvailableBufferQ.push(camBuffer); } else { if (isFaceEnabled(sequence) && mFaceDetection->needRunFace(sequence)) { if (PlatformData::runFaceWithSyncMode(mCameraId)) { @@ -175,14 +175,28 @@ int FaceStage::onFrameAvailable(uuid port, const shared_ptr& camBu LOG2("%s, run face with ASYNC mode. mIsPrivate: %d", sequence, __func__, mIsPrivate); - shared_ptr faceBuffer = copyToInternalBuffer(camBuffer); - CheckAndLogError(!faceBuffer, UNKNOWN_ERROR, - " %s, Failed to copy frame to internal buffer", __func__); + shared_ptr faceBuffer; + { + AutoMutex l(mBufferPoolLock); + CheckAndLogError(mAvailableBufferQ.empty(), NO_MEMORY, "No detection buffer"); + faceBuffer = mAvailableBufferQ.front(); + } + + CameraBufferMapper mapper(camBuffer); + CheckAndLogError(camBuffer->getBufferAddr() == nullptr, BAD_VALUE, + "%s, Failed to get addr for camBuffer", __func__); + + MEMCPY_S(faceBuffer->getBufferAddr(), faceBuffer->getBufferSize(), + camBuffer->getBufferAddr(), camBuffer->getBufferSize()); + + faceBuffer->setSequence(camBuffer->getSequence()); + AutoMutex l(mBufferPoolLock); + mAvailableBufferQ.pop(); mPendingBufferQ.push(faceBuffer); } } - CameraStream::onFrameAvailable(port, camBuffer); + CameraStream::onBufferAvailable(port, camBuffer); } return OK; } @@ -199,16 +213,14 @@ bool FaceStage::process(int64_t triggerId) { faceBuffer = mPendingBufferQ.front(); mPendingBufferQ.pop(); - if (mPendingBufferQ.size() > PlatformData::getMaxRequestsInHAL(mCameraId)) { + if (mPendingBufferQ.size() > PlatformData::getMaxPipelineDepth(mCameraId)) { LOG2("%s, Skip this time due to many buffer in pendding: %d", __func__, mPendingBufferQ.size()); if (mIsPrivate && this->mBufferInProcessing > 0) { this->mBufferInProcessing--; } - if (mInternalBufferPool != nullptr) { - mInternalBufferPool->returnBuffer(faceBuffer); - } + mAvailableBufferQ.push(faceBuffer); return true; } } @@ -222,9 +234,7 @@ bool FaceStage::process(int64_t triggerId) { if (mIsPrivate && this->mBufferInProcessing > 0) { this->mBufferInProcessing--; } - if (mInternalBufferPool != nullptr) { - mInternalBufferPool->returnBuffer(faceBuffer); - } + mAvailableBufferQ.push(faceBuffer); return true; } diff --git a/src/core/processingUnit/FaceStage.h b/src/core/processingUnit/FaceStage.h index 4be51db..b52bdc3 100644 --- a/src/core/processingUnit/FaceStage.h +++ b/src/core/processingUnit/FaceStage.h @@ -18,7 +18,6 @@ #include "CameraStream.h" #include "ISchedulerNode.h" -#include "CameraBufferPool.h" #include "IFaceDetection.h" #include "iutils/Errors.h" @@ -40,18 +39,16 @@ class FaceStage : public CameraStream, public ISchedulerNode { virtual int stop(); virtual int qbuf(camera_buffer_t* ubuffer, int64_t sequence, bool addExtraBuf = false); - virtual int onFrameAvailable(uuid port, const std::shared_ptr& camBuffer); + virtual int onBufferAvailable(uuid port, const std::shared_ptr& camBuffer); virtual bool process(int64_t triggerId); private: - std::shared_ptr copyToInternalBuffer( - const std::shared_ptr& camBuffer); bool isFaceEnabled(int64_t sequence); private: stream_t mStreamInfo; // The stream info for face detection // Maintains a internal buffer pool when face running in async and bind on preview stream - std::unique_ptr mInternalBufferPool; + CameraBufQ mAvailableBufferQ; // Store the pending buffers need to process // Use the mBufferPoolLock in base class to guard it diff --git a/src/core/processingUnit/GPUPostStage.cpp b/src/core/processingUnit/GPUPostStage.cpp index dead15f..d2db943 100644 --- a/src/core/processingUnit/GPUPostStage.cpp +++ b/src/core/processingUnit/GPUPostStage.cpp @@ -91,7 +91,7 @@ int GPUPostStage::qbuf(uuid port, const std::shared_ptr& camBuffer bool GPUPostStage::fetchRequestBuffer(int64_t sequence, std::shared_ptr& inBuffer) { CameraBufVector& bufV = mInternalBuffers[mInputPort]; - CheckAndLogError(bufV.empty(), false, "%s: queued %d, no avaiable buffer", getName(), + CheckAndLogError(bufV.empty(), false, "%s: queued %d, no available buffer", getName(), mQueuedInputBuffers.size()); inBuffer = bufV.back(); bufV.pop_back(); diff --git a/src/core/processingUnit/IPipeManagerFactory.h b/src/core/processingUnit/IPipeManagerFactory.h index e4327c4..619fd5e 100644 --- a/src/core/processingUnit/IPipeManagerFactory.h +++ b/src/core/processingUnit/IPipeManagerFactory.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef I_PIPE_MANAGER_FACTORY -#define I_PIPE_MANAGER_FACTORY +#pragma once #include "IPipeManager.h" #include "CameraScheduler.h" @@ -29,7 +28,7 @@ namespace icamera { class IPipeManagerFactory { public: /** - * \brief Select the IPipeManager accroding to config + * \brief Select the IPipeManager according to config * * \param cameraId: the camera id * \param PipeManagerCallback: the callback object @@ -40,5 +39,3 @@ class IPipeManagerFactory { std::shared_ptr& scheduler); }; } // namespace icamera - -#endif // I_PIPE_MANAGER_FACTORY diff --git a/src/core/processingUnit/PipeLine.cpp b/src/core/processingUnit/PipeLine.cpp index d139ab7..9d47836 100644 --- a/src/core/processingUnit/PipeLine.cpp +++ b/src/core/processingUnit/PipeLine.cpp @@ -46,29 +46,38 @@ PipeLine::~PipeLine() { } } +void PipeLine::deinit() { + if (mPSysDevice != nullptr) { + mPSysDevice->deinit(); + } +} + void PipeLine::updateIspTuningMode(TuningMode tuningMode) { - if (PlatformData::supportUpdateTuning(mCameraId)) { - uint32_t ispTuningMode = 0; - auto ret = mGraphConfig->getIspTuningModeByStreamId(mStreamId, ispTuningMode); - if (ret == OK) { - ia_lard_input_params lardParam = { - IA_MKN_CHTOUL('D', 'F', 'L', 'T'), - IA_MKN_CHTOUL('D', 'F', 'L', 'T'), - ispTuningMode, - IA_MKN_CHTOUL('D', 'F', 'L', 'T'), - }; - cca::cca_nvm tmpNvm = {}; + if (!PlatformData::supportUpdateTuning(mCameraId)) { + return; + } - auto intelCca = IntelCca::getInstance(mCameraId, tuningMode); - CheckAndLogError(!intelCca, VOID_VALUE, "Failed to get IntelCca"); + uint32_t ispTuningMode = 0; + int ret = mGraphConfig->getIspTuningModeByStreamId(mStreamId, ispTuningMode); + CheckAndLogError(ret != OK, VOID_VALUE, "Failed to get tuning mode"); - ia_err iaErr = intelCca->updateTuning(cca::CCA_LARD_ISP, lardParam, tmpNvm, mStreamId); - CheckAndLogError(iaErr != ia_err_none, VOID_VALUE, "Failed to update tuning %u", - ispTuningMode); + uint32_t aiqMode = IA_MKN_CHTOUL('D', 'F', 'L', 'T'); + ia_lard_input_params lardParam = { + IA_MKN_CHTOUL('D', 'F', 'L', 'T'), + aiqMode, + ispTuningMode, + IA_MKN_CHTOUL('D', 'F', 'L', 'T'), + }; + cca::cca_nvm tmpNvm = {}; - LOG1("Update isp tuning mode %u, streamId %d", ispTuningMode, mStreamId); - } - } + IntelCca* intelCca = IntelCca::getInstance(mCameraId, tuningMode); + CheckAndLogError(!intelCca, VOID_VALUE, "Failed to get IntelCca"); + + ia_err iaErr = intelCca->updateTuning(cca::CCA_LARD_ISP, lardParam, tmpNvm, mStreamId); + CheckAndLogError(iaErr != ia_err_none, VOID_VALUE, "Failed to update tuning %u", + ispTuningMode); + + LOG1("Update isp tuning mode %u, streamId %d", ispTuningMode, mStreamId); } int PipeLine::configure(TuningMode tuningMode, IpuPacAdaptor* adaptor) { @@ -204,7 +213,7 @@ void PipeLine::releasePipeStage() { status_t PipeLine::createPipeStages() { std::map stages; status_t ret = mGraphConfig->getStagesByStreamId(mStreamId, &stages); - CheckAndLogError(ret != OK, ret, "%s: Get pipeStages from grpah failed", __func__); + CheckAndLogError(ret != OK, ret, "%s: Get pipeStages from graph failed", __func__); if (mPSysDevice) { delete mPSysDevice; diff --git a/src/core/processingUnit/PipeLine.h b/src/core/processingUnit/PipeLine.h index b61c47b..0f881f0 100644 --- a/src/core/processingUnit/PipeLine.h +++ b/src/core/processingUnit/PipeLine.h @@ -75,6 +75,8 @@ class PipeLine { PipeLine(int cameraId, int streamId, std::shared_ptr gc, std::shared_ptr scheduler); virtual ~PipeLine(); + + void deinit(); int configure(TuningMode tuningMode, IpuPacAdaptor* adaptor); int start(); int stop(); diff --git a/src/core/processingUnit/PipeManager.cpp b/src/core/processingUnit/PipeManager.cpp index 9abbf18..5307f1f 100644 --- a/src/core/processingUnit/PipeManager.cpp +++ b/src/core/processingUnit/PipeManager.cpp @@ -101,6 +101,7 @@ int PipeManager::stop() { for (auto& pipeLine : mPipeLines) { pipeLine.second->stop(); } + mPacAdaptor->clearAicResult(); return icamera::OK; } @@ -182,7 +183,7 @@ int PipeManager::bindExternalPorts( bool bind = false; auto frameInfo = inputFrameInfo.begin(); while (frameInfo != inputFrameInfo.end()) { - const bool match = isSameStreamConfig(portInfo.second, frameInfo->second, false); + bool match = isSameStreamConfig(portInfo.second, frameInfo->second, false); if (match) { PortMapping portMap; portMap.mPipeStage = pipeLine.second->getInput(); @@ -268,7 +269,7 @@ int PipeManager::bindYuvReprocessingPort(const std::map& yuvInpu std::map outputInfo; std::map inputInfo; - // YUV reporcessing pipe line has only one pipe stage + // YUV reprocessing pipe line has only one pipe stage IPipeStage* mPipeStage = mYuvPipeLine[YUV_REPROCESSING_STREAM_ID]->getInput(); mPipeStage->getFrameInfo(inputInfo, outputInfo); @@ -380,6 +381,7 @@ void PipeManager::releasePipeLines() { pipeLine.second->removeListener(EVENT_PSYS_STATS_BUF_READY, this); pipeLine.second->removeListener(EVENT_PSYS_STATS_SIS_BUF_READY, this); pipeLine.second->removeListener(EVENT_STAGE_BUF_READY, this); + pipeLine.second->deinit(); } mPipeLines.clear(); @@ -555,7 +557,7 @@ bool PipeManager::updateZoomSettings(const camera_zoom_region_t& zoom, PtzInfo* * --------------------- * | | | | * | | | | - * | | orignal | | + * | | original | | * | | | | * | | | | * |-------------------- @@ -564,7 +566,7 @@ bool PipeManager::updateZoomSettings(const camera_zoom_region_t& zoom, PtzInfo* // Increase h ptz->y -= (ptz->xSize - ptz->ySize) / 2; ptz->ySize = xSize; - // Check the boundry + // Check the boundary if (ptz->y < 0.0) { ptz->y = 0.0; } else { @@ -576,7 +578,7 @@ bool PipeManager::updateZoomSettings(const camera_zoom_region_t& zoom, PtzInfo* // Increase w ptz->x -= (ptz->ySize - ptz->xSize) / 2; ptz->xSize = ySize; - // Check the boundry + // Check the boundary if (ptz->x < 0.0) { ptz->x = 0.0; } else { @@ -630,7 +632,7 @@ void PipeManager::queueBuffers(const PipeTaskData& task, const std::vectorqueue input buffer for stream:%d stage uuid: %u, external:%d", sequence, inputMap.mStreamId, inputMap.mStagePort, inputFrame.first); - inputMap.mPipeStage->onFrameAvailable(inputMap.mStagePort, inputFrame.second); + inputMap.mPipeStage->onBufferAvailable(inputMap.mStagePort, inputFrame.second); } } } @@ -679,7 +681,8 @@ int PipeManager::onBufferDone(uuid port, const std::shared_ptr& bu // Check if buffer belongs to the task because input buffer maybe reused for (auto& buf : task.mTaskData.mOutputBuffers) { - if (buf.second && (buffer->getUserBuffer() == buf.second->getUserBuffer())) { + if ((buf.second != nullptr) && + (buffer->getUserBuffer() == buf.second->getUserBuffer())) { outputPort = buf.first; } } @@ -710,12 +713,12 @@ int PipeManager::onBufferDone(uuid port, const std::shared_ptr& bu return OK; } - if (mPMCallback) { + if (mPMCallback != nullptr) { // Return buffer mPMCallback->onBufferDone(sequence, outputPort, buffer); } - if (needReturn && mPMCallback) { + if (needReturn && (mPMCallback != nullptr)) { mPMCallback->onTaskDone(result); } @@ -745,6 +748,7 @@ void PipeManager::handleEvent(EventData eventData) { (void)onBufferDone(eventData.data.stageBufReady.uuid, eventData.buffer); break; default: + // Do not need to callback break; } } diff --git a/src/core/processingUnit/PipeManager.h b/src/core/processingUnit/PipeManager.h index 3b44b4f..60fdb54 100644 --- a/src/core/processingUnit/PipeManager.h +++ b/src/core/processingUnit/PipeManager.h @@ -53,9 +53,9 @@ class PipeManager : public IPipeManager { */ virtual void handleEvent(EventData eventData); // handle bufferDone - int onBufferDone(uuid port, const std::shared_ptr& camBuffer); + virtual int onBufferDone(uuid port, const std::shared_ptr& camBuffer); // metadata handler - void onMetadataReady(int64_t sequence); + virtual void onMetadataReady(int64_t sequence); public: /** diff --git a/src/core/processingUnit/PipeManagerStub.cpp b/src/core/processingUnit/PipeManagerStub.cpp index ec55638..929f358 100644 --- a/src/core/processingUnit/PipeManagerStub.cpp +++ b/src/core/processingUnit/PipeManagerStub.cpp @@ -281,7 +281,7 @@ int PipeManagerStub::processTask(const PipeTaskData& task) { static_cast(cInBuffer->getBufferAddr()), cInBuffer->getBufferSize(), cInBuffer->getFormat(), static_cast(mIntermBuffer->getBufferAddr()), mIntermBuffer->getBufferSize(), mIntermBuffer->getFormat()); - CheckAndLogError((ret < 0), ret, "format convertion failed with %d", ret); + CheckAndLogError((ret < 0), ret, "format conversion failed with %d", ret); } for (auto& outputFrame : task.mOutputBuffers) { if (outputFrame.second) { diff --git a/src/core/processingUnit/PostProcessStage.cpp b/src/core/processingUnit/PostProcessStage.cpp index d1444cb..7380738 100644 --- a/src/core/processingUnit/PostProcessStage.cpp +++ b/src/core/processingUnit/PostProcessStage.cpp @@ -122,7 +122,7 @@ bool PostProcessStage::fetchRequestBuffer(int64_t sequence, } CameraBufVector& bufV = mInternalBuffers[mInputPort]; - CheckAndLogError(bufV.empty(), false, "%s: queued %d, no avaiable buffer", getName(), + CheckAndLogError(bufV.empty(), false, "%s: queued %d, no available buffer", getName(), mQueuedInputBuffers.size()); inBuffer = bufV.back(); bufV.pop_back(); diff --git a/src/fd/FaceDetection.h b/src/fd/FaceDetection.h index 87dd832..3a03cbf 100644 --- a/src/fd/FaceDetection.h +++ b/src/fd/FaceDetection.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef FACE_DETECTION_H -#define FACE_DETECTION_H - +#pragma once #include #include "CameraBuffer.h" @@ -72,4 +70,3 @@ class FaceDetection { } // namespace icamera -#endif // FACE_DETECTION_H diff --git a/src/fd/IFaceDetection.cpp b/src/fd/IFaceDetection.cpp index 2760796..54f0c33 100644 --- a/src/fd/IFaceDetection.cpp +++ b/src/fd/IFaceDetection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,6 @@ #define LOG_TAG IFaceDetection #include "src/fd/IFaceDetection.h" -#include "FaceDetectionPVL.h" #include "FaceSSD.h" #include "PlatformData.h" #include "iutils/CameraLog.h" @@ -27,9 +26,7 @@ namespace icamera { FaceDetection* IFaceDetection::createFaceDetection(int cameraId, int width, int height) { FaceDetection* fd = nullptr; int fdVendor = PlatformData::faceEngineVendor(cameraId); - if (fdVendor == FACE_ENGINE_INTEL_PVL) { - fd = new FaceDetectionPVL(cameraId, width, height); - } else if (fdVendor == FACE_ENGINE_GOOGLE_FACESSD) { + if (fdVendor == FACE_ENGINE_GOOGLE_FACESSD) { fd = new FaceSSD(cameraId, width, height); } diff --git a/src/fd/facessd/CameraFaceDetection.cpp b/src/fd/facessd/CameraFaceDetection.cpp new file mode 100644 index 0000000..b43895b --- /dev/null +++ b/src/fd/facessd/CameraFaceDetection.cpp @@ -0,0 +1,174 @@ +/* + * Copyright (C) 2024 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG FaceSSD +#include "src/fd/facessd/CameraFaceDetection.h" + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "iutils/CameraLog.h" +#include "src/fd/facessd/CommonTypes.h" + +namespace icamera { + +namespace { + +constexpr int kImageSizeForDetection = 160; + +} // namespace + +// static +std::unique_ptr FaceDetector::Create() { + auto face_detector_handle = face_detector_create(); + + // store the model and anchor path + if (!face_detector_initialize(face_detector_handle)) { + LOGE("Failed to initialize FaceSSD detector"); + return nullptr; + } + return std::unique_ptr(new FaceDetector(face_detector_handle)); +} + +FaceDetector::~FaceDetector() { + face_detector_delete(face_detector_handle_); +} + +FaceDetector::FaceDetector(FaceDetectorHandle face_detector_handle) + : face_detector_handle_(face_detector_handle) {}; + +FaceDetectResult FaceDetector::Detect( + const uint8_t* buffer_addr, int input_stride, Size input_size, + std::optional active_sensor_array_size, + std::vector& faces) { + Size scaled_size = + (input_size.width > input_size.height) + ? Size(kImageSizeForDetection, + kImageSizeForDetection * input_size.height / input_size.width) + : Size(kImageSizeForDetection * input_size.width / input_size.height, + kImageSizeForDetection); + + PrepareBuffer(scaled_size); + + libyuv::ScalePlane(buffer_addr, input_stride, input_size.width, + input_size.height, scaled_buffer_.data(), + scaled_size.width, scaled_size.width, scaled_size.height, + libyuv::FilterMode::kFilterNone); + + { + size_t num_faces = 0; + faces.clear(); + faces.resize(MAX_NUM_FACES); + if (!face_detector_detect(face_detector_handle_, scaled_buffer_.data(), + scaled_size.width, scaled_size.height, + faces.data(), &num_faces)) { + return FaceDetectResult::kDetectError; + } + faces.resize(num_faces); + } + + if (!faces.empty()) { + float ratio = static_cast(input_size.width) / + static_cast(scaled_size.width); + for (auto& f : faces) { + f.bounding_box.x1 *= ratio; + f.bounding_box.y1 *= ratio; + f.bounding_box.x2 *= ratio; + f.bounding_box.y2 *= ratio; + for (auto& l : f.landmarks) { + l.x *= ratio; + l.y *= ratio; + } + } + } + + if (active_sensor_array_size) { + std::optional> transform = + GetCoordinateTransform(input_size, *active_sensor_array_size); + if (!transform) { + return FaceDetectResult::kTransformError; + } + const float scale = std::get<0>(*transform); + const float offset_x = std::get<1>(*transform); + const float offset_y = std::get<2>(*transform); + for (auto& f : faces) { + f.bounding_box.x1 = scale * f.bounding_box.x1 + offset_x; + f.bounding_box.y1 = scale * f.bounding_box.y1 + offset_y; + f.bounding_box.x2 = scale * f.bounding_box.x2 + offset_x; + f.bounding_box.y2 = scale * f.bounding_box.y2 + offset_y; + for (auto& l : f.landmarks) { + l.x = scale * l.x + offset_x; + l.y = scale * l.y + offset_y; + } + } + } + return FaceDetectResult::kDetectOk; +} + +// static +std::optional> +FaceDetector::GetCoordinateTransform(const Size src, const Size dst) { + if (src.width > dst.width || src.height > dst.height) { + return std::nullopt; + } + const float width_ratio = static_cast(dst.width) / src.width; + const float height_ratio = static_cast(dst.height) / src.height; + const float scaling = std::min(width_ratio, height_ratio); + float offset_x = 0.0f, offset_y = 0.0f; + if (width_ratio < height_ratio) { + // |dst| has larger height than |src| * scaling. + offset_y = (dst.height - (src.height * scaling)) / 2; + } else { + // |dst| has larger width than |src| * scaling. + offset_x = (dst.width - (src.width * scaling)) / 2; + } + return std::make_tuple(scaling, offset_x, offset_y); +} + +void FaceDetector::PrepareBuffer(Size img_size) { + size_t new_size = img_size.width * img_size.height; + if (new_size > scaled_buffer_.size()) { + scaled_buffer_.resize(new_size); + } +} + +std::string LandmarkTypeToString(LandmarkType type) { + switch (type) { + case LANDMARK_LEFT_EYE: + return "LeftEye"; + case LANDMARK_RIGHT_EYE: + return "RightEye"; + case LANDMARK_NOSE_TIP: + return "NoseTip"; + case LANDMARK_MOUTH_CENTER: + return "MouthCenter"; + case LANDMARK_LEFT_EAR_TRAGION: + return "LeftEarTragion"; + case LANDMARK_RIGHT_EAR_TRAGION: + return "RightEarTragion"; + default: + return "Unknown"; + } +} + +} // namespace icamera diff --git a/src/fd/facessd/CameraFaceDetection.h b/src/fd/facessd/CameraFaceDetection.h new file mode 100644 index 0000000..f5b0716 --- /dev/null +++ b/src/fd/facessd/CameraFaceDetection.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "src/fd/facessd/CommonTypes.h" + +namespace icamera { + +enum class FaceDetectResult { + kDetectOk, + kDetectError, + kBufferError, + kTransformError, + kTimeoutError, +}; + +// This class encapsulates Google3 FaceSSD library. Only support gray type. +class FaceDetector { + public: + static std::unique_ptr Create(); + + ~FaceDetector(); + + FaceDetectResult Detect(const uint8_t* buffer_addr, int input_stride, Size input_size, + std::optional active_sensor_array_size, + std::vector& faces); + + static std::optional> GetCoordinateTransform( + const Size src, const Size dst); + + private: + explicit FaceDetector(FaceDetectorHandle face_detector_handle); + + void PrepareBuffer(Size img_size); + + std::vector scaled_buffer_; + + FaceDetectorHandle face_detector_handle_; +}; + +std::string LandmarkTypeToString(LandmarkType type); + +} // namespace icamera diff --git a/src/fd/facessd/CommonTypes.h b/src/fd/facessd/CommonTypes.h new file mode 100644 index 0000000..89098c5 --- /dev/null +++ b/src/fd/facessd/CommonTypes.h @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2024 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include +#include +#include +#include +#include +#include +#include + +namespace icamera { + +/** + * Rect follows rectangular coordinate system for images. (0, 0) is the + * top-left corner. It can be used to present the coordinates of active sensory + * array and bounding box of detected faces. + */ +template +struct Rect { + T left; + T top; + T width; + T height; + + Rect() : left(0), top(0), width(0), height(0) {} + Rect(T l, T t, T w, T h) : left(l), top(t), width(w), height(h) {} + T right() const { + return left + width - (std::is_integral::value ? 1 : 0); + } + T bottom() const { + return top + height - (std::is_integral::value ? 1 : 0); + } + bool is_valid() const { return width > 0 && height > 0; } + template , bool> = true> + bool operator==(const Rect& rhs) const { + return left == rhs.left && top == rhs.top && width == rhs.width && + height == rhs.height; + } + + template , bool> = true> + bool operator==(const Rect& rhs) const { + constexpr E kEpsilon = 1e-3; + return std::abs(left - rhs.left) <= kEpsilon && + std::abs(top - rhs.top) <= kEpsilon && + std::abs(width - rhs.width) <= kEpsilon && + std::abs(height - rhs.height) <= kEpsilon; + } + + template + Rect AsRect() const { + return Rect(static_cast(left), static_cast(top), + static_cast(width), static_cast(height)); + } + std::string ToString() const { + std::stringstream ss; + ss << left << "," << top << "+" << width << "x" << height; + std::string str; + ss >> str; + return str; + } +}; + +struct Size { + uint32_t width; + uint32_t height; + + Size() : width(0), height(0) {} + Size(uint32_t w, uint32_t h) : width(w), height(h) {} + uint32_t area() const { return width * height; } + bool operator<(const Size& rhs) const { + if (area() == rhs.area()) { + return width < rhs.width; + } + return area() < rhs.area(); + } + bool operator==(const Size& rhs) const { + return width == rhs.width && height == rhs.height; + } + bool operator!=(const Size& rhs) const { return !(*this == rhs); } + bool is_valid() const { return width > 0 && height > 0; } + std::string ToString() const { + return std::format("{0}x{1}", width, height); + } + double aspect_ratio() const { + return static_cast(width) / static_cast(height); + } + Size Scale(float factor) const { + return Size( + static_cast(static_cast(width) * factor + 0.5f), + static_cast(static_cast(height) * factor + + 0.5f)); + } +}; + +template +struct Range { + T lower_bound = 0; + T upper_bound = 0; + + Range() = default; + Range(T l, T u) : lower_bound(l), upper_bound(u) {} + bool is_valid() const { return lower_bound <= upper_bound; } + T lower() const { return lower_bound; } + T upper() const { return upper_bound; } + T Clamp(T value) const { return std::clamp(value, lower_bound, upper_bound); } + bool operator==(const Range& rhs) const { + return lower_bound == rhs.lower_bound && upper_bound == rhs.upper_bound; + } +}; + +template +std::ostream& operator<<(std::ostream& stream, const Rect& r) { + return stream << "(" << r.left << "," << r.top << ")+" << r.width << "x" + << r.height; +} + +template +std::ostream& operator<<(std::ostream& stream, const Range& r) { + return stream << "[" << r.lower_bound << ", " << r.upper_bound << "]"; +} + +// Relative FoV (field of view) are ratios of (width, height) of the visible +// region to the active array region. +class RelativeFov { + public: + RelativeFov(float x, float y); + // Calculates FoV from image size and sensor active array size in Android spec + // (either image dimension has full FoV of the sensor active array). + // For example, the RelativeFov of 640x360 (16:9) images generated from + // 1600x1200 (4:3) active sensor array is (1, 0.75). + RelativeFov(const Size& image_size, const Size& active_array_size); + bool operator==(const RelativeFov& other) const; + bool IsValid() const; + bool Covers(const RelativeFov& other) const; + Rect GetCropWindowInto(const RelativeFov& other) const; + + private: + static constexpr float kEpsilon = 3e-2f; + + float x_ = 0.0f; + float y_ = 0.0f; +}; + +} // namespace icamera + +template <> +struct std::hash { + std::size_t operator()(icamera::Size const& s) const noexcept { + std::size_t h1 = std::hash{}(s.width); + std::size_t h2 = std::hash{}(s.height); + return h1 ^ (h2 << 1); + } +}; diff --git a/src/fd/facessd/FaceSSD.cpp b/src/fd/facessd/FaceSSD.cpp index 6ec5c1b..e87673d 100644 --- a/src/fd/facessd/FaceSSD.cpp +++ b/src/fd/facessd/FaceSSD.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ namespace icamera { using namespace std; FaceSSD::FaceSSD(int cameraId, int width, int height) - : FaceDetection(cameraId, width, height, V4L2_MEMORY_DMABUF), + : FaceDetection(cameraId, width, height, V4L2_MEMORY_USERPTR), mFaceDetector(nullptr) { int ret = initFaceDetection(); CheckAndLogError(ret != OK, VOID_VALUE, "failed to init face detection, ret %d", ret); @@ -38,6 +38,7 @@ FaceSSD::FaceSSD(int cameraId, int width, int height) FaceSSD::~FaceSSD() { LOG1(" @%s", mCameraId, __func__); + mFaceDetector = nullptr; } int FaceSSD::initFaceDetection() { @@ -48,7 +49,7 @@ int FaceSSD::initFaceDetection() { return OK; } - mFaceDetector = cros::FaceDetector::Create(); + mFaceDetector = FaceDetector::Create(); CheckAndLogError(!mFaceDetector, NO_INIT, "Failed to create Face SSD instance %s", __func__); mInitialized = true; @@ -60,26 +61,56 @@ void FaceSSD::runFaceDetection(const shared_ptr& camBuffer) { CheckAndLogError(mInitialized == false, VOID_VALUE, "@%s, mInitialized is false", __func__); CheckAndLogError(!camBuffer, VOID_VALUE, "@%s, ccBuf buffer is nullptr", __func__); - camera_buffer_t* ubuffer = camBuffer->getUserBuffer(); - auto handle = reinterpret_cast(static_cast(ubuffer->privateHandle)); - CheckAndLogError(!handle, VOID_VALUE, "Face SSD only supports gbm handle buffer", __func__); + CameraBufferMapper mapper(camBuffer); int64_t sequence = camBuffer->getSequence(); + int input_stride = camBuffer->getStride(); + Size input_size = Size(camBuffer->getWidth(), camBuffer->getHeight()); + LOG2("@%s, sequence %ld, stride %d, wxh [%dx%d]", __func__, sequence, input_stride, + camBuffer->getWidth(), camBuffer->getHeight()); + const uint8_t* buffer_addr = static_cast(mapper.addr()); + std::vector faces; nsecs_t startTime = CameraUtils::systemTime(); - std::vector faces; - cros::FaceDetectResult ret = mFaceDetector->Detect(handle, &faces); - CheckAndLogError(ret != cros::FaceDetectResult::kDetectOk, VOID_VALUE, + auto ret = mFaceDetector->Detect(buffer_addr, input_stride, input_size, std::nullopt, + faces); + CheckAndLogError(ret != FaceDetectResult::kDetectOk, VOID_VALUE, "%s, Failed to run face for sequence: %ld", __func__, sequence); printfFDRunRate(); LOG2("%s: ret:%d, it takes need %ums", camBuffer->getSequence(), __func__, ret, (unsigned)((CameraUtils::systemTime() - startTime) / 1000000)); - updateFaceResult(faces, sequence); + FaceSSDResult fdResults{}; + faceDetectResult(faces, fdResults); + + updateFaceResult(fdResults, sequence); +} + +void FaceSSD::faceDetectResult(const std::vector& faces, FaceSSDResult& fdResults) { + std::vector sortFaces = faces; + std::sort(sortFaces.begin(), sortFaces.end(), + [](const DetectedFace& a, const DetectedFace& b) { + auto area1 = (a.bounding_box.x2 - a.bounding_box.x1) * + (a.bounding_box.y2 - a.bounding_box.y1); + auto area2 = (b.bounding_box.x2 - b.bounding_box.x1) * + (b.bounding_box.y2 - b.bounding_box.y1); + return area1 > area2; + }); + + int faceCount = 0; + for (auto& face : sortFaces) { + if (faceCount >= mMaxFaceNum) break; + fdResults.faceSsdResults[faceCount] = face; + faceCount++; + LOG2("face result: box: %f,%f,%f,%f", face.bounding_box.x1, face.bounding_box.y1, + face.bounding_box.x2, face.bounding_box.y2); + } + fdResults.faceNum = faceCount; + fdResults.faceUpdated = true; + LOG2("@%s, faceNum:%d", __func__, fdResults.faceNum); } -void FaceSSD::updateFaceResult(const std::vector& result, - int64_t sequence) { +void FaceSSD::updateFaceResult(const FaceSSDResult& fdResults, int64_t sequence) { camera_coordinate_system_t sysCoord = {IA_COORDINATE_LEFT, IA_COORDINATE_TOP, IA_COORDINATE_RIGHT, IA_COORDINATE_BOTTOM}; auto cameraContext = CameraContext::getInstance(mCameraId); @@ -90,18 +121,18 @@ void FaceSSD::updateFaceResult(const std::vector& resul buf->ccaFaceState.updated = true; buf->ccaFaceState.is_video_conf = true; - buf->ccaFaceState.num_faces = CLIP(result.size(), mMaxFaceNum, 0); + buf->ccaFaceState.num_faces = CLIP(fdResults.faceNum, mMaxFaceNum, 0); LOG2("@%s, face number: %d", sequence, __func__, buf->ccaFaceState.num_faces); for (int i = 0; i < buf->ccaFaceState.num_faces; i++) { buf->ccaFaceState.faces[i].face_area.left = - static_cast(result[i].bounding_box.x1); // rect.left; + static_cast(fdResults.faceSsdResults[i].bounding_box.x1); // rect.left; buf->ccaFaceState.faces[i].face_area.top = - static_cast(result[i].bounding_box.y1); // rect.top + static_cast(fdResults.faceSsdResults[i].bounding_box.y1); // rect.top buf->ccaFaceState.faces[i].face_area.right = - static_cast(result[i].bounding_box.x2); // rect.right + static_cast(fdResults.faceSsdResults[i].bounding_box.x2); // rect.right buf->ccaFaceState.faces[i].face_area.bottom = - static_cast(result[i].bounding_box.y2); // rect.bottom + static_cast(fdResults.faceSsdResults[i].bounding_box.y2); // rect.bottom convertFaceCoordinate(sysCoord, &buf->ccaFaceState.faces[i].face_area.left, &buf->ccaFaceState.faces[i].face_area.top, &buf->ccaFaceState.faces[i].face_area.right, @@ -110,7 +141,7 @@ void FaceSSD::updateFaceResult(const std::vector& resul buf->ccaFaceState.faces[i].rip_angle = 0; buf->ccaFaceState.faces[i].rop_angle = 0; buf->ccaFaceState.faces[i].tracking_id = i; - buf->ccaFaceState.faces[i].confidence = result[i].confidence; + buf->ccaFaceState.faces[i].confidence = fdResults.faceSsdResults[i].confidence; buf->ccaFaceState.faces[i].person_id = -1; buf->ccaFaceState.faces[i].similarity = 0; buf->ccaFaceState.faces[i].best_ratio = 0; @@ -127,11 +158,12 @@ void FaceSSD::updateFaceResult(const std::vector& resul buf->ccaFaceState.faces[i].face_area.bottom); buf->faceIds[i] = i; - buf->faceScores[i] = static_cast(result[i].confidence * 100); - buf->faceRect[i * 4] = static_cast(result[i].bounding_box.x1); // rect.left; - buf->faceRect[i * 4 + 1] = static_cast(result[i].bounding_box.y1); // rect.top - buf->faceRect[i * 4 + 2] = static_cast(result[i].bounding_box.x2); // rect.right - buf->faceRect[i * 4 + 3] = static_cast(result[i].bounding_box.y2); // rect.bottom + buf->faceScores[i] = static_cast(fdResults.faceSsdResults[i].confidence * 100); + // left, top, right and bottom + buf->faceRect[i * 4] = static_cast(fdResults.faceSsdResults[i].bounding_box.x1); + buf->faceRect[i * 4 + 1] = static_cast(fdResults.faceSsdResults[i].bounding_box.y1); + buf->faceRect[i * 4 + 2] = static_cast(fdResults.faceSsdResults[i].bounding_box.x2); + buf->faceRect[i * 4 + 3] = static_cast(fdResults.faceSsdResults[i].bounding_box.y2); convertFaceCoordinate(mRatioInfo.sysCoord, &buf->faceRect[i * 4], &buf->faceRect[i * 4 + 1], &buf->faceRect[i * 4 + 2], &buf->faceRect[i * 4 + 3]); diff --git a/src/fd/facessd/FaceSSD.h b/src/fd/facessd/FaceSSD.h index d785ce6..5f9d09a 100644 --- a/src/fd/facessd/FaceSSD.h +++ b/src/fd/facessd/FaceSSD.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,19 @@ */ #pragma once -#include #include "FaceDetection.h" +#include + namespace icamera { +struct FaceSSDResult { + bool faceUpdated; + int faceNum; + DetectedFace faceSsdResults[MAX_FACES_DETECTABLE]; +}; + class FaceSSD : public FaceDetection { public: FaceSSD(int cameraId, int width, int height); @@ -32,11 +39,11 @@ class FaceSSD : public FaceDetection { DISALLOW_COPY_AND_ASSIGN(FaceSSD); int initFaceDetection(); - void updateFaceResult(const std::vector& result, int64_t sequence); - void updateFaceResult(const FaceDetectionResult& result, int64_t sequence); + void faceDetectResult(const std::vector& faces, FaceSSDResult& fdResults); + void updateFaceResult(const FaceSSDResult& fdResults, int64_t sequence); private: - std::unique_ptr mFaceDetector; + std::unique_ptr mFaceDetector; }; } // namespace icamera diff --git a/src/hal/CameraHal.cpp b/src/hal/CameraHal.cpp index b61b37c..7d79fb3 100644 --- a/src/hal/CameraHal.cpp +++ b/src/hal/CameraHal.cpp @@ -24,9 +24,6 @@ #include "Parameters.h" #include "PlatformData.h" #include "ParameterConvert.h" -// FRAME_SYNC_S -#include "SyncManager.h" -// FRAME_SYNC_E #include "iutils/CameraLog.h" namespace icamera { @@ -112,11 +109,6 @@ int CameraHal::deinit() { } // VIRTUAL_CHANNEL_E - // FRAME_SYNC_S - // SyncManager is used to do synchronization with multi-devices. - // Release it when the last device exit - SyncManager::releaseInstance(); - // FRAME_SYNC_E // Release the PlatformData instance here due to it was // created in init() period PlatformData::releaseInstance(); diff --git a/src/hal/MockCameraHal.h b/src/hal/MockCameraHal.h index 5818961..0d9aeb7 100644 --- a/src/hal/MockCameraHal.h +++ b/src/hal/MockCameraHal.h @@ -37,7 +37,7 @@ namespace icamera { * If open dual cameras in different process, the shared memory must be used to * keep the account of the open times. * - * The CameraHal create and maintains followings singleton instancs + * The CameraHal create and maintains following singleton instances * 1. MediaControl Instance * 2. PlatformData Instance */ diff --git a/src/hal/hal_adaptor/HalAdaptor.cpp b/src/hal/hal_adaptor/HalAdaptor.cpp index b58ce42..25d8d0c 100644 --- a/src/hal/hal_adaptor/HalAdaptor.cpp +++ b/src/hal/hal_adaptor/HalAdaptor.cpp @@ -57,8 +57,13 @@ static bool get_ipu_info(const std::string& path) { return retval; } - struct dirent* entry; - while ((entry = readdir(dir)) != nullptr) { + struct dirent* entry = nullptr; + while (true) { + entry = readdir(dir); + if (entry == nullptr) { + break; + } + if ((entry->d_type != DT_LNK) || (strstr(entry->d_name, "0000:") == nullptr)) { continue; } diff --git a/src/hal/hal_adaptor/HalAdaptor.h b/src/hal/hal_adaptor/HalAdaptor.h index 191d698..5793ab4 100644 --- a/src/hal/hal_adaptor/HalAdaptor.h +++ b/src/hal/hal_adaptor/HalAdaptor.h @@ -13,9 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef HAL_ADAPTOR_H -#define HAL_ADAPTOR_H - +#pragma once #include "ICamera.h" extern "C" { @@ -51,4 +49,3 @@ struct HalApiHandle { } // namespace icamera } // extern "C" -#endif // HAL_ADAPTOR_H diff --git a/src/icbm/ICBMThread.cpp b/src/icbm/ICBMThread.cpp index 4d604c4..a7493b0 100644 --- a/src/icbm/ICBMThread.cpp +++ b/src/icbm/ICBMThread.cpp @@ -36,7 +36,7 @@ int ICBMThread::setup(ICBMInitInfo* initParams) { } void ICBMThread::shutdown(const ICBMReqInfo& request) { - LOG1("%s, Shuting down...", __func__); + LOG1("%s, Shutting down...", __func__); mIntelICBM->shutdown(request); } diff --git a/src/icbm/OPIC2Api.h b/src/icbm/OPIC2Api.h index 4883ea3..dced07e 100644 --- a/src/icbm/OPIC2Api.h +++ b/src/icbm/OPIC2Api.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef IC2API_FOR_CHROME_H -#define IC2API_FOR_CHROME_H - +#pragma once extern "C" { #define KEYPOINTSCOUNT 40 diff --git a/src/image_process/PostProcessorBase.cpp b/src/image_process/PostProcessorBase.cpp index aaa1170..8143c17 100644 --- a/src/image_process/PostProcessorBase.cpp +++ b/src/image_process/PostProcessorBase.cpp @@ -18,6 +18,9 @@ #include "PostProcessorBase.h" #include +#ifdef LIBCAMERA_BUILD +#else +#endif #include "iutils/CameraLog.h" #include "stdlib.h" diff --git a/src/image_process/chrome/ImageProcessorCore.cpp b/src/image_process/chrome/ImageProcessorCore.cpp index d3850bb..d6f0a6b 100644 --- a/src/image_process/chrome/ImageProcessorCore.cpp +++ b/src/image_process/chrome/ImageProcessorCore.cpp @@ -23,13 +23,18 @@ namespace icamera { -ImageProcessorCore::ImageProcessorCore() { - mRotationMode = {{0, libyuv::RotationMode::kRotate0}, - {90, libyuv::RotationMode::kRotate90}, - {180, libyuv::RotationMode::kRotate180}, - {270, libyuv::RotationMode::kRotate270}}; +libyuv::RotationMode getRotationMode(int angle) { + switch (angle) { + case 0: return libyuv::RotationMode::kRotate0; + case 90: return libyuv::RotationMode::kRotate90; + case 180: return libyuv::RotationMode::kRotate180; + case 270: return libyuv::RotationMode::kRotate270; + default: return libyuv::RotationMode::kRotate0; + } } +ImageProcessorCore::ImageProcessorCore() {} + std::unique_ptr IImageProcessor::createImageProcessor() { return std::unique_ptr(new ImageProcessorCore()); } @@ -126,7 +131,7 @@ status_t ImageProcessorCore::rotateFrame(const std::shared_ptr& in CheckAndLogError(output->getWidth() != input->getHeight() || output->getHeight() != input->getWidth(), BAD_VALUE, - "output resolution mis-match [%d x %d] -> [%d x %d]", input->getWidth(), + "output resolution mismatch [%d x %d] -> [%d x %d]", input->getWidth(), input->getHeight(), output->getWidth(), output->getHeight()); CheckAndLogError((angle != 90 && angle != 270), BAD_VALUE, "angle value:%d is wrong", angle); @@ -144,7 +149,7 @@ status_t ImageProcessorCore::rotateFrame(const std::shared_ptr& in uint8_t* I420Buffer = rotateBuf.data(); - if (mRotationMode[angle] == libyuv::RotationMode::kRotate0) { + if (getRotationMode(angle) == libyuv::RotationMode::kRotate0) { libyuv::CopyPlane(inBuffer, inStride, outBuffer, outStride, inW, inH); libyuv::CopyPlane(inBuffer + inH * inStride, inStride, outBuffer + outH * outStride, outStride, inW, inH / 2); @@ -152,7 +157,7 @@ status_t ImageProcessorCore::rotateFrame(const std::shared_ptr& in int ret = libyuv::NV12ToI420Rotate(inBuffer, inStride, inBuffer + inH * inStride, inStride, I420Buffer, outW, I420Buffer + outW * outH, outW / 2, I420Buffer + outW * outH * 5 / 4, outW / 2, inW, inH, - mRotationMode[angle]); + getRotationMode(angle)); CheckAndLogError((ret < 0), UNKNOWN_ERROR, "NV12ToI420Rotate failed [%d]", ret); ret = libyuv::I420ToNV12(I420Buffer, outW, I420Buffer + outW * outH, outW / 2, diff --git a/src/image_process/chrome/ImageProcessorCore.h b/src/image_process/chrome/ImageProcessorCore.h index 5a2efa7..0d788f0 100644 --- a/src/image_process/chrome/ImageProcessorCore.h +++ b/src/image_process/chrome/ImageProcessorCore.h @@ -17,8 +17,6 @@ #include -#include - #include "IImageProcessor.h" namespace icamera { @@ -40,8 +38,6 @@ class ImageProcessorCore : public IImageProcessor { private: DISALLOW_COPY_AND_ASSIGN(ImageProcessorCore); - - std::unordered_map mRotationMode; }; } /* namespace icamera */ diff --git a/src/image_process/sw/ImageConverter.cpp b/src/image_process/sw/ImageConverter.cpp index bcf2387..68dc74f 100644 --- a/src/image_process/sw/ImageConverter.cpp +++ b/src/image_process/sw/ImageConverter.cpp @@ -128,7 +128,7 @@ void trimConvertNV12ToRGB565(int width, int height, int srcStride, void *src, vo } } -// covert YV12 (Y plane, V plane, U plane) to NV21 (Y plane, interlaced VU bytes) +// convert YV12 (Y plane, V plane, U plane) to NV21 (Y plane, interlaced VU bytes) void convertYV12ToNV21(int width, int height, int srcStride, int dstStride, void *src, void *dst) { const int cStride = srcStride>>1; @@ -206,7 +206,7 @@ void copyYV12ToYV12(int width, int height, int srcStride, int dstStride, void *s } } -// covert NV12 (Y plane, interlaced UV bytes) to +// convert NV12 (Y plane, interlaced UV bytes) to // NV21 (Y plane, interlaced VU bytes) and trim stride width to real width void trimConvertNV12ToNV21(int width, int height, int srcStride, void *src, void *dst) { @@ -401,7 +401,7 @@ void align16ConvertNV12ToYV12(int width, int height, int srcStride, void *src, v } } -// P411's Y, U, V are seperated. But the YUY2's Y, U and V are interleaved. +// P411's Y, U, V are separated. But the YUY2's Y, U and V are interleaved. void YUY2ToP411(int width, int height, int stride, void *src, void *dst) { int ySize = width * height; @@ -474,7 +474,7 @@ void NV12ToP411Separate(int width, int height, int stride, } } -// P411's Y, U, V are seperated. But the NV12's U and V are interleaved. +// P411's Y, U, V are separated. But the NV12's U and V are interleaved. void NV12ToP411(int width, int height, int stride, void *src, void *dst) { NV12ToP411Separate(width, height, stride, @@ -516,7 +516,7 @@ void NV21ToP411Separate(int width, int height, int stride, } } -// P411's Y, U, V are seperated. But the NV21's U and V are interleaved. +// P411's Y, U, V are separated. But the NV21's U and V are interleaved. void NV21ToP411(int width, int height, int stride, void *src, void *dst) { NV21ToP411Separate(width, height, stride, @@ -641,7 +641,7 @@ void repadYUV420(int width, int height, int srcStride, int dstStride, void *src, } } -// covert YUYV(YUY2, YUV422 format) to YV12 (Y plane, V plane, U plane) +// convert YUYV(YUY2, YUV422 format) to YV12 (Y plane, V plane, U plane) void convertYUYVToYV12(int width, int height, int srcStride, int dstStride, void *src, void *dst) { int ySize = width * height; @@ -679,7 +679,7 @@ void convertYUYVToYV12(int width, int height, int srcStride, int dstStride, void } } -// covert YUYV(YUY2, YUV422 format) to NV21 (Y plane, interlaced VU bytes) +// convert YUYV(YUY2, YUV422 format) to NV21 (Y plane, interlaced VU bytes) void convertYUYVToNV21(int width, int height, int srcStride, void *src, void *dst) { int ySize = width * height; diff --git a/src/image_process/sw/ImageScalerCore.cpp b/src/image_process/sw/ImageScalerCore.cpp index 9dd4001..9df756e 100644 --- a/src/image_process/sw/ImageScalerCore.cpp +++ b/src/image_process/sw/ImageScalerCore.cpp @@ -530,7 +530,7 @@ void ImageScalerCore::downScaleNv12ImageFrom800x600ToQvga(unsigned char *dest, c 0 * ((a2 >> 0) & 0xff) + 2 * ((a2 >> 8) & 0xff) + 4 * ((a2 >> 16) & 0xff) + 4 * ((a2 >> 24) & 0xff) + 0 * ((a3 >> 0) & 0xff) + 1 * ((a3 >> 8) & 0xff) + 2 * ((a3 >> 16) & 0xff) + 2 * ((a3 >> 24) & 0xff)); t = (t + 12) / 25; - b |= t << 24; // Eigth pixel + b |= t << 24; // Eight pixel *d++ = b; } s1 = (u_int32_t *)(&src[(i * 5 + 4) * src_stride]); @@ -611,7 +611,7 @@ void ImageScalerCore::downScaleNv12ImageFrom800x600ToQvga(unsigned char *dest, c 0 * ((a2 >> 0) & 0xff) + 2 * ((a2 >> 8) & 0xff) + 4 * ((a2 >> 16) & 0xff) + 4 * ((a2 >> 24) & 0xff) + 0 * ((a3 >> 0) & 0xff) + 1 * ((a3 >> 8) & 0xff) + 2 * ((a3 >> 16) & 0xff) + 2 * ((a3 >> 24) & 0xff)); t = (t + 12) / 25; - b |= t << 24; // Eigth pixel + b |= t << 24; // Eight pixel *d++ = b; } } diff --git a/src/iutils/CameraDump.cpp b/src/iutils/CameraDump.cpp index ca11a5b..dab4435 100644 --- a/src/iutils/CameraDump.cpp +++ b/src/iutils/CameraDump.cpp @@ -430,7 +430,7 @@ static string formatBinFileName(int cameraId, const char* prefix, BinParam_t* bi binParam->bParam.height); default: - LOGW("Unknow binary type:%d", binParam->bType); + LOGW("Unknown binary type:%d", binParam->bType); break; } diff --git a/src/iutils/CameraDump.h b/src/iutils/CameraDump.h index c2d4f2d..3dfe678 100644 --- a/src/iutils/CameraDump.h +++ b/src/iutils/CameraDump.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_DUMP_H -#define CAMERA_DUMP_H - +#pragma once #include #include @@ -123,7 +121,7 @@ typedef struct { } BinParam_t; /** - * Dump files with formated file name, put under getDumpPath() + * Dump files with formatted file name, put under getDumpPath() * Supported dump type: * Image(RAW/YUV/RGB) * PAL bin @@ -157,4 +155,3 @@ void dumpBinary(int cameraId, const void* data, int size, BinParam_t* binParam); } // namespace icamera -#endif // CAMERA_DUMP_H diff --git a/src/iutils/CameraLog.cpp b/src/iutils/CameraLog.cpp index 4fb3216..81aba08 100644 --- a/src/iutils/CameraLog.cpp +++ b/src/iutils/CameraLog.cpp @@ -41,12 +41,12 @@ GroupDesc globalGroupsDescp[TAGS_MAX_NUM]; namespace icamera { uint32_t gLogLevel = 0U; -uint32_t gPerfLevel = 0U; +static uint32_t gPerfLevel = 0U; int32_t gSlowlyRunRatio = 0; // DUMP_ENTITY_TOPOLOGY_S -bool gIsDumpMediaTopo = false; +static bool gIsDumpMediaTopo = false; // DUMP_ENTITY_TOPOLOGY_E -bool gIsDumpMediaInfo = false; +static bool gIsDumpMediaInfo = false; const char* cameraDebugLogToString(uint32_t level) { switch (level) { @@ -147,26 +147,26 @@ void doLogBody(int logTag, uint32_t level, const char* fmt, ...) { namespace Log { -#define DEFAULT_LOG_SINK "GLOG" -#define FILELOG_SINK "FILELOG" - static void initLogSinks() { #ifdef LIBCAMERA_BUILD - globalLogSink = new LibcameraLogSink(); - LOG2("Enable libcamera LOG"); + if (globalLogSink == nullptr) { + globalLogSink = new LibcameraLogSink(); + LOG2("Enable libcamera LOG"); + return; + } #else +#endif globalLogSink = new StdconLogSink(); LOG2("Enable Stdcon LOG"); -#endif } static void setLogTagLevel() { static const char* LOG_FILE_TAG = "cameraTags"; char* logFileTag = ::getenv(LOG_FILE_TAG); - if (logFileTag == nullptr) { return; } + std::string s = logFileTag; std::istringstream is(s); std::string token; @@ -189,7 +189,8 @@ static void setLogTagLevel() { } if (!levelStr.empty()) { - globalGroupsDescp[itemIdx].level = strtoul(levelStr.c_str(), nullptr, 0); + globalGroupsDescp[itemIdx].level = + static_cast(strtoul(levelStr.c_str(), nullptr, 0)); } } } @@ -206,7 +207,7 @@ void setDebugLevel(void) { gLogLevel = CAMERA_DEBUG_LOG_ERR | CAMERA_DEBUG_LOG_WARNING | CAMERA_DEBUG_LOG_INFO; if (dbgLevel != nullptr) { - gLogLevel = strtoul(dbgLevel, nullptr, 0); + gLogLevel = static_cast(strtoul(dbgLevel, nullptr, 0)); LOG1("Debug level is 0x%x", gLogLevel); } @@ -226,7 +227,7 @@ void setDebugLevel(void) { const char* PROP_CAMERA_HAL_PERF = "cameraPerf"; char* perfLevel = getenv(PROP_CAMERA_HAL_PERF); if (perfLevel != nullptr) { - gPerfLevel = strtoul(perfLevel, nullptr, 0); + gPerfLevel = static_cast(strtoul(perfLevel, nullptr, 0)); LOGI("Performance level is 0x%x", gPerfLevel); // bitmask of tracing categories diff --git a/src/iutils/CameraLog.h b/src/iutils/CameraLog.h index 61587a1..2482ef7 100644 --- a/src/iutils/CameraLog.h +++ b/src/iutils/CameraLog.h @@ -14,9 +14,7 @@ * limitations under the License. */ -#ifndef CAMERA_LOG_H -#define CAMERA_LOG_H - +#pragma once #include #include #include @@ -163,6 +161,11 @@ extern void doLogBody(int logTag, uint32_t level, const char* fmt, ...); { doLogBody(GET_FILE_SHIFT(LOG_TAG), icamera::CAMERA_DEBUG_LOG_WARNING, ##__VA_ARGS__); } \ } while (0) +#define ALOGE LOGE +#define ALOGW LOGW +#define ALOGI LOGI +#define ALOGD LOGI + #define HAL_TRACE_NAME(level, name) ScopedTrace ___tracer(level, name) #define HAL_TRACE_CALL(level) HAL_TRACE_NAME(level, __PRETTY_FUNCTION__) @@ -208,4 +211,3 @@ class ScopedTrace { } // namespace icamera -#endif // CAMERA_LOG_H diff --git a/src/iutils/Errors.h b/src/iutils/Errors.h index 727350a..d3703e9 100644 --- a/src/iutils/Errors.h +++ b/src/iutils/Errors.h @@ -15,8 +15,7 @@ * limitations under the License. */ -#ifndef ERRORS_H -#define ERRORS_H +#pragma once #include #include @@ -65,5 +64,3 @@ enum { }; } // namespace icamera - -#endif // ERRORS_H diff --git a/src/iutils/LogSink.cpp b/src/iutils/LogSink.cpp index 36c09bb..cc63959 100644 --- a/src/iutils/LogSink.cpp +++ b/src/iutils/LogSink.cpp @@ -23,6 +23,7 @@ #ifdef LIBCAMERA_BUILD #include +#else #endif #include @@ -31,10 +32,19 @@ #include "iutils/LogSink.h" #include "iutils/Utils.h" +#define TIME_BUF_SIZE 128 +#define DEFAULT_FILELOG_PATH "/run/camera/hal_logs.txt" + namespace icamera { extern const char* cameraDebugLogToString(uint32_t level); -#define CAMERA_DEBUG_LOG_ERR (1 << 5) -#define CAMERA_DEBUG_LOG_WARNING (1 << 3) + +static const uint32_t CAMERA_DEBUG_LOG_LEVEL1 = 1U; +static const uint32_t CAMERA_DEBUG_LOG_LEVEL2 = 2U; // 1 << 1 +static const uint32_t CAMERA_DEBUG_LOG_LEVEL3 = 4U; // 1 << 2 + +static const uint32_t CAMERA_DEBUG_LOG_INFO = 16U; // 1 << 4 +static const uint32_t CAMERA_DEBUG_LOG_WARNING = 32U; // 1 << 5; +static const uint32_t CAMERA_DEBUG_LOG_ERR = 64U; // 1 << 6; #ifdef LIBCAMERA_BUILD void LibcameraLogSink::sendOffLog(LogItem logItem) { @@ -44,21 +54,25 @@ void LibcameraLogSink::sendOffLog(LogItem logItem) { libcamera::LogCategory* cat = libcamera::LogCategory::create(logItem.logTags); libcamera::LogSeverity sev = (logItem.level == CAMERA_DEBUG_LOG_ERR) ? libcamera::LogError : (logItem.level == CAMERA_DEBUG_LOG_WARNING) ? libcamera::LogWarning + : (logItem.level == CAMERA_DEBUG_LOG_INFO) ? libcamera::LogInfo : libcamera::LogDebug; + uint32_t levels = CAMERA_DEBUG_LOG_LEVEL1 | CAMERA_DEBUG_LOG_LEVEL2 | CAMERA_DEBUG_LOG_LEVEL3; + if (logItem.level & levels) { + cat->setSeverity(libcamera::LogDebug); + } libcamera::_log(cat, sev).stream() << prefix << logItem.logEntry; } #else -#endif +#endif void StdconLogSink::sendOffLog(LogItem logItem) { -#define TIME_BUF_SIZE 128 char timeInfo[TIME_BUF_SIZE]; LogOutputSink::setLogTime(timeInfo); fprintf(stdout, "[%s] CamHAL[%s] %s: %s\n", timeInfo, icamera::cameraDebugLogToString(logItem.level), logItem.logTags, logItem.logEntry); } -void LogOutputSink::setLogTime(char* buf) { +void LogOutputSink::setLogTime(char* timeBuf) { struct timeval tv; gettimeofday(&tv, nullptr); const time_t nowtime = tv.tv_sec; @@ -68,7 +82,7 @@ void LogOutputSink::setLogTime(char* buf) { if (nowtm != nullptr) { char tmbuf[TIME_BUF_SIZE]; (void)strftime(tmbuf, TIME_BUF_SIZE, "%m-%d %H:%M:%S", nowtm); - snprintf(buf, TIME_BUF_SIZE, "%.96s.%d", tmbuf, + snprintf(timeBuf, TIME_BUF_SIZE, "%.96s.%d", tmbuf, static_cast((tv.tv_usec / 1000U) % 1000U)); } } @@ -83,7 +97,6 @@ FtraceLogSink::FtraceLogSink() { } void FtraceLogSink::sendOffLog(LogItem logItem) { -#define TIME_BUF_SIZE 128 char timeInfo[TIME_BUF_SIZE]; setLogTime(timeInfo); dprintf(mFtraceFD, "%s CamHAL[%s] %s\n", timeInfo, cameraDebugLogToString(logItem.level), @@ -91,12 +104,11 @@ void FtraceLogSink::sendOffLog(LogItem logItem) { } #endif -#define DEFALUT_PATH "/run/camera/hal_logs.txt" FileLogSink::FileLogSink() { static const char* filePath = ::getenv("FILE_LOG_PATH"); if (filePath == nullptr) { - filePath = DEFALUT_PATH; + filePath = DEFAULT_FILELOG_PATH; } mFp = fopen(filePath, "w"); diff --git a/src/iutils/LogSink.h b/src/iutils/LogSink.h index a9caac5..72e96f7 100644 --- a/src/iutils/LogSink.h +++ b/src/iutils/LogSink.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef LOG_SINK -#define LOG_SINK +#pragma once #include @@ -40,8 +39,8 @@ class LibcameraLogSink : public LogOutputSink { void sendOffLog(LogItem logItem) override; }; #else -#endif +#endif #ifdef CAMERA_TRACE class FtraceLogSink : public LogOutputSink { public: @@ -68,5 +67,3 @@ class FileLogSink : public LogOutputSink { }; } // namespace icamera - -#endif diff --git a/src/iutils/ModuleTags.cpp b/src/iutils/ModuleTags.cpp index 2930ae3..baf030d 100644 --- a/src/iutils/ModuleTags.cpp +++ b/src/iutils/ModuleTags.cpp @@ -75,8 +75,7 @@ const char* tagNames[] = { "Dvs", "EXIFMaker", "EXIFMetaData", - "EvcpManager", - "ExifCreater", + "ExifCreator", "FaceDetection", "FaceDetectionPVL", "FaceSSD", @@ -119,9 +118,6 @@ const char* tagNames[] = { "IntelCca", "IntelCcaClient", "IntelCcaServer", - "IntelEVCPClient", - "IntelEVCPServer", - "IntelEvcp", "IntelFDServer", "IntelFaceDetection", "IntelFaceDetectionClient", @@ -131,7 +127,6 @@ const char* tagNames[] = { "IntelICBMServer", "IntelTNR7Stage", "IpuPacAdaptor", - "IspControlUtils", "JpegEncoderCore", "JpegMaker", "JsonCommonParser", @@ -172,17 +167,14 @@ const char* tagNames[] = { "Scheduler", "SensorHwCtrl", "SensorManager", - "SensorOB", "SofSource", "SwImageConverter", "SwImageProcessor", "SwPostProcessUnit", - "SyncManager", "SysCall", "TCPServer", "Thread", "Trace", - "UltraManEvcp", "Utils", "V4l2DeviceFactory", "V4l2_device_cc", diff --git a/src/iutils/ModuleTags.h b/src/iutils/ModuleTags.h index 2cc20d6..48bdf33 100644 --- a/src/iutils/ModuleTags.h +++ b/src/iutils/ModuleTags.h @@ -16,8 +16,7 @@ // !!! DO NOT EDIT THIS FILE !!! -#ifndef __MODULE_TAGS_HPP__ -#define __MODULE_TAGS_HPP__ +#pragma once #ifdef __clang__ #pragma clang diagnostic push @@ -83,129 +82,120 @@ enum ModuleTags { GENERATED_TAGS_Dvs = 53, GENERATED_TAGS_EXIFMaker = 54, GENERATED_TAGS_EXIFMetaData = 55, - GENERATED_TAGS_EvcpManager = 56, - GENERATED_TAGS_ExifCreater = 57, - GENERATED_TAGS_FaceDetection = 58, - GENERATED_TAGS_FaceDetectionPVL = 59, - GENERATED_TAGS_FaceSSD = 60, - GENERATED_TAGS_FaceStage = 61, - GENERATED_TAGS_FileSource = 62, - GENERATED_TAGS_GPUPostProcessor = 63, - GENERATED_TAGS_GPUPostStage = 64, - GENERATED_TAGS_GenGfx = 65, - GENERATED_TAGS_GraphConfig = 66, - GENERATED_TAGS_GraphConfigManager = 67, - GENERATED_TAGS_GraphUtils = 68, - GENERATED_TAGS_HAL_FACE_DETECTION_TEST = 69, - GENERATED_TAGS_HAL_basic = 70, - GENERATED_TAGS_HAL_inset_portrait = 71, - GENERATED_TAGS_HAL_jpeg = 72, - GENERATED_TAGS_HAL_multi_streams_test = 73, - GENERATED_TAGS_HAL_rotation_test = 74, - GENERATED_TAGS_HAL_supported_streams_test = 75, - GENERATED_TAGS_HAL_yuv = 76, - GENERATED_TAGS_HalAdaptor = 77, - GENERATED_TAGS_HalV3Utils = 78, - GENERATED_TAGS_I3AControlFactory = 79, - GENERATED_TAGS_ICBMThread = 80, - GENERATED_TAGS_ICamera = 81, - GENERATED_TAGS_IFaceDetection = 82, - GENERATED_TAGS_IPCIntelCca = 83, - GENERATED_TAGS_IPC_FACE_DETECTION = 84, - GENERATED_TAGS_IPipeManagerFactory = 85, - GENERATED_TAGS_IProcessingUnitFactory = 86, - GENERATED_TAGS_ImageProcessorCore = 87, - GENERATED_TAGS_ImageScalerCore = 88, - GENERATED_TAGS_Intel3AParameter = 89, - GENERATED_TAGS_IntelAEStateMachine = 90, - GENERATED_TAGS_IntelAFStateMachine = 91, - GENERATED_TAGS_IntelAWBStateMachine = 92, - GENERATED_TAGS_IntelAlgoClient = 93, - GENERATED_TAGS_IntelAlgoCommonClient = 94, - GENERATED_TAGS_IntelAlgoServer = 95, - GENERATED_TAGS_IntelCPUAlgoServer = 96, - GENERATED_TAGS_IntelCca = 97, - GENERATED_TAGS_IntelCcaClient = 98, - GENERATED_TAGS_IntelCcaServer = 99, - GENERATED_TAGS_IntelEVCPClient = 100, - GENERATED_TAGS_IntelEVCPServer = 101, - GENERATED_TAGS_IntelEvcp = 102, - GENERATED_TAGS_IntelFDServer = 103, - GENERATED_TAGS_IntelFaceDetection = 104, - GENERATED_TAGS_IntelFaceDetectionClient = 105, - GENERATED_TAGS_IntelGPUAlgoServer = 106, - GENERATED_TAGS_IntelICBM = 107, - GENERATED_TAGS_IntelICBMClient = 108, - GENERATED_TAGS_IntelICBMServer = 109, - GENERATED_TAGS_IntelTNR7Stage = 110, - GENERATED_TAGS_IpuPacAdaptor = 111, - GENERATED_TAGS_IspControlUtils = 112, - GENERATED_TAGS_JpegEncoderCore = 113, - GENERATED_TAGS_JpegMaker = 114, - GENERATED_TAGS_JsonCommonParser = 115, - GENERATED_TAGS_JsonParserBase = 116, - GENERATED_TAGS_LensHw = 117, - GENERATED_TAGS_LensManager = 118, - GENERATED_TAGS_LiveTuning = 119, - GENERATED_TAGS_MANUAL_POST_PROCESSING = 120, - GENERATED_TAGS_MakerNote = 121, - GENERATED_TAGS_MediaControl = 122, - GENERATED_TAGS_MetadataConvert = 123, - GENERATED_TAGS_MockCamera3HAL = 124, - GENERATED_TAGS_MockCameraHal = 125, - GENERATED_TAGS_MockPSysDevice = 126, - GENERATED_TAGS_MockSysCall = 127, - GENERATED_TAGS_MsgHandler = 128, - GENERATED_TAGS_OnePunchIC2 = 129, - GENERATED_TAGS_OpenSourceGFX = 130, - GENERATED_TAGS_PSysDevice = 131, - GENERATED_TAGS_ParameterConvert = 132, - GENERATED_TAGS_ParameterHelper = 133, - GENERATED_TAGS_Parameters = 134, - GENERATED_TAGS_PipeLine = 135, - GENERATED_TAGS_PipeManager = 136, - GENERATED_TAGS_PipeManagerStub = 137, - GENERATED_TAGS_PlatformData = 138, - GENERATED_TAGS_PnpDebugControl = 139, - GENERATED_TAGS_PostProcessStage = 140, - GENERATED_TAGS_PostProcessorBase = 141, - GENERATED_TAGS_PostProcessorCore = 142, - GENERATED_TAGS_ProcessingUnit = 143, - GENERATED_TAGS_RequestManager = 144, - GENERATED_TAGS_RequestThread = 145, - GENERATED_TAGS_ResultProcessor = 146, - GENERATED_TAGS_SWJpegEncoder = 147, - GENERATED_TAGS_SWPostProcessor = 148, - GENERATED_TAGS_SchedPolicy = 149, - GENERATED_TAGS_Scheduler = 150, - GENERATED_TAGS_SensorHwCtrl = 151, - GENERATED_TAGS_SensorManager = 152, - GENERATED_TAGS_SensorOB = 153, - GENERATED_TAGS_SofSource = 154, - GENERATED_TAGS_SwImageConverter = 155, - GENERATED_TAGS_SwImageProcessor = 156, - GENERATED_TAGS_SwPostProcessUnit = 157, - GENERATED_TAGS_SyncManager = 158, - GENERATED_TAGS_SysCall = 159, - GENERATED_TAGS_TCPServer = 160, - GENERATED_TAGS_Thread = 161, - GENERATED_TAGS_Trace = 162, - GENERATED_TAGS_UltraManEvcp = 163, - GENERATED_TAGS_Utils = 164, - GENERATED_TAGS_V4l2DeviceFactory = 165, - GENERATED_TAGS_V4l2_device_cc = 166, - GENERATED_TAGS_V4l2_subdevice_cc = 167, - GENERATED_TAGS_V4l2_video_node_cc = 168, - GENERATED_TAGS_VendorTags = 169, - GENERATED_TAGS_camera_metadata_tests = 170, - GENERATED_TAGS_icamera_metadata_base = 171, - GENERATED_TAGS_metadata_test = 172, - ST_FPS = 173, - ST_GPU_TNR = 174, - ST_STATS = 175, + GENERATED_TAGS_ExifCreator = 56, + GENERATED_TAGS_FaceDetection = 57, + GENERATED_TAGS_FaceDetectionPVL = 58, + GENERATED_TAGS_FaceSSD = 59, + GENERATED_TAGS_FaceStage = 60, + GENERATED_TAGS_FileSource = 61, + GENERATED_TAGS_GPUPostProcessor = 62, + GENERATED_TAGS_GPUPostStage = 63, + GENERATED_TAGS_GenGfx = 64, + GENERATED_TAGS_GraphConfig = 65, + GENERATED_TAGS_GraphConfigManager = 66, + GENERATED_TAGS_GraphUtils = 67, + GENERATED_TAGS_HAL_FACE_DETECTION_TEST = 68, + GENERATED_TAGS_HAL_basic = 69, + GENERATED_TAGS_HAL_inset_portrait = 70, + GENERATED_TAGS_HAL_jpeg = 71, + GENERATED_TAGS_HAL_multi_streams_test = 72, + GENERATED_TAGS_HAL_rotation_test = 73, + GENERATED_TAGS_HAL_supported_streams_test = 74, + GENERATED_TAGS_HAL_yuv = 75, + GENERATED_TAGS_HalAdaptor = 76, + GENERATED_TAGS_HalV3Utils = 77, + GENERATED_TAGS_I3AControlFactory = 78, + GENERATED_TAGS_ICBMThread = 79, + GENERATED_TAGS_ICamera = 80, + GENERATED_TAGS_IFaceDetection = 81, + GENERATED_TAGS_IPCIntelCca = 82, + GENERATED_TAGS_IPC_FACE_DETECTION = 83, + GENERATED_TAGS_IPipeManagerFactory = 84, + GENERATED_TAGS_IProcessingUnitFactory = 85, + GENERATED_TAGS_ImageProcessorCore = 86, + GENERATED_TAGS_ImageScalerCore = 87, + GENERATED_TAGS_Intel3AParameter = 88, + GENERATED_TAGS_IntelAEStateMachine = 89, + GENERATED_TAGS_IntelAFStateMachine = 90, + GENERATED_TAGS_IntelAWBStateMachine = 91, + GENERATED_TAGS_IntelAlgoClient = 92, + GENERATED_TAGS_IntelAlgoCommonClient = 93, + GENERATED_TAGS_IntelAlgoServer = 94, + GENERATED_TAGS_IntelCPUAlgoServer = 95, + GENERATED_TAGS_IntelCca = 96, + GENERATED_TAGS_IntelCcaClient = 97, + GENERATED_TAGS_IntelCcaServer = 98, + GENERATED_TAGS_IntelFDServer = 99, + GENERATED_TAGS_IntelFaceDetection = 100, + GENERATED_TAGS_IntelFaceDetectionClient = 101, + GENERATED_TAGS_IntelGPUAlgoServer = 102, + GENERATED_TAGS_IntelICBM = 103, + GENERATED_TAGS_IntelICBMClient = 104, + GENERATED_TAGS_IntelICBMServer = 105, + GENERATED_TAGS_IntelTNR7Stage = 106, + GENERATED_TAGS_IpuPacAdaptor = 107, + GENERATED_TAGS_JpegEncoderCore = 108, + GENERATED_TAGS_JpegMaker = 109, + GENERATED_TAGS_JsonCommonParser = 110, + GENERATED_TAGS_JsonParserBase = 111, + GENERATED_TAGS_LensHw = 112, + GENERATED_TAGS_LensManager = 113, + GENERATED_TAGS_LiveTuning = 114, + GENERATED_TAGS_MANUAL_POST_PROCESSING = 115, + GENERATED_TAGS_MakerNote = 116, + GENERATED_TAGS_MediaControl = 117, + GENERATED_TAGS_MetadataConvert = 118, + GENERATED_TAGS_MockCamera3HAL = 119, + GENERATED_TAGS_MockCameraHal = 120, + GENERATED_TAGS_MockPSysDevice = 121, + GENERATED_TAGS_MockSysCall = 122, + GENERATED_TAGS_MsgHandler = 123, + GENERATED_TAGS_OnePunchIC2 = 124, + GENERATED_TAGS_OpenSourceGFX = 125, + GENERATED_TAGS_PSysDevice = 126, + GENERATED_TAGS_ParameterConvert = 127, + GENERATED_TAGS_ParameterHelper = 128, + GENERATED_TAGS_Parameters = 129, + GENERATED_TAGS_PipeLine = 130, + GENERATED_TAGS_PipeManager = 131, + GENERATED_TAGS_PipeManagerStub = 132, + GENERATED_TAGS_PlatformData = 133, + GENERATED_TAGS_PnpDebugControl = 134, + GENERATED_TAGS_PostProcessStage = 135, + GENERATED_TAGS_PostProcessorBase = 136, + GENERATED_TAGS_PostProcessorCore = 137, + GENERATED_TAGS_ProcessingUnit = 138, + GENERATED_TAGS_RequestManager = 139, + GENERATED_TAGS_RequestThread = 140, + GENERATED_TAGS_ResultProcessor = 141, + GENERATED_TAGS_SWJpegEncoder = 142, + GENERATED_TAGS_SWPostProcessor = 143, + GENERATED_TAGS_SchedPolicy = 144, + GENERATED_TAGS_Scheduler = 145, + GENERATED_TAGS_SensorHwCtrl = 146, + GENERATED_TAGS_SensorManager = 147, + GENERATED_TAGS_SofSource = 148, + GENERATED_TAGS_SwImageConverter = 149, + GENERATED_TAGS_SwImageProcessor = 150, + GENERATED_TAGS_SwPostProcessUnit = 151, + GENERATED_TAGS_SysCall = 152, + GENERATED_TAGS_TCPServer = 153, + GENERATED_TAGS_Thread = 154, + GENERATED_TAGS_Trace = 155, + GENERATED_TAGS_Utils = 156, + GENERATED_TAGS_V4l2DeviceFactory = 157, + GENERATED_TAGS_V4l2_device_cc = 158, + GENERATED_TAGS_V4l2_subdevice_cc = 159, + GENERATED_TAGS_V4l2_video_node_cc = 160, + GENERATED_TAGS_VendorTags = 161, + GENERATED_TAGS_camera_metadata_tests = 162, + GENERATED_TAGS_icamera_metadata_base = 163, + GENERATED_TAGS_metadata_test = 164, + ST_FPS = 165, + ST_GPU_TNR = 166, + ST_STATS = 167, }; -#define TAGS_MAX_NUM 176 +#define TAGS_MAX_NUM 168 -#endif // !!! DO NOT EDIT THIS FILE !!! diff --git a/src/iutils/RWLock.h b/src/iutils/RWLock.h index a25ef56..daa254a 100644 --- a/src/iutils/RWLock.h +++ b/src/iutils/RWLock.h @@ -37,14 +37,14 @@ namespace icamera { */ class RWLock { public: - RWLock() {} - ~RWLock(); + RWLock() {} + ~RWLock(); - status_t readLock(); - status_t tryReadLock(); - status_t writeLock(); - status_t tryWriteLock(); - void unlock(); + status_t readLock(); + status_t tryReadLock(); + status_t writeLock(); + status_t tryWriteLock(); + void unlock(); class AutoRLock { public: @@ -64,10 +64,10 @@ class RWLock { private: // A RWLock cannot be copied - RWLock(const RWLock&); - RWLock& operator = (const RWLock&); + RWLock(const RWLock&); + RWLock& operator = (const RWLock&); - pthread_rwlock_t mRWLock = PTHREAD_RWLOCK_INITIALIZER; + pthread_rwlock_t mRWLock = PTHREAD_RWLOCK_INITIALIZER; }; inline RWLock::~RWLock() { diff --git a/src/iutils/ScopedAtrace.cpp b/src/iutils/ScopedAtrace.cpp index 709b4a6..4250d93 100644 --- a/src/iutils/ScopedAtrace.cpp +++ b/src/iutils/ScopedAtrace.cpp @@ -20,8 +20,8 @@ namespace icamera { -const int32_t ATRACE_LEN = 128; -uint32_t gScopedAtraceLevel = 0U; +static const int32_t ATRACE_LEN = 128; +static uint32_t gScopedAtraceLevel = 0U; ScopedAtrace::ScopedAtrace(uint32_t level, const char* func, const char* tag, const char* note, long value, const char* note2, int value2, const char* note3, diff --git a/src/iutils/SwImageConverter.cpp b/src/iutils/SwImageConverter.cpp index 30b544e..2f864b6 100644 --- a/src/iutils/SwImageConverter.cpp +++ b/src/iutils/SwImageConverter.cpp @@ -424,7 +424,7 @@ int SwImageConverter::convertFormat(unsigned int width, unsigned int height, uns CameraUtils::format2string(dstFmt).c_str(), width, height); if (dstFmt == srcFmt) { - // No need do format convertion. + // No need do format conversion. LOG2("No conversion needed"); MEMCPY_S(outBuf, outLength, inBuf, inLength); return 0; diff --git a/src/iutils/Thread.h b/src/iutils/Thread.h index c3984e1..5ad4ea7 100644 --- a/src/iutils/Thread.h +++ b/src/iutils/Thread.h @@ -134,7 +134,7 @@ class Thread { bool isExited() const; /** - * Overrided by derived class + * Overridden by derived class */ virtual void run() {} diff --git a/src/iutils/Trace.h b/src/iutils/Trace.h index 7b31b71..f721a98 100644 --- a/src/iutils/Trace.h +++ b/src/iutils/Trace.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef TRACE_H -#define TRACE_H +#pragma once #include #include @@ -220,5 +219,3 @@ static inline void atrace_int64(uint64_t tag, const char* name, int64_t value) { // ASYNC_TRACE_E } // namespace icamera - -#endif // TRACE_H diff --git a/src/iutils/Utils.cpp b/src/iutils/Utils.cpp index ab61cad..db9f93b 100644 --- a/src/iutils/Utils.cpp +++ b/src/iutils/Utils.cpp @@ -40,6 +40,12 @@ using std::string; #define FPS_FRAME_COUNT 60 // the frame interval to print fps +#define GET_FOURCC_FMT(a, b, c, d) \ + ((static_cast(d)) | \ + ((static_cast(c) << 8)) | \ + ((static_cast(b) << 16)) | \ + ((static_cast(a) << 24))) + namespace icamera { int CameraUtils::getFileContent(const char* filename, char* buffer, int maxSize) { @@ -57,12 +63,6 @@ int CameraUtils::getFileContent(const char* filename, char* buffer, int maxSize) return copyLength; } -#define GET_FOURCC_FMT(a, b, c, d) \ - ((static_cast(d)) | \ - ((static_cast(c) << 8)) | \ - ((static_cast(b) << 16)) | \ - ((static_cast(a) << 24))) - enum FormatType { FORMAT_RAW, FORMAT_RAW_VEC, @@ -539,14 +539,14 @@ int CameraUtils::getCompressedFrameSize(int format, int width, int height) { * Calc frame buffer size. * * Why alignment is 64? - * The IPU DMA unit must transimit at leat 64 bytes one time. + * The IPU DMA unit must transimit at least 64 bytes one time. * * Why need extra size? It's due to a hardware issue: the DMA unit is a power of * two, and a line should be transferred as few units as possible. * The result is that up to line length more data than the image size * may be transferred to memory after the image. * - * Another limition is the GDA(Global Dynamic Allocator) allocation unit size(1024). For low + * Another limitation is the GDA(Global Dynamic Allocator) allocation unit size(1024). For low * resolution it gives a bigger number. Use larger one to avoid * memory corruption. * for example: 320x480 UVVY, which bpl is 640, less than 1024, in this case, driver will @@ -557,7 +557,7 @@ int CameraUtils::getFrameSize(int format, int width, int height, bool needAligne const int alignedBpl = getStride(format, width); // Get frame size with aligned height taking in count for internal buffers. - // To garantee PSYS kernel like GDC always get enough buffer size to process. + // To guarantee PSYS kernel like GDC always get enough buffer size to process. // This is to satisfy the PSYS kernel, like GDC, input alignment requirement. if (needAlignedHeight) { height = ALIGN_64(height); @@ -608,7 +608,12 @@ void CameraUtils::getDeviceName(const char* entityName, string& deviceNodeName, CheckAndLogError((dp == nullptr), VOID_VALUE, "@%s, Fail open : %s", __func__, dirPath); struct dirent* dirp = nullptr; - while ((dirp = readdir(dp)) != nullptr) { + while (true) { + dirp = readdir(dp); + if (dirp == nullptr) { + break; + } + if ((dirp->d_type == DT_LNK) && (strncmp(dirp->d_name, filePrefix, strlen(filePrefix)) == 0)) { string subDeviceName = dirPath; @@ -621,7 +626,11 @@ void CameraUtils::getDeviceName(const char* entityName, string& deviceNodeName, char buf[128] = {'\0'}; int len = read(fd, buf, sizeof(buf)); close(fd); - len--; // remove "\n" + if (len > 0) { + len--; // remove "\n" + } else { + len = 0; + } if ((len == static_cast(strlen(entityName))) && (memcmp(buf, entityName, len) == 0)) { deviceNodeName = "/dev/"; @@ -692,8 +701,8 @@ void CameraUtils::getConfigModeFromString(string str, std::vector& c string resultStr, modeStr = str; while (split) { - size_t pos = 0U; - if ((pos = modeStr.find(",")) == string::npos) { + const auto pos = modeStr.find(","); + if (pos == string::npos) { mode = getConfigModeByName(modeStr.c_str()); split = false; } else { @@ -807,7 +816,8 @@ std::vector CameraUtils::splitString(const char* srcStr, char delim) { nsecs_t CameraUtils::systemTime() { struct timespec t; - t.tv_sec = t.tv_nsec = 0; + t.tv_sec = 0; + t.tv_nsec = 0; clock_gettime(CLOCK_MONOTONIC, &t); return nsecs_t(t.tv_sec) * 1000000000LL + t.tv_nsec; } diff --git a/src/iutils/Utils.h b/src/iutils/Utils.h index fa20be8..9c73b3c 100644 --- a/src/iutils/Utils.h +++ b/src/iutils/Utils.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef UTILS_H -#define UTILS_H +#pragma once #include #include @@ -127,7 +126,7 @@ typedef int64_t nsecs_t; * long long signed value (equivalent to int64_t) */ #define TIMEVAL2USECS(x) (static_cast( \ - ((x).tv_sec * 1000000000LL + (x).tv_usec * 1000LL) / 1000LL)) + ((x).tv_sec * 1000000000ULL + (x).tv_usec * 1000ULL) / 1000ULL)) // macro for float comparaion with 0 #define EPSILON 0.00001 @@ -275,11 +274,9 @@ std::vector splitString(const char* srcStr, char delim); nsecs_t systemTime(); -void checkFps(unsigned int frameNumber, timeval *requestTime); +void checkFps(unsigned int frameNumber, timeval *startPoint); frame_usage_mode_t getFrameUsage(const stream_config_t *streamList); } // namespace CameraUtils } // namespace icamera - -#endif // UTILS_H diff --git a/src/jpeg/CMakeLists.txt b/src/jpeg/CMakeLists.txt index 409f472..48988e6 100644 --- a/src/jpeg/CMakeLists.txt +++ b/src/jpeg/CMakeLists.txt @@ -27,7 +27,7 @@ endif() set(JPEG_SRCS ${JPEG_SRCS} - ${JPEG_DIR}/ExifCreater.cpp + ${JPEG_DIR}/ExifCreator.cpp ${JPEG_DIR}/EXIFMetaData.cpp ${JPEG_DIR}/EXIFMaker.cpp ${JPEG_DIR}/JpegMaker.cpp diff --git a/src/jpeg/EXIFMaker.cpp b/src/jpeg/EXIFMaker.cpp index cd37ce1..7e686f8 100644 --- a/src/jpeg/EXIFMaker.cpp +++ b/src/jpeg/EXIFMaker.cpp @@ -97,7 +97,7 @@ void EXIFMaker::readProperty() { * Fills EXIF data after a picture has been taken to * record the active sensor, 3A and ISP state to EXIF metadata. * - * This function is intented to set EXIF tags belonging + * This function is intended to set EXIF tags belonging * to the EXIF "Per Picture Camera Setting" group. * * @arg params active Android HAL parameters diff --git a/src/jpeg/EXIFMaker.h b/src/jpeg/EXIFMaker.h index d776adb..af21aed 100644 --- a/src/jpeg/EXIFMaker.h +++ b/src/jpeg/EXIFMaker.h @@ -19,7 +19,7 @@ #include #include "EXIFMetaData.h" -#include "ExifCreater.h" +#include "ExifCreator.h" #include "AiqResult.h" #include "CameraContext.h" #include "iutils/Utils.h" @@ -53,7 +53,7 @@ class EXIFMaker { void setSensorAeConfig(const AiqResult* aiqResult, const DataContext* dataContext); private: // member variables - ExifCreater mEncoder; + ExifCreator mEncoder; exif_attribute_t mExifAttributes; size_t mExifSize; bool mInitialized; diff --git a/src/jpeg/Exif.h b/src/jpeg/Exif.h index bce7b71..484a9a8 100644 --- a/src/jpeg/Exif.h +++ b/src/jpeg/Exif.h @@ -35,7 +35,7 @@ #define NUM_1TH_IFD_TIFF 9 // For QVGA: 320 * 240 * 1.5 #define EXIF_SIZE_LIMITATION 0x10000 -// Limite the thumbnail size to 32k, to make sure the whole exif size does +// Limit the thumbnail size to 32k, to make sure the whole exif size does // not exceed the exif size limitation. We guess the total size of all the // other fields is smaller than 32k. (Currently the size is about 26k.) #define THUMBNAIL_SIZE_LIMITATION 0x8000 diff --git a/src/jpeg/ExifCreater.cpp b/src/jpeg/ExifCreator.cpp similarity index 96% rename from src/jpeg/ExifCreater.cpp rename to src/jpeg/ExifCreator.cpp index cc51b36..d3db8c9 100644 --- a/src/jpeg/ExifCreater.cpp +++ b/src/jpeg/ExifCreator.cpp @@ -15,15 +15,15 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * JPEG DRIVER MODULE (ExifCreater.cpp) + * JPEG DRIVER MODULE (ExifCreator.cpp) * Author : ge.lee -- initial version * Date : 03 June 2010 * Purpose : This file implements the JPEG encoder APIs as needed by Camera HAL */ -#define LOG_TAG ExifCreater +#define LOG_TAG ExifCreator -#include "ExifCreater.h" +#include "ExifCreator.h" #include #include @@ -37,14 +37,14 @@ static const char ExifAsciiPrefix[] = {0x41, 0x53, 0x43, 0x49, 0x49, 0x0, 0x0, 0 namespace icamera { -ExifCreater::ExifCreater() { +ExifCreator::ExifCreator() { m_thumbBuf = nullptr; m_thumbSize = 0; } -ExifCreater::~ExifCreater() {} +ExifCreator::~ExifCreator() {} -exif_status ExifCreater::setThumbData(const void* thumbBuf, unsigned int thumbSize) { +exif_status ExifCreator::setThumbData(const void* thumbBuf, unsigned int thumbSize) { if ((thumbSize + EXIF_SIZE_WITHOUT_THUMBNAIL) >= EXIF_SIZE_LIMITATION) { LOGE("ERROR: Too big thumb size %d (limit: %d)", thumbSize, EXIF_SIZE_LIMITATION); m_thumbBuf = nullptr; @@ -57,12 +57,12 @@ exif_status ExifCreater::setThumbData(const void* thumbBuf, unsigned int thumbSi return EXIF_SUCCESS; } -bool ExifCreater::isThumbDataSet() const { +bool ExifCreator::isThumbDataSet() const { return m_thumbBuf != nullptr; } // if exif tags size + thumbnail size is > 64K, it will disable thumbnail -exif_status ExifCreater::makeExif(void* exifOut, exif_attribute_t* exifInfo, size_t* size) { +exif_status ExifCreator::makeExif(void* exifOut, exif_attribute_t* exifInfo, size_t* size) { LOG1("makeExif start"); unsigned char *pCur, *pApp1Start, *pIfdStart, *pGpsIfdPtr, *pNextIfdOffset; @@ -354,7 +354,7 @@ exif_status ExifCreater::makeExif(void* exifOut, exif_attribute_t* exifInfo, siz return status; } -void ExifCreater::writeMarkerSizeToBuf(unsigned char* ptrTo, unsigned int size) { +void ExifCreator::writeMarkerSizeToBuf(unsigned char* ptrTo, unsigned int size) { unsigned char size_mm[2] = {static_cast((size >> 8) & 0xFF), static_cast(size & 0xFF)}; @@ -372,7 +372,7 @@ void ExifCreater::writeMarkerSizeToBuf(unsigned char* ptrTo, unsigned int size) * \param writeId [IN] Whether to write the Intel Makernote ID string. * \param size [OUT] Total size after APP2 is written */ -exif_status ExifCreater::makeApp2(void* pStartApp2, size_t& size, exif_attribute_t* exifInfo, +exif_status ExifCreator::makeApp2(void* pStartApp2, size_t& size, exif_attribute_t* exifInfo, bool writeId) { // APP2 marker will be written starting from the pos pointed to by // pStartApp2 @@ -446,7 +446,7 @@ exif_status ExifCreater::makeApp2(void* pStartApp2, size_t& size, exif_attribute return EXIF_SUCCESS; } -void ExifCreater::writeThumbData(unsigned char* pIfdStart, unsigned char* pNextIfdOffset, +void ExifCreator::writeThumbData(unsigned char* pIfdStart, unsigned char* pNextIfdOffset, unsigned int* LongerTagOffset, exif_attribute_t* exifInfo) { unsigned char* pCur; unsigned int tmp; @@ -501,7 +501,7 @@ void ExifCreater::writeThumbData(unsigned char* pIfdStart, unsigned char* pNextI } } -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, +void ExifCreator::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, unsigned int count, uint32_t value) { MEMCPY_S(*pCur, 2, (int8_t*)&tag, 2); *pCur += 2; @@ -513,7 +513,7 @@ void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigne *pCur += 4; } -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, +void ExifCreator::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, unsigned int count, unsigned char* pValue) { char buf[4] = { 0, @@ -530,7 +530,7 @@ void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigne *pCur += 4; } -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, +void ExifCreator::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, unsigned int count, unsigned char* pValue, unsigned int* offset, unsigned char* start) { MEMCPY_S(*pCur, 2, (int8_t*)&tag, 2); @@ -545,7 +545,7 @@ void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigne *offset += count; } -void ExifCreater::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, +void ExifCreator::writeExifIfd(unsigned char** pCur, unsigned short tag, unsigned short type, unsigned int count, rational_t* pValue, unsigned int* offset, unsigned char* start) { MEMCPY_S(*pCur, 2, (int8_t*)&tag, 2); diff --git a/src/jpeg/ExifCreater.h b/src/jpeg/ExifCreator.h similarity index 98% rename from src/jpeg/ExifCreater.h rename to src/jpeg/ExifCreator.h index bf90e26..ae5eb3b 100644 --- a/src/jpeg/ExifCreater.h +++ b/src/jpeg/ExifCreator.h @@ -72,10 +72,10 @@ const unsigned SIZEOF_APP2_OVERHEAD = const bool ENABLE_APP2_MARKER = true; typedef enum { EXIF_FAIL = -1, EXIF_SUCCESS = 0 } exif_status; -class ExifCreater { +class ExifCreator { public: - ExifCreater(); - virtual ~ExifCreater(); + ExifCreator(); + virtual ~ExifCreator(); exif_status setThumbData(const void* thumbBuf, unsigned int thumbSize); diff --git a/src/jpeg/JpegMaker.cpp b/src/jpeg/JpegMaker.cpp index c43209c..db218a8 100644 --- a/src/jpeg/JpegMaker.cpp +++ b/src/jpeg/JpegMaker.cpp @@ -130,7 +130,7 @@ status_t JpegMaker::processJpegSettings(const AiqResult* aiqResult, const DataCo LOG2("@%s:", __func__); status_t status = OK; - CheckAndLogError(!metaData, UNKNOWN_ERROR, "MetaData struct not intialized"); + CheckAndLogError(!metaData, UNKNOWN_ERROR, "MetaData struct not initialized"); metaData->mJpegSetting.jpegQuality = dataContext->mJpegParams.jpegQuality; @@ -162,7 +162,7 @@ status_t JpegMaker::processJpegSettings(const AiqResult* aiqResult, const DataCo /** * This function will get GPS metadata from request setting * - * \param[in] settings The Anroid metadata to process GPS settings from + * \param[in] settings The Android metadata to process GPS settings from * \param[out] metadata The EXIF data where the GPS setting are written to */ status_t JpegMaker::processGpsSettings(const DataContext* dataContext, ExifMetaData* metadata) { diff --git a/src/jpeg/sw/SWJpegEncoder.cpp b/src/jpeg/sw/SWJpegEncoder.cpp index 2dd94c4..6207f79 100644 --- a/src/jpeg/sw/SWJpegEncoder.cpp +++ b/src/jpeg/sw/SWJpegEncoder.cpp @@ -228,7 +228,7 @@ void SWJpegEncoder::deInit(void) { } /** - * configue every thread for multi thread jpeg + * configure every thread for multi thread jpeg * * \param package: jpeg encode package */ @@ -416,7 +416,8 @@ SWJpegEncoder::CodecWorkerThread::~CodecWorkerThread() { */ status_t SWJpegEncoder::CodecWorkerThread::runThread(const char* name) { LOG2("@%s, line:%d", __func__, __LINE__); - return this->start(); + this->start(); + return OK; } /** @@ -539,8 +540,8 @@ void SWJpegEncoder::Codec::setJpegQuality(int quality) { * * mainly, it will set the destination buffer manager, color space, quality. * - * \param width: the width of the jpeg dimentions. - * \param height: the height of the jpeg dimentions. + * \param width: the width of the jpeg dimensions. + * \param height: the height of the jpeg dimensions. * \param jpegBuf: the dest buffer to store the jpeg data * \param jpegBufSize: the size of jpegBuf buffer * diff --git a/src/meson.build b/src/meson.build index 8573d51..c6bf941 100644 --- a/src/meson.build +++ b/src/meson.build @@ -29,7 +29,6 @@ libcamera_sources += files([ '3a/intel3a/Intel3AParameter.cpp', 'core/BufferQueue.cpp', 'core/CameraBuffer.cpp', - 'core/CameraBufferPool.cpp', 'core/CameraContext.cpp', 'core/CameraEvent.cpp', 'core/CameraStream.cpp', diff --git a/src/metadata/CameraMetadata.cpp b/src/metadata/CameraMetadata.cpp index 555d19b..7950db9 100644 --- a/src/metadata/CameraMetadata.cpp +++ b/src/metadata/CameraMetadata.cpp @@ -145,8 +145,8 @@ status_t CameraMetadata::checkType(uint32_t tag, uint8_t expectedType) { status_t CameraMetadata::update(uint32_t tag, const int32_t* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_INT32)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_INT32); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -154,8 +154,8 @@ status_t CameraMetadata::update(uint32_t tag, const int32_t* data, size_t data_c status_t CameraMetadata::update(uint32_t tag, const uint8_t* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_BYTE)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_BYTE); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -163,8 +163,8 @@ status_t CameraMetadata::update(uint32_t tag, const uint8_t* data, size_t data_c status_t CameraMetadata::update(uint32_t tag, const float* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_FLOAT)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_FLOAT); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -172,8 +172,8 @@ status_t CameraMetadata::update(uint32_t tag, const float* data, size_t data_cou status_t CameraMetadata::update(uint32_t tag, const int64_t* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_INT64)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_INT64); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -181,8 +181,8 @@ status_t CameraMetadata::update(uint32_t tag, const int64_t* data, size_t data_c status_t CameraMetadata::update(uint32_t tag, const double* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_DOUBLE)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_DOUBLE); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -191,8 +191,8 @@ status_t CameraMetadata::update(uint32_t tag, const double* data, size_t data_co status_t CameraMetadata::update(uint32_t tag, const icamera_metadata_rational_t* data, size_t data_count) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_RATIONAL)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_RATIONAL); + if (res != OK) { return res; } return updateImpl(tag, reinterpret_cast(data), data_count); @@ -200,8 +200,8 @@ status_t CameraMetadata::update(uint32_t tag, const icamera_metadata_rational_t* status_t CameraMetadata::update(uint32_t tag, const std::string& string) { CheckAndLogError(mLocked, INVALID_OPERATION, "%s: CameraMetadata is locked", __func__); - status_t res; - if ((res = checkType(tag, ICAMERA_TYPE_BYTE)) != OK) { + const status_t res = checkType(tag, ICAMERA_TYPE_BYTE); + if (res != OK) { return res; } // string.size() doesn't count the null termination character. diff --git a/src/metadata/CameraMetadata.h b/src/metadata/CameraMetadata.h index 3dc8e08..1bfb4c2 100644 --- a/src/metadata/CameraMetadata.h +++ b/src/metadata/CameraMetadata.h @@ -15,9 +15,7 @@ * limitations under the License. */ -#ifndef CAMERA_METADATA_H -#define CAMERA_METADATA_H - +#pragma once #include #include "icamera_metadata_base.h" @@ -110,7 +108,7 @@ class CameraMetadata { size_t entryCount() const; /** - * Is the buffer empty (no entires) + * Is the buffer empty (no entries) */ bool isEmpty() const; @@ -192,4 +190,3 @@ class CameraMetadata { } // namespace icamera -#endif // CAMERA_METADATA_H diff --git a/src/metadata/ParameterHelper.h b/src/metadata/ParameterHelper.h index 454023b..09e0fb4 100644 --- a/src/metadata/ParameterHelper.h +++ b/src/metadata/ParameterHelper.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef PARAMETER_HELPER_H -#define PARAMETER_HELPER_H +#pragma once #include "iutils/RWLock.h" #include "CameraMetadata.h" @@ -142,5 +141,3 @@ class ParameterHelper { }; } // namespace icamera - -#endif // PARAMETER_HELPER_H diff --git a/src/metadata/Parameters.cpp b/src/metadata/Parameters.cpp index 5423b90..dbb168c 100644 --- a/src/metadata/Parameters.cpp +++ b/src/metadata/Parameters.cpp @@ -49,7 +49,7 @@ void Parameters::merge(const Parameters& other) { } int Parameters::setAeMode(camera_ae_mode_t aeMode) { - uint8_t mode = aeMode; + uint8_t mode = static_cast(aeMode); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_AE_MODE, &mode, 1); } @@ -65,7 +65,7 @@ int Parameters::getAeMode(camera_ae_mode_t& aeMode) const { } int Parameters::setAeState(camera_ae_state_t aeState) { - uint8_t state = aeState; + uint8_t state = static_cast(aeState); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_AE_STATE, &state, 1); } @@ -222,7 +222,7 @@ int Parameters::getFrameRate(float& fps) const { } int Parameters::setAntiBandingMode(camera_antibanding_mode_t bandingMode) { - uint8_t mode = bandingMode; + uint8_t mode = static_cast(bandingMode); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_AE_ANTIBANDING_MODE, &mode, 1); } @@ -238,7 +238,7 @@ int Parameters::getAntiBandingMode(camera_antibanding_mode_t& bandingMode) const } int Parameters::setAwbMode(camera_awb_mode_t awbMode) { - uint8_t mode = awbMode; + uint8_t mode = static_cast(awbMode); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_AWB_MODE, &mode, 1); } @@ -254,7 +254,7 @@ int Parameters::getAwbMode(camera_awb_mode_t& awbMode) const { } int Parameters::setAwbState(camera_awb_state_t awbState) { - uint8_t state = awbState; + uint8_t state = static_cast(awbState); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_AWB_STATE, &state, 1); } @@ -325,7 +325,7 @@ int Parameters::getAwbGains(camera_awb_gains_t& awbGains) const { int Parameters::setAwbResult(void* data) { const uint32_t size = sizeof(camera_awb_result_t); - const uint32_t tag = CAMERA_AWB_RESULT; + const uint32_t tag = static_cast(CAMERA_AWB_RESULT); ParameterHelper::AutoWLock wl(mData); if (data == NULL) { @@ -340,7 +340,7 @@ int Parameters::getAwbResult(void* data) const { } const uint32_t size = sizeof(camera_awb_result_t); - const uint32_t tag = CAMERA_AWB_RESULT; + const uint32_t tag = static_cast(CAMERA_AWB_RESULT); ParameterHelper::AutoRLock rl(mData); auto entry = ParameterHelper::getMetadataEntry(mData, tag); @@ -1149,20 +1149,20 @@ int Parameters::getRun3ACadence(int& cadence) const { return OK; } -int Parameters::setFisheyeDewarpingMode(camera_fisheye_dewarping_mode_t mode) { - uint8_t dewarpingMode = static_cast(mode); +int Parameters::setFisheyeDewarpingMode(camera_fisheye_dewarping_mode_t dewarpingMode) { + uint8_t mode = static_cast(dewarpingMode); ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(INTEL_CONTROL_FISHEYE_DEWARPING_MODE, - &dewarpingMode, 1); + &mode, 1); } -int Parameters::getFisheyeDewarpingMode(camera_fisheye_dewarping_mode_t& mode) const { +int Parameters::getFisheyeDewarpingMode(camera_fisheye_dewarping_mode_t& dewarpingMode) const { ParameterHelper::AutoRLock rl(mData); auto entry = ParameterHelper::getMetadataEntry(mData, INTEL_CONTROL_FISHEYE_DEWARPING_MODE); if (entry.count != 1) { return NAME_NOT_FOUND; } - mode = static_cast(entry.data.u8[0]); + dewarpingMode = static_cast(entry.data.u8[0]); return OK; } @@ -1501,7 +1501,7 @@ int Parameters::getAfState(camera_af_state_t& afState) const { } int Parameters::setLensState(bool lensMoving) { - uint8_t state = (lensMoving) ? 1 : 0; + uint8_t state = (lensMoving) ? 1U : 0U; ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_LENS_STATE, &state, 1); } @@ -1568,7 +1568,7 @@ int Parameters::getSensorMountType(camera_mount_type_t& sensorMountType) const { return OK; } -// User can set envrionment and then call api to update the debug level. +// User can set environment and then call api to update the debug level. int Parameters::updateDebugLevel() { Log::setDebugLevel(); return OK; @@ -1632,7 +1632,7 @@ int Parameters::getFaceDetectMode(uint8_t& faceDetectMode) const { return OK; } -int Parameters::setFaceIds(int* faceIds, int faceNum) { +int Parameters::setFaceIds(const int* faceIds, int faceNum) { ParameterHelper::AutoWLock wl(mData); return ParameterHelper::getMetadata(mData).update(CAMERA_STATISTICS_FACE_IDS, faceIds, faceNum); } diff --git a/src/metadata/icamera_metadata_base.cpp b/src/metadata/icamera_metadata_base.cpp index f58f4fa..1db972d 100644 --- a/src/metadata/icamera_metadata_base.cpp +++ b/src/metadata/icamera_metadata_base.cpp @@ -887,7 +887,8 @@ void dump_indented_icamera_metadata(const icamera_metadata_t *metadata, camera_metadata_buffer_entry_t *entry = get_entries(metadata); for (i = 0U; i < metadata->entry_count; i++, entry++) { - const char *tag_name, *tag_section; + const char *tag_name; + const char *tag_section; tag_section = get_icamera_metadata_section_name(entry->tag); if (tag_section == NULL) { tag_section = "unknownSection"; @@ -961,7 +962,8 @@ static void print_data(int32_t fd, const uint8_t *data_ptr, uint32_t tag, } int index = 0; - int j, k; + int j; + int k; for (j = 0; j < lines; j++) { dprintf(fd, "%*s[", indentation + 4, ""); for (k = 0; diff --git a/src/metadata/icamera_metadata_base.h b/src/metadata/icamera_metadata_base.h index d9a7584..3e7df9c 100644 --- a/src/metadata/icamera_metadata_base.h +++ b/src/metadata/icamera_metadata_base.h @@ -15,9 +15,7 @@ * limitations under the License. */ -#ifndef ICAMERA_METADATA_BASE_H -#define ICAMERA_METADATA_BASE_H - +#pragma once #include #include @@ -451,4 +449,3 @@ int icamera_metadata_enum_snprint(uint32_t tag, } #endif -#endif // ICAMERA_METADATA_BASE_H diff --git a/src/metadata/icamera_metadata_tags.h b/src/metadata/icamera_metadata_tags.h index 3c55fec..9396124 100644 --- a/src/metadata/icamera_metadata_tags.h +++ b/src/metadata/icamera_metadata_tags.h @@ -29,7 +29,7 @@ /** * Top level hierarchy definitions for camera metadata. *_INFO sections are for - * the static metadata that can be retrived without opening the camera device. + * the static metadata that can be retrieved without opening the camera device. * New sections must be added right before CAMERA_SECTION_COUNT to maintain * existing enumerations. */ diff --git a/src/platformdata/CameraParserInvoker.cpp b/src/platformdata/CameraParserInvoker.cpp index 1c52b73..6f3924e 100644 --- a/src/platformdata/CameraParserInvoker.cpp +++ b/src/platformdata/CameraParserInvoker.cpp @@ -43,7 +43,7 @@ void CameraParserInvoker::parseSensors() { mStaticCfg->mCommonConfig.availableSensors); if (allSensors.empty()) { - LOGW("%s: No sensors availabe", __func__); + LOGW("%s: No sensors available", __func__); return; } @@ -68,10 +68,10 @@ void CameraParserInvoker::runParser() { dumpSensorInfo(); } -void CameraParserInvoker::chooseAvaliableJsonFile( - const std::vector& avaliableJsonFiles, std::string* jsonFile) { +void CameraParserInvoker::chooseAvailableJsonFile( + const std::vector& availableJsonFiles, std::string* jsonFile) const { struct stat st; - for (const auto json : avaliableJsonFiles) { + for (const auto json : availableJsonFiles) { const int ret = stat(json, &st); if (ret == 0) { *jsonFile = json; @@ -87,7 +87,7 @@ std::string CameraParserInvoker::getJsonFileFullName(std::string fileName) { sysFolderFileName.c_str()}; std::string chosenJsonFile = fileName; - chooseAvaliableJsonFile(profiles, &chosenJsonFile); + chooseAvailableJsonFile(profiles, &chosenJsonFile); return chosenJsonFile; } diff --git a/src/platformdata/CameraParserInvoker.h b/src/platformdata/CameraParserInvoker.h index 2529fb9..c880805 100644 --- a/src/platformdata/CameraParserInvoker.h +++ b/src/platformdata/CameraParserInvoker.h @@ -40,8 +40,8 @@ class CameraParserInvoker { void parseCommon(); void parseSensors(); void dumpSensorInfo(void); - void chooseAvaliableJsonFile(const std::vector& avaliableJsonFiles, - std::string* jsonFile); + void chooseAvailableJsonFile(const std::vector& availableJsonFiles, + std::string* jsonFile) const; std::string getJsonFileFullName(std::string fileName); private: diff --git a/src/platformdata/CameraSensorsParser.cpp b/src/platformdata/CameraSensorsParser.cpp index 32bb1a0..49f4238 100644 --- a/src/platformdata/CameraSensorsParser.cpp +++ b/src/platformdata/CameraSensorsParser.cpp @@ -497,19 +497,19 @@ void CameraSensorsParser::parseStaticMetaDataSectionSupportedFeatures(const Json for (Json::Value::ArrayIndex i = 0; i < node.size(); ++i) { camera_features feature = INVALID_FEATURE; - auto featrueStr = node[i].asString(); + const auto featureStr = node[i].asString(); - if (featrueStr == "MANUAL_EXPOSURE") + if (featureStr == "MANUAL_EXPOSURE") feature = MANUAL_EXPOSURE; - else if (featrueStr == "MANUAL_WHITE_BALANCE") + else if (featureStr == "MANUAL_WHITE_BALANCE") feature = MANUAL_WHITE_BALANCE; - else if (featrueStr == "IMAGE_ENHANCEMENT") + else if (featureStr == "IMAGE_ENHANCEMENT") feature = IMAGE_ENHANCEMENT; - else if (featrueStr == "NOISE_REDUCTION") + else if (featureStr == "NOISE_REDUCTION") feature = NOISE_REDUCTION; - else if (featrueStr == "SCENE_MODE") + else if (featureStr == "SCENE_MODE") feature = SCENE_MODE; - else if (featrueStr == "PER_FRAME_CONTROL") + else if (featureStr == "PER_FRAME_CONTROL") feature = PER_FRAME_CONTROL; if (feature != INVALID_FEATURE) { @@ -734,7 +734,7 @@ std::string CameraSensorsParser::resolveI2CBusString(const std::string& name) { pos = res.find("$CAP_N"); if (pos != std::string::npos) { res.replace(pos, sizeof("$CAP_N"), - std::to_string(std::stoi(mCsiPort) * NR_OF_CSI2_SRC_PADS)); + std::to_string(std::atoi(mCsiPort.c_str()) * NR_OF_CSI2_SRC_PADS)); } return res; @@ -848,6 +848,9 @@ void CameraSensorsParser::parseSensorSection(const Json::Value& node) { if (node.isMember("faceEngineVendor")) { mCurCam->mFaceEngineVendor = node["faceEngineVendor"].asInt(); } + if (node.isMember("runFaceWithSyncMode")) { + mCurCam->mRunFaceWithSyncMode = node["runFaceWithSyncMode"].asBool(); + } if (node.isMember("psysBundleWithAic")) { mCurCam->mPsysBundleWithAic = node["psysBundleWithAic"].asBool(); } @@ -881,6 +884,9 @@ void CameraSensorsParser::parseSensorSection(const Json::Value& node) { if (node.isMember("removeCacheFlushOutputBuffer")) { mCurCam->mRemoveCacheFlushOutputBuffer = node["removeCacheFlushOutputBuffer"].asBool(); } + if (node.isMember("sensorExposureNum")) { + mCurCam->mSensorExposureNum = node["sensorExposureNum"].asInt(); + } if (node.isMember("MediaCtlConfig")) { parseMediaCtlConfigSection(node["MediaCtlConfig"]); @@ -1004,10 +1010,14 @@ void CameraSensorsParser::updateNVMDir() { } fseek(fp, 0, SEEK_SET); std::unique_ptr ptr(new char[size + 1]); - ptr[size] = 0; size_t readSize = fread(ptr.get(), sizeof(char), size, fp); fclose(fp); + if (readSize < size) { + ptr[readSize] = '\0'; + } else { + ptr[size] = '\0'; + } if (readSize > 0) { for (auto& nvm : mNVMDeviceInfo) { if (strstr(ptr.get(), nvm.nodeName.c_str()) != nullptr) { diff --git a/src/platformdata/CameraTypes.h b/src/platformdata/CameraTypes.h index 88d8878..4b41606 100644 --- a/src/platformdata/CameraTypes.h +++ b/src/platformdata/CameraTypes.h @@ -62,7 +62,7 @@ enum { enum { SENSOR_GAIN_NONE = 0, - SENSOR_MULTI_DG_AND_CONVERTION_AG, /* Multi-DigitalGain and convertion AnalogGain are set + SENSOR_MULTI_DG_AND_CONVERSION_AG, /* Multi-DigitalGain and conversion AnalogGain are set to sensor driver */ ISP_DG_AND_SENSOR_DIRECT_AG, /* All digital gain is passed to ISP */ SENSOR_MULTI_DG_AND_DIRECT_AG /* Multi analog and digital gains, i.e. DCG */ diff --git a/src/platformdata/PlatformData.cpp b/src/platformdata/PlatformData.cpp index 740d8c7..32d79c4 100644 --- a/src/platformdata/PlatformData.cpp +++ b/src/platformdata/PlatformData.cpp @@ -104,7 +104,7 @@ int PlatformData::init() { /** * Read graph descriptor and settings from configuration files. * - * The resulting graphs represend all possible graphs for given sensor, and + * The resulting graphs represent all possible graphs for given sensor, and * they are stored in capinfo structure. */ void PlatformData::parseGraphFromXmlFile() { @@ -291,12 +291,6 @@ bool PlatformData::isNeedToPreRegisterBuffer(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mNeedPreRegisterBuffers; } -// FRAME_SYNC_S -bool PlatformData::isEnableFrameSyncCheck(int cameraId) { - return getInstance()->mStaticCfg.mCameras[cameraId].mFrameSyncCheckEnabled; -} -// FRAME_SYNC_E - int PlatformData::getExposureNum(int cameraId, bool multiExposure) { if (multiExposure) { return getInstance()->mStaticCfg.mCameras[cameraId].mSensorExposureNum; @@ -697,25 +691,6 @@ int PlatformData::getISysRawFormat(int cameraId) { return getInstance()->mStaticCfg.mCameras[cameraId].mISysRawFormat; } -stream_t PlatformData::getISysOutputByPort(int cameraId, uuid port) { - stream_t config; - CLEAR(config); - - MediaCtlConf* mc = PlatformData::getMediaCtlConf(cameraId); - CheckAndLogError(!mc, config, "Invalid media control config."); - - for (const auto& output : mc->outputs) { - if (output.port == port) { - config.format = output.v4l2Format; - config.width = output.width; - config.height = output.height; - break; - } - } - - return config; -} - // CSI_META_S bool PlatformData::isCsiMetaEnabled(int cameraId) { // FILE_SOURCE_S @@ -1105,7 +1080,7 @@ int PlatformData::getStreamIdByConfigMode(int cameraId, ConfigMode configMode) { return modeMap.find(configMode) == modeMap.end() ? -1 : modeMap[configMode]; } -int PlatformData::getMaxRequestsInHAL(int cameraId) { +int32_t PlatformData::getMaxPipelineDepth(int cameraId) { const std::string str = "request.pipelineMaxDepth"; auto v = getByteStaticMetadata(cameraId, str); if (v.size() == 1) { @@ -1171,22 +1146,6 @@ bool PlatformData::isCSIBackEndCapture(int cameraId) { return isCsiBECapture; } -bool PlatformData::isCSIFrontEndCapture(int cameraId) { - bool isCsiFeCapture = false; - MediaCtlConf* mc = getMediaCtlConf(cameraId); - CheckAndLogError(!mc, false, "getMediaCtlConf returns nullptr, cameraId:%d", cameraId); - - for (const auto& node : mc->videoNodes) { - if ((node.videoNodeType == VIDEO_GENERIC) && - ((node.name.find(CSI_PORT_NAME) != string::npos) || - (node.name.find("TPG") != string::npos))) { - isCsiFeCapture = true; - break; - } - } - return isCsiFeCapture; -} - bool PlatformData::isTPGReceiver(int cameraId) { bool isTPGCapture = false; MediaCtlConf* mc = getMediaCtlConf(cameraId); diff --git a/src/platformdata/PlatformData.h b/src/platformdata/PlatformData.h index bdba766..5850fc8 100644 --- a/src/platformdata/PlatformData.h +++ b/src/platformdata/PlatformData.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef PLATFORM_DATA_H -#define PLATFORM_DATA_H +#pragma once #include #include @@ -223,9 +222,6 @@ class PlatformData { mUseSensorDigitalGain(false), mUseIspDigitalGain(false), mNeedPreRegisterBuffers(false), - // FRAME_SYNC_S - mFrameSyncCheckEnabled(false), - // FRAME_SYNC_E mEnableAiqd(false), mCurrentMcConf(nullptr), mDVSType(MORPH_TABLE), @@ -316,9 +312,6 @@ class PlatformData { bool mUseSensorDigitalGain; bool mUseIspDigitalGain; bool mNeedPreRegisterBuffers; - // FRAME_SYNC_S - bool mFrameSyncCheckEnabled; - // FRAME_SYNC_E bool mEnableAiqd; MediaCtlConf* mCurrentMcConf; std::map mStreamToMcMap; @@ -466,7 +459,7 @@ class PlatformData { * get the sensor description * * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return const char*: the sensor descrition string. + * \return const char*: the sensor description string. */ static const char* getSensorDescription(int cameraId); @@ -615,16 +608,6 @@ class PlatformData { */ static bool isNeedToPreRegisterBuffer(int cameraId); - // FRAME_SYNC_S - /** - * Check Frame Sync is enabled or not - * - * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return if Frame Sync is enabled or not. - */ - static bool isEnableFrameSyncCheck(int cameraId); - // FRAME_SYNC_E - /** * Get exposure number * @@ -885,7 +868,7 @@ class PlatformData { * in the mMediaCtlConfs. * * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return MediaCtlConf*, if it doens't find one, this function will return nullptr. + * \return MediaCtlConf*, if it doesn't find one, this function will return nullptr. */ static MediaCtlConf* getMediaCtlConf(int cameraId); @@ -1026,14 +1009,6 @@ class PlatformData { */ static int getISysRawFormat(int cameraId); - /** - * Get the config of the ISYS output per port - * - * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return the config of the ISYS output for the given port. - */ - static stream_t getISysOutputByPort(int cameraId, uuid port); - // CSI_META_S /** * get CSI meta enabled status @@ -1086,7 +1061,7 @@ class PlatformData { static int calculateFrameParams(int cameraId, SensorFrameParams& sensorFrameParams); /** - * Get the optmized resolutions that supported by input system + * Get the optimized resolutions that supported by input system * * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] * \param width: The width of the request frame @@ -1148,12 +1123,12 @@ class PlatformData { static int getStreamIdByConfigMode(int cameraId, ConfigMode configMode); /* - * Get the max requests number in HAL + * Get max pipeline depth * * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return the max requests number in HAL + * \return the max pipeline depth */ - static int getMaxRequestsInHAL(int cameraId); + static int32_t getMaxPipelineDepth(int cameraId); /* * Get the max requests number in flight @@ -1167,7 +1142,7 @@ class PlatformData { * get yuv color range mode * * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return the correponding camera_yuv_color_range_mode_t. + * \return the corresponding camera_yuv_color_range_mode_t. */ static camera_yuv_color_range_mode_t getYuvColorRangeMode(int cameraId); @@ -1207,14 +1182,6 @@ class PlatformData { */ static bool isCSIBackEndCapture(int cameraId); - /** - * if ISYS CSI Front End capture enabled - * - * \param cameraId: [0, MAX_CAMERA_NUMBER - 1] - * \return true if the current sensor is CSI Front End capture or not - */ - static bool isCSIFrontEndCapture(int cameraId); - /** * if AIQD enabled * @@ -1538,4 +1505,3 @@ class PlatformData { }; } /* namespace icamera */ -#endif // PLATFORM_DATA_H diff --git a/src/platformdata/PnpDebugControl.cpp b/src/platformdata/PnpDebugControl.cpp index f381a3e..d60e646 100644 --- a/src/platformdata/PnpDebugControl.cpp +++ b/src/platformdata/PnpDebugControl.cpp @@ -108,7 +108,7 @@ PnpDebugParser::PnpDebugParser(PnpDebugControl::StaticCfg* cfg) std::string fullpath = PlatformData::getCameraCfgPath() + filename; bool ret = run(fullpath); - CheckAndLogError(!ret, VOID_VALUE, "Failed to get policy profiles data frome %s", + CheckAndLogError(!ret, VOID_VALUE, "Failed to get policy profiles data from %s", PNP_DEBUG_FILE_NAME); } diff --git a/src/platformdata/gc/GraphConfig.cpp b/src/platformdata/gc/GraphConfig.cpp index 4bb2bd6..423fb63 100644 --- a/src/platformdata/gc/GraphConfig.cpp +++ b/src/platformdata/gc/GraphConfig.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2024 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -306,7 +306,7 @@ void GraphConfig::chooseIpuStreams(map& streams, int avaS /* * For some special streams which aren't from IPU, and their ratio aren't same as any ipu - * stream, we asume to use the biggest stream for them. + * stream, we assume to use the biggest stream for them. * This stream with the biggest size will be default ipu stream for those special streams. */ int bigIpuStreamIdx = streams.begin()->first; @@ -776,7 +776,7 @@ status_t GraphConfig::fillConnectionFormat(const IpuGraphLink& ipuLink, const Ou bool useDest = (node == link->destNode) ? true : false; int32_t terminal = useDest ? link->destTerminalId : link->srcTerminalId; const StaticGraphRunKernel* kernel = nullptr; - kernel = findKernalForFrameTerminal(node, terminal); + kernel = findKernelForFrameTerminal(node, terminal); CheckAndLogError((ipuLink.stream == nullptr) && (kernel == nullptr), NO_ENTRY, "%s: Can't find kernel for link", __func__); @@ -813,7 +813,7 @@ status_t GraphConfig::fillConnectionFormat(const IpuGraphLink& ipuLink, const Ou } const StaticGraphRunKernel* -GraphConfig::findKernalForFrameTerminal(const OuterNode* node, int32_t terminalId) { +GraphConfig::findKernelForFrameTerminal(const OuterNode* node, int32_t terminalId) { int32_t kernelId = CBLayoutUtils::getKernelForDataTerminal(node->resourceId, terminalId); if (kernelId > 0) { for (uint32_t i = 0U; i < node->nodeKernels.kernelCount; i++) { @@ -884,7 +884,7 @@ status_t GraphConfig::updateGraphSettingForPtz(const PtzInfo& cur, const PtzInfo } void GraphConfig::dumpLink(const GraphLink* link) { -#define INVALID_SOURCE_ID (-1) +#define INVALID_SOURCE_ID (0xff) uint8_t srcId = link->srcNode ? link->srcNode->resourceId : INVALID_SOURCE_ID; uint8_t destId = link->destNode ? link->destNode->resourceId : INVALID_SOURCE_ID; LOG3("", diff --git a/src/platformdata/gc/GraphConfig.h b/src/platformdata/gc/GraphConfig.h index 0421bf1..0cfc2d5 100644 --- a/src/platformdata/gc/GraphConfig.h +++ b/src/platformdata/gc/GraphConfig.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2024 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -173,7 +173,7 @@ class GraphConfig { IGraphType::ConnectionConfig* conn); OuterNode* findFrameTerminalOwner(const GraphLink* link); - const StaticGraphRunKernel* findKernalForFrameTerminal(const OuterNode* node, + const StaticGraphRunKernel* findKernelForFrameTerminal(const OuterNode* node, int32_t terminalId); uint32_t createQueryKeyAttribute(int cameraId); diff --git a/src/platformdata/gc/GraphConfigManager.h b/src/platformdata/gc/GraphConfigManager.h index 9c03a60..1a4ae57 100644 --- a/src/platformdata/gc/GraphConfigManager.h +++ b/src/platformdata/gc/GraphConfigManager.h @@ -71,7 +71,7 @@ class GraphConfigManager { PipeUseCase getUseCaseFromStream(ConfigMode configMode, const stream_t& stream); void releaseHalStream(std::vector* halStreamVec); - // Debuging helpers + // Debugging helpers void dumpStreamConfig(); private: diff --git a/src/platformdata/gc/IGraphType.h b/src/platformdata/gc/IGraphType.h index 54e64fa..60b9537 100644 --- a/src/platformdata/gc/IGraphType.h +++ b/src/platformdata/gc/IGraphType.h @@ -41,13 +41,20 @@ namespace icamera { #ifdef TNR7_CM // Stream id associated with video stream. static const int32_t VIDEO_STREAM_ID = 60006; +#elif defined(DOL_FEATURE) +static const int32_t VIDEO_STREAM_ID = 60014; #else static const int32_t VIDEO_STREAM_ID = 60001; #endif // Stream id associated with still capture with gpu tnr. static const int32_t STILL_TNR_STREAM_ID = 60009; + +#ifdef DOL_FEATURE +static const int32_t STILL_STREAM_ID = 60015; +#else // Stream id associated with still capture. static const int32_t STILL_STREAM_ID = 60000; +#endif #define MAX_RBM_STR_SIZE 128 diff --git a/src/platformdata/gc/StageDescriptor.h b/src/platformdata/gc/StageDescriptor.h index 540cb9f..f12c892 100644 --- a/src/platformdata/gc/StageDescriptor.h +++ b/src/platformdata/gc/StageDescriptor.h @@ -22,8 +22,11 @@ namespace icamera { -#define STAGE_UID(stream, stage) ((((stream)&0xFFFFU) << 16) | (((stage) & 0xFFU) << 8)) -#define PORT_UID(stream, stage, terminal) (STAGE_UID(stream, stage) + ((terminal) & 0xFFU)+ 1U) +#define STAGE_UID(stream, stage) \ + ((((static_cast(stream)) & 0xFFFFU) << 16U) | \ + (((static_cast(stage)) & 0xFFU) << 8U)) +#define PORT_UID(stream, stage, terminal) \ + (STAGE_UID(stream, stage) + ((static_cast(terminal)) & 0xFFU) + 1U) #define GET_STREAM_ID(uuid) (((uuid) >> 16) & 0xFFFF) #define GET_STAGE_ID(uuid) (((uuid) >> 8) & 0xFF) diff --git a/src/scheduler/CameraScheduler.cpp b/src/scheduler/CameraScheduler.cpp index 15d8225..8ae29da 100644 --- a/src/scheduler/CameraScheduler.cpp +++ b/src/scheduler/CameraScheduler.cpp @@ -35,7 +35,7 @@ CameraScheduler::CameraScheduler(int cameraId) : mCameraId(cameraId), mTriggerCo } CameraScheduler::~CameraScheduler() { - destoryExecutors(); + destroyExecutors(); } int32_t CameraScheduler::configurate(int32_t graphId) { @@ -43,7 +43,7 @@ int32_t CameraScheduler::configurate(int32_t graphId) { CheckAndLogError(ret != OK, ret, "configurate %d error", graphId); mTriggerCount = 0; - destoryExecutors(); + destroyExecutors(); return createExecutors(); } @@ -76,7 +76,7 @@ int32_t CameraScheduler::createExecutors() { return OK; } -void CameraScheduler::destoryExecutors() { +void CameraScheduler::destroyExecutors() { std::lock_guard l(mLock); mRegisteredNodes.clear(); mExeGroups.clear(); @@ -155,7 +155,7 @@ CameraScheduler::Executor::Executor(const char* name) mTriggerTick(0) {} CameraScheduler::Executor::~Executor() { - LOG1("%s: destory", getName()); + LOG1("%s: destroy", getName()); CameraScheduler::Executor::stop(); } @@ -242,7 +242,7 @@ bool CameraScheduler::Executor::threadLoop() { } void CameraScheduler::SystemTimerExecutor::trigger(int64_t tick) { - // Ingore external trigger + // Ignore external trigger UNUSED(tick); } @@ -268,6 +268,7 @@ int CameraScheduler::SystemTimerExecutor::waitTrigger() { } } + std::lock_guard l(Executor::mNodeLock); PERF_CAMERA_ATRACE_PARAM1(getName(), mTriggerTick); mTriggerTick++; return mTriggerTick; diff --git a/src/scheduler/CameraScheduler.h b/src/scheduler/CameraScheduler.h index 8206573..3b0cf11 100644 --- a/src/scheduler/CameraScheduler.h +++ b/src/scheduler/CameraScheduler.h @@ -53,7 +53,7 @@ class CameraScheduler { /** * triggerSource: - * emptry string: no designated source, will trigger executors WITHOUT trigger sources + * empty string: no designated source, will trigger executors WITHOUT trigger sources * in configuration file. * triggerId: * >= 0: will be passed to ISchedulerNode for processing sync. @@ -93,13 +93,13 @@ class CameraScheduler { std::string mName; - std::mutex mNodeLock; std::vector mNodes; std::vector> mListeners; std::condition_variable mTriggerSignal; bool mActive; protected: + std::mutex mNodeLock; int64_t mTriggerTick; private: @@ -126,14 +126,14 @@ class CameraScheduler { private: int32_t createExecutors(); - void destoryExecutors(); + void destroyExecutors(); std::shared_ptr findExecutor(const char* exeName); private: struct ExecutorGroup { std::shared_ptr executor; - std::string triggerSource; // emptry string means no designated source + std::string triggerSource; // empty string means no designated source std::vector nodeList; }; diff --git a/src/v4l2/MediaControl.cpp b/src/v4l2/MediaControl.cpp index 86b9ac0..10b6453 100644 --- a/src/v4l2/MediaControl.cpp +++ b/src/v4l2/MediaControl.cpp @@ -507,6 +507,7 @@ int MediaControl::getDevnameFromSysfs(MediaEntity* entity) { LOGE("readlink sysName %s failed ret %d.", sysName, ret); return -EINVAL; } + target[MAX_TARGET_NAME - 1] = '\0'; char* d = strrchr(target, '/'); if (!d) { @@ -762,6 +763,9 @@ int MediaControl::setFormat(int cameraId, const McFormat* format, int targetWidt struct v4l2_subdev_format tmt = {}; tmt.format = mbusfmt; tmt.pad = link->sink->index; + // VIRTUAL_CHANNEL_S + tmt.stream = format->stream; + // VIRTUAL_CHANNEL_E tmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; subDev->SetFormat(tmt); } diff --git a/src/v4l2/MediaControl.h b/src/v4l2/MediaControl.h index 77e2e9a..c2dd29f 100644 --- a/src/v4l2/MediaControl.h +++ b/src/v4l2/MediaControl.h @@ -161,7 +161,6 @@ struct MediaCtlConf { std::vector links; std::map> routings; std::vector formats; - std::vector outputs; std::vector videoNodes; int mcId; int outputWidth; diff --git a/src/v4l2/V4l2DeviceFactory.cpp b/src/v4l2/V4l2DeviceFactory.cpp index 8bb9b6d..d4292aa 100644 --- a/src/v4l2/V4l2DeviceFactory.cpp +++ b/src/v4l2/V4l2DeviceFactory.cpp @@ -48,7 +48,7 @@ void V4l2DeviceFactory::createDeviceFactory(int cameraId) { /** * Release the static instance of V4l2DeviceFactory for cameraId. - * All device related to the instance of of V4l2DeviceFactory will be release here as well + * All device related to the instance of V4l2DeviceFactory will be release here as well * After calling this function, all device could not be used anymore. */ void V4l2DeviceFactory::releaseDeviceFactory(int cameraId) { @@ -64,7 +64,7 @@ void V4l2DeviceFactory::releaseDeviceFactory(int cameraId) { * * The caller is supposed to get an opened sub device. * If openSubDev failed, it just return non-opened instance, - * and using this instance to call its funtion will cause 'device not open' error, + * and using this instance to call its function will cause 'device not open' error, * * Return a not nullptr sub device pointer */ diff --git a/src/v4l2/V4l2DeviceFactory.h b/src/v4l2/V4l2DeviceFactory.h index 732a0e3..2a91106 100644 --- a/src/v4l2/V4l2DeviceFactory.h +++ b/src/v4l2/V4l2DeviceFactory.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef V4L2_DEVICE_FACTORY_H -#define V4L2_DEVICE_FACTORY_H +#pragma once #include #include @@ -57,5 +56,3 @@ class V4l2DeviceFactory { }; } // namespace icamera - -#endif // V4L2_DEVICE_FACTORY_H