Remove goldfreq in VP8_COMP
authorYunqing Wang <yunqingwang@google.com>
Tue, 12 Jun 2012 15:57:26 +0000 (11:57 -0400)
committerYunqing Wang <yunqingwang@google.com>
Tue, 12 Jun 2012 15:57:26 +0000 (11:57 -0400)
goldfreq can be replaced by DEFAULT_GF_INTERVAL.

Change-Id: I3659a9e7b9a6be9cb1952a1838e02c20d656e369

vp8/encoder/onyx_if.c
vp8/encoder/onyx_int.h
vp8/encoder/ratectrl.c

index fa8fea0..c24e944 100644 (file)
@@ -1225,7 +1225,6 @@ static void init_config(VP8_COMP *cpi, VP8_CONFIG *oxcf)
 
     cpi->auto_gold = 1;
     cpi->auto_adjust_gold_quantizer = 1;
-    cpi->goldfreq = 7;
 
     cm->version = oxcf->Version;
     vp8_setup_version(cm);
@@ -2669,7 +2668,7 @@ static void update_alt_ref_frame_stats(VP8_COMP *cpi)
 
     // Select an interval before next GF or altref
     if (!cpi->auto_gold)
-        cpi->frames_till_gf_update_due = cpi->goldfreq;
+        cpi->frames_till_gf_update_due = DEFAULT_GF_INTERVAL;
 
     if ((cpi->pass != 2) && cpi->frames_till_gf_update_due)
     {
@@ -2708,7 +2707,7 @@ static void update_golden_frame_stats(VP8_COMP *cpi)
     {
         // Select an interval before next GF
         if (!cpi->auto_gold)
-            cpi->frames_till_gf_update_due = cpi->goldfreq;
+            cpi->frames_till_gf_update_due = DEFAULT_GF_INTERVAL;
 
         if ((cpi->pass != 2) && (cpi->frames_till_gf_update_due > 0))
         {
index 3b202c9..860d16e 100644 (file)
@@ -477,7 +477,6 @@ typedef struct VP8_COMP
     int interquantizer;
     int auto_gold;
     int auto_adjust_gold_quantizer;
-    int goldfreq;
     int auto_worst_q;
     int cpu_used;
     int pass;
index f6baf4c..2a96d2d 100644 (file)
@@ -323,7 +323,7 @@ void vp8_setup_key_frame(VP8_COMP *cpi)
         //cpi->frames_till_gf_update_due = DEFAULT_GF_INTERVAL;
         cpi->frames_till_gf_update_due = cpi->baseline_gf_interval;
     else
-        cpi->frames_till_gf_update_due = cpi->goldfreq;
+        cpi->frames_till_gf_update_due = DEFAULT_GF_INTERVAL;
 
     cpi->common.refresh_golden_frame = 1;
     cpi->common.refresh_alt_ref_frame = 1;