ref: 39f95de83dd8cbdb42c84453f37bedab9ca8242d
parent: 9aa88c476b00557164f2beb47987853bf40c3d3a
parent: 5511968f21d79fa529a70dbee314093a3471b375
author: Yaowu Xu <[email protected]>
date: Wed Mar 19 05:04:44 EDT 2014
Merge "Removed several unused functions."
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -69,13 +69,6 @@
(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 @@
++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 @@
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;
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1267,7 +1267,7 @@
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 @@
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;
--- a/vp9/encoder/vp9_ssim.c
+++ b/vp9/encoder/vp9_ssim.c
@@ -65,12 +65,6 @@
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,
--- 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;
--- a/vp9/encoder/vp9_tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -298,13 +298,6 @@
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};
--- 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,
--- a/vp9/encoder/x86/vp9_variance_sse2.c
+++ b/vp9/encoder/x86/vp9_variance_sse2.c
@@ -24,10 +24,6 @@
int *Sum
);
-unsigned int vp9_get_mb_ss_sse2
-(
- const int16_t *src_ptr
-);
unsigned int vp9_get16x16var_sse2
(
const unsigned char *src_ptr,