Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Unified Diff: libvpx/source/libvpx/vp8/encoder/parms.cpp

Issue 7624054: Revert r97185 "Update libvpx snapshot to v0.9.7-p1 (Cayuga)." (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « libvpx/source/libvpx/vp8/encoder/onyx_int.h ('k') | libvpx/source/libvpx/vp8/encoder/pickinter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libvpx/source/libvpx/vp8/encoder/parms.cpp
diff --git a/libvpx/source/libvpx/vp8/encoder/parms.cpp b/libvpx/source/libvpx/vp8/encoder/parms.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2a39b2ca32f13e4e62dd96e32aac9dcce00acd68
--- /dev/null
+++ b/libvpx/source/libvpx/vp8/encoder/parms.cpp
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+
+#if 0
+
+#include <map>
+#include <string>
+#include <fstream>
+extern "C"
+{
+ #include "vp8/common/onyx.h"
+}
+
+
+using namespace std;
+
+typedef map<string,int> Parms;
+
+#define ALLPARMS(O,DOTHIS) \
+ DOTHIS(O, interquantizer )\
+ DOTHIS(O, auto_gold )\
+ DOTHIS(O, auto_adjust_gold_quantizer )\
+ DOTHIS(O, goldquantizer )\
+ DOTHIS(O, goldfreq )\
+ DOTHIS(O, auto_key )\
+ DOTHIS(O, auto_adjust_key_quantizer )\
+ DOTHIS(O, keyquantizer )\
+ DOTHIS(O, keyfreq )\
+ DOTHIS(O, pass )\
+ DOTHIS(O, fixed_q )\
+ DOTHIS(O, target_bandwidth )\
+ DOTHIS(O, auto_worst_q )\
+ DOTHIS(O, worst_quality )\
+ DOTHIS(O, best_allowed_q )\
+ DOTHIS(O, end_usage )\
+ DOTHIS(O, starting_buffer_level )\
+ DOTHIS(O, optimal_buffer_level )\
+ DOTHIS(O, maximum_buffer_size )\
+ DOTHIS(O, under_shoot_pct )\
+ DOTHIS(O, allow_df )\
+ DOTHIS(O, drop_frames_water_mark )\
+ DOTHIS(O, max_allowed_datarate )\
+ DOTHIS(O, two_pass_vbrbias )\
+ DOTHIS(O, two_pass_vbrmin_section )\
+ DOTHIS(O, two_pass_vbrmax_section )\
+ DOTHIS(O, filter_type )\
+ DOTHIS(O, compressor_speed )\
+ DOTHIS(O, mbpitch_feature )\
+ DOTHIS(O, allow_spatial_resampling )\
+ DOTHIS(O, resample_down_water_mark )\
+ DOTHIS(O, resample_up_water_mark )\
+ DOTHIS(O, noise_sensitivity )\
+ DOTHIS(O, horiz_scale )\
+ DOTHIS(O, vert_scale )
+
+
+#define GET(O,V) O->V = x[#V];
+#define PUT(O,V) x[#V] = O->V;
+
+
+extern "C" void get_parms(VP8_CONFIG *ocf,char *filename)
+{
+
+ Parms x;
+ int value;
+ string variable;
+ string equal;
+
+ ifstream config_file(filename);
+
+ ALLPARMS(ocf, PUT);
+
+ // store all the parms in a map (really simple parsing)
+ while(!config_file.eof() && config_file.is_open())
+ {
+ config_file >> variable;
+ config_file >> equal;
+
+ if(equal != "=")
+ continue;
+
+ config_file >> value;
+
+ x[variable] = value;
+ }
+
+ ALLPARMS(ocf, GET);
+
+}
+
+#define PRINT(O,V) debug_file<<#V <<" = " << O->V <<"\n";
+extern "C" void print_parms(VP8_CONFIG *ocf,char *filename)
+{
+ ofstream debug_file(filename,ios_base::app);
+ ALLPARMS(ocf, PRINT);
+ debug_file << "=============================================="<<"\n";
+}
+
+#endif
« no previous file with comments | « libvpx/source/libvpx/vp8/encoder/onyx_int.h ('k') | libvpx/source/libvpx/vp8/encoder/pickinter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698