---
 libavcodec/proresenc.c | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c
index 9672399..555150a 100644
--- a/libavcodec/proresenc.c
+++ b/libavcodec/proresenc.c
@@ -192,7 +192,9 @@ typedef struct ProresContext {
     const uint8_t *quant_mat;
 
     uint8_t dct_permutation[64];
-    void (* fdct) (const uint16_t *src, int linesize, int16_t *block);
+    void (* fdct)(DSPContext *dsp, const uint16_t *src,
+                  int linesize, int16_t *block);
+    DSPContext dsp;
     ScanTable  scantable;
 
     int mb_width, mb_height;
@@ -262,27 +264,27 @@ static void get_slice_data(ProresContext *ctx, const 
uint16_t *src,
                        mb_width * sizeof(*emu_buf));
         }
         if (!is_chroma) {
-            ctx->fdct(esrc, elinesize, blocks);
+            ctx->fdct(&ctx->dsp, esrc, elinesize, blocks);
             blocks += 64;
             if (blocks_per_mb > 2) {
-                ctx->fdct(esrc + 8, elinesize, blocks);
+                ctx->fdct(&ctx->dsp, esrc + 8, elinesize, blocks);
                 blocks += 64;
             }
-            ctx->fdct(esrc + elinesize * 4, elinesize, blocks);
+            ctx->fdct(&ctx->dsp, esrc + elinesize * 4, elinesize, blocks);
             blocks += 64;
             if (blocks_per_mb > 2) {
-                ctx->fdct(esrc + elinesize * 4 + 8, elinesize, blocks);
+                ctx->fdct(&ctx->dsp, esrc + elinesize * 4 + 8, elinesize, 
blocks);
                 blocks += 64;
             }
         } else {
-            ctx->fdct(esrc, elinesize, blocks);
+            ctx->fdct(&ctx->dsp, esrc, elinesize, blocks);
             blocks += 64;
-            ctx->fdct(esrc + elinesize * 4, elinesize, blocks);
+            ctx->fdct(&ctx->dsp, esrc + elinesize * 4, elinesize, blocks);
             blocks += 64;
             if (blocks_per_mb > 2) {
-                ctx->fdct(esrc + 8, elinesize, blocks);
+                ctx->fdct(&ctx->dsp, esrc + 8, elinesize, blocks);
                 blocks += 64;
-                ctx->fdct(esrc + elinesize * 4 + 8, elinesize, blocks);
+                ctx->fdct(&ctx->dsp, esrc + elinesize * 4 + 8, elinesize, 
blocks);
                 blocks += 64;
             }
         }
@@ -1067,7 +1069,8 @@ static av_cold int encode_close(AVCodecContext *avctx)
     return 0;
 }
 
-static void prores_fdct(const uint16_t *src, int linesize, int16_t *block)
+static void prores_fdct(DSPContext *dsp, const uint16_t *src,
+                        int linesize, int16_t *block)
 {
     int x, y;
     const uint16_t *tsrc = src;
@@ -1077,7 +1080,7 @@ static void prores_fdct(const uint16_t *src, int 
linesize, int16_t *block)
             block[y * 8 + x] = tsrc[x];
         tsrc += linesize >> 1;
     }
-    ff_jpeg_fdct_islow_10(block);
+    dsp->fdct(block);
 }
 
 static av_cold int encode_init(AVCodecContext *avctx)
@@ -1098,6 +1101,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
     ff_init_scantable(ctx->dct_permutation, &ctx->scantable,
                       interlaced ? ff_prores_interlaced_scan
                                  : ff_prores_progressive_scan);
+    ff_dsputil_init(&ctx->dsp, avctx);
 
     mps = ctx->mbs_per_slice;
     if (mps & (mps - 1)) {
-- 
1.8.3.2

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to