[FFmpeg-devel] [PATCH 2/2] cosmetics: rename ff_fmt_convert_init_ppc() to ff_fmt_convert_init_altivec().

Måns Rullgård mans
Sun Mar 6 19:51:10 CET 2011


"Ronald S. Bultje" <rsbultje at gmail.com> writes:

> Hi,
>
> On Sun, Mar 6, 2011 at 1:16 PM, Justin Ruggles <justin.ruggles at gmail.com> wrote:
>>
>> It only has Altivec functions and is not compiled if Altivec is disabled.
>> ---
>> ?libavcodec/fmtconvert.c ? ? ? ? ? ? | ? ?2 +-
>> ?libavcodec/fmtconvert.h ? ? ? ? ? ? | ? ?2 +-
>> ?libavcodec/ppc/fmtconvert_altivec.c | ? ?2 +-
>> ?3 files changed, 3 insertions(+), 3 deletions(-)
> [..]
>> -void ff_fmt_convert_init_ppc(FmtConvertContext *c, AVCodecContext *avctx)
>> +void ff_fmt_convert_init_altivec(FmtConvertContext *c, AVCodecContext *avctx)
>>  {
>>      c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_altivec;
>>      if(!(avctx->flags & CODEC_FLAG_BITEXACT)) {
>
> You should still use AVCPUFlags & ... _ALTIVEC, in case people compile
> binaries intended to be used on systems both with and without systems
> where autodetection is supported.

We don't support runtime detection of altivec in practice since if the
chosen --cpu supports it, the compiler will use altivec instructions in
normal C code as well.

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



More information about the ffmpeg-devel mailing list