changeset 21724:019171a44e19

compilation fixes: define always_inline and don't use uint64_t_C
author rik
date Sat, 23 Dec 2006 13:18:43 +0000
parents a804f969af97
children e4cd9d683286
files libmpcodecs/vf_zrmjpeg.c libvo/jpeg_enc.c
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_zrmjpeg.c	Sat Dec 23 12:34:31 2006 +0000
+++ b/libmpcodecs/vf_zrmjpeg.c	Sat Dec 23 13:18:43 2006 +0000
@@ -39,6 +39,13 @@
 #include "libavcodec/mpegvideo.h"
 //#include "jpeg_enc.h" /* this file is not present yet */
 
+/* code from ffmpeg/libavcodec */
+#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC_ == 3 && __GNUC_MINOR__ > 0)
+#    define always_inline __attribute__((always_inline)) inline
+#else
+#    define always_inline inline
+#endif
+
 #undef malloc
 #undef free
 #undef realloc
@@ -151,7 +158,7 @@
  * So 16           <= qscale * quant_matrix[i]             <= 7905
  * so (1<<19) / 16 >= (1<<19) / (qscale * quant_matrix[i]) >= (1<<19) / 7905
  * so 32768        >= (1<<19) / (qscale * quant_matrix[i]) >= 67 */
-				qmat[qscale][i] = (int)((uint64_t_C(1) <<
+				qmat[qscale][i] = (int)((UINT64_C(1) <<
 						QMAT_SHIFT_MMX) / (qscale
 							*quant_matrix[j]));
 				qmat16[qscale][0][i] = (1 << QMAT_SHIFT_MMX)
--- a/libvo/jpeg_enc.c	Sat Dec 23 12:34:31 2006 +0000
+++ b/libvo/jpeg_enc.c	Sat Dec 23 13:18:43 2006 +0000
@@ -113,7 +113,7 @@
                    so (1<<19) / 16 >= (1<<19) / (qscale * quant_matrix[i]) >= (1<<19) / 7905
                    so 32768        >= (1<<19) / (qscale * quant_matrix[i]) >= 67
                 */
-                qmat  [qscale][i] = (int)((uint64_t_C(1) << QMAT_SHIFT_MMX) / (qscale * quant_matrix[j]));
+                qmat  [qscale][i] = (int)((UINT64_C(1) << QMAT_SHIFT_MMX) / (qscale * quant_matrix[j]));
                 qmat16[qscale][0][i] = (1 << QMAT_SHIFT_MMX) / (qscale * quant_matrix[j]);
 
                 if(qmat16[qscale][0][i]==0 || qmat16[qscale][0][i]==128*256) qmat16[qscale][0][i]=128*256-1;