Skip to content
Merged
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
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.
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/OV13B10_09B13.IPU8.bin
Binary file not shown.
Binary file modified config/linux/ipu8/gcss/OV13B10_09B13_2M.IPU8.bin
Binary file not shown.
7 changes: 7 additions & 0 deletions modules/ipu_desc/ipu75xa/FragmentsConfigurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,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
10 changes: 5 additions & 5 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 @@ -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
180 changes: 95 additions & 85 deletions modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.cpp

Large diffs are not rendered by default.

88 changes: 45 additions & 43 deletions modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphAutogen.h

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphBinaryAutogen.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ struct GraphConfigurationKey {
};

struct GraphConfigurationHeader {
uint32_t additonalFeaturesBit = 0;
uint32_t additionalFeaturesBit = 0;
uint8_t isIsysUnpacked = 0;
GraphConfigurationKey settingsKey;
uint16_t settingId = 0;
int32_t graphId = 0;
Expand Down Expand Up @@ -116,6 +117,7 @@ struct SysToolVersion

struct BinaryHeader {
uint32_t sapAttributes = 0;
uint32_t additionalFeaturesBit = 0;
uint32_t binaryCommonHashCode = 0;
uint32_t numberOfResolutions = 0;
uint32_t numberOfSensorModes = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ typedef struct SysToolVersion {
typedef struct {

uint32_t sapAttributes;
uint32_t additionalFeaturesBit;
uint32_t binaryCommonHashCode;
uint32_t numberOfResolutions;
uint32_t numberOfSensorModes;
Expand Down Expand Up @@ -119,7 +120,7 @@ typedef struct DataRange
static int distinctGraphsCount = 41;

static GraphHashCode hashCodeLookup[] = {
{0, 0x63F6EE7C},
{0, 0x375F6AED},
{100000, 0xFCF9A282},
{100001, 0x71134980},
{100002, 0x62D5AF5A},
Expand Down
84 changes: 42 additions & 42 deletions modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphReaderAutogen.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class StaticGraphReader
uint32_t GetSAPAttribute() const;
uint32_t GetGlobalAdditionalFeaturesBit() const;
uint32_t GetAdditionalFeaturesBit(const GraphConfigurationHeader* header) const;
static const uint32_t staticGraphCommonHashCode = 1677127292; // autogenerated
static const uint32_t staticGraphCommonHashCode = 929000173; // autogenerated
private:
void GetSinkMappingConfiguration(GraphConfigurationHeader* baseGraphConfigurationHeader, VirtualSinkMapping* baseSinkMappingConfiguration,
GraphConfigurationHeader* selectedGraphConfigurationHeader, VirtualSinkMapping* selectedSinkMappingConfiguration);
Expand Down
4 changes: 4 additions & 0 deletions modules/ipu_desc/ipu75xa/Ipu75xaStaticGraphTypesAutogen.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ enum class HwSink : uint8_t
RawIsysPdafSink,
};

enum class AdditionalFeaturesBitValues {
None = 0
};

#pragma pack(push, 4)

#ifndef STATIC_GRAPH_USE_IA_LEGACY_TYPES
Expand Down
7 changes: 7 additions & 0 deletions modules/ipu_desc/ipu7x/FragmentsConfigurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,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
10 changes: 5 additions & 5 deletions modules/ipu_desc/ipu7x/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 @@ -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
Loading
Loading