simple_idct: add 10-bit version
[ffmpeg.git] / libavcodec / sh4 / dsputil_sh4.c
index 9ea48ad4a1a3acc09694ed34c8c4e5c8d7c8826b..bf58a9cbbda55ff5c584583ade04a7b80ead39a6 100644 (file)
@@ -97,7 +97,8 @@ void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx)
 
         if (!high_bit_depth)
         c->clear_blocks = clear_blocks_sh4;
 
         if (!high_bit_depth)
         c->clear_blocks = clear_blocks_sh4;
-        if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SH4){
+        if (avctx->bits_per_raw_sample <= 8 &&
+            (idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SH4)) {
                 c->idct_put = idct_put;
                 c->idct_add = idct_add;
                c->idct     = idct_sh4;
                 c->idct_put = idct_put;
                 c->idct_add = idct_add;
                c->idct     = idct_sh4;