|
38 | 38 |
|
39 | 39 | #if COMPILE_INTEL_AVX2
|
40 | 40 | #include "kvazaar.h"
|
41 |
| -#if KVZ_BIT_DEPTH == 8 |
42 | 41 | #include <immintrin.h>
|
43 | 42 |
|
44 | 43 | #include "strategyselector.h"
|
@@ -938,30 +937,28 @@ static void matrix_i ## type ## _## n ## x ## n ## _avx2(int8_t bitdepth, const
|
938 | 937 | TRANSFORM(dct, 32);
|
939 | 938 | ITRANSFORM(dct, 32);
|
940 | 939 |
|
941 |
| -#endif // KVZ_BIT_DEPTH == 8 |
| 940 | + |
942 | 941 | #endif //COMPILE_INTEL_AVX2
|
943 | 942 |
|
944 | 943 | int kvz_strategy_register_dct_avx2(void* opaque, uint8_t bitdepth)
|
945 | 944 | {
|
946 | 945 | bool success = true;
|
947 | 946 | #if COMPILE_INTEL_AVX2
|
948 |
| -#if KVZ_BIT_DEPTH == 8 |
949 |
| - if (bitdepth == 8){ |
950 |
| - success &= kvz_strategyselector_register(opaque, "fast_forward_dst_4x4", "avx2", 40, &matrix_dst_4x4_avx2); |
| 947 | + // Coefficients are the same for all bitdepths, no need to disable for 10-bit |
| 948 | + success &= kvz_strategyselector_register(opaque, "fast_forward_dst_4x4", "avx2", 40, &matrix_dst_4x4_avx2); |
951 | 949 |
|
952 |
| - success &= kvz_strategyselector_register(opaque, "dct_4x4", "avx2", 40, &matrix_dct_4x4_avx2); |
953 |
| - success &= kvz_strategyselector_register(opaque, "dct_8x8", "avx2", 40, &matrix_dct_8x8_avx2); |
954 |
| - success &= kvz_strategyselector_register(opaque, "dct_16x16", "avx2", 40, &matrix_dct_16x16_avx2); |
955 |
| - success &= kvz_strategyselector_register(opaque, "dct_32x32", "avx2", 40, &matrix_dct_32x32_avx2); |
| 950 | + success &= kvz_strategyselector_register(opaque, "dct_4x4", "avx2", 40, &matrix_dct_4x4_avx2); |
| 951 | + success &= kvz_strategyselector_register(opaque, "dct_8x8", "avx2", 40, &matrix_dct_8x8_avx2); |
| 952 | + success &= kvz_strategyselector_register(opaque, "dct_16x16", "avx2", 40, &matrix_dct_16x16_avx2); |
| 953 | + success &= kvz_strategyselector_register(opaque, "dct_32x32", "avx2", 40, &matrix_dct_32x32_avx2); |
956 | 954 |
|
957 |
| - success &= kvz_strategyselector_register(opaque, "fast_inverse_dst_4x4", "avx2", 40, &matrix_idst_4x4_avx2); |
| 955 | + success &= kvz_strategyselector_register(opaque, "fast_inverse_dst_4x4", "avx2", 40, &matrix_idst_4x4_avx2); |
958 | 956 |
|
959 |
| - success &= kvz_strategyselector_register(opaque, "idct_4x4", "avx2", 40, &matrix_idct_4x4_avx2); |
960 |
| - success &= kvz_strategyselector_register(opaque, "idct_8x8", "avx2", 40, &matrix_idct_8x8_avx2); |
961 |
| - success &= kvz_strategyselector_register(opaque, "idct_16x16", "avx2", 40, &matrix_idct_16x16_avx2); |
962 |
| - success &= kvz_strategyselector_register(opaque, "idct_32x32", "avx2", 40, &matrix_idct_32x32_avx2); |
963 |
| - } |
964 |
| -#endif // KVZ_BIT_DEPTH == 8 |
| 957 | + success &= kvz_strategyselector_register(opaque, "idct_4x4", "avx2", 40, &matrix_idct_4x4_avx2); |
| 958 | + success &= kvz_strategyselector_register(opaque, "idct_8x8", "avx2", 40, &matrix_idct_8x8_avx2); |
| 959 | + success &= kvz_strategyselector_register(opaque, "idct_16x16", "avx2", 40, &matrix_idct_16x16_avx2); |
| 960 | + success &= kvz_strategyselector_register(opaque, "idct_32x32", "avx2", 40, &matrix_idct_32x32_avx2); |
| 961 | + |
965 | 962 | #endif //COMPILE_INTEL_AVX2
|
966 | 963 | return success;
|
967 | 964 | }
|
0 commit comments