Skip to content

Commit

Permalink
Release 6.2.4
Browse files Browse the repository at this point in the history
- Updated zlib version
- OpenCL SoftISP Fix denoise kernel issue

Change-Id: I2b47505100e62a8a0672f1a8b6f56021fce3bd0b
  • Loading branch information
ReneThrane committed Feb 27, 2024
1 parent f4db193 commit 7875ca6
Show file tree
Hide file tree
Showing 10 changed files with 932 additions and 895 deletions.
1,498 changes: 764 additions & 734 deletions DemoApps/OpenCL/SoftISP/Content/isp_kernel.cl

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions DemoApps/OpenCL/SoftISP/Fsl.gen
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<FslBuildGen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../FslBuildGen.xsd">
<Executable Name="OpenCL.SoftISP" NoInclude="true" CreationYear="2016">
<Default.Platform.Supported Value="false"/>
<ImportTemplate Name="DemoAppOpenCL1_2"/>
<Platform Name="Yocto" Supported="true"/>
</Executable>
</FslBuildGen>
8 changes: 3 additions & 5 deletions DemoApps/OpenCL/SoftISP/source/OptionParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@ namespace Fsl
}


OptionParser::~OptionParser()
{
}
OptionParser::~OptionParser() = default;


void OptionParser::OnArgumentSetup(std::deque<Option>& rOptions)
{
rOptions.push_back(Option("Enable", OptionArgument::OptionNone, CommandId::DenoiseStatus, "Enable denoise function."));
rOptions.emplace_back("Enable", OptionArgument::OptionNone, CommandId::DenoiseStatus, "Enable denoise function.");
rOptions.emplace_back("c", "m_cycleNum", OptionArgument::OptionRequired, CommandId::CycleNum, "Control the number of cycle");
}

Expand All @@ -81,7 +79,7 @@ namespace Fsl
return OptionParseResult::Parsed;
case CommandId::CycleNum:
StringParseUtil::Parse(m_cycleNum, strOptArg);
m_cycleNum = std::max(m_cycleNum, uint32_t(1));
m_cycleNum = std::max(m_cycleNum, static_cast<uint32_t>(1));
return OptionParseResult::Parsed;
default:
return OptionParseResult::NotHandled;
Expand Down
10 changes: 5 additions & 5 deletions DemoApps/OpenCL/SoftISP/source/OptionParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ namespace Fsl

public:
OptionParser();
~OptionParser();
~OptionParser() override;

bool GetDenoiseStatus() const
{
return m_denoiseStatus;
}

int32_t GetCycleNumStatus() const
uint32_t GetCycleNumStatus() const
{
return m_cycleNum;
}

protected:
virtual void OnArgumentSetup(std::deque<Option>& rOptions) override;
virtual OptionParseResult OnParse(const int32_t cmdId, const StringViewLite& strOptArg) override;
virtual bool OnParsingComplete() override;
void OnArgumentSetup(std::deque<Option>& rOptions) override;
OptionParseResult OnParse(const int32_t cmdId, const StringViewLite& strOptArg) override;
bool OnParsingComplete() override;
};
}

Expand Down
261 changes: 139 additions & 122 deletions DemoApps/OpenCL/SoftISP/source/SoftISP.cpp

Large diffs are not rendered by default.

22 changes: 8 additions & 14 deletions DemoApps/OpenCL/SoftISP/source/SoftISP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
*
****************************************************************************************************************************************************/

#include <FslBase/Span/Span.hpp>
#include <FslDemoApp/OpenCL/DemoAppOpenCL.hpp>
#include <FslUtil/OpenCL1_2/ContextEx.hpp>
#include <RapidOpenCL1/Buffer.hpp>
Expand All @@ -43,25 +44,18 @@ namespace Fsl
{
class SoftISP : public DemoAppOpenCL
{
OpenCL::ContextEx m_context;
cl_device_id m_deviceId;
RapidOpenCL1::CommandQueue m_commandQueue;
bool m_denoiseEn;
int32_t m_cycleNum = 1000;
const std::size_t m_BINS = 256;
const std::size_t m_imgWid = 1920;
const std::size_t m_imgHei = 1080;
const std::size_t m_imgSize = 1920 * 1080;

std::vector<uint8_t> m_dst0;
std::vector<uint8_t> m_dst1;
std::vector<uint8_t> m_dst2;
std::vector<uint8_t> m_dst3;
std::vector<uint8_t> m_dst4;
std::vector<uint8_t> m_dst5;
std::vector<uint8_t> m_YBuf;
std::vector<uint8_t> m_YBufOut;
std::vector<uint8_t> m_UVBuf;
std::vector<uint8_t> m_yBuf;
std::vector<uint8_t> m_yBufOut;
std::vector<uint8_t> m_uvBuf;
int m_pixelValueR;
int m_pixelValueG;
int m_pixelValueB;
Expand All @@ -78,13 +72,13 @@ namespace Fsl
std::vector<RapidOpenCL1::Buffer> m_deviceDist;

public:
SoftISP(const DemoAppConfig& config);
~SoftISP();
explicit SoftISP(const DemoAppConfig& config);
~SoftISP() override;

protected:
virtual void Run() override;
void Run() override;
void AllocateMemory(const cl_context context, const std::size_t size);
void CopyToBMP(Bitmap& bitmap, const IO::Path& fileName, const void* ptr);
void CopyToBMP(Bitmap& rBitmap, const IO::Path& fileName, const Span<uint8_t> span);
};
}

