chromium/third_party/libaom/source/libaom/aom_dsp/x86/sad4d_avx2.c

/*
 * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
 *
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 */
#include <immintrin.h>  // AVX2

#include "config/aom_dsp_rtcd.h"

#include "aom/aom_integer.h"
#include "aom_dsp/x86/synonyms_avx2.h"

static AOM_FORCE_INLINE void aggregate_and_store_sum(uint32_t res[4],
                                                     const __m256i *sum_ref0,
                                                     const __m256i *sum_ref1,
                                                     const __m256i *sum_ref2,
                                                     const __m256i *sum_ref3) {}

static AOM_FORCE_INLINE void aom_sadMxNx4d_avx2(
    int M, int N, const uint8_t *src, int src_stride,
    const uint8_t *const ref[4], int ref_stride, uint32_t res[4]) {}

static AOM_FORCE_INLINE void aom_sadMxNx3d_avx2(
    int M, int N, const uint8_t *src, int src_stride,
    const uint8_t *const ref[4], int ref_stride, uint32_t res[4]) {}

#define SADMXN_AVX2(m, n)

SADMXN_AVX2()
SADMXN_AVX2()
SADMXN_AVX2()

SADMXN_AVX2()
SADMXN_AVX2()
SADMXN_AVX2()

SADMXN_AVX2()
SADMXN_AVX2()

#if !CONFIG_REALTIME_ONLY
SADMXN_AVX2(32, 8)
SADMXN_AVX2(64, 16)
#endif  // !CONFIG_REALTIME_ONLY

#define SAD_SKIP_MXN_AVX2(m, n)

SAD_SKIP_MXN_AVX2()
SAD_SKIP_MXN_AVX2()
SAD_SKIP_MXN_AVX2()

SAD_SKIP_MXN_AVX2()
SAD_SKIP_MXN_AVX2()
SAD_SKIP_MXN_AVX2()

SAD_SKIP_MXN_AVX2()
SAD_SKIP_MXN_AVX2()

#if !CONFIG_REALTIME_ONLY
SAD_SKIP_MXN_AVX2(32, 8)
SAD_SKIP_MXN_AVX2(64, 16)
#endif  // !CONFIG_REALTIME_ONLY

static AOM_FORCE_INLINE void aom_sad16xNx3d_avx2(int N, const uint8_t *src,
                                                 int src_stride,
                                                 const uint8_t *const ref[4],
                                                 int ref_stride,
                                                 uint32_t res[4]) {}

static AOM_FORCE_INLINE void aom_sad16xNx4d_avx2(int N, const uint8_t *src,
                                                 int src_stride,
                                                 const uint8_t *const ref[4],
                                                 int ref_stride,
                                                 uint32_t res[4]) {}

#define SAD16XNX3_AVX2(n)
#define SAD16XNX4_AVX2(n)

SAD16XNX4_AVX2()
SAD16XNX4_AVX2()
SAD16XNX4_AVX2()

SAD16XNX3_AVX2()
SAD16XNX3_AVX2()
SAD16XNX3_AVX2()

#if !CONFIG_REALTIME_ONLY
SAD16XNX3_AVX2(64)
SAD16XNX3_AVX2(4)

SAD16XNX4_AVX2(64)
SAD16XNX4_AVX2(4)

#endif  // !CONFIG_REALTIME_ONLY

#define SAD_SKIP_16XN_AVX2(n)

SAD_SKIP_16XN_AVX2()
SAD_SKIP_16XN_AVX2()
SAD_SKIP_16XN_AVX2()

#if !CONFIG_REALTIME_ONLY
SAD_SKIP_16XN_AVX2(64)
SAD_SKIP_16XN_AVX2(4)
#endif  // !CONFIG_REALTIME_ONLY