chromium/third_party/libaom/source/libaom/av1/encoder/k_means_template.h

/*
 * 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 <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include "av1/common/blockd.h"
#include "av1/encoder/palette.h"
#include "av1/encoder/random.h"

#ifndef AV1_K_MEANS_DIM
#error "This template requires AV1_K_MEANS_DIM to be defined"
#endif

#define RENAME_
#define RENAME
#define K_MEANS_RENAME_C
#define RENAME_C_
#define RENAME_C

// Though we want to compute the smallest L2 norm, in 1 dimension,
// it is equivalent to find the smallest L1 norm and then square it.
// This is preferrable for speed, especially on the SIMD side.
static int RENAME(calc_dist)(const int16_t *p1, const int16_t *p2) {}

void RENAME_C(av1_calc_indices)(const int16_t *data, const int16_t *centroids,
                                uint8_t *indices, int64_t *dist, int n, int k) {}

static void RENAME(calc_centroids)(const int16_t *data, int16_t *centroids,
                                   const uint8_t *indices, int n, int k) {}

void RENAME(av1_k_means)(const int16_t *data, int16_t *centroids,
                         uint8_t *indices, int n, int k, int max_itr) {}
#undef RENAME_
#undef RENAME
#undef K_MEANS_RENAME_C
#undef RENAME_C_
#undef RENAME_C