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

Ronald S. Bultje rsbultje
Sun Mar 6 19:58:35 CET 2011


Hi,

On Sun, Mar 6, 2011 at 1:54 PM, Justin Ruggles <justin.ruggles at gmail.com> wrote:
> On 03/06/2011 01:22 PM, Ronald S. Bultje wrote:
>> 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.
>
> But isn't autodetection pointless due to compile flags? ?Because we use
> -maltivec, even the C version could be using Altivec instructions. ?Why
> should we check at runtime if it doesn't matter?

IMO the C _could_ have been compiled without -maltivec, but anyway,
you guys do the PPC arch support so feel free to do it this way, but
then please consistently. So either remove AV_CPU_FLAG_ALTIVEC or use
it consistently.

Ronald



More information about the ffmpeg-devel mailing list