destination[channels*destination_offset+i]=source[source_offset*channels+i];
}
-static inline void MixPixels(const Quantum *source,ssize_t *source_offset,
+static inline void MixPixels(const Quantum *source,const ssize_t *source_offset,
const size_t source_size,Quantum *destination,
const ssize_t destination_offset,const size_t channels)
{
const ssize_t source_offset1,const ssize_t source_offset2,
Quantum *destination,const ssize_t destination_offset,const size_t channels)
{
- ssize_t
+ const ssize_t
offsets[2] = { source_offset1, source_offset2 };
MixPixels(source,offsets,2,destination,destination_offset,channels);
ssize_t
i;
+ (void) source;
for (i=0; i < 4; i++)
CopyPixels(pixels,4,result,i,channels);
if (PixelsEqual(pixels,0,pixels,1,channels) &&
#define caseA(N,A,B,C,D) \
case N: \
{ \
- ssize_t \
+ const ssize_t \
offsets[4] = { A, B, C, D }; \
\
MixPixels(source,offsets,4,destination,destination_offset,channels);\
#define caseB(N,A,B,C,D,E,F,G,H) \
case N: \
{ \
- ssize_t \
+ const ssize_t \
offsets[8] = { A, B, C, D, E, F, G, H }; \
\
MixPixels(source,offsets,8,destination,destination_offset,channels);\
caseB(10,e,e,d,d,d,b,b,b)
case 11:
{
- ssize_t
+ const ssize_t
offsets[16] = { e, e, e, e, e, e, e, e, e, e, e, e, e, e, d, b };
MixPixels(source,offsets,16,destination,destination_offset,channels);
{
if (PixelsEqual(source,b,source,d,channels))
{
- ssize_t
+ const ssize_t
offsets[4] = { e, e, d, b };
MixPixels(source,offsets,4,destination,destination_offset,channels);
{
if (PixelsEqual(source,b,source,d,channels))
{
- ssize_t
+ const ssize_t
offsets[8] = { e, e, d, d, d, b, b, b };
MixPixels(source,offsets,8,destination,destination_offset,channels);
{
if (PixelsEqual(source,b,source,d,channels))
{
- ssize_t
+ const ssize_t
offsets[16] = { e, e, e, e, e, e, e, e, e, e, e, e, e, e, d, b };
MixPixels(source,offsets,16,destination,destination_offset,channels);
}
case 15:
{
- ssize_t
+ const ssize_t
offsets[4] = { e, e, e, a };
if (PixelsEqual(source,b,source,d,channels))
{
- ssize_t
+ const ssize_t
offsets[4] = { e, e, d, b };
MixPixels(source,offsets,4,destination,destination_offset,channels);
}
case 16:
{
- ssize_t
+ const ssize_t
offsets[4] = { e, e, e, a };
if (PixelsEqual(source,b,source,d,channels))
{
- ssize_t
+ const ssize_t
offsets[8] = { e, e, e, e, e, e, d, b };
MixPixels(source,offsets,8,destination,destination_offset,channels);
}
case 17:
{
- ssize_t
+ const ssize_t
offsets[4] = { e, e, e, a };
if (PixelsEqual(source,b,source,d,channels))
{
- ssize_t
+ const ssize_t
offsets[8] = { e, e, d, d, d, b, b, b };
MixPixels(source,offsets,8,destination,destination_offset,channels);
}
case 18:
{
- ssize_t
+ const ssize_t
offsets[4] = { e, e, e, d };
if (PixelsEqual(source,b,source,f,channels))
{
- ssize_t
+ const ssize_t
offsets[8] = { e, e, e, e, e, b, b, d };
MixPixels(source,offsets,8,destination,destination_offset,channels);
}
default:
{
- ssize_t
+ const ssize_t
offsets[4] = { e, e, e, b };
if (PixelsEqual(source,d,source,h,channels))
{
- ssize_t
+ const ssize_t
offsets[8] = { e, e, e, e, e, d, d, b };
MixPixels(source,offsets,8,destination,destination_offset,channels);
break;