Skip to content

Commit

Permalink
Fix a inconsistence introduced in latest commit
Browse files Browse the repository at this point in the history
Size of parameter may differ on several compilers
  • Loading branch information
mm2 committed Mar 13, 2024
1 parent fcf6792 commit b2aeb18
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 12 deletions.
3 changes: 2 additions & 1 deletion plugins/fast_float/src/fast_16_tethra.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ void PerformanceEval16(struct _cmstransform_struct *CMMcargo,

int in16, out16; // Used by macros!

size_t nalpha, strideIn, strideOut;
cmsUInt32Number nalpha;
size_t strideIn, strideOut;

cmsUInt32Number dwInFormat = cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo);
cmsUInt32Number dwOutFormat = cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo);
Expand Down
12 changes: 8 additions & 4 deletions plugins/fast_float/src/fast_8_curves.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ static void FastEvaluateRGBCurves8(struct _cmstransform_struct *CMMcargo,
cmsUInt8Number* bout;
cmsUInt8Number* aout = NULL;

cmsUInt32Number nalpha, strideIn, strideOut;
cmsUInt32Number nalpha;
size_t strideIn, strideOut;

Curves8Data* Data = (Curves8Data*)_cmsGetTransformUserData(CMMcargo);

Expand Down Expand Up @@ -135,7 +136,8 @@ static void FastRGBIdentity8(struct _cmstransform_struct *CMMcargo,
cmsUInt8Number* bout;
cmsUInt8Number* aout = NULL;

cmsUInt32Number nalpha, strideIn, strideOut;
cmsUInt32Number nalpha;
size_t strideIn, strideOut;

_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
Expand Down Expand Up @@ -209,7 +211,8 @@ static void FastEvaluateGrayCurves8(struct _cmstransform_struct *CMMcargo,
cmsUInt8Number* gout;
cmsUInt8Number* aout = NULL;

size_t nalpha, strideIn, strideOut;
cmsUInt32Number nalpha;
size_t strideIn, strideOut;

Curves8Data* Data = (Curves8Data*)_cmsGetTransformUserData(CMMcargo);

Expand Down Expand Up @@ -274,7 +277,8 @@ static void FastGrayIdentity8(struct _cmstransform_struct *CMMcargo,
cmsUInt8Number* gout;
cmsUInt8Number* aout = NULL;

cmsUInt32Number nalpha, strideIn, strideOut;
cmsUInt32Number nalpha;
size_t strideIn, strideOut;

_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
Expand Down
3 changes: 2 additions & 1 deletion plugins/fast_float/src/fast_8_matsh.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ void MatShaperXform8(struct _cmstransform_struct *CMMcargo,
cmsUInt8Number* bout;
cmsUInt8Number* aout = NULL;

size_t nalpha, strideIn, strideOut;
cmsUInt32Number nalpha;
size_t strideIn, strideOut;

_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
Expand Down
3 changes: 2 additions & 1 deletion plugins/fast_float/src/fast_8_matsh_sse.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ void MatShaperXform8SSE(struct _cmstransform_struct *CMMcargo,
cmsUInt8Number* bout;
cmsUInt8Number* aout = NULL;

size_t nalpha, strideIn, strideOut;
cmsUInt32Number nalpha;
size_t strideIn, strideOut;


__m128 mat0 = _mm_load_ps(p->Mat[0]);
Expand Down
3 changes: 2 additions & 1 deletion plugins/fast_float/src/fast_8_tethra.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ void PerformanceEval8(struct _cmstransform_struct *CMMcargo,
const cmsUInt8Number* bin;
const cmsUInt8Number* ain = NULL;

size_t nalpha, strideIn, strideOut;
cmsUInt32Number nalpha;
size_t strideIn, strideOut;

_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
Expand Down
3 changes: 2 additions & 1 deletion plugins/fast_float/src/fast_float_15mats.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ void MatShaperXform(struct _cmstransform_struct *CMMcargo,
cmsUInt8Number* bout;
cmsUInt8Number* aout = NULL;

size_t nalpha, strideIn, strideOut;
cmsUInt32Number nalpha;
size_t strideIn, strideOut;

_cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
Expand Down
6 changes: 3 additions & 3 deletions plugins/fast_float/src/fast_float_curves.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static void FastFloatRGBIdentity(struct _cmstransform_struct *CMMcargo,
cmsUInt32Number OutputFormat = cmsGetTransformOutputFormat((cmsHTRANSFORM) CMMcargo);

cmsUInt32Number nchans, nalpha;
cmsUInt32Number strideIn, strideOut;
size_t strideIn, strideOut;

_cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);
Expand Down Expand Up @@ -245,7 +245,7 @@ static void FastEvaluateFloatGrayCurves(struct _cmstransform_struct* CMMcargo,
CurvesFloatData* Data = (CurvesFloatData*)_cmsGetTransformUserData(CMMcargo);

cmsUInt32Number nchans, nalpha;
cmsUInt32Number strideIn, strideOut;
size_t strideIn, strideOut;

_cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, DestStartingOrder, DestIncrements);
Expand Down Expand Up @@ -308,7 +308,7 @@ static void FastFloatGrayIdentity(struct _cmstransform_struct* CMMcargo,
cmsUInt32Number OutputFormat = cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo);

cmsUInt32Number nchans, nalpha;
cmsUInt32Number strideIn, strideOut;
size_t strideIn, strideOut;

_cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
_cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);
Expand Down

0 comments on commit b2aeb18

Please sign in to comment.