# HG changeset patch # User michaelni # Date 1052915537 0 # Node ID bc68a29d0dd1d6589993ef39b1bad0d57872602b # Parent e8c3884f2c7e59d63bf4004797cffe45bac37f15 make sh4 IDCT optional, so the user can choose diff -r e8c3884f2c7e -r bc68a29d0dd1 avcodec.h --- a/avcodec.h Wed May 14 12:18:49 2003 +0000 +++ b/avcodec.h Wed May 14 12:32:17 2003 +0000 @@ -844,6 +844,7 @@ #define FF_IDCT_MLIB 6 #define FF_IDCT_ARM 7 #define FF_IDCT_ALTIVEC 8 +#define FF_IDCT_SH4 9 /** * slice count. diff -r e8c3884f2c7e -r bc68a29d0dd1 sh4/dsputil_sh4.c --- a/sh4/dsputil_sh4.c Wed May 14 12:18:49 2003 +0000 +++ b/sh4/dsputil_sh4.c Wed May 14 12:32:17 2003 +0000 @@ -105,10 +105,13 @@ void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx) { + const int idct_algo= avctx->idct_algo; dsputil_init_align(c,avctx); c->clear_blocks = clear_blocks_sh4; - c->idct_put = idct_put; - c->idct_add = idct_add; - c->idct_permutation_type= FF_NO_IDCT_PERM; //FF_SIMPLE_IDCT_PERM; //FF_LIBMPEG2_IDCT_PERM; + if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SH4){ + c->idct_put = idct_put; + c->idct_add = idct_add; + c->idct_permutation_type= FF_NO_IDCT_PERM; //FF_SIMPLE_IDCT_PERM; //FF_LIBMPEG2_IDCT_PERM; + } }