Gems/Atom
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -115,8 +115,6 @@ namespace ImageProcessingAtom
|
||||
IImageObjectPtr ETC2Compressor::CompressImage(IImageObjectPtr srcImage, EPixelFormat fmtDst,
|
||||
const CompressOption* compressOption) const
|
||||
{
|
||||
const size_t srcPixelSize = 4;
|
||||
|
||||
//validate input
|
||||
EPixelFormat fmtSrc = srcImage->GetPixelFormat();
|
||||
|
||||
|
||||
@@ -133,7 +133,6 @@ namespace ImageProcessingAtom
|
||||
|
||||
IImageObjectPtr C3dLutColorChart::GenerateChartImage()
|
||||
{
|
||||
const AZ::u32 mipCount = 1;
|
||||
IImageObjectPtr image(IImageObject::CreateImage(ePS_Red* ePS_Blue, ePS_Green, 1, ePixelFormat_R8G8B8A8));
|
||||
|
||||
{
|
||||
|
||||
@@ -209,18 +209,18 @@ namespace ImageProcessingAtom
|
||||
/* addition of c-pointers already takes care of datatype-sizes */ \
|
||||
const signed long int dy = /*parm->mirror ? -1 :*/ 1; \
|
||||
const unsigned int stridei = parm->incols * 1 * 1; \
|
||||
const unsigned int stridet = parm->subcols * 1 * 1; \
|
||||
const unsigned int strideo = parm->outcols * 1 * 1; \
|
||||
[[maybe_unused]] const unsigned int stridet = parm->subcols * 1 * 1; \
|
||||
[[maybe_unused]] const unsigned int strideo = parm->outcols * 1 * 1; \
|
||||
/* offset and shift calculations still require the unmodified values */ \
|
||||
const unsigned int strideiraw = parm->incols; \
|
||||
const unsigned int stridetraw = parm->subcols; \
|
||||
[[maybe_unused]] const unsigned int stridetraw = parm->subcols; \
|
||||
const unsigned int strideoraw = parm->outcols; \
|
||||
\
|
||||
class Plane2D<dtyp> tmp(tmpcols, tmprows, 4); \
|
||||
dtyp*** t = (dtyp***)tmp; \
|
||||
int srcPos, dstPos; \
|
||||
bool plusminush = false; const bool of = true; \
|
||||
bool plusminusv = false; const bool nc = false; \
|
||||
bool plusminush = false; [[maybe_unused]] const bool of = true; \
|
||||
bool plusminusv = false; [[maybe_unused]] const bool nc = false; \
|
||||
FilterWeights<wtyp>* fwh = calculateFilterWeights<wtyp>(parm->resample.colrem, parm->caged ? 0 : 0 - parm->region.subtop, parm->caged ? srccols : parm->subrows - parm->region.subtop, \
|
||||
parm->resample.colquo, 0, dstcols, reps, parm->resample.colblur, parm->resample.wf, parm->resample.operation != eWindowEvaluation_Sum, plusminush); \
|
||||
FilterWeights<wtyp>* fwv = calculateFilterWeights<wtyp>(parm->resample.rowrem, parm->caged ? 0 : 0 - parm->region.intop, parm->caged ? srcrows : parm->inrows - parm->region.intop, \
|
||||
@@ -833,7 +833,7 @@ namespace ImageProcessingAtom
|
||||
|
||||
#define filterRowFetch(srcOffs, srcSize, srcSkip, dstOffs, dstSize, dstSkip) \
|
||||
/* vertical stride, horizontal fetch */ \
|
||||
getCxNFromStreamSwapped(srcSkip, i); \
|
||||
/* getCxNFromStreamSwapped(srcSkip, i); Expands to nothing */ \
|
||||
getCxNFromStream(srcSkip, i); \
|
||||
getCxNFromPlane(1); \
|
||||
\
|
||||
@@ -935,7 +935,7 @@ namespace ImageProcessingAtom
|
||||
comcpyCHistogram(); \
|
||||
\
|
||||
/* horizontal stride, vertical store */ \
|
||||
putCxNToStreamSwapped(dstSkip, o); \
|
||||
/* putCxNToStreamSwapped(dstSkip, o); Expands to nothing */ \
|
||||
putCxNToStream(dstSkip, o); \
|
||||
putCxNToPlane(1); \
|
||||
\
|
||||
|
||||
@@ -58,9 +58,6 @@ namespace ImageProcessingAtom
|
||||
// linear interpolation
|
||||
FilterImage(MipGenType::triangle, MipGenEvalType::sum, 0.0f, 0.0f, m_img, dwMipDown, newImage, dstMip, NULL, NULL);
|
||||
|
||||
const AZ::u32 pixelCountIn = m_img->GetWidth(dstMip) * m_img->GetHeight(dstMip);
|
||||
const AZ::u32 pixelCountOut = newImage->GetWidth(dstMip) * newImage->GetHeight(dstMip);
|
||||
|
||||
//substraction
|
||||
AZ::u8* srcPixelBuf;
|
||||
AZ::u32 srcPitch;
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace ImageProcessingAtom
|
||||
if (dxgiFormat != DXGI_FORMAT_UNKNOWN)
|
||||
{
|
||||
int i = 0;
|
||||
for (i; i < ePixelFormat_Count; i++)
|
||||
for (; i < ePixelFormat_Count; i++)
|
||||
{
|
||||
const PixelFormatInfo* info = CPixelFormats::GetInstance().GetPixelFormatInfo((EPixelFormat)i);
|
||||
if (static_cast<AZ::u32>(info->d3d10Format) == dxgiFormat)
|
||||
@@ -506,7 +506,7 @@ namespace ImageProcessingAtom
|
||||
if (dxgiFormat != DXGI_FORMAT_UNKNOWN)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
for (i; i < ePixelFormat_Count; i++)
|
||||
for (; i < ePixelFormat_Count; i++)
|
||||
{
|
||||
const PixelFormatInfo* info = CPixelFormats::GetInstance().GetPixelFormatInfo((EPixelFormat)i);
|
||||
if (static_cast<uint32_t>(info->d3d10Format) == dxgiFormat)
|
||||
|
||||
@@ -603,8 +603,6 @@ namespace ImageProcessingAtom
|
||||
const bool isCompressing = isSourceFormatUncompressed ? true : false;
|
||||
const EPixelFormat outputFormat = isCompressing ? destinationFormat : sourceFormat;
|
||||
|
||||
const uint32_t imageWidth = m_image->Get()->GetWidth(0);
|
||||
const uint32_t imageHeight = m_image->Get()->GetHeight(0);
|
||||
ICompressorPtr compressor = ICompressor::FindCompressor(outputFormat, m_input->m_presetSetting.m_destColorSpace, isCompressing);
|
||||
|
||||
// find out if the compressor has a preference to any specific colorspace
|
||||
|
||||
@@ -241,8 +241,6 @@ namespace ImageProcessingAtom
|
||||
// clone this image-object's contents
|
||||
IImageObject* CImageObject::Clone(uint32_t maxMipCount) const
|
||||
{
|
||||
const EPixelFormat srcPixelformat = GetPixelFormat();
|
||||
|
||||
IImageObject* outImage = AllocateImage(maxMipCount);
|
||||
AZ::u32 mips = outImage->GetMipCount();
|
||||
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ namespace ImageProcessingAtom
|
||||
// Dispatch event on main thread
|
||||
AZ::SystemTickBus::QueueFunction(
|
||||
[
|
||||
thumbnailKey, thumbnailSize,
|
||||
thumbnailKey,
|
||||
pixmap = QPixmap::fromImage(image.scaled(QSize(thumbnailSize, thumbnailSize), Qt::KeepAspectRatio, Qt::SmoothTransformation))
|
||||
]() mutable
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user