diff options
Diffstat (limited to 'libavcodec/ppc/dsputil_ppc.c')
-rw-r--r-- | libavcodec/ppc/dsputil_ppc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c index 698f545..cbb1cfb 100644 --- a/libavcodec/ppc/dsputil_ppc.c +++ b/libavcodec/ppc/dsputil_ppc.c @@ -3,20 +3,20 @@ * Copyright (c) 2002 Dieter Shirley * Copyright (c) 2003-2004 Romain Dolbeau <romain@dolbeau.org> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -128,6 +128,7 @@ static long check_dcbzl_effect(void) av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth) { + int mm_flags = av_get_cpu_flags(); // common optimizations whether AltiVec is available or not if (!high_bit_depth) { switch (check_dcbzl_effect()) { @@ -142,7 +143,7 @@ av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx, } } - if (PPC_ALTIVEC(av_get_cpu_flags())) { + if (PPC_ALTIVEC(mm_flags)) { ff_dsputil_init_altivec(c, avctx, high_bit_depth); ff_int_init_altivec(c, avctx); c->gmc1 = ff_gmc1_altivec; @@ -154,12 +155,14 @@ av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx, c->fdct = ff_fdct_altivec; } #endif //CONFIG_ENCODERS + if (avctx->lowres == 0) { if ((avctx->idct_algo == FF_IDCT_AUTO) || (avctx->idct_algo == FF_IDCT_ALTIVEC)) { c->idct_put = ff_idct_put_altivec; c->idct_add = ff_idct_add_altivec; c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; } + } } } } |