From 4af5b6cdb06703fb059aa9aa49684d2228e1672f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sigbj=C3=B8rn=20Skj=C3=A6ret?= Date: Fri, 1 Jul 2005 09:37:35 +0000 Subject: [PATCH] =?utf8?q?Disable=20AltiVec=20IDCT=20for=20lowres=20decodi?= =?utf8?q?ng=20in=20lavc=20patch=20by=20(Sigbj=C3=B8rn=20Skj=C3=A6ret:=20c?= =?utf8?q?isc,=20broadpark=20no)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Originally committed as revision 4413 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/ppc/dsputil_ppc.c | 3 +++ libavcodec/ppc/mpegvideo_ppc.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c index 80dea03..776f423 100644 --- a/libavcodec/ppc/dsputil_ppc.c +++ b/libavcodec/ppc/dsputil_ppc.c @@ -305,6 +305,8 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) } #endif //CONFIG_ENCODERS + if (avctx->lowres==0) + { if ((avctx->idct_algo == FF_IDCT_AUTO) || (avctx->idct_algo == FF_IDCT_ALTIVEC)) { @@ -316,6 +318,7 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) c->idct_permutation_type = FF_NO_IDCT_PERM; #endif /* ALTIVEC_USE_REFERENCE_C_CODE */ } + } #ifdef POWERPC_PERFORMANCE_REPORT { diff --git a/libavcodec/ppc/mpegvideo_ppc.c b/libavcodec/ppc/mpegvideo_ppc.c index c8269eb..832bace 100644 --- a/libavcodec/ppc/mpegvideo_ppc.c +++ b/libavcodec/ppc/mpegvideo_ppc.c @@ -39,6 +39,8 @@ void MPV_common_init_ppc(MpegEncContext *s) #ifdef HAVE_ALTIVEC if (has_altivec()) { + if (s->avctx->lowres==0) + { if ((s->avctx->idct_algo == FF_IDCT_AUTO) || (s->avctx->idct_algo == FF_IDCT_ALTIVEC)) { @@ -50,6 +52,7 @@ void MPV_common_init_ppc(MpegEncContext *s) s->dsp.idct_permutation_type = FF_NO_IDCT_PERM; #endif /* ALTIVEC_USE_REFERENCE_C_CODE */ } + } // Test to make sure that the dct required alignments are met. if ((((long)(s->q_intra_matrix) & 0x0f) != 0) || -- 2.7.4