]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/x86/idctdsp_init.c
Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
[ffmpeg] / libavcodec / x86 / idctdsp_init.c
index 2c26a9885086333fa5a85fe5ffa32bdf46cdd154..bcf7e5be0e2266bdf7832b9d0e1bf5525091be8a 100644 (file)
@@ -85,4 +85,42 @@ av_cold void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx,
         c->put_pixels_clamped        = ff_put_pixels_clamped_sse2;
         c->add_pixels_clamped        = ff_add_pixels_clamped_sse2;
     }
+
+    if (ARCH_X86_64 && avctx->lowres == 0) {
+        if (avctx->bits_per_raw_sample == 10 &&
+        (avctx->idct_algo == FF_IDCT_AUTO ||
+         avctx->idct_algo == FF_IDCT_SIMPLEAUTO ||
+         avctx->idct_algo == FF_IDCT_SIMPLE)) {
+        if (EXTERNAL_SSE2(cpu_flags)) {
+            c->idct_put  = ff_simple_idct10_put_sse2;
+            c->idct_add  = NULL;
+            c->idct      = ff_simple_idct10_sse2;
+            c->perm_type = FF_IDCT_PERM_TRANSPOSE;
+
+        }
+        if (EXTERNAL_AVX(cpu_flags)) {
+            c->idct_put  = ff_simple_idct10_put_avx;
+            c->idct_add  = NULL;
+            c->idct      = ff_simple_idct10_avx;
+            c->perm_type = FF_IDCT_PERM_TRANSPOSE;
+        }
+        }
+
+        if (avctx->bits_per_raw_sample == 12 &&
+            (avctx->idct_algo == FF_IDCT_AUTO ||
+             avctx->idct_algo == FF_IDCT_SIMPLEMMX)) {
+            if (EXTERNAL_SSE2(cpu_flags)) {
+                c->idct_put  = ff_simple_idct12_put_sse2;
+                c->idct_add  = NULL;
+                c->idct      = ff_simple_idct12_sse2;
+                c->perm_type = FF_IDCT_PERM_TRANSPOSE;
+            }
+            if (EXTERNAL_AVX(cpu_flags)) {
+                c->idct_put  = ff_simple_idct12_put_avx;
+                c->idct_add  = NULL;
+                c->idct      = ff_simple_idct12_avx;
+                c->perm_type = FF_IDCT_PERM_TRANSPOSE;
+            }
+        }
+    }
 }