mirror of https://github.com/mpv-player/mpv
Remove remaining %lf printf conversions
Most cases are just code in comments. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32438 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
ee77268087
commit
db90a65d11
|
@ -134,6 +134,7 @@ int channels=0;
|
|||
static sample_t dynrng_call (sample_t c, void *data)
|
||||
{
|
||||
struct MPOpts *opts = data;
|
||||
//fprintf(stderr, "(%f, %f): %f\n", (double)c, (double)drc_level, (double)pow((double)c, drc_level));
|
||||
//fprintf(stderr, "(%lf, %lf): %lf\n", (double)c, opts->drc_level, pow(c, opts->drc_level));
|
||||
return pow(c, opts->drc_level);
|
||||
}
|
||||
|
|
|
@ -201,8 +201,8 @@ static int check_font(font_desc_t *desc, float ppem, int padding, int pic_idx,
|
|||
}
|
||||
desc->glyph_index[unicode?character:code] = glyph_index;
|
||||
}
|
||||
// fprintf(stderr, "font height: %lf\n", (double)(face->bbox.yMax-face->bbox.yMin)/(double)face->units_per_EM*ppem);
|
||||
// fprintf(stderr, "font width: %lf\n", (double)(face->bbox.xMax-face->bbox.xMin)/(double)face->units_per_EM*ppem);
|
||||
// fprintf(stderr, "font height: %f\n", (double)(face->bbox.yMax-face->bbox.yMin)/(double)face->units_per_EM*ppem);
|
||||
// fprintf(stderr, "font width: %f\n", (double)(face->bbox.xMax-face->bbox.xMin)/(double)face->units_per_EM*ppem);
|
||||
|
||||
ymax = (double)(face->bbox.yMax)/(double)face->units_per_EM*ppem+1;
|
||||
ymin = (double)(face->bbox.yMin)/(double)face->units_per_EM*ppem-1;
|
||||
|
@ -592,13 +592,13 @@ void render_one_glyph(font_desc_t *desc, int c)
|
|||
desc->tables.omt, desc->tables.o_r, desc->tables.o_w,
|
||||
desc->tables.o_size);
|
||||
}
|
||||
// fprintf(stderr, "fg: outline t = %lf\n", GetTimer()-t);
|
||||
// fprintf(stderr, "fg: outline t = %f\n", GetTimer()-t);
|
||||
|
||||
if (desc->tables.g_r) {
|
||||
blur(abuffer+off, desc->tables.tmp, width, height, stride,
|
||||
desc->tables.gt2, desc->tables.g_r,
|
||||
desc->tables.g_w);
|
||||
// fprintf(stderr, "fg: blur t = %lf\n", GetTimer()-t);
|
||||
// fprintf(stderr, "fg: blur t = %f\n", GetTimer()-t);
|
||||
}
|
||||
|
||||
resample_alpha(abuffer+off, bbuffer+off, width, height, stride, font_factor);
|
||||
|
@ -637,9 +637,9 @@ static int prepare_font(font_desc_t *desc, FT_Face face, float ppem, int pic_idx
|
|||
// ttime = GetTimer();
|
||||
err = check_font(desc, ppem, padding, pic_idx, charset_size, charset, charcodes, unicode);
|
||||
// ttime=GetTimer()-ttime;
|
||||
// printf("render: %7lf us\n",ttime);
|
||||
// printf("render: %7f us\n",ttime);
|
||||
if (err) return -1;
|
||||
// fprintf(stderr, "fg: render t = %lf\n", GetTimer()-t);
|
||||
// fprintf(stderr, "fg: render t = %f\n", GetTimer()-t);
|
||||
|
||||
desc->pic_a[pic_idx]->w = desc->pic_b[pic_idx]->w;
|
||||
desc->pic_a[pic_idx]->h = desc->pic_b[pic_idx]->h;
|
||||
|
@ -1023,7 +1023,7 @@ font_desc_t* read_font_desc_ft(const char *fname, int face_index, int movie_widt
|
|||
goto err_out;
|
||||
#endif
|
||||
|
||||
// fprintf(stderr, "fg: prepare t = %lf\n", GetTimer()-t);
|
||||
// fprintf(stderr, "fg: prepare t = %f\n", GetTimer()-t);
|
||||
|
||||
err = prepare_font(desc, face, subtitle_font_ppem, desc->face_cnt-1,
|
||||
charset_size, my_charset, my_charcodes, unicode,
|
||||
|
|
|
@ -4553,7 +4553,7 @@ static double exp_CIpow(void)
|
|||
{
|
||||
FPU_DOUBLES(x,y);
|
||||
|
||||
dbgprintf("_CIpow(%lf, %lf)\n", x, y);
|
||||
dbgprintf("_CIpow(%f, %f)\n", x, y);
|
||||
return pow(x, y);
|
||||
}
|
||||
|
||||
|
@ -5008,7 +5008,7 @@ static const char * WINAPI expPathFindFileNameA(const char *path) {
|
|||
|
||||
static double expfloor(double x)
|
||||
{
|
||||
dbgprintf("floor(%lf)\n", x);
|
||||
dbgprintf("floor(%f)\n", x);
|
||||
return floor(x);
|
||||
}
|
||||
|
||||
|
@ -5019,7 +5019,7 @@ static double exp_CIcos(void)
|
|||
{
|
||||
FPU_DOUBLE(x);
|
||||
|
||||
dbgprintf("_CIcos(%lf)\n", x);
|
||||
dbgprintf("_CIcos(%f)\n", x);
|
||||
return cos(x);
|
||||
}
|
||||
|
||||
|
@ -5027,7 +5027,7 @@ static double exp_CIsin(void)
|
|||
{
|
||||
FPU_DOUBLE(x);
|
||||
|
||||
dbgprintf("_CIsin(%lf)\n", x);
|
||||
dbgprintf("_CIsin(%f)\n", x);
|
||||
return sin(x);
|
||||
}
|
||||
|
||||
|
@ -5035,7 +5035,7 @@ static double exp_CIsqrt(void)
|
|||
{
|
||||
FPU_DOUBLE(x);
|
||||
|
||||
dbgprintf("_CIsqrt(%lf)\n", x);
|
||||
dbgprintf("_CIsqrt(%f)\n", x);
|
||||
return sqrt(x);
|
||||
}
|
||||
|
||||
|
|
|
@ -1702,7 +1702,7 @@ static void *video_grabber(void *data)
|
|||
priv->video_interval_sum += orig_interval-prev_interval;
|
||||
if (priv->video_avg_ptr >= VIDEO_AVG_BUFFER_SIZE) priv->video_avg_ptr = 0;
|
||||
|
||||
// fprintf(stderr, "fps: %lf\n", (double)1e6*VIDEO_AVG_BUFFER_SIZE/priv->video_interval_sum);
|
||||
// fprintf(stderr, "fps: %f\n", (double)1e6*VIDEO_AVG_BUFFER_SIZE/priv->video_interval_sum);
|
||||
|
||||
// interpolate the skew in time
|
||||
pthread_mutex_lock(&priv->skew_mutex);
|
||||
|
|
|
@ -1693,7 +1693,7 @@ static void *video_grabber(void *data)
|
|||
if (!priv->tv_param->noaudio) pthread_mutex_unlock(&priv->skew_mutex);
|
||||
}
|
||||
priv->curr_frame = (long long)buf.timestamp.tv_sec*1e6+buf.timestamp.tv_usec;
|
||||
// fprintf(stderr, "idx = %d, ts = %lf\n", buf.index, (double)(priv->curr_frame) / 1e6);
|
||||
// fprintf(stderr, "idx = %d, ts = %f\n", buf.index, (double)(priv->curr_frame) / 1e6);
|
||||
|
||||
interval = priv->curr_frame - priv->first_frame;
|
||||
delta = interval - prev_interval;
|
||||
|
@ -1713,7 +1713,7 @@ static void *video_grabber(void *data)
|
|||
}
|
||||
}
|
||||
|
||||
mp_msg(MSGT_TV, MSGL_DBG3, "\nfps = %lf, interval = %lf, a_skew = %f, corr_skew = %f\n",
|
||||
mp_msg(MSGT_TV, MSGL_DBG3, "\nfps = %f, interval = %f, a_skew = %f, corr_skew = %f\n",
|
||||
delta ? (double)1e6/delta : -1,
|
||||
(double)1e-6*interval, (double)1e-6*xskew, (double)1e-6*skew);
|
||||
mp_msg(MSGT_TV, MSGL_DBG3, "vcnt = %d, acnt = %d\n", priv->video_cnt, priv->audio_cnt);
|
||||
|
@ -1886,7 +1886,7 @@ static void *audio_grabber(void *data)
|
|||
priv->audio_start_time = start_time_avg/(priv->audio_recv_blocks_total+1);
|
||||
}
|
||||
|
||||
// fprintf(stderr, "spb = %lf, bs = %d, skew = %lf\n", priv->audio_secs_per_block, priv->audio_in.blocksize,
|
||||
// fprintf(stderr, "spb = %f, bs = %d, skew = %f\n", priv->audio_secs_per_block, priv->audio_in.blocksize,
|
||||
// (double)(current_time - 1e6*priv->audio_secs_per_block*priv->audio_recv_blocks_total)/1e6);
|
||||
|
||||
// put the current skew into the ring buffer
|
||||
|
@ -1938,7 +1938,7 @@ static void *audio_grabber(void *data)
|
|||
priv->audio_skew += priv->audio_start_time - priv->first_frame;
|
||||
pthread_mutex_unlock(&priv->skew_mutex);
|
||||
|
||||
// fprintf(stderr, "audio_skew = %lf, delta = %lf\n", (double)priv->audio_skew/1e6, (double)priv->audio_skew_delta_total/1e6);
|
||||
// fprintf(stderr, "audio_skew = %f, delta = %f\n", (double)priv->audio_skew/1e6, (double)priv->audio_skew_delta_total/1e6);
|
||||
|
||||
pthread_mutex_lock(&priv->audio_mutex);
|
||||
if ((priv->audio_tail+1) % priv->audio_buffer_size == priv->audio_head) {
|
||||
|
|
Loading…
Reference in New Issue