mv vp10_fwd_txfm2d_#x# into vp10_rtcd.h
Change-Id: Iad7352698786791b0fd7c005a7edfd1724b71599
This commit is contained in:
Родитель
40ef86f27d
Коммит
abd447e339
|
@ -12,17 +12,16 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "test/acm_random.h"
|
||||
#include "test/vp10_txfm_test.h"
|
||||
#include "vp10/common/vp10_fwd_txfm2d.h"
|
||||
#include "vp10/common/vp10_fwd_txfm2d_cfg.h"
|
||||
#include "./vp10_rtcd.h"
|
||||
|
||||
using libvpx_test::ACMRandom;
|
||||
|
||||
namespace {
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
const int txfm_size_num = 5;
|
||||
const int txfm_size_ls[5] = {4, 8, 16, 32, 64};
|
||||
const TXFM_2D_CFG* fwd_txfm_cfg_ls[5][4] = {
|
||||
|
@ -105,5 +104,6 @@ TEST(vp10_fwd_txfm2d, accuracy) {
|
|||
delete[] ref_output;
|
||||
}
|
||||
}
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
} // anonymous namespace
|
||||
|
|
|
@ -12,19 +12,17 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
|
||||
#include "./vp10_rtcd.h"
|
||||
#include "test/acm_random.h"
|
||||
#include "test/vp10_txfm_test.h"
|
||||
#include "vp10/common/vp10_fwd_txfm2d.h"
|
||||
#include "vp10/common/vp10_fwd_txfm2d_cfg.h"
|
||||
#include "vp10/common/vp10_inv_txfm2d.h"
|
||||
#include "vp10/common/vp10_inv_txfm2d_cfg.h"
|
||||
|
||||
using libvpx_test::ACMRandom;
|
||||
|
||||
namespace {
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
const int txfm_size_num = 5;
|
||||
const int txfm_size_ls[5] = {4, 8, 16, 32, 64};
|
||||
const TXFM_2D_CFG* fwd_txfm_cfg_ls[5][4] = {
|
||||
|
@ -50,11 +48,12 @@ const TXFM_2D_CFG* inv_txfm_cfg_ls[5][4] = {
|
|||
{&inv_txfm_2d_cfg_dct_dct_64, NULL, NULL, NULL}};
|
||||
|
||||
const Fwd_Txfm2d_Func fwd_txfm_func_ls[5] = {
|
||||
vp10_fwd_txfm2d_4x4, vp10_fwd_txfm2d_8x8, vp10_fwd_txfm2d_16x16,
|
||||
vp10_fwd_txfm2d_32x32, vp10_fwd_txfm2d_64x64};
|
||||
vp10_fwd_txfm2d_4x4_c, vp10_fwd_txfm2d_8x8_c, vp10_fwd_txfm2d_16x16_c,
|
||||
vp10_fwd_txfm2d_32x32_c, vp10_fwd_txfm2d_64x64_c};
|
||||
const Inv_Txfm2d_Func inv_txfm_func_ls[5] = {
|
||||
vp10_inv_txfm2d_add_4x4, vp10_inv_txfm2d_add_8x8, vp10_inv_txfm2d_add_16x16,
|
||||
vp10_inv_txfm2d_add_32x32, vp10_inv_txfm2d_add_64x64};
|
||||
vp10_inv_txfm2d_add_4x4_c, vp10_inv_txfm2d_add_8x8_c,
|
||||
vp10_inv_txfm2d_add_16x16_c, vp10_inv_txfm2d_add_32x32_c,
|
||||
vp10_inv_txfm2d_add_64x64_c};
|
||||
|
||||
const int txfm_type_num = 4;
|
||||
|
||||
|
@ -115,5 +114,6 @@ TEST(vp10_inv_txfm2d, round_trip) {
|
|||
delete[] output;
|
||||
}
|
||||
}
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
} // anonymous namespace
|
||||
|
|
|
@ -90,7 +90,7 @@ static inline void fwd_txfm2d_c(const int16_t *input, int32_t *output,
|
|||
}
|
||||
}
|
||||
|
||||
void vp10_fwd_txfm2d_4x4(const int16_t *input, int32_t *output,
|
||||
void vp10_fwd_txfm2d_4x4_c(const int16_t *input, int32_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd) {
|
||||
int txfm_buf[4 * 4 + 4 + 4];
|
||||
|
@ -98,7 +98,7 @@ void vp10_fwd_txfm2d_4x4(const int16_t *input, int32_t *output,
|
|||
fwd_txfm2d_c(input, output, stride, cfg, txfm_buf);
|
||||
}
|
||||
|
||||
void vp10_fwd_txfm2d_8x8(const int16_t *input, int32_t *output,
|
||||
void vp10_fwd_txfm2d_8x8_c(const int16_t *input, int32_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd) {
|
||||
int txfm_buf[8 * 8 + 8 + 8];
|
||||
|
@ -106,7 +106,7 @@ void vp10_fwd_txfm2d_8x8(const int16_t *input, int32_t *output,
|
|||
fwd_txfm2d_c(input, output, stride, cfg, txfm_buf);
|
||||
}
|
||||
|
||||
void vp10_fwd_txfm2d_16x16(const int16_t *input, int32_t *output,
|
||||
void vp10_fwd_txfm2d_16x16_c(const int16_t *input, int32_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd) {
|
||||
int txfm_buf[16 * 16 + 16 + 16];
|
||||
|
@ -114,7 +114,7 @@ void vp10_fwd_txfm2d_16x16(const int16_t *input, int32_t *output,
|
|||
fwd_txfm2d_c(input, output, stride, cfg, txfm_buf);
|
||||
}
|
||||
|
||||
void vp10_fwd_txfm2d_32x32(const int16_t *input, int32_t *output,
|
||||
void vp10_fwd_txfm2d_32x32_c(const int16_t *input, int32_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd) {
|
||||
int txfm_buf[32 * 32 + 32 + 32];
|
||||
|
@ -122,7 +122,7 @@ void vp10_fwd_txfm2d_32x32(const int16_t *input, int32_t *output,
|
|||
fwd_txfm2d_c(input, output, stride, cfg, txfm_buf);
|
||||
}
|
||||
|
||||
void vp10_fwd_txfm2d_64x64(const int16_t *input, int32_t *output,
|
||||
void vp10_fwd_txfm2d_64x64_c(const int16_t *input, int32_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd) {
|
||||
int txfm_buf[64 * 64 + 64 + 64];
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2015 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.
|
||||
*/
|
||||
|
||||
#ifndef VP10_FWD_TXFM2D_H_
|
||||
#define VP10_FWD_TXFM2D_H_
|
||||
|
||||
#include "vp10/common/vp10_txfm.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void vp10_fwd_txfm2d_4x4(const int16_t *input, int32_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd);
|
||||
void vp10_fwd_txfm2d_8x8(const int16_t *input, int32_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd);
|
||||
void vp10_fwd_txfm2d_16x16(const int16_t *input, int32_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd);
|
||||
void vp10_fwd_txfm2d_32x32(const int16_t *input, int32_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd);
|
||||
void vp10_fwd_txfm2d_64x64(const int16_t *input, int32_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // VP10_FWD_TXFM2D_H_
|
|
@ -88,7 +88,7 @@ static inline void inv_txfm2d_add_c(const int32_t *input, int16_t *output,
|
|||
}
|
||||
}
|
||||
|
||||
void vp10_inv_txfm2d_add_4x4(const int32_t *input, uint16_t *output,
|
||||
void vp10_inv_txfm2d_add_4x4_c(const int32_t *input, uint16_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd) {
|
||||
int txfm_buf[4 * 4 + 4 + 4];
|
||||
|
@ -100,7 +100,7 @@ void vp10_inv_txfm2d_add_4x4(const int32_t *input, uint16_t *output,
|
|||
clamp_block((int16_t *)output, 4, stride, 0, (1 << bd) - 1);
|
||||
}
|
||||
|
||||
void vp10_inv_txfm2d_add_8x8(const int32_t *input, uint16_t *output,
|
||||
void vp10_inv_txfm2d_add_8x8_c(const int32_t *input, uint16_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd) {
|
||||
int txfm_buf[8 * 8 + 8 + 8];
|
||||
|
@ -112,7 +112,7 @@ void vp10_inv_txfm2d_add_8x8(const int32_t *input, uint16_t *output,
|
|||
clamp_block((int16_t *)output, 8, stride, 0, (1 << bd) - 1);
|
||||
}
|
||||
|
||||
void vp10_inv_txfm2d_add_16x16(const int32_t *input, uint16_t *output,
|
||||
void vp10_inv_txfm2d_add_16x16_c(const int32_t *input, uint16_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd) {
|
||||
int txfm_buf[16 * 16 + 16 + 16];
|
||||
|
@ -124,7 +124,7 @@ void vp10_inv_txfm2d_add_16x16(const int32_t *input, uint16_t *output,
|
|||
clamp_block((int16_t *)output, 16, stride, 0, (1 << bd) - 1);
|
||||
}
|
||||
|
||||
void vp10_inv_txfm2d_add_32x32(const int32_t *input, uint16_t *output,
|
||||
void vp10_inv_txfm2d_add_32x32_c(const int32_t *input, uint16_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd) {
|
||||
int txfm_buf[32 * 32 + 32 + 32];
|
||||
|
@ -136,7 +136,7 @@ void vp10_inv_txfm2d_add_32x32(const int32_t *input, uint16_t *output,
|
|||
clamp_block((int16_t *)output, 32, stride, 0, (1 << bd) - 1);
|
||||
}
|
||||
|
||||
void vp10_inv_txfm2d_add_64x64(const int32_t *input, uint16_t *output,
|
||||
void vp10_inv_txfm2d_add_64x64_c(const int32_t *input, uint16_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd) {
|
||||
int txfm_buf[64 * 64 + 64 + 64];
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2015 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.
|
||||
*/
|
||||
|
||||
#ifndef VP10_INV_TXFM2D_C_H_
|
||||
#define VP10_INV_TXFM2D_C_H_
|
||||
|
||||
#include "vp10/common/vp10_inv_txfm2d_cfg.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void vp10_inv_txfm2d_add_4x4(const int32_t *input, uint16_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd);
|
||||
void vp10_inv_txfm2d_add_8x8(const int32_t *input, uint16_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd);
|
||||
void vp10_inv_txfm2d_add_16x16(const int32_t *input, uint16_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd);
|
||||
void vp10_inv_txfm2d_add_32x32(const int32_t *input, uint16_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd);
|
||||
void vp10_inv_txfm2d_add_64x64(const int32_t *input, uint16_t *output,
|
||||
const int stride, const TXFM_2D_CFG *cfg,
|
||||
const int bd);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // VP10_INV_TXFM2D_C_H_
|
|
@ -7,6 +7,7 @@ print <<EOF
|
|||
#include "vpx/vpx_integer.h"
|
||||
#include "vp10/common/common.h"
|
||||
#include "vp10/common/enums.h"
|
||||
#include "vp10/common/vp10_txfm.h"
|
||||
|
||||
struct macroblockd;
|
||||
|
||||
|
@ -611,6 +612,32 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
|
|||
} # CONFIG_EMULATE_HARDWARE
|
||||
} # CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
|
||||
#fwd txfm
|
||||
add_proto qw/void vp10_fwd_txfm2d_4x4/, "const int16_t *input, int32_t *output, const int stride, const TXFM_2D_CFG *cfg, const int bd";
|
||||
specialize qw/vp10_fwd_txfm2d_4x4/;
|
||||
add_proto qw/void vp10_fwd_txfm2d_8x8/, "const int16_t *input, int32_t *output, const int stride, const TXFM_2D_CFG *cfg, const int bd";
|
||||
specialize qw/vp10_fwd_txfm2d_8x8/;
|
||||
add_proto qw/void vp10_fwd_txfm2d_16x16/, "const int16_t *input, int32_t *output, const int stride, const TXFM_2D_CFG *cfg, const int bd";
|
||||
specialize qw/vp10_fwd_txfm2d_16x16/;
|
||||
add_proto qw/void vp10_fwd_txfm2d_32x32/, "const int16_t *input, int32_t *output, const int stride, const TXFM_2D_CFG *cfg, const int bd";
|
||||
specialize qw/vp10_fwd_txfm2d_32x32/;
|
||||
add_proto qw/void vp10_fwd_txfm2d_64x64/, "const int16_t *input, int32_t *output, const int stride, const TXFM_2D_CFG *cfg, const int bd";
|
||||
specialize qw/vp10_fwd_txfm2d_64x64/;
|
||||
|
||||
#inv txfm
|
||||
add_proto qw/void vp10_inv_txfm2d_add_4x4/, "const int32_t *input, uint16_t *output, const int stride, const TXFM_2D_CFG *cfg, const int bd";
|
||||
specialize qw/vp10_inv_txfm2d_add_4x4/;
|
||||
add_proto qw/void vp10_inv_txfm2d_add_8x8/, "const int32_t *input, uint16_t *output, const int stride, const TXFM_2D_CFG *cfg, const int bd";
|
||||
specialize qw/vp10_inv_txfm2d_add_8x8/;
|
||||
add_proto qw/void vp10_inv_txfm2d_add_16x16/, "const int32_t *input, uint16_t *output, const int stride, const TXFM_2D_CFG *cfg, const int bd";
|
||||
specialize qw/vp10_inv_txfm2d_add_16x16/;
|
||||
add_proto qw/void vp10_inv_txfm2d_add_32x32/, "const int32_t *input, uint16_t *output, const int stride, const TXFM_2D_CFG *cfg, const int bd";
|
||||
specialize qw/vp10_inv_txfm2d_add_32x32/;
|
||||
add_proto qw/void vp10_inv_txfm2d_add_64x64/, "const int32_t *input, uint16_t *output, const int stride, const TXFM_2D_CFG *cfg, const int bd";
|
||||
specialize qw/vp10_inv_txfm2d_add_64x64/;
|
||||
}
|
||||
|
||||
#
|
||||
# Motion search
|
||||
#
|
||||
|
|
|
@ -118,9 +118,9 @@ static INLINE int32_t half_btf(int32_t w0, int32_t in0, int32_t w1, int32_t in1,
|
|||
int64_t result_64 = (int64_t)w0 * (int64_t)in0 + (int64_t)w1 * (int64_t)in1;
|
||||
if (result_32 != result_64) {
|
||||
printf(
|
||||
"%s overflow result_32: %d result_64: %ld w0: %d in0: %d w1: %d in1: "
|
||||
"%s overflow result_32: %d result_64: %lld w0: %d in0: %d w1: %d in1: "
|
||||
"%d\n",
|
||||
__func__, result_32, result_64, w0, in0, w1, in1);
|
||||
__func__, result_32, (long long int)result_64, w0, in0, w1, in1);
|
||||
assert(0 && "half_btf overflow");
|
||||
}
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче