comparison ppc/mpegvideo_ppc.c @ 2778:4c0ab7ed2642 libavcodec

Disable AltiVec IDCT for lowres decoding in lavc patch by (Sigbjrn Skjret: cisc, broadpark no)
author michael
date Fri, 01 Jul 2005 09:37:35 +0000
parents 9241d99f7443
children ef2149182f1c
comparison
equal deleted inserted replaced
2777:09108466b7d0 2778:4c0ab7ed2642
37 void MPV_common_init_ppc(MpegEncContext *s) 37 void MPV_common_init_ppc(MpegEncContext *s)
38 { 38 {
39 #ifdef HAVE_ALTIVEC 39 #ifdef HAVE_ALTIVEC
40 if (has_altivec()) 40 if (has_altivec())
41 { 41 {
42 if (s->avctx->lowres==0)
43 {
42 if ((s->avctx->idct_algo == FF_IDCT_AUTO) || 44 if ((s->avctx->idct_algo == FF_IDCT_AUTO) ||
43 (s->avctx->idct_algo == FF_IDCT_ALTIVEC)) 45 (s->avctx->idct_algo == FF_IDCT_ALTIVEC))
44 { 46 {
45 s->dsp.idct_put = idct_put_altivec; 47 s->dsp.idct_put = idct_put_altivec;
46 s->dsp.idct_add = idct_add_altivec; 48 s->dsp.idct_add = idct_add_altivec;
48 s->dsp.idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; 50 s->dsp.idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
49 #else /* ALTIVEC_USE_REFERENCE_C_CODE */ 51 #else /* ALTIVEC_USE_REFERENCE_C_CODE */
50 s->dsp.idct_permutation_type = FF_NO_IDCT_PERM; 52 s->dsp.idct_permutation_type = FF_NO_IDCT_PERM;
51 #endif /* ALTIVEC_USE_REFERENCE_C_CODE */ 53 #endif /* ALTIVEC_USE_REFERENCE_C_CODE */
52 } 54 }
55 }
53 56
54 // Test to make sure that the dct required alignments are met. 57 // Test to make sure that the dct required alignments are met.
55 if ((((long)(s->q_intra_matrix) & 0x0f) != 0) || 58 if ((((long)(s->q_intra_matrix) & 0x0f) != 0) ||
56 (((long)(s->q_inter_matrix) & 0x0f) != 0)) 59 (((long)(s->q_inter_matrix) & 0x0f) != 0))
57 { 60 {