Skip to content

Commit

Permalink
Resources|Windows: Updated use of abs() in hq2x
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jan 14, 2013
1 parent 6a911ba commit 074b567
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions doomsday/engine/src/resource/hq2x.cpp
Expand Up @@ -193,9 +193,9 @@ static __inline int Diff(uint32_t c1, uint32_t c2)
YUV1 = ABGR8888toYUV888(c1);
YUV2 = ABGR8888toYUV888(c2);
return ( ((ABGR8888_COMP(3, c1) != 0) != ((ABGR8888_COMP(3, c2) != 0))) ||
(ABS(int(YUV1 & YUV888_Ymask) - int(YUV2 & YUV888_Ymask)) > ((trY & (int)0xFF) << 16)) ||
(ABS(int(YUV1 & YUV888_Umask) - int(YUV2 & YUV888_Umask)) > ((trU & (int)0xFF) << 8)) ||
(ABS(int(YUV1 & YUV888_Vmask) - int(YUV2 & YUV888_Vmask)) > ((trV & (int)0xFF)) ));
(abs(int(YUV1 & YUV888_Ymask - YUV2 & YUV888_Ymask)) > ((trY & (int)0xFF) << 16)) ||
(abs(int(YUV1 & YUV888_Umask - YUV2 & YUV888_Umask)) > ((trU & (int)0xFF) << 8)) ||
(abs(int(YUV1 & YUV888_Vmask - YUV2 & YUV888_Vmask)) > ((trV & (int)0xFF)) ));
}

static __inline void Transl(uint8_t* pc, uint32_t c)
Expand Down Expand Up @@ -361,9 +361,9 @@ uint8_t* GL_SmartFilterHQ2x(const uint8_t* src, int width, int height, int flags
{
YUV2 = ABGR8888toYUV888(w[k]);
if(((ABGR8888_COMP(3, w[5]) != 0) != (ABGR8888_COMP(3, w[k]) != 0)) ||
(ABS(int(YUV1 & YUV888_Ymask) - int(YUV2 & YUV888_Ymask)) > ((trY & (int)0xFF) << 16)) ||
(ABS(int(YUV1 & YUV888_Umask) - int(YUV2 & YUV888_Umask)) > ((trU & (int)0xFF) << 8)) ||
(ABS(int(YUV1 & YUV888_Vmask) - int(YUV2 & YUV888_Vmask)) > ((trV & (int)0xFF) )) )
(abs(int(YUV1 & YUV888_Ymask - YUV2 & YUV888_Ymask)) > ((trY & (int)0xFF) << 16)) ||
(abs(int(YUV1 & YUV888_Umask - YUV2 & YUV888_Umask)) > ((trU & (int)0xFF) << 8)) ||
(abs(int(YUV1 & YUV888_Vmask - YUV2 & YUV888_Vmask)) > ((trV & (int)0xFF) )) )
pattern |= flag;
}
flag <<= 1;
Expand Down

0 comments on commit 074b567

Please sign in to comment.