CLAMP checks both if value is '< 0' and '> max'. Value will never be a negative
number since it is an unsigned integer. Removing that check and only checking if
it is bigger than max and setting it appropriately.
CID
1256559
e[i] = v & mp;
/* quantize and store */
v &= ~mp;
- p[i] = CLAMP (v, 0, 65535);
+ p[i] = MIN (v, 65535);
}
}
}
e[i + 4] = v & mp;
/* quantize and store */
v &= ~mp;
- p[i] = CLAMP (v, 0, 255);
+ p[i] = MIN (v, 255);
}
}
#else
e[i + 4] = v & mp;
/* quantize and store */
v &= ~mp;
- p[i] = CLAMP (v, 0, 65535);
+ p[i] = MIN (v, 65535);
}
}
}
e[i + 4] = v & mp;
/* quantize and store */
v &= ~mp;
- p[i] = CLAMP (v, 0, 255);
+ p[i] = MIN (v, 255);
}
}
e[i + 4] = v & mp;
/* quantize and store */
v &= ~mp;
- p[i] = CLAMP (v & ~mp, 0, 65535);
+ p[i] = MIN (v & ~mp, 65535);
}
}