shithub: libvpx

Download patch

ref: 8dc39a7540f8d3e77f197b52f7cf119990ebc9e6
parent: bb07de7ccea40c145548e8d49752bcccdd08c248
parent: a60b76bd09be9028a106cf1a3adc706b7284180e
author: Jim Bankoski <[email protected]>
date: Fri Feb 14 09:15:38 EST 2014

Merge "vp9_vaq.c resolve vs warnings"

--- a/vp9/encoder/vp9_vaq.c
+++ b/vp9/encoder/vp9_vaq.c
@@ -75,9 +75,9 @@
 void vp9_vaq_frame_setup(VP9_COMP *cpi) {
   VP9_COMMON *cm = &cpi->common;
   struct segmentation *seg = &cm->seg;
-  int base_q = vp9_convert_qindex_to_q(cm->base_qindex);
-  int base_rdmult = vp9_compute_rd_mult(cpi, cm->base_qindex +
-                                        cm->y_dc_delta_q);
+  const double base_q = vp9_convert_qindex_to_q(cm->base_qindex);
+  const int base_rdmult = vp9_compute_rd_mult(cpi, cm->base_qindex +
+                                              cm->y_dc_delta_q);
   int i;
 
   if (cm->frame_type == KEY_FRAME ||
@@ -143,9 +143,6 @@
 
   vp9_clear_system_state();  // __asm emms;
 
-  // if (var <= 1000)
-  //   return 0;
-
-  energy = 0.9*(logf(var + 1) - 10.0);
+  energy = 0.9 * (log(var + 1.0) - 10.0);
   return clamp(round(energy), ENERGY_MIN, ENERGY_MAX);
 }