[FFmpeg-devel] [PATCH 3/3] Fix compilation on powerpc with --disable-altivec.

Ronald S. Bultje rsbultje
Sat Mar 5 01:37:16 CET 2011


Hi,

On Fri, Mar 4, 2011 at 5:43 PM, Luca Barbato <lu_zero at gentoo.org> wrote:
> From: Carl Eugen Hoyos <cehoyos at ag.or.at>
>
> ---
> ?libavcodec/fmtconvert.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/fmtconvert.c b/libavcodec/fmtconvert.c
> index e26b899..bf762cc 100644
> --- a/libavcodec/fmtconvert.c
> +++ b/libavcodec/fmtconvert.c
> @@ -63,6 +63,6 @@ av_cold void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx)
> ? ? c->float_to_int16_interleave ?= float_to_int16_interleave_c;
>
> ? ? if (ARCH_ARM) ff_fmt_convert_init_arm(c, avctx);
> - ? ?if (ARCH_PPC) ff_fmt_convert_init_ppc(c, avctx);
> + ? ?if (HAVE_ALTIVEC) ff_fmt_convert_init_ppc(c, avctx);
> ? ? if (HAVE_MMX) ff_fmt_convert_init_x86(c, avctx);
> ?}
> --
> 1.7.4.1

Justin already had a better version of this patch. Having a _ppc
function under HAVE_ALTIVEC is plain wrong, for one the function
doesn't do runtime flag detection and thus fails if the binary was
compiled with altivec support but the system has no altivec.

Ronald



More information about the ffmpeg-devel mailing list