GRAPHICS: Optimize the Normal scaler slightly
This commit is contained in:
parent
909be8a933
commit
0c59abf327
1 changed files with 4 additions and 4 deletions
|
@ -41,7 +41,7 @@ template<typename Pixel>
|
||||||
void Normal2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
|
void Normal2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
|
||||||
int width, int height) {
|
int width, int height) {
|
||||||
uint8 *r;
|
uint8 *r;
|
||||||
int b = sizeof(Pixel);
|
const int b = sizeof(Pixel);
|
||||||
|
|
||||||
assert(IS_ALIGNED(dstPtr, 2));
|
assert(IS_ALIGNED(dstPtr, 2));
|
||||||
while (height--) {
|
while (height--) {
|
||||||
|
@ -103,7 +103,7 @@ void Normal3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPit
|
||||||
uint8 *r;
|
uint8 *r;
|
||||||
const uint32 dstPitch2 = dstPitch * 2;
|
const uint32 dstPitch2 = dstPitch * 2;
|
||||||
const uint32 dstPitch3 = dstPitch * 3;
|
const uint32 dstPitch3 = dstPitch * 3;
|
||||||
int b = sizeof(Pixel);
|
const int b = sizeof(Pixel);
|
||||||
|
|
||||||
assert(IS_ALIGNED(dstPtr, 2));
|
assert(IS_ALIGNED(dstPtr, 2));
|
||||||
while (height--) {
|
while (height--) {
|
||||||
|
@ -136,7 +136,7 @@ void Normal4x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPit
|
||||||
const uint32 dstPitch2 = dstPitch * 2;
|
const uint32 dstPitch2 = dstPitch * 2;
|
||||||
const uint32 dstPitch3 = dstPitch * 3;
|
const uint32 dstPitch3 = dstPitch * 3;
|
||||||
const uint32 dstPitch4 = dstPitch * 4;
|
const uint32 dstPitch4 = dstPitch * 4;
|
||||||
int b = sizeof(Pixel);
|
const int b = sizeof(Pixel);
|
||||||
|
|
||||||
assert(IS_ALIGNED(dstPtr, 2));
|
assert(IS_ALIGNED(dstPtr, 2));
|
||||||
while (height--) {
|
while (height--) {
|
||||||
|
@ -177,7 +177,7 @@ void Normal5x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPit
|
||||||
const uint32 dstPitch3 = dstPitch * 3;
|
const uint32 dstPitch3 = dstPitch * 3;
|
||||||
const uint32 dstPitch4 = dstPitch * 4;
|
const uint32 dstPitch4 = dstPitch * 4;
|
||||||
const uint32 dstPitch5 = dstPitch * 5;
|
const uint32 dstPitch5 = dstPitch * 5;
|
||||||
int b = sizeof(Pixel);
|
const int b = sizeof(Pixel);
|
||||||
|
|
||||||
assert(IS_ALIGNED(dstPtr, 2));
|
assert(IS_ALIGNED(dstPtr, 2));
|
||||||
while (height--) {
|
while (height--) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue