From b5dc95cc9dbdc4fa369ebe35052e552c43d69fef Mon Sep 17 00:00:00 2001 From: Olaf Schulz Date: Wed, 2 Nov 2016 21:16:35 +0100 Subject: [PATCH 1/2] Add source file to resolve linking error in Cmake. --- libde265/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/libde265/CMakeLists.txt b/libde265/CMakeLists.txt index ab50a98b9..90669eae5 100644 --- a/libde265/CMakeLists.txt +++ b/libde265/CMakeLists.txt @@ -54,6 +54,7 @@ set (libde265_sources acceleration.h fallback.cc fallback.h fallback-motion.cc fallback-motion.h fallback-dct.h fallback-dct.cc fallback-sao.h fallback-sao.cc + fallback-intra-dc.cc quality.cc quality.h configparam.cc configparam.h image-io.h image-io.cc From 068c381de7ba7f5a61acac0beb59a576b239903b Mon Sep 17 00:00:00 2001 From: Olaf Schulz Date: Thu, 3 Nov 2016 18:10:39 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=E2=80=A2=20Fix=20detection=20of=20SSSE3=20?= =?UTF-8?q?flag.=20Check=20used=20the=20wrong=20register.=20=E2=80=A2=20Ch?= =?UTF-8?q?ange=20detection=20of=20available=20SSE=20instructions.=20It=20?= =?UTF-8?q?changes=20the=20selected=20SSE=20functions=20in=20the=20case=20?= =?UTF-8?q?=201=3Dhave=5FSSE2=3Dhave=5FSSE3,=200=3Dhave=5FSSSE3=3Dhave=5FS?= =?UTF-8?q?SSE4=5F1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libde265/x86/sse.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libde265/x86/sse.cc b/libde265/x86/sse.cc index 303152f93..bd491a896 100644 --- a/libde265/x86/sse.cc +++ b/libde265/x86/sse.cc @@ -76,7 +76,7 @@ void init_acceleration_functions_sse(struct acceleration_functions* accel, int have_SSE = !!(edx & (1<<25)); int have_SSE2 = !!(edx & (1<<26)); int have_SSE3 = !!(ecx & (1<< 0)); - int have_SSSE3 = !!(edx & (1<< 9)); + int have_SSSE3 = !!(ecx & (1<< 9)); int have_SSE4_1 = !!(ecx & (1<<19)); int have_SSE4_2 = !!(ecx & (1<<20)); int have_AVX = !!(ecx & (1<<28)); @@ -94,22 +94,25 @@ void init_acceleration_functions_sse(struct acceleration_functions* accel, } #if HAVE_SSE4_1 - if (have_SSE2) { + if (have_SSE4_1) { accel->put_unweighted_pred_8 = put_pred_8_sse2; accel->put_weighted_pred_avg_8 = put_bipred_8_sse2; } if (have_SSSE3) { accel->put_weighted_pred_8 = put_weighted_pred_8_ssse3; } + if (have_SSE2) { accel->put_weighted_bipred_8 = put_weighted_bipred_8_sse2; } - if (have_SSE2) { accel->put_hevc_epel_8 = put_hevc_chroma_direct_8_sse2; } + if (have_SSE4_1) { accel->put_hevc_epel_8 = put_hevc_chroma_direct_8_sse2; } + if (have_SSE4_1) { // TODO: check requirements accel->put_hevc_epel_h_8 = ff_hevc_put_hevc_epel_h_8_sse; accel->put_hevc_epel_v_8 = ff_hevc_put_hevc_epel_v_8_sse; accel->put_hevc_epel_hv_8 = ff_hevc_put_hevc_epel_hv_8_sse; } - if (have_SSE2) { accel->put_hevc_qpel_8[0][0] = put_hevc_luma_direct_8_sse2; } + if (have_SSE4_1) { accel->put_hevc_qpel_8[0][0] = put_hevc_luma_direct_8_sse2; } + if (have_SSE4_1) { // TODO: check requirements accel->put_hevc_qpel_8[0][1] = ff_hevc_put_hevc_qpel_v_1_8_sse; accel->put_hevc_qpel_8[0][2] = ff_hevc_put_hevc_qpel_v_2_8_sse; @@ -152,6 +155,6 @@ void init_acceleration_functions_sse(struct acceleration_functions* accel, if (have_SSSE3) { accel->intra_dc_noavg_8[3] = intra_dc_noavg_8_32x32_ssse3; } accel->intra_dc_avg_8[3] = nullptr; - if (have_SSE2) { accel->sao_band_8 = sao_band_8bit_sse2; } + if (have_SSSE3) { accel->sao_band_8 = sao_band_8bit_sse2; } #endif }