aboutsummaryrefslogtreecommitdiff
path: root/src/dsp/x86/intrapred_smooth_sse4.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/dsp/x86/intrapred_smooth_sse4.cc')
-rw-r--r--src/dsp/x86/intrapred_smooth_sse4.cc27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/dsp/x86/intrapred_smooth_sse4.cc b/src/dsp/x86/intrapred_smooth_sse4.cc
index e944ea3..de9f551 100644
--- a/src/dsp/x86/intrapred_smooth_sse4.cc
+++ b/src/dsp/x86/intrapred_smooth_sse4.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/dsp/intrapred.h"
+#include "src/dsp/intrapred_smooth.h"
#include "src/utils/cpu.h"
#if LIBGAV1_TARGETING_SSE4_1
@@ -22,12 +22,12 @@
#include <cassert>
#include <cstddef>
#include <cstdint>
-#include <cstring> // memcpy
#include "src/dsp/constants.h"
#include "src/dsp/dsp.h"
#include "src/dsp/x86/common_sse4.h"
#include "src/utils/common.h"
+#include "src/utils/constants.h"
namespace libgav1 {
namespace dsp {
@@ -67,29 +67,6 @@ inline void WriteSmoothHorizontalSum4(void* const dest, const __m128i& left,
Store4(dest, _mm_shuffle_epi8(pred, cvtepi32_epi8));
}
-template <int y_mask>
-inline __m128i SmoothVerticalSum4(const __m128i& top, const __m128i& weights,
- const __m128i& scaled_bottom_left) {
- const __m128i weights_y = _mm_shuffle_epi32(weights, y_mask);
- const __m128i weighted_top_y = _mm_mullo_epi16(top, weights_y);
- const __m128i scaled_bottom_left_y =
- _mm_shuffle_epi32(scaled_bottom_left, y_mask);
- return _mm_add_epi32(scaled_bottom_left_y, weighted_top_y);
-}
-
-template <int y_mask>
-inline void WriteSmoothVerticalSum4(uint8_t* dest, const __m128i& top,
- const __m128i& weights,
- const __m128i& scaled_bottom_left,
- const __m128i& round) {
- __m128i pred_sum =
- SmoothVerticalSum4<y_mask>(top, weights, scaled_bottom_left);
- // Equivalent to RightShiftWithRounding(pred[x][y], 8).
- pred_sum = _mm_srli_epi32(_mm_add_epi32(pred_sum, round), 8);
- const __m128i cvtepi32_epi8 = _mm_set1_epi32(0x0C080400);
- Store4(dest, _mm_shuffle_epi8(pred_sum, cvtepi32_epi8));
-}
-
// For SMOOTH_H, |pixels| is the repeated left value for the row. For SMOOTH_V,
// |pixels| is a segment of the top row or the whole top row, and |weights| is
// repeated.