chromium/third_party/libvpx/source/libvpx/vpx_dsp/variance.c

/*
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"

#include "vpx_ports/mem.h"
#include "vpx/vpx_integer.h"

#include "vpx_dsp/variance.h"

static const uint8_t bilinear_filters[8][2] =;

uint32_t vpx_get4x4sse_cs_c(const uint8_t *src_ptr, int src_stride,
                            const uint8_t *ref_ptr, int ref_stride) {}

uint32_t vpx_get_mb_ss_c(const int16_t *src_ptr) {}

static void variance(const uint8_t *src_ptr, int src_stride,
                     const uint8_t *ref_ptr, int ref_stride, int w, int h,
                     uint32_t *sse, int *sum) {}

// Applies a 1-D 2-tap bilinear filter to the source block in either horizontal
// or vertical direction to produce the filtered output block. Used to implement
// the first-pass of 2-D separable filter.
//
// Produces int16_t output to retain precision for the next pass. Two filter
// taps should sum to FILTER_WEIGHT. pixel_step defines whether the filter is
// applied horizontally (pixel_step = 1) or vertically (pixel_step = stride).
// It defines the offset required to move from one input to the next.
static void var_filter_block2d_bil_first_pass(
    const uint8_t *src_ptr, uint16_t *ref_ptr, unsigned int src_pixels_per_line,
    int pixel_step, unsigned int output_height, unsigned int output_width,
    const uint8_t *filter) {}

// Applies a 1-D 2-tap bilinear filter to the source block in either horizontal
// or vertical direction to produce the filtered output block. Used to implement
// the second-pass of 2-D separable filter.
//
// Requires 16-bit input as produced by filter_block2d_bil_first_pass. Two
// filter taps should sum to FILTER_WEIGHT. pixel_step defines whether the
// filter is applied horizontally (pixel_step = 1) or vertically
// (pixel_step = stride). It defines the offset required to move from one input
// to the next. Output is 8-bit.
static void var_filter_block2d_bil_second_pass(
    const uint16_t *src_ptr, uint8_t *ref_ptr, unsigned int src_pixels_per_line,
    unsigned int pixel_step, unsigned int output_height,
    unsigned int output_width, const uint8_t *filter) {}

#define VAR(W, H)

#define SUBPIX_VAR(W, H)

#define SUBPIX_AVG_VAR(W, H)

/* Identical to the variance call except it takes an additional parameter, sum,
 * and returns that value using pass-by-reference instead of returning
 * sse - sum^2 / w*h
 */
#define GET_VAR(W, H)

/* Identical to the variance call except it does not calculate the
 * sse - sum^2 / w*h and returns sse in addition to modifying the passed in
 * variable.
 */
#define MSE(W, H)

/* All three forms of the variance are available in the same sizes. */
#define VARIANCES(W, H)

VARIANCES(64, 64)
VARIANCES(64, 32)
VARIANCES(32, 64)
VARIANCES(32, 32)
VARIANCES(32, 16)
VARIANCES(16, 32)
VARIANCES(16, 16)
VARIANCES(16, 8)
VARIANCES(8, 16)
VARIANCES(8, 8)
VARIANCES(8, 4)
VARIANCES(4, 8)
VARIANCES(4, 4)

GET_VAR()
GET_VAR()

MSE()
MSE()
MSE()
MSE()

void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width,
                         int height, const uint8_t *ref, int ref_stride) {}

#if CONFIG_VP9_HIGHBITDEPTH
static void highbd_variance64(const uint8_t *src8_ptr, int src_stride,
                              const uint8_t *ref8_ptr, int ref_stride, int w,
                              int h, uint64_t *sse, int64_t *sum) {}

static void highbd_8_variance(const uint8_t *src8_ptr, int src_stride,
                              const uint8_t *ref8_ptr, int ref_stride, int w,
                              int h, uint32_t *sse, int *sum) {}

static void highbd_10_variance(const uint8_t *src8_ptr, int src_stride,
                               const uint8_t *ref8_ptr, int ref_stride, int w,
                               int h, uint32_t *sse, int *sum) {}

static void highbd_12_variance(const uint8_t *src8_ptr, int src_stride,
                               const uint8_t *ref8_ptr, int ref_stride, int w,
                               int h, uint32_t *sse, int *sum) {}

#define HIGHBD_VAR(W, H)

#define HIGHBD_GET_VAR(S)

#define HIGHBD_MSE(W, H)

static void highbd_var_filter_block2d_bil_first_pass(
    const uint8_t *src_ptr8, uint16_t *output_ptr,
    unsigned int src_pixels_per_line, int pixel_step,
    unsigned int output_height, unsigned int output_width,
    const uint8_t *filter) {}

static void highbd_var_filter_block2d_bil_second_pass(
    const uint16_t *src_ptr, uint16_t *output_ptr,
    unsigned int src_pixels_per_line, unsigned int pixel_step,
    unsigned int output_height, unsigned int output_width,
    const uint8_t *filter) {}

#define HIGHBD_SUBPIX_VAR(W, H)

#define HIGHBD_SUBPIX_AVG_VAR(W, H)

/* All three forms of the variance are available in the same sizes. */
#define HIGHBD_VARIANCES(W, H)

HIGHBD_VARIANCES(64, 64)
HIGHBD_VARIANCES(64, 32)
HIGHBD_VARIANCES(32, 64)
HIGHBD_VARIANCES(32, 32)
HIGHBD_VARIANCES(32, 16)
HIGHBD_VARIANCES(16, 32)
HIGHBD_VARIANCES(16, 16)
HIGHBD_VARIANCES(16, 8)
HIGHBD_VARIANCES(8, 16)
HIGHBD_VARIANCES(8, 8)
HIGHBD_VARIANCES(8, 4)
HIGHBD_VARIANCES(4, 8)
HIGHBD_VARIANCES(4, 4)

HIGHBD_GET_VAR()
HIGHBD_GET_VAR()

HIGHBD_MSE()
HIGHBD_MSE()
HIGHBD_MSE()
HIGHBD_MSE()

void vpx_highbd_comp_avg_pred_c(uint16_t *comp_pred, const uint16_t *pred,
                                int width, int height, const uint16_t *ref,
                                int ref_stride) {}
#endif  // CONFIG_VP9_HIGHBITDEPTH