This source file includes following definitions.
- change_video_tables
- set_quality
- save_original_bitrates
- modify_bitrate
1 #include "conf.h"
2
3 static int bitrate_multiplier = 4;
4 static int bitrate_changed = 0;
5 extern int video_target_framesize;
6 extern int video_target_framesize2;
7
8
9 static int orig_bitrate[2];
10
11 void change_video_tables(int a, int b) {
12 bitrate_multiplier = (a<<2)/b;
13 bitrate_changed = 1;
14 }
15
16
17 void set_quality(int *x){
18 if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
19 }
20
21 void save_original_bitrates() {
22 orig_bitrate[0] = video_target_framesize;
23 orig_bitrate[1] = video_target_framesize2;
24 bitrate_changed = 1;
25 }
26
27 void modify_bitrate() {
28 if (bitrate_changed) {
29 bitrate_changed = 0;
30 video_target_framesize = (orig_bitrate[0] * bitrate_multiplier) >> 2;
31 video_target_framesize2 = (orig_bitrate[1] * bitrate_multiplier) >> 2;
32 }
33 }
34