]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/idctdsp: Initialize ff_put/add_pixels_clamped correctly so that the optimized...
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 3 Sep 2014 02:52:50 +0000 (04:52 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 3 Sep 2014 03:19:06 +0000 (05:19 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/idctdsp.c

index cf12f1606ae862fd3710a77ac2002f111480aeb6..19e81262613f6dae3eeb66d7764ed39f720b7081 100644 (file)
@@ -292,9 +292,6 @@ av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
     c->put_signed_pixels_clamped = put_signed_pixels_clamped_c;
     c->add_pixels_clamped        = add_pixels_clamped_c;
 
-    ff_put_pixels_clamped = c->put_pixels_clamped;
-    ff_add_pixels_clamped = c->add_pixels_clamped;
-
     if (CONFIG_MPEG4_DECODER && avctx->idct_algo == FF_IDCT_XVID)
         ff_xvid_idct_init(c, avctx);
 
@@ -307,6 +304,9 @@ av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
     if (ARCH_X86)
         ff_idctdsp_init_x86(c, avctx, high_bit_depth);
 
+    ff_put_pixels_clamped = c->put_pixels_clamped;
+    ff_add_pixels_clamped = c->add_pixels_clamped;
+
     ff_init_scantable_permutation(c->idct_permutation,
                                   c->perm_type);
 }