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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/linux/ipu75xa/dummy_1280x720.nv12

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions config/linux/ipu75xa/dummy_1920x1080.nv12

Large diffs are not rendered by default.

Binary file modified config/linux/ipu75xa/gcss/IMX471_BBG803N3.IPU75XA.bin
Binary file not shown.
Binary file modified config/linux/ipu75xa/gcss/OV08X40_KAFE799.IPU75XA.bin
Binary file not shown.
Binary file modified config/linux/ipu75xa/gcss/OV13B10_09B13.IPU75XA.bin
Binary file not shown.
22 changes: 0 additions & 22 deletions config/linux/ipu75xa/libcamhal_configs.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,11 @@
// The value format of availableSensors is "sensor name"-wf/uf-"CSI port ID".
// wf is word facing, and uf is user facing.
"availableSensors": [
"ov8856-wf-0",
"ov13b10-wf-0",
"ov13b10-uf-2",
"ov08x40-uf-0",
"ov08x40-uf-2",
"imx471-uf-0",
"ov05c10-uf-0",
"lt6911gxd-1-0",
"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",
"ar0233-1-0",
"ar0820-1-0",
"isx031-5-0",
"isx031-6-0",
"isx031-7-0",
"isx031-8-0",
"ar0830-a-0",
"ar0830-b-2",
"isx031-a-0",
"isx031-b-2"
],
"videoStreamNum" : 2
}
Expand Down
1 change: 1 addition & 0 deletions config/linux/ipu7x/dummy_1280x720.nv12

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions config/linux/ipu7x/dummy_1920x1080.nv12

Large diffs are not rendered by default.

