[FFmpeg-devel] [PATCH] Remove some extern inlines (using static symbols).

Måns Rullgård mans
Fri Oct 3 01:40:53 CEST 2008


Diego 'Flameeyes' Petten? <flameeyes at gmail.com> writes:

> Sun Studio Express under Solaris does not allow for extern inline
> functions to reference static symbols in their definition
> unit. Strangely, this does not happen under Linux, even though gcc
> with -Wextra does warn about such a case.
>
> For this reason, remove inline suggestion from motion_est.c functions
> that reference static symbols.
> ---
>
>  libavcodec/motion_est_template.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
> index 05c2764..38d1d43 100644
> --- a/libavcodec/motion_est_template.c
> +++ b/libavcodec/motion_est_template.c
> @@ -232,7 +232,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,
> +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;
> @@ -1150,7 +1150,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,
> +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)
>  {

What happens if you declare these functions (in mpegvideo.h) with an
explicit extern specifier?

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list