ppc: idctdsp: Immediately return if no AltiVec is available

This is how all the other init functions operate.
This commit is contained in:
Diego Biurrun 2014-07-31 04:48:07 -07:00
parent 706208ef47
commit 03c9f357a4

View File

@ -231,7 +231,9 @@ av_cold void ff_idctdsp_init_ppc(IDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth)
{
#if HAVE_ALTIVEC
if (PPC_ALTIVEC(av_get_cpu_flags())) {
if (!PPC_ALTIVEC(av_get_cpu_flags()))
return;
if (!high_bit_depth) {
if ((avctx->idct_algo == FF_IDCT_AUTO) ||
(avctx->idct_algo == FF_IDCT_ALTIVEC)) {
@ -240,6 +242,5 @@ av_cold void ff_idctdsp_init_ppc(IDCTDSPContext *c, AVCodecContext *avctx,
c->perm_type = FF_IDCT_PERM_TRANSPOSE;
}
}
}
#endif /* HAVE_ALTIVEC */
}