shithub: libvpx

Download patch

ref: c87bf0df917b556e913178607b7f14d49aaf1722
parent: 6104f2cc13657aae315545acbf4400e1102b3860
parent: 8044c6a44bd2ee86bfea90e02cbba7f3397cc586
author: Paul Wilkins <paulwilkins@google.com>
date: Tue Oct 30 03:24:11 EDT 2012

Merge "onyx_if: remove unused function, and make locally used functions static." into experimental

--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -182,8 +182,8 @@
 // formulaic approach to facilitate easier adjustment of the Q tables.
 // The formulae were derived from computing a 3rd order polynomial best
 // fit to the original data (after plotting real maxq vs minq (not q index))
-int calculate_minq_index(double maxq,
-                         double x3, double x2, double x, double c) {
+static int calculate_minq_index(double maxq,
+                                double x3, double x2, double x, double c) {
   int i;
   double minqtarget;
   double thisq;
@@ -204,7 +204,7 @@
   return QINDEX_RANGE - 1;
 }
 
-void init_minq_luts() {
+static void init_minq_luts(void) {
   int i;
   double maxq;
 
@@ -241,7 +241,7 @@
   }
 }
 
-void init_base_skip_probs() {
+static void init_base_skip_probs(void) {
   int i;
   double q;
   int skip_prob, t;
@@ -275,7 +275,8 @@
     vp8cx_base_skip_false_prob[i][0] = skip_prob;
   }
 }
-void update_base_skip_probs(VP8_COMP *cpi) {
+
+static void update_base_skip_probs(VP8_COMP *cpi) {
   VP8_COMMON *cm = &cpi->common;
 
   if (cm->frame_type != KEY_FRAME) {
@@ -2586,7 +2587,7 @@
   }
 }
 
-int find_fp_qindex() {
+static int find_fp_qindex() {
   int i;
 
   for (i = 0; i < QINDEX_RANGE; i++) {
@@ -2611,27 +2612,6 @@
   vp8_first_pass(cpi);
 }
 
-#if 1
-void write_yuv_frame_to_file(YV12_BUFFER_CONFIG *frame) {
-
-  // write the frame
-  int i;
-  FILE *fp = fopen("encode_recon.yuv", "a");
-
-  for (i = 0; i < frame->y_height; i++)
-    fwrite(frame->y_buffer + i * frame->y_stride,
-           frame->y_width, 1, fp);
-  for (i = 0; i < frame->uv_height; i++)
-    fwrite(frame->u_buffer + i * frame->uv_stride,
-           frame->uv_width, 1, fp);
-  for (i = 0; i < frame->uv_height; i++)
-    fwrite(frame->v_buffer + i * frame->uv_stride,
-           frame->uv_width, 1, fp);
-
-  fclose(fp);
-}
-#endif
-
 #define WRITE_RECON_BUFFER 0
 #if WRITE_RECON_BUFFER
 void write_cx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame) {
@@ -2737,7 +2717,7 @@
   return force_recode;
 }
 
-void update_reference_frames(VP8_COMMON *cm) {
+static void update_reference_frames(VP8_COMMON *cm) {
   YV12_BUFFER_CONFIG *yv12_fb = cm->yv12_fb;
 
   // At this point the new frame has been encoded.
@@ -2807,7 +2787,7 @@
   }
 }
 
-void loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm) {
+static void loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm) {
   if (cm->no_lpf) {
     cm->filter_level = 0;
   }
--