Chameleon

Chameleon Commit Details

Date:2014-10-23 06:01:38 (9 years 5 months ago)
Author:Chuck Fry
Commit:2444
Parents: 2443
Message:Comment out unused static functions, which cause build to fail in "release" mode; other minor cleanups
Changes:
M/branches/chucko/i386/libsaio/vbe.c

File differences

branches/chucko/i386/libsaio/vbe.c
3333
3434
3535
36
37
3638
3739
3840
......
6971
7072
7173
74
75
7276
7377
7478
......
159163
160164
161165
162
166
163167
164
168
165169
166170
167171
......
191195
192196
193197
194
195
196
198
199
200
197201
202
203
204
198205
199206
200207
......
202209
203210
204211
205
206
207
208212
209213
210214
......
226230
227231
228232
229
233
230234
231235
232236
static biosBuf_t bb;
#if UNUSED
//==============================================================================
static inline void
//==============================================================================
#endif /* UNUSED */
int getVBEInfo( void * infoBlock )
{
bb.intno = 0x10;
int paramType,
VBECRTCInfoBlock * timing )
{
double h_period_est, h_freq, h_period, h_total_pixels, h_sync_pixels;
double h_period, h_total_pixels, h_sync_pixels;
double h_active_pixels, h_ideal_duty_cycle, h_blank_pixels, pixel_freq = 0;
double v_sync_plus_bp = 0, v_total_lines = 0, v_field_rate_est, v_frame_rate = 0;
double v_sync_plus_bp = 0, v_total_lines = 0, v_frame_rate = 0;
const double h_pixels = (double) width;
const double v_lines = (double) height;
double v_field_rate_in = (double) paramValue;
// Estimate the horizontal period
h_period_est = ((1 / v_field_rate_in) - kMinVSyncPlusBP / 1000000) /
(v_lines + (2 * top_margin_lines) + kMinFrontPorch + interlace) *
1000000;
double h_period_est = ((1 / v_field_rate_in) - kMinVSyncPlusBP / 1000000) /
(v_lines + (2 * top_margin_lines) + kMinFrontPorch + interlace) *
1000000;
// Estimate the vertical field frequency
double v_field_rate_est = 1 / h_period_est / v_total_lines * 1000000;
// Number of lines in Vsync + back porch
v_sync_plus_bp = Round(kMinVSyncPlusBP / h_period_est);
v_total_lines = v_lines + top_margin_lines + bot_margin_lines +
v_sync_plus_bp + interlace + kMinFrontPorch;
// Estimate the vertical field frequency
v_field_rate_est = 1 / h_period_est / v_total_lines * 1000000;
// Find the actual horizontal period
h_period = h_period_est / (v_field_rate_in / v_field_rate_est);
if (paramType == kCRTCParamPixelClock)
{
// Horizontal frequency
h_freq = pixel_freq / h_total_pixels * 1000;
double h_freq = pixel_freq / h_total_pixels * 1000;
// Number of lines in V sync + back porch
v_sync_plus_bp = Round(kMinVSyncPlusBP * h_freq / 1000);

Archive Download the corresponding diff file

Revision: 2444