2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
25 typedef map
<string
,int> Parms
;
27 #define ALLPARMS(O,DOTHIS) \
28 DOTHIS(O, interquantizer )\
29 DOTHIS(O, auto_gold )\
30 DOTHIS(O, auto_adjust_gold_quantizer )\
31 DOTHIS(O, goldquantizer )\
34 DOTHIS(O, auto_adjust_key_quantizer )\
35 DOTHIS(O, keyquantizer )\
39 DOTHIS(O, target_bandwidth )\
40 DOTHIS(O, auto_worst_q )\
41 DOTHIS(O, worst_quality )\
42 DOTHIS(O, best_allowed_q )\
43 DOTHIS(O, end_usage )\
44 DOTHIS(O, starting_buffer_level )\
45 DOTHIS(O, optimal_buffer_level )\
46 DOTHIS(O, maximum_buffer_size )\
47 DOTHIS(O, under_shoot_pct )\
49 DOTHIS(O, drop_frames_water_mark )\
50 DOTHIS(O, max_allowed_datarate )\
51 DOTHIS(O, two_pass_vbrbias )\
52 DOTHIS(O, two_pass_vbrmin_section )\
53 DOTHIS(O, two_pass_vbrmax_section )\
54 DOTHIS(O, filter_type )\
55 DOTHIS(O, compressor_speed )\
56 DOTHIS(O, mbpitch_feature )\
57 DOTHIS(O, allow_spatial_resampling )\
58 DOTHIS(O, resample_down_water_mark )\
59 DOTHIS(O, resample_up_water_mark )\
60 DOTHIS(O, noise_sensitivity )\
61 DOTHIS(O, horiz_scale )\
62 DOTHIS(O, vert_scale )
65 #define GET(O,V) O->V = x[#V];
66 #define PUT(O,V) x[#V] = O->V;
69 extern "C" void get_parms(VP8_CONFIG
*ocf
,char *filename
)
77 ifstream
config_file(filename
);
81 // store all the parms in a map (really simple parsing)
82 while(!config_file
.eof() && config_file
.is_open())
84 config_file
>> variable
;
99 #define PRINT(O,V) debug_file<<#V <<" = " << O->V <<"\n";
100 extern "C" void print_parms(VP8_CONFIG
*ocf
,char *filename
)
102 ofstream
debug_file(filename
,ios_base::app
);
103 ALLPARMS(ocf
, PRINT
);
104 debug_file
<< "=============================================="<<"\n";