From 3107a93eafd615ff9164e7dc0de01d195a2f4974 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Tue, 17 May 2016 14:09:57 +0300 Subject: [PATCH] Fix avx2 chroma sampling for amp --- src/strategies/avx2/ipol-avx2.c | 6 ++++++ src/strategies/generic/ipol-generic.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/strategies/avx2/ipol-avx2.c b/src/strategies/avx2/ipol-avx2.c index af0323f6..2289c643 100644 --- a/src/strategies/avx2/ipol-avx2.c +++ b/src/strategies/avx2/ipol-avx2.c @@ -35,6 +35,7 @@ #include "strategies/strategies-ipol.h" #include "strategyselector.h" #include "strategies/strategies-common.h" +#include "strategies/generic/ipol-generic.h" #define FILTER_OFFSET 3 @@ -566,6 +567,11 @@ void kvz_filter_inter_octpel_chroma_avx2(const encoder_control_t * const encoder void kvz_sample_octpel_chroma_avx2(const encoder_control_t * const encoder, kvz_pixel *src, int16_t src_stride, int width, int height,kvz_pixel *dst, int16_t dst_stride, int8_t hor_flag, int8_t ver_flag, const int16_t mv[2]) { + //Check for amp + if (width != height) { + kvz_sample_octpel_chroma_generic(encoder, src, src_stride, width, height, dst, dst_stride, hor_flag, ver_flag, mv); + return; + } //TODO: horizontal and vertical only filtering int32_t x, y; int16_t shift1 = KVZ_BIT_DEPTH - 8; diff --git a/src/strategies/generic/ipol-generic.h b/src/strategies/generic/ipol-generic.h index 2fc8187d..a8558591 100644 --- a/src/strategies/generic/ipol-generic.h +++ b/src/strategies/generic/ipol-generic.h @@ -31,6 +31,7 @@ #include "kvazaar.h" int kvz_strategy_register_ipol_generic(void* opaque, uint8_t bitdepth); +void kvz_sample_octpel_chroma_generic(const encoder_control_t * const encoder, kvz_pixel *src, int16_t src_stride, int width, int height, kvz_pixel *dst, int16_t dst_stride, int8_t hor_flag, int8_t ver_flag, const int16_t mv[2]); #endif //STRATEGIES_IPOL_GENERIC_H_