[FFmpeg-devel] [PATCH] Add ppc/fmtconvert_ppc.c to fix compilation for PPC without Altivec.
Ronald S. Bultje
rsbultje
Fri Mar 4 21:16:21 CET 2011
Hi,
On Fri, Mar 4, 2011 at 2:25 PM, Justin Ruggles <justin.ruggles at gmail.com> wrote:
> ---
> ?libavcodec/ppc/Makefile ? ? ? ? ? ? | ? ?1 +
> ?libavcodec/ppc/fmtconvert_altivec.c | ? ?2 +-
> ?libavcodec/ppc/fmtconvert_ppc.c ? ? | ? 33 +++++++++++++++++++++++++++++++++
> ?3 files changed, 35 insertions(+), 1 deletions(-)
> ?create mode 100644 libavcodec/ppc/fmtconvert_ppc.c
[..]
> +void ff_fmt_convert_init_ppc(FmtConvertContext *c, AVCodecContext *avctx)
> +{
> + int mm_flags = av_get_cpu_flags();
> +
> + if (mm_flags & AV_CPU_FLAG_ALTIVEC && HAVE_ALTIVEC) {
> + ff_fmt_convert_init_altivec(c, avctx);
> + }
> +}
Why this wrapper function? I.e. why not do this inside _init_altivec()?
Ronald
More information about the ffmpeg-devel
mailing list