Binary file modified config/linux/ipu7x/gcss/IMX471_AAJH5-D.IPU7X.bin
Binary file not shown.
Binary file modified config/linux/ipu7x/gcss/OV02C10_MSHW0550.IPU7X.bin
Binary file not shown.
Binary file modified config/linux/ipu7x/gcss/OV02E10_CBG202N3.IPU7X.bin
Binary file not shown.
Binary file modified config/linux/ipu7x/gcss/OV05C10_BBG501N3.IPU7X.bin
Binary file not shown.
Binary file modified config/linux/ipu7x/gcss/OV08X40_BBG802N3_LNL.IPU7X.bin
Binary file not shown.
Binary file modified config/linux/ipu7x/gcss/OV13B10_09B13.IPU7X.bin
Binary file not shown.
Binary file modified config/linux/ipu7x/gcss/S5K3J1_GRBG_NONPDAF.IPU7X.bin
Binary file not shown.
Binary file modified config/linux/ipu8/gcss/OV08X40_KAFE799.IPU8.bin
Binary file not shown.
Binary file modified config/linux/ipu8/gcss/OV13B10_09B13.IPU8.bin
Binary file not shown.
Binary file modified config/linux/ipu8/gcss/OV13B10_09B13_2M.IPU8.bin
Binary file not shown.
14 changes: 2 additions & 12 deletions config/linux/ipu8/libcamhal_configs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (C) 2025-2026 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.
Expand All @@ -23,17 +23,7 @@
"availableSensors": [
"ov13b10-wf-0",
"ov13b10-uf-2",
"lt6911gxd-1-0",
"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"

"ov08x40-uf-0"
],
"videoStreamNum" : 2
}
Expand Down
4 changes: 2 additions & 2 deletions config/linux/ipu8/sensors/ov13b10-uf.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
},
{
"srcName": "Intel IPU7 CSI2 $CSI_PORT", "srcPad": 1,
"sinkName": "Intel IPU7 ISYS Capture 16", "sinkPad": 0, "enable": true
"sinkName": "Intel IPU7 ISYS Capture $CAP_N", "sinkPad": 0, "enable": true
}
],
"videonode": [
{
"name": "Intel IPU7 ISYS Capture 16", "videoNodeType": "VIDEO_GENERIC"
"name": "Intel IPU7 ISYS Capture $CAP_N", "videoNodeType": "VIDEO_GENERIC"
},
{
"name": "Intel IPU7 CSI2 $CSI_PORT", "videoNodeType": "VIDEO_ISYS_RECEIVER"
Expand Down
4 changes: 2 additions & 2 deletions config/linux/ipu8/sensors/ov13b10-wf.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
},
{
"srcName": "Intel IPU7 CSI2 $CSI_PORT", "srcPad": 1,
"sinkName": "Intel IPU7 ISYS Capture 0", "sinkPad": 0, "enable": true
"sinkName": "Intel IPU7 ISYS Capture $CAP_N", "sinkPad": 0, "enable": true
}
],
"videonode": [
{
"name": "Intel IPU7 ISYS Capture 0", "videoNodeType": "VIDEO_GENERIC"
"name": "Intel IPU7 ISYS Capture $CAP_N", "videoNodeType": "VIDEO_GENERIC"
},
{
"name": "Intel IPU7 CSI2 $CSI_PORT", "videoNodeType": "VIDEO_ISYS_RECEIVER"
Expand Down
4 changes: 4 additions & 0 deletions include/utils/ScopedAtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ class ScopedAtrace {
long value = -1, const char* note2 = NULL, int value2 = -1,
const char* note3 = NULL, int value3 = -1);
~ScopedAtrace();

ScopedAtrace(const ScopedAtrace&) = delete;
ScopedAtrace& operator=(const ScopedAtrace&) = delete;

static void setTraceLevel(uint32_t);

private:
Expand Down
3 changes: 3 additions & 0 deletions modules/algowrapper/IntelCca.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class IntelCca {
IntelCca(int cameraId, TuningMode mode);
virtual ~IntelCca();

IntelCca(const IntelCca&) = delete;
IntelCca& operator=(const IntelCca&) = delete;

static IntelCca* getInstance(int cameraId, TuningMode mode);
static void releaseInstance(int cameraId, TuningMode mode);

Expand Down
13 changes: 11 additions & 2 deletions modules/ipu_desc/ipu75xa/FragmentsConfigurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,14 @@ StaticGraphStatus Gen2FragmentsConfigurator::configureFragments(std::vector<Smur
switch (kernelRole)
{
case GraphResolutionConfiguratorKernelRole::DownScaler:
case GraphResolutionConfiguratorKernelRole::DownScalerSmall:
{
res = configFragmentsDownscaler(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments);
break;
}

case GraphResolutionConfiguratorKernelRole::EspaCropper:
case GraphResolutionConfiguratorKernelRole::EspaCropperSmall:
{
res = configFragmentsCropper(runKernel, kernelFragments, prevKernelUuid, prevKernelFragments);
break;
Expand Down Expand Up @@ -205,6 +207,13 @@ StaticGraphStatus Gen2FragmentsConfigurator::configFragmentsDownscaler(StaticGra

for (int32_t stripe = leftNonVanishedStripe; stripe <= rightNonVanishedStripe; stripe++)
{
if (scaleFactor == 1.0)
{
kernelFragments[stripe].fragmentOutputWidth = kernelFragments[stripe].fragmentInputWidth;
_outputStartX[runKernel->kernel_uuid][stripe] = kernelFragments[stripe].fragmentStartX;
continue;
}

int rightCrop = stripe == static_cast<int32_t>(_numberOfFragments - 1) ? resInfo->input_crop.right : 0;

double value = (static_cast<double>(kernelFragments[stripe].fragmentInputWidth - rightCrop) * scaleFactor) / 4;
Expand Down Expand Up @@ -258,7 +267,7 @@ StaticGraphStatus Gen2FragmentsConfigurator::configFragmentsDownscaler(StaticGra
s_factor_f = floor(s_factor_f * ratio_prec) / ratio_prec;

// Update horizontal_offset_fxp and horizontal_offset_max
double horizontal_offset_f = (s_factor_f - 1.0) / 2.0 + (2.0 * s_factor_f * ceil(static_cast<double>(fragment_start_x / s_factor_f / 2.0)) - fragment_start_x);
double horizontal_offset_f = (s_factor_f - 1.0) / 2.0 + (2.0 * s_factor_f * ceil((static_cast<double>(fragment_start_x) / s_factor_f / 2.0)) - fragment_start_x);
double horizontal_offset_max_f = fragment_input_width - fragment_output_width * s_factor_f + s_factor_f * (1.0 + 1.0 / 128);

horizontal_offset_fxp = static_cast<int32_t>(floor(horizontal_offset_f * ratio_prec));
Expand Down Expand Up @@ -522,7 +531,7 @@ StaticGraphStatus Gen2FragmentsConfigurator::configFragmentsUpscaler(StaticGraph

auto scaleFactorW = static_cast<double>(resInfo->input_width - resInfo->input_crop.left - resInfo->input_crop.right) / resInfo->output_width;
auto scaleFactorH = static_cast<double>(resInfo->input_height - resInfo->input_crop.top - resInfo->input_crop.bottom) / resInfo->output_height;
auto scaleFactor = std::max(scaleFactorW, scaleFactorH);
auto scaleFactor = std::min(scaleFactorW, scaleFactorH);

uint32_t upscalerWidthGranularity = 2;
uint16_t inputUnits = 1;
Expand Down
54 changes: 23 additions & 31 deletions modules/ipu_desc/ipu75xa/GraphResolutionConfigurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ StaticGraphStatus GraphResolutionConfigurator::updateRunKernelUpScaler(StaticGra
upscalerActualInputWidth = GRA_ROUND_DOWN(upscalerActualInputWidth, stepW);
upscalerActualInputHeight = (upscalerActualInputWidth / stepW) * stepH;

if ((upscalerActualOutputWidth / upscalerActualInputWidth) > max_upscaling)
if ((static_cast<double>(upscalerActualOutputWidth) / upscalerActualInputWidth) > max_upscaling)
{
// Perform the max possible up scaling, downscaler will adjust itself
upscalerActualInputWidth = upscalerActualOutputWidth / max_upscaling;
Expand Down Expand Up @@ -1481,10 +1481,10 @@ StaticGraphStatus Gen2GraphResolutionConfigurator::getDownscalerInputRoi(const R
double widthHistScale = _widthIn2OutScale / _sensorHorizontalScaling;
double heightHistScale = _heightIn2OutScale / _sensorVerticalScaling;

pipeInputRoi.left = static_cast<uint32_t>(((outputLeft + _originalCropOfOutput.left) * widthHistScale) + _originaHistoryOfOutput.left);
pipeInputRoi.right = static_cast<uint32_t>(((outputRight + _originalCropOfOutput.right) * widthHistScale) + _originaHistoryOfOutput.right);
pipeInputRoi.top = static_cast<uint32_t>(((outputTop + _originalCropOfOutput.top) * heightHistScale) + _originaHistoryOfOutput.top);
pipeInputRoi.bottom = static_cast<uint32_t>(((outputBottom + _originalCropOfOutput.bottom) * heightHistScale) + _originaHistoryOfOutput.bottom);
pipeInputRoi.left = static_cast<uint32_t>(outputLeft * widthHistScale + _originaHistoryOfOutput.left);
pipeInputRoi.right = static_cast<uint32_t>(outputRight * widthHistScale + _originaHistoryOfOutput.right);
pipeInputRoi.top = static_cast<uint32_t>(outputTop * heightHistScale + _originaHistoryOfOutput.top);
pipeInputRoi.bottom = static_cast<uint32_t>(outputBottom * heightHistScale + _originaHistoryOfOutput.bottom);

// Translate ROI on input to ROI as input to downscaler
double scaleWidth = static_cast<double>(_downscalerRunKernel->resolution_history->input_width
Expand Down Expand Up @@ -1703,8 +1703,8 @@ StaticGraphStatus Gen2GraphResolutionConfigurator::updateRunKernelCropper(Static
totalHorizontalCrop -= (_originalCropOfCropper.left + _originalCropOfCropper.right);

// Calculate the crop after downscale, relatively to the desired crop before the downscale
cropLeft = (cropLeft + cropRight) == 0 ? 0 :
GRA_ROUND_DOWN(static_cast<int32_t>(GRA_ROUND(static_cast<double>(cropLeft) / (cropLeft + cropRight) * (totalHorizontalCrop))), 2);
cropLeft = (cropLeft + cropRight - paddingToRemove) == 0 ? 0 :
GRA_ROUND_DOWN(static_cast<int32_t>(GRA_ROUND(static_cast<double>(cropLeft) / (cropLeft + cropRight - paddingToRemove) * (totalHorizontalCrop))), 2);

runKernel->resolution_info->input_crop.left = _originalCropOfCropper.left + cropLeft;
runKernel->resolution_info->input_crop.right = _originalCropOfCropper.right + (totalHorizontalCrop - cropLeft) + paddingToRemove;
Expand Down Expand Up @@ -1761,8 +1761,8 @@ StaticGraphStatus Gen2GraphResolutionConfigurator::updateRunKernelCropper(Static
totalVerticalCrop -= (_originalCropOfCropper.top + _originalCropOfCropper.bottom);

// Calculate the crop after downscale, relatively to the desired crop before the downscale
cropTop = (cropTop + cropBottom) == 0 ? 0 :
GRA_ROUND_DOWN(static_cast<int32_t>(GRA_ROUND(static_cast<double>(cropTop) / (cropTop + cropBottom) * (totalVerticalCrop))), 2);
cropTop = (cropTop + cropBottom - paddingToRemove) == 0 ? 0 :
GRA_ROUND_DOWN(static_cast<int32_t>(GRA_ROUND(static_cast<double>(cropTop) / (cropTop + cropBottom - paddingToRemove) * (totalVerticalCrop))), 2);

runKernel->resolution_info->input_crop.top = _originalCropOfCropper.top + cropTop;
runKernel->resolution_info->input_crop.bottom = _originalCropOfCropper.bottom + (totalVerticalCrop - cropTop) + paddingToRemove;
Expand Down Expand Up @@ -2004,6 +2004,12 @@ StaticGraphStatus Gen2GraphResolutionConfigurator::getInputRoiForOutput(const Re
widthIn2OutScale *= _sensorHorizontalScaling;
heightIn2OutScale *= _sensorVerticalScaling;

// outputCrop was computed at history-level scale (before sensor scale); bring it into sensor space now
outputCrop.left = static_cast<int32_t>(outputCrop.left * _sensorHorizontalScaling);
outputCrop.right = static_cast<int32_t>(outputCrop.right * _sensorHorizontalScaling);
outputCrop.top = static_cast<int32_t>(outputCrop.top * _sensorVerticalScaling);
outputCrop.bottom = static_cast<int32_t>(outputCrop.bottom * _sensorVerticalScaling);

if ((outputCropHist.left < _sensorHorizontalCropLeft) ||
(outputCropHist.right < _sensorHorizontalCropRight) ||
(outputCropHist.top < _sensorVerticalCropTop) ||
Expand Down Expand Up @@ -2264,22 +2270,7 @@ StaticGraphStatus Ipu9GraphResolutionConfigurator::updateRunKernelUpScaler(Stati
uint32_t totalCropW = roi.left + roi.right - cropperKernelCrop.left - cropperKernelCrop.right - _originalCropOfUpscaler.left - _originalCropOfUpscaler.right;
uint32_t totalCropH = roi.top + roi.bottom - cropperKernelCrop.top - cropperKernelCrop.bottom - _originalCropOfUpscaler.top - _originalCropOfUpscaler.bottom;

// Cropping must be done in units of stepW x stepH.
// How many units of stepW x stepH should we crop?
/*uint32_t unitsW = GRA_ROUND_DOWN(totalCropW, _upscalerStepW) / _upscalerStepW;
uint32_t unitsH = GRA_ROUND_DOWN(totalCropH, _upscalerStepH) / _upscalerStepH;

uint32_t units = unitsW < unitsH ? unitsW : unitsH;

uint32_t actualCropW = units * _upscalerStepW;
uint32_t actualCropH = units * _upscalerStepH;*/

/*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;*/

// we must make sure that the scale facotr of width and height are matching. So we recalculate the extra crop to get this.
// We must make sure that the scale facotr of width and height are matching. So we recalculate the extra crop to get this.
uint32_t widthAfterCrop = runKernel->resolution_info->input_width - totalCropW;
uint32_t heightAfterCrop = runKernel->resolution_info->input_height - totalCropH;
auto scaleFactorW = static_cast<double>(widthAfterCrop) / outputWidth;
Expand All @@ -2290,13 +2281,14 @@ StaticGraphStatus Ipu9GraphResolutionConfigurator::updateRunKernelUpScaler(Stati
GRA_ROUND_DOWN(static_cast<uint32_t>(floor(static_cast<double>(outputWidth * scaleFactor))), 2));
heightAfterCrop = std::min(inputHeight,
GRA_ROUND_DOWN(static_cast<uint32_t>(floor(static_cast<double>(outputHeight * scaleFactor))), 2));
totalCropW = (inputWidth - widthAfterCrop)-(roi.left + roi.right - cropperKernelCrop.left - cropperKernelCrop.right - _originalCropOfUpscaler.left - _originalCropOfUpscaler.right);
totalCropH = (inputHeight - heightAfterCrop)-(roi.top + roi.bottom - cropperKernelCrop.top - cropperKernelCrop.bottom - _originalCropOfUpscaler.top - _originalCropOfUpscaler.bottom);

uint32_t deltaLeft = GRA_ROUND_DOWN((totalCropW) / 2, 2);
uint32_t deltaRight = totalCropW - deltaLeft;
uint32_t deltaTop = GRA_ROUND_DOWN((totalCropH) / 2, 2);
uint32_t deltaBottom = totalCropH - deltaTop;
uint32_t actualCropW = inputWidth - widthAfterCrop;
uint32_t actualCropH = inputHeight - heightAfterCrop;

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 - deltaLeft;
runKernel->resolution_info->input_crop.right = roi.right - cropperKernelCrop.right - deltaRight;
Expand Down
Loading