IPU: replace SATURATE macro with a function

This commit is contained in:
Gregory Hainaut 2016-08-27 19:00:15 +02:00
parent ac1b3845b2
commit 796b2d4970
1 changed files with 5 additions and 5 deletions

View File

@ -334,11 +334,11 @@ static __fi int get_chroma_dc_dct_diff()
return dc_diff; return dc_diff;
} }
#define SATURATE(val) \ static __fi void SATURATE(int& val)
do { \ {
if (((u32)(val + 2048) > 4095)) \ if ((u32)(val + 2048) > 4095)
val = (((s32)val) >> 31) ^ 2047; \ val = (val >> 31) ^ 2047;
} while (0) }
static bool get_intra_block() static bool get_intra_block()
{ {