Expand Down
2 changes: 1 addition & 1 deletion Project.gen
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<FslBuildGenProjectRoot Version="1">
<Project Name="DemoFramework" ShortName="DF" Version="6.2.3" DefaultTemplate="DF" DefaultPackageLanguage="C++" DefaultCompany="NXP" RequirePackageCreationYear="true" ToolConfigFile=".Config/FslBuildGen.xml">
<Project Name="DemoFramework" ShortName="DF" Version="6.2.4" DefaultTemplate="DF" DefaultPackageLanguage="C++" DefaultCompany="NXP" RequirePackageCreationYear="true" ToolConfigFile=".Config/FslBuildGen.xml">
<!-- Add a base package that all other packages dependent on -->
<AddBasePackage Name="Platform"/>
<AddRootDirectory Name="$(FSL_GRAPHICS_SDK)"/>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- #AG_PROJECT_CAPTION_BEGIN# -->
# DemoFramework 6.2.3
# DemoFramework 6.2.4
<!-- #AG_PROJECT_CAPTION_END# -->

A multi-platform framework for fast and easy demo development.
Expand Down
4 changes: 2 additions & 2 deletions SCR-gtec-demo-framework.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Package: gtec-demo-framework.git
Version: 6.2.3
Version: 6.2.4
Outgoing License: BSD-3-Clause
License File: License.md
Package Category: Graphics
Type of Content: source
Description and comments: Graphics sample applications
Release Location: https://github.com/NXPmicro/gtec-demo-framework -b 6.2.3
Release Location: https://github.com/NXPmicro/gtec-demo-framework -b 6.2.4
Origin: NXP (BSD-3-clause)
Demo Framework
Sascha Willems - Vulkan demo (MIT) - https://github.com/SaschaWillems/Vulkan
Expand Down
18 changes: 9 additions & 9 deletions ThirdParty/Recipe/zlib_1_3/Fsl.gen
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<Default.Platform.Supported Value="false"/>

<Platform Name="Android" Supported="false">
<ExperimentalRecipe Name="ZLIB" Version="1.3" FindTargetName="ZLIB::ZLIB">
<ExperimentalRecipe Name="ZLIB" Version="1.3.1" FindTargetName="ZLIB::ZLIB">
<Pipeline>
<Download URL="https://zlib.net/zlib-1.3.tar.gz" Hash="ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e"/>
<Unpack File="zlib-1.3.tar.gz" OutputPath="zlib-1.3"/>
<Download URL="https://zlib.net/zlib-1.3.1.tar.gz" Hash="9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23"/>
<Unpack File="zlib-1.3.1.tar.gz" OutputPath="zlib-1.3.1"/>
<CMakeBuild Project="" Target="install" Configuration="release" OutputPath="_Install"/>
</Pipeline>
<Installation>
Expand All @@ -22,10 +22,10 @@


<Platform Name="Ubuntu;QNX" Supported="true">
<ExperimentalRecipe Name="ZLIB" Version="1.3" FindTargetName="ZLIB::ZLIB">
<ExperimentalRecipe Name="ZLIB" Version="1.3.1" FindTargetName="ZLIB::ZLIB">
<Pipeline>
<Download URL="https://zlib.net/zlib-1.3.tar.gz" Hash="ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e"/>
<Unpack File="zlib-1.3.tar.gz" OutputPath="zlib-1.3"/>
<Download URL="https://zlib.net/zlib-1.3.1.tar.gz" Hash="9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23"/>
<Unpack File="zlib-1.3.1.tar.gz" OutputPath="zlib-1.3.1"/>
<CMakeBuild Project="" Target="install" Configuration="debug;release" OutputPath="_Install"/>
</Pipeline>
<Installation>
Expand All @@ -39,10 +39,10 @@
</Platform>

<Platform Name="Windows" Supported="true">
<ExperimentalRecipe Name="ZLIB" Version="1.3">
<ExperimentalRecipe Name="ZLIB" Version="1.3.1">
<Pipeline>
<Download URL="https://zlib.net/zlib-1.3.tar.gz" Hash="ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e"/>
<Unpack File="zlib-1.3.tar.gz" OutputPath="zlib-1.3"/>
<Download URL="https://zlib.net/zlib-1.3.1.tar.gz" Hash="9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23"/>
<Unpack File="zlib-1.3.1.tar.gz" OutputPath="zlib-1.3.1"/>
<CMakeBuild Project="" Target="install" Configuration="release" OutputPath="_Install"/>
</Pipeline>
<Installation>
Expand Down

0 comments on commit 7875ca6

Please sign in to comment.