summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2014-03-19 09:04:44 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-03-19 09:04:44 -0700
commit39f95de83dd8cbdb42c84453f37bedab9ca8242d (patch)
tree7d7c1b7ec7a7bdb5da2ed4d93c2c6861f128316e
parent9aa88c476b00557164f2beb47987853bf40c3d3a (diff)
parent5511968f21d79fa529a70dbee314093a3471b375 (diff)
downloadlibvpx-39f95de83dd8cbdb42c84453f37bedab9ca8242d.tar
libvpx-39f95de83dd8cbdb42c84453f37bedab9ca8242d.tar.gz
libvpx-39f95de83dd8cbdb42c84453f37bedab9ca8242d.tar.bz2
libvpx-39f95de83dd8cbdb42c84453f37bedab9ca8242d.zip
Merge "Removed several unused functions."
-rw-r--r--vp9/encoder/vp9_firstpass.c15
-rw-r--r--vp9/encoder/vp9_ratectrl.c4
-rw-r--r--vp9/encoder/vp9_ssim.c6
-rw-r--r--vp9/encoder/vp9_subexp.c9
-rw-r--r--vp9/encoder/vp9_tokenize.c7
-rw-r--r--vp9/encoder/x86/vp9_variance_mmx.c1
-rw-r--r--vp9/encoder/x86/vp9_variance_sse2.c4
7 files changed, 3 insertions, 43 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index 5cd72532d..cd4e3d670 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -69,13 +69,6 @@ static int gfboost_qadjust(int qindex) {
(1.32 * q) + 79.3);
}
-static int kfboost_qadjust(int qindex) {
- const double q = vp9_convert_qindex_to_q(qindex);
- return (int)((0.00000973 * q * q * q) +
- (-0.00613 * q * q) +
- (1.316 * q) + 121.2);
-}
-
// Resets the first pass file to the given position using a relative seek from
// the current position.
static void reset_fpf_position(struct twopass_rc *p,
@@ -826,12 +819,6 @@ void vp9_first_pass(VP9_COMP *cpi) {
++cm->current_video_frame;
}
-// Estimate a cost per mb attributable to overheads such as the coding of modes
-// and motion vectors. This currently makes simplistic assumptions for testing.
-static double bitcost(double prob) {
- return -(log(prob) / log(2.0));
-}
-
static double calc_correction_factor(double err_per_mb,
double err_divisor,
double pt_low,
@@ -2131,7 +2118,7 @@ void vp9_rc_get_first_pass_params(VP9_COMP *cpi) {
VP9_COMMON *const cm = &cpi->common;
if (!cpi->refresh_alt_ref_frame &&
(cm->current_video_frame == 0 ||
- cm->frame_flags & FRAMEFLAGS_KEY)) {
+ (cm->frame_flags & FRAMEFLAGS_KEY))) {
cm->frame_type = KEY_FRAME;
} else {
cm->frame_type = INTER_FRAME;
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index fe9207ff6..edc48bb16 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1267,7 +1267,7 @@ void vp9_rc_get_one_pass_vbr_params(VP9_COMP *cpi) {
int target;
if (!cpi->refresh_alt_ref_frame &&
(cm->current_video_frame == 0 ||
- cm->frame_flags & FRAMEFLAGS_KEY ||
+ (cm->frame_flags & FRAMEFLAGS_KEY) ||
rc->frames_to_key == 0 ||
(cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) {
cm->frame_type = KEY_FRAME;
@@ -1373,7 +1373,7 @@ void vp9_rc_get_one_pass_cbr_params(VP9_COMP *cpi) {
RATE_CONTROL *const rc = &cpi->rc;
int target;
if ((cm->current_video_frame == 0 ||
- cm->frame_flags & FRAMEFLAGS_KEY ||
+ (cm->frame_flags & FRAMEFLAGS_KEY) ||
rc->frames_to_key == 0 ||
(cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) {
cm->frame_type = KEY_FRAME;
diff --git a/vp9/encoder/vp9_ssim.c b/vp9/encoder/vp9_ssim.c
index a5f18e631..1435191d0 100644
--- a/vp9/encoder/vp9_ssim.c
+++ b/vp9/encoder/vp9_ssim.c
@@ -65,12 +65,6 @@ static double similarity(unsigned long sum_s, unsigned long sum_r,
return ssim_n * 1.0 / ssim_d;
}
-static double ssim_16x16(uint8_t *s, int sp, uint8_t *r, int rp) {
- unsigned long sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0;
- vp9_ssim_parms_16x16(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r,
- &sum_sxr);
- return similarity(sum_s, sum_r, sum_sq_s, sum_sq_r, sum_sxr, 256);
-}
static double ssim_8x8(uint8_t *s, int sp, uint8_t *r, int rp) {
unsigned long sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0;
vp9_ssim_parms_8x8(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r,
diff --git a/vp9/encoder/vp9_subexp.c b/vp9/encoder/vp9_subexp.c
index fd82fa3b2..9796d6476 100644
--- a/vp9/encoder/vp9_subexp.c
+++ b/vp9/encoder/vp9_subexp.c
@@ -18,15 +18,6 @@
static int update_bits[255];
-static int split_index(int i, int n, int modulus) {
- int max1 = (n - 1 - modulus / 2) / modulus + 1;
- if (i % modulus == modulus / 2)
- i = i / modulus;
- else
- i = max1 + i - (i + modulus - modulus / 2) / modulus;
- return i;
-}
-
static int recenter_nonneg(int v, int m) {
if (v > (m << 1))
return v;
diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c
index a293dd881..bb5f1c23b 100644
--- a/vp9/encoder/vp9_tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -298,13 +298,6 @@ static void is_skippable(int plane, int block,
args->skippable[0] &= (!args->x->plane[plane].eobs[block]);
}
-static int sb_is_skippable(MACROBLOCK *x, BLOCK_SIZE bsize) {
- int result = 1;
- struct is_skippable_args args = {x, &result};
- vp9_foreach_transformed_block(&x->e_mbd, bsize, is_skippable, &args);
- return result;
-}
-
int vp9_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
int result = 1;
struct is_skippable_args args = {x, &result};
diff --git a/vp9/encoder/x86/vp9_variance_mmx.c b/vp9/encoder/x86/vp9_variance_mmx.c
index a3d011401..c4d17fc0f 100644
--- a/vp9/encoder/x86/vp9_variance_mmx.c
+++ b/vp9/encoder/x86/vp9_variance_mmx.c
@@ -13,7 +13,6 @@
#include "vp9/common/vp9_pragmas.h"
#include "vpx_ports/mem.h"
-extern unsigned int vp9_get_mb_ss_mmx(const int16_t *src_ptr);
extern unsigned int vp9_get8x8var_mmx
(
const unsigned char *src_ptr,
diff --git a/vp9/encoder/x86/vp9_variance_sse2.c b/vp9/encoder/x86/vp9_variance_sse2.c
index 79e42c4cd..9e65694a8 100644
--- a/vp9/encoder/x86/vp9_variance_sse2.c
+++ b/vp9/encoder/x86/vp9_variance_sse2.c
@@ -24,10 +24,6 @@ extern unsigned int vp9_get4x4var_mmx
int *Sum
);
-unsigned int vp9_get_mb_ss_sse2
-(
- const int16_t *src_ptr
-);
unsigned int vp9_get16x16var_sse2
(
const unsigned char *src_ptr,