[FFmpeg-cvslog] new attribute "extern inline" ( fixing linker error with ff_get_mb_score and ff_get_mb_score)

J. Bohl git at videolan.org
Fri Jun 15 03:19:55 CEST 2012


ffmpeg | branch: master | J. Bohl <jbohl at h-quer.de> | Thu Jun 14 23:09:52 2012 +0200| [0719e44b58dbc7d93db4c46b875d5aecb5c7306b] | committer: Michael Niedermayer

new attribute "extern inline" (fixing linker error with ff_get_mb_score and ff_get_mb_score)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0719e44b58dbc7d93db4c46b875d5aecb5c7306b
---

 libavcodec/motion_est_template.c |    4 ++--
 libavutil/attributes.h           |    8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index b7b7b6d..d81bed8 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -162,7 +162,7 @@ static int no_sub_motion_search(MpegEncContext * s,
     return dmin;
 }
 
-inline int ff_get_mb_score(MpegEncContext * s, int mx, int my, int src_index,
+av_extern_inline int ff_get_mb_score(MpegEncContext * s, int mx, int my, int src_index,
                                int ref_index, int size, int h, int add_rate)
 {
 //    const int check_luma= s->dsp.me_sub_cmp != s->dsp.mb_cmp;
@@ -974,7 +974,7 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int
 }
 
 //this function is dedicated to the braindamaged gcc
-inline int ff_epzs_motion_search(MpegEncContext * s, int *mx_ptr, int *my_ptr,
+av_extern_inline int ff_epzs_motion_search(MpegEncContext * s, int *mx_ptr, int *my_ptr,
                              int P[10][2], int src_index, int ref_index, int16_t (*last_mv)[2],
                              int ref_mv_scale, int size, int h)
 {
diff --git a/libavutil/attributes.h b/libavutil/attributes.h
index 0a6fda1..d517fdf 100644
--- a/libavutil/attributes.h
+++ b/libavutil/attributes.h
@@ -40,6 +40,14 @@
 #endif
 #endif
 
+#ifndef av_extern_inline
+#if defined(__INTEL_COMPILER) ||  defined(__GNUC_STDC_INLINE__)
+#    define av_extern_inline extern inline
+#else
+#    define av_extern_inline inline
+#endif
+#endif
+
 #ifndef av_noreturn
 #if AV_GCC_VERSION_AT_LEAST(2,5)
 #    define av_noreturn __attribute__((noreturn))



More information about the ffmpeg-cvslog mailing list