mv vp10_fwd_txfm2d_#x# into vp10_rtcd.h
Change-Id: Iad7352698786791b0fd7c005a7edfd1724b71599
diff --git a/test/vp10_fwd_txfm2d_test.cc b/test/vp10_fwd_txfm2d_test.cc
index d4115c9..137f653 100644
--- a/test/vp10_fwd_txfm2d_test.cc
+++ b/test/vp10_fwd_txfm2d_test.cc
@@ -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 @@
delete[] ref_output;
}
}
+#endif // CONFIG_VP9_HIGHBITDEPTH
} // anonymous namespace
diff --git a/test/vp10_inv_txfm2d_test.cc b/test/vp10_inv_txfm2d_test.cc
index b0e6af5..9257244 100644
--- a/test/vp10_inv_txfm2d_test.cc
+++ b/test/vp10_inv_txfm2d_test.cc
@@ -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 @@
{&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 @@
delete[] output;
}
}
+#endif // CONFIG_VP9_HIGHBITDEPTH
} // anonymous namespace
diff --git a/vp10/common/vp10_fwd_txfm2d.c b/vp10/common/vp10_fwd_txfm2d.c
index c85f437..32214ae 100644
--- a/vp10/common/vp10_fwd_txfm2d.c
+++ b/vp10/common/vp10_fwd_txfm2d.c
@@ -90,7 +90,7 @@
}
}
-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 @@
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 @@
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 @@
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 @@
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];
diff --git a/vp10/common/vp10_fwd_txfm2d.h b/vp10/common/vp10_fwd_txfm2d.h
deleted file mode 100644
index 3829609..0000000
--- a/vp10/common/vp10_fwd_txfm2d.h
+++ /dev/null
@@ -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_
diff --git a/vp10/common/vp10_inv_txfm2d.c b/vp10/common/vp10_inv_txfm2d.c
index ca7f39e..d9f713c 100644
--- a/vp10/common/vp10_inv_txfm2d.c
+++ b/vp10/common/vp10_inv_txfm2d.c
@@ -88,7 +88,7 @@
}
}
-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 @@
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 @@
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 @@
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 @@
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];
diff --git a/vp10/common/vp10_inv_txfm2d.h b/vp10/common/vp10_inv_txfm2d.h
deleted file mode 100644
index fd4b23c..0000000
--- a/vp10/common/vp10_inv_txfm2d.h
+++ /dev/null
@@ -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_
diff --git a/vp10/common/vp10_rtcd_defs.pl b/vp10/common/vp10_rtcd_defs.pl
index f617ff6..4612395 100644
--- a/vp10/common/vp10_rtcd_defs.pl
+++ b/vp10/common/vp10_rtcd_defs.pl
@@ -7,6 +7,7 @@
#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 @@
} # 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
#
diff --git a/vp10/common/vp10_txfm.h b/vp10/common/vp10_txfm.h
index 1e512ac..ad7b38f 100644
--- a/vp10/common/vp10_txfm.h
+++ b/vp10/common/vp10_txfm.h
@@ -118,9 +118,9 @@
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