[FFmpeg-soc] [soc]: r5610 - indeo5/ivi_common.h
kostya
subversion at mplayerhq.hu
Wed Jan 27 17:30:28 CET 2010
Author: kostya
Date: Wed Jan 27 17:30:28 2010
New Revision: 5610
Log:
simplify IVI_TOSIGNED macro
Modified:
indeo5/ivi_common.h
Modified: indeo5/ivi_common.h
==============================================================================
--- indeo5/ivi_common.h Wed Jan 27 17:30:06 2010 (r5609)
+++ indeo5/ivi_common.h Wed Jan 27 17:30:28 2010 (r5610)
@@ -183,7 +183,7 @@ static inline int ivi_pic_config_cmp(IVI
/** convert unsigned values into signed ones (the sign is in the LSB) */
/* TODO: find a way to calculate this without the conditional using bit magic */
-#define IVI_TOSIGNED(val) (((val) & 1) ? ((val) + 1) >> 1 : -(((val) + 1) >> 1))
+#define IVI_TOSIGNED(val) (-(((val) >> 1) ^ -((val) & 1)))
/** scales motion vector */
static inline int ivi_scale_mv(int mv, int mv_scale)
More information about the FFmpeg-soc
mailing list