Commit d71ba038 authored by Yaowu Xu's avatar Yaowu Xu

silent compiling warnings for VC9 build

Change-Id: Iaa947e640f27e6f6eaf7d845f243536bca2df513
parent 2b59e14a
......@@ -24,7 +24,7 @@ void Ebml_WriteLen(EbmlGlobal *glob, int64_t val)
unsigned char size = 8; /* size in bytes to output */
/* mask to compare for byte size */
uint64_t minVal = 0xff;
int64_t minVal = 0xff;
for (size = 1; size < 8; size ++)
{
......@@ -47,7 +47,7 @@ void Ebml_WriteString(EbmlGlobal *glob, const char *str)
/* TODO: it's not clear from the spec whether the nul terminator
* should be serialized too. For now we omit the null terminator.
*/
Ebml_Write(glob, str, size);
Ebml_Write(glob, str, (unsigned long)size);
}
void Ebml_WriteUTF8(EbmlGlobal *glob, const wchar_t *wstr)
......@@ -60,7 +60,7 @@ void Ebml_WriteUTF8(EbmlGlobal *glob, const wchar_t *wstr)
const uint64_t size = strlen;
Ebml_WriteLen(glob, size);
Ebml_Write(glob, wstr, size);
Ebml_Write(glob, wstr, (unsigned long)size);
}
void Ebml_WriteID(EbmlGlobal *glob, unsigned long class_id)
......
......@@ -1272,7 +1272,7 @@ ne_read_block(nestegg * ctx, uint64_t block_id, uint64_t block_size, nestegg_pac
if (total > block_size)
return -1;
entry = ne_find_track_entry(ctx, track - 1);
entry = ne_find_track_entry(ctx, (unsigned int)(track - 1));
if (!entry)
return -1;
......@@ -1291,7 +1291,7 @@ ne_read_block(nestegg * ctx, uint64_t block_id, uint64_t block_size, nestegg_pac
pkt = ne_alloc(sizeof(*pkt));
pkt->track = track - 1;
pkt->timecode = abs_timecode * tc_scale * track_scale;
pkt->timecode = (uint64_t)(abs_timecode * tc_scale * track_scale);
ctx->log(ctx, NESTEGG_LOG_DEBUG, "%sblock t %lld pts %f f %llx frames: %llu",
block_id == ID_BLOCK ? "" : "simple", pkt->track, pkt->timecode / 1e9, flags, frames);
......@@ -1774,35 +1774,35 @@ nestegg_track_video_params(nestegg * ctx, unsigned int track,
if (ne_get_uint(entry->video.pixel_width, &value) != 0)
return -1;
params->width = value;
params->width = (unsigned int)value;
if (ne_get_uint(entry->video.pixel_height, &value) != 0)
return -1;
params->height = value;
params->height = (unsigned int)value;
value = 0;
ne_get_uint(entry->video.pixel_crop_bottom, &value);
params->crop_bottom = value;
params->crop_bottom = (unsigned int)value;
value = 0;
ne_get_uint(entry->video.pixel_crop_top, &value);
params->crop_top = value;
params->crop_top = (unsigned int)value;
value = 0;
ne_get_uint(entry->video.pixel_crop_left, &value);
params->crop_left = value;
params->crop_left = (unsigned int)value;
value = 0;
ne_get_uint(entry->video.pixel_crop_right, &value);
params->crop_right = value;
params->crop_right = (unsigned int)value;
value = params->width;
ne_get_uint(entry->video.display_width, &value);
params->display_width = value;
params->display_width = (unsigned int)value;
value = params->height;
ne_get_uint(entry->video.display_height, &value);
params->display_height = value;
params->display_height = (unsigned int)value;
return 0;
}
......@@ -1828,11 +1828,11 @@ nestegg_track_audio_params(nestegg * ctx, unsigned int track,
value = 1;
ne_get_uint(entry->audio.channels, &value);
params->channels = value;
params->channels = (unsigned int)value;
value = 16;
ne_get_uint(entry->audio.bit_depth, &value);
params->depth = value;
params->depth = (unsigned int)value;
return 0;
}
......@@ -1888,7 +1888,7 @@ nestegg_free_packet(nestegg_packet * pkt)
int
nestegg_packet_track(nestegg_packet * pkt, unsigned int * track)
{
*track = pkt->track;
*track = (unsigned int)pkt->track;
return 0;
}
......
......@@ -55,7 +55,7 @@ void vp8dx_bool_decoder_fill(BOOL_DECODER *br);
int loop_end, x; \
size_t bits_left = ((_bufend)-(_bufptr))*CHAR_BIT; \
\
x = shift + CHAR_BIT - bits_left; \
x = (int)(shift + CHAR_BIT - bits_left); \
loop_end = 0; \
if(x >= 0) \
{ \
......
......@@ -509,13 +509,13 @@ static unsigned int read_available_partition_size(
if (read_is_valid(partition_size_ptr, 3, first_fragment_end))
partition_size = read_partition_size(partition_size_ptr);
else if (pbi->ec_active)
partition_size = bytes_left;
partition_size = (unsigned int)bytes_left;
else
vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME,
"Truncated partition size data");
}
else
partition_size = bytes_left;
partition_size = (unsigned int)bytes_left;
/* Validate the calculated partition length. If the buffer
* described by the partition can't be fully read, then restrict
......@@ -524,7 +524,7 @@ static unsigned int read_available_partition_size(
if (!read_is_valid(fragment_start, partition_size, fragment_end))
{
if (pbi->ec_active)
partition_size = bytes_left;
partition_size = (unsigned int)bytes_left;
else
vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME,
"Truncated packet or corrupt partition "
......@@ -570,10 +570,10 @@ static void setup_token_decoder(VP8D_COMP *pbi,
/* Size of first partition + token partition sizes element */
ptrdiff_t ext_first_part_size = token_part_sizes -
pbi->fragments[0] + 3 * (num_token_partitions - 1);
fragment_size -= ext_first_part_size;
fragment_size -= (unsigned int)ext_first_part_size;
if (fragment_size > 0)
{
pbi->fragment_sizes[0] = ext_first_part_size;
pbi->fragment_sizes[0] = (unsigned int)ext_first_part_size;
/* The fragment contains an additional partition. Move to
* next. */
fragment_idx++;
......@@ -592,8 +592,8 @@ static void setup_token_decoder(VP8D_COMP *pbi,
fragment_end,
fragment_idx - 1,
num_token_partitions);
pbi->fragment_sizes[fragment_idx] = partition_size;
fragment_size -= partition_size;
pbi->fragment_sizes[fragment_idx] = (unsigned int)partition_size;
fragment_size -= (unsigned int)partition_size;
assert(fragment_idx <= num_token_partitions);
if (fragment_size > 0)
{
......@@ -859,7 +859,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
init_frame(pbi);
if (vp8dx_start_decode(bc, data, data_end - data))
if (vp8dx_start_decode(bc, data, (unsigned int)(data_end - data)))
vpx_internal_error(&pc->error, VPX_CODEC_MEM_ERROR,
"Failed to allocate bool decoder 0");
if (pc->frame_type == KEY_FRAME) {
......
......@@ -397,7 +397,7 @@ static void pack_tokens_into_partitions_c(VP8_COMP *cpi, unsigned char *cx_data,
{
const TOKENEXTRA *p = cpi->tplist[mb_row].start;
const TOKENEXTRA *stop = cpi->tplist[mb_row].stop;
int tokens = stop - p;
int tokens = (int)(stop - p);
vp8_pack_tokens_c(w, p, tokens);
}
......@@ -416,7 +416,7 @@ static void pack_mb_row_tokens_c(VP8_COMP *cpi, vp8_writer *w)
{
const TOKENEXTRA *p = cpi->tplist[mb_row].start;
const TOKENEXTRA *stop = cpi->tplist[mb_row].stop;
int tokens = stop - p;
int tokens = (int)(stop - p);
vp8_pack_tokens_c(w, p, tokens);
}
......
......@@ -256,8 +256,9 @@ void vp8_denoiser_denoise_mb(VP8_DENOISER *denoiser,
mv_row = x->best_sse_mv.as_mv.row;
if (frame == INTRA_FRAME ||
(mv_row *mv_row + mv_col *mv_col <= NOISE_MOTION_THRESHOLD &&
sse_diff < SSE_DIFF_THRESHOLD))
((unsigned int)(mv_row *mv_row + mv_col *mv_col)
<= NOISE_MOTION_THRESHOLD &&
sse_diff < (int)SSE_DIFF_THRESHOLD))
{
/*
* Handle intra blocks as referring to last frame with zero motion
......
......@@ -823,7 +823,8 @@ void vp8_encode_frame(VP8_COMP *cpi)
for (mb_row = 0; mb_row < cm->mb_rows; mb_row ++)
{
cpi->tok_count += cpi->tplist[mb_row].stop - cpi->tplist[mb_row].start;
cpi->tok_count += (unsigned int)
(cpi->tplist[mb_row].stop - cpi->tplist[mb_row].start);
}
if (xd->segmentation_enabled)
......@@ -867,7 +868,7 @@ void vp8_encode_frame(VP8_COMP *cpi)
x->src.v_buffer += 8 * x->src.uv_stride - 8 * cm->mb_cols;
}
cpi->tok_count = tp - cpi->tok;
cpi->tok_count = (unsigned int)(tp - cpi->tok);
}
#if CONFIG_REALTIME_ONLY & CONFIG_ONTHEFLY_BITPACKING
......
This diff is collapsed.
This diff is collapsed.
......@@ -236,17 +236,17 @@ typedef struct
int target_bandwidth;
/* Layer specific coding parameters */
int starting_buffer_level;
int optimal_buffer_level;
int maximum_buffer_size;
int starting_buffer_level_in_ms;
int optimal_buffer_level_in_ms;
int maximum_buffer_size_in_ms;
int64_t starting_buffer_level;
int64_t optimal_buffer_level;
int64_t maximum_buffer_size;
int64_t starting_buffer_level_in_ms;
int64_t optimal_buffer_level_in_ms;
int64_t maximum_buffer_size_in_ms;
int avg_frame_size_for_layer;
int buffer_level;
int bits_off_target;
int64_t buffer_level;
int64_t bits_off_target;
int64_t total_actual_bits;
int total_target_vs_actual;
......@@ -431,7 +431,7 @@ typedef struct VP8_COMP
double frame_rate;
double ref_frame_rate;
int64_t buffer_level;
int bits_off_target;
int64_t bits_off_target;
int rolling_target_bits;
int rolling_actual_bits;
......@@ -569,10 +569,10 @@ typedef struct VP8_COMP
vp8_refining_search_fn_t refining_search_sad;
vp8_diamond_search_fn_t diamond_search_sad;
vp8_variance_fn_ptr_t fn_ptr[BLOCK_MAX_SEGMENTS];
unsigned int time_receive_data;
unsigned int time_compress_data;
unsigned int time_pick_lpf;
unsigned int time_encode_mb_row;
uint64_t time_receive_data;
uint64_t time_compress_data;
uint64_t time_pick_lpf;
uint64_t time_encode_mb_row;
int base_skip_false_prob[128];
......
......@@ -353,7 +353,7 @@ static void calc_iframe_target_size(VP8_COMP *cpi)
{
/* boost defaults to half second */
int kf_boost;
unsigned int target;
uint64_t target;
/* Clear down mmx registers to allow floating point in what follows */
vp8_clear_system_state();
......@@ -423,7 +423,7 @@ static void calc_iframe_target_size(VP8_COMP *cpi)
target = max_rate;
}
cpi->this_frame_target = target;
cpi->this_frame_target = (int)target;
/* TODO: if we separate rate targeting from Q targetting, move this.
* Reset the active worst quality to the baseline value for key frames.
......@@ -747,7 +747,8 @@ static void calc_pframe_target_size(VP8_COMP *cpi)
/* Adapt target frame size with respect to any buffering constraints: */
if (cpi->buffered_mode)
{
int one_percent_bits = 1 + cpi->oxcf.optimal_buffer_level / 100;
int one_percent_bits = (int)
(1 + cpi->oxcf.optimal_buffer_level / 100);
if ((cpi->buffer_level < cpi->oxcf.optimal_buffer_level) ||
(cpi->bits_off_target < cpi->oxcf.optimal_buffer_level))
......@@ -764,9 +765,9 @@ static void calc_pframe_target_size(VP8_COMP *cpi)
if ((cpi->oxcf.end_usage == USAGE_STREAM_FROM_SERVER) &&
(cpi->buffer_level < cpi->oxcf.optimal_buffer_level))
{
percent_low =
(cpi->oxcf.optimal_buffer_level - cpi->buffer_level) /
one_percent_bits;
percent_low = (int)
((cpi->oxcf.optimal_buffer_level - cpi->buffer_level) /
one_percent_bits);
}
/* Are we overshooting the long term clip data rate... */
else if (cpi->bits_off_target < 0)
......@@ -790,7 +791,7 @@ static void calc_pframe_target_size(VP8_COMP *cpi)
*/
if (cpi->auto_worst_q && cpi->ni_frames > 150)
{
int critical_buffer_level;
int64_t critical_buffer_level;
/* For streaming applications the most important factor is
* cpi->buffer_level as this takes into account the
......@@ -841,7 +842,7 @@ static void calc_pframe_target_size(VP8_COMP *cpi)
*/
cpi->active_worst_quality =
cpi->worst_quality -
((qadjustment_range * above_base) /
(int)((qadjustment_range * above_base) /
(cpi->oxcf.optimal_buffer_level*3>>2));
}
else
......@@ -866,9 +867,9 @@ static void calc_pframe_target_size(VP8_COMP *cpi)
if ((cpi->oxcf.end_usage == USAGE_STREAM_FROM_SERVER)
&& (cpi->buffer_level > cpi->oxcf.optimal_buffer_level))
{
percent_high = (cpi->buffer_level
percent_high = (int)((cpi->buffer_level
- cpi->oxcf.optimal_buffer_level)
/ one_percent_bits;
/ one_percent_bits);
}
else if (cpi->bits_off_target > cpi->oxcf.optimal_buffer_level)
{
......@@ -956,7 +957,7 @@ static void calc_pframe_target_size(VP8_COMP *cpi)
/* Update the buffer level variable. */
cpi->bits_off_target += cpi->av_per_frame_bandwidth;
if (cpi->bits_off_target > cpi->oxcf.maximum_buffer_size)
cpi->bits_off_target = cpi->oxcf.maximum_buffer_size;
cpi->bits_off_target = (int)cpi->oxcf.maximum_buffer_size;
cpi->buffer_level = cpi->bits_off_target;
}
}
......
......@@ -212,7 +212,8 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
if (cfg->g_pass == VPX_RC_LAST_PASS)
{
size_t packet_sz = sizeof(FIRSTPASS_STATS);
int n_packets = cfg->rc_twopass_stats_in.sz / packet_sz;
int n_packets = (int)(cfg->rc_twopass_stats_in.sz /
packet_sz);
FIRSTPASS_STATS *stats;
if (!cfg->rc_twopass_stats_in.buf)
......@@ -898,9 +899,9 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx,
pkt.data.frame.pts =
(dst_time_stamp * ctx->cfg.g_timebase.den + round)
/ ctx->cfg.g_timebase.num / 10000000;
pkt.data.frame.duration =
(delta * ctx->cfg.g_timebase.den + round)
/ ctx->cfg.g_timebase.num / 10000000;
pkt.data.frame.duration = (unsigned long)
((delta * ctx->cfg.g_timebase.den + round)
/ ctx->cfg.g_timebase.num / 10000000);
pkt.data.frame.flags = lib_flags << 16;
if (lib_flags & FRAMEFLAGS_KEY)
......
......@@ -162,7 +162,7 @@ x86_readtsc(void)
return tsc;
#else
#if ARCH_X86_64
return __rdtsc();
return (unsigned int)__rdtsc();
#else
__asm rdtsc;
#endif
......
......@@ -503,7 +503,7 @@ nestegg_seek_cb(int64_t offset, int whence, void * userdata)
case NESTEGG_SEEK_CUR: whence = SEEK_CUR; break;
case NESTEGG_SEEK_END: whence = SEEK_END; break;
};
return fseek(userdata, offset, whence)? -1 : 0;
return fseek(userdata, (long)offset, whence)? -1 : 0;
}
......@@ -560,7 +560,7 @@ webm_guess_framerate(struct input_ctx *input,
goto fail;
*fps_num = (i - 1) * 1000000;
*fps_den = tstamp / 1000;
*fps_den = (unsigned int)(tstamp / 1000);
return 0;
fail:
nestegg_destroy(input->nestegg_ctx);
......@@ -963,7 +963,8 @@ int main(int argc, const char **argv_)
That will have to wait until these tools support WebM natively.*/
sprintf(buffer, "YUV4MPEG2 C%s W%u H%u F%u:%u I%c\n",
"420jpeg", width, height, fps_num, fps_den, 'p');
out_put(out, (unsigned char *)buffer, strlen(buffer), do_md5);
out_put(out, (unsigned char *)buffer,
(unsigned int)strlen(buffer), do_md5);
}
/* Try to determine the codec from the fourcc. */
......@@ -1041,7 +1042,7 @@ int main(int argc, const char **argv_)
vpx_usec_timer_start(&timer);
if (vpx_codec_decode(&decoder, buf, buf_sz, NULL, 0))
if (vpx_codec_decode(&decoder, buf, (unsigned int)buf_sz, NULL, 0))
{
const char *detail = vpx_codec_error_detail(&decoder);
fprintf(stderr, "Failed to decode frame: %s\n", vpx_codec_error(&decoder));
......@@ -1053,7 +1054,7 @@ int main(int argc, const char **argv_)
}
vpx_usec_timer_mark(&timer);
dx_time += vpx_usec_timer_elapsed(&timer);
dx_time += (unsigned int)vpx_usec_timer_elapsed(&timer);
++frame_in;
......
......@@ -494,7 +494,7 @@ static void write_ivf_frame_header(FILE *outfile,
return;
pts = pkt->data.frame.pts;
mem_put_le32(header, pkt->data.frame.sz);
mem_put_le32(header, (int)pkt->data.frame.sz);
mem_put_le32(header + 4, pts & 0xFFFFFFFF);
mem_put_le32(header + 8, pts >> 32);
......@@ -504,7 +504,7 @@ static void write_ivf_frame_header(FILE *outfile,
static void write_ivf_frame_size(FILE *outfile, size_t size)
{
char header[4];
mem_put_le32(header, size);
mem_put_le32(header, (int)size);
(void) fwrite(header, 1, 4, outfile);
}
......@@ -559,7 +559,7 @@ void Ebml_Write(EbmlGlobal *glob, const void *buffer_in, unsigned long len)
#define WRITE_BUFFER(s) \
for(i = len-1; i>=0; i--)\
{ \
x = *(const s *)buffer_in >> (i * CHAR_BIT); \
x = (char)(*(const s *)buffer_in >> (i * CHAR_BIT)); \
Ebml_Write(glob, &x, 1); \
}
void Ebml_Serialize(EbmlGlobal *glob, const void *buffer_in, int buffer_size, unsigned long len)
......@@ -698,7 +698,7 @@ write_webm_seek_info(EbmlGlobal *ebml)
Ebml_StartSubElement(ebml, &startInfo, Info);
Ebml_SerializeUnsigned(ebml, TimecodeScale, 1000000);
Ebml_SerializeFloat(ebml, Segment_Duration,
ebml->last_pts_ms + frame_time);
(double)(ebml->last_pts_ms + frame_time));
Ebml_SerializeString(ebml, 0x4D80, version_string);
Ebml_SerializeString(ebml, 0x5741, version_string);
Ebml_EndSubElement(ebml, &startInfo);
......@@ -790,7 +790,7 @@ write_webm_block(EbmlGlobal *glob,
if(pts_ms - glob->cluster_timecode > SHRT_MAX)
start_cluster = 1;
else
block_timecode = pts_ms - glob->cluster_timecode;
block_timecode = (unsigned short)pts_ms - glob->cluster_timecode;
is_keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY);
if(start_cluster || is_keyframe)
......@@ -801,7 +801,7 @@ write_webm_block(EbmlGlobal *glob,
/* Open the new cluster */
block_timecode = 0;
glob->cluster_open = 1;
glob->cluster_timecode = pts_ms;
glob->cluster_timecode = (uint32_t)pts_ms;
glob->cluster_pos = ftello(glob->stream);
Ebml_StartSubElement(glob, &glob->startCluster, Cluster); /* cluster */
Ebml_SerializeUnsigned(glob, Timecode, glob->cluster_timecode);
......@@ -828,7 +828,7 @@ write_webm_block(EbmlGlobal *glob,
/* Write the Simple Block */
Ebml_WriteID(glob, SimpleBlock);
block_length = pkt->data.frame.sz + 4;
block_length = (unsigned long)pkt->data.frame.sz + 4;
block_length |= 0x10000000;
Ebml_Serialize(glob, &block_length, sizeof(block_length), 4);
......@@ -845,7 +845,7 @@ write_webm_block(EbmlGlobal *glob,
flags |= 0x08;
Ebml_Write(glob, &flags, 1);
Ebml_Write(glob, pkt->data.frame.buf, pkt->data.frame.sz);
Ebml_Write(glob, pkt->data.frame.buf, (unsigned long)pkt->data.frame.sz);
}
......@@ -1336,7 +1336,7 @@ static void show_histogram(const struct hist_bucket *bucket,
int j;
float pct;
pct = 100.0 * (float)bucket[i].count / (float)total;
pct = (float)(100.0 * bucket[i].count / total);
len = HIST_BAR_MAX * bucket[i].count / scale;
if(len < 1)
len = 1;
......@@ -1438,7 +1438,7 @@ static void update_rate_histogram(struct rate_hist *hist,
idx = hist->frames++ % hist->samples;
hist->pts[idx] = now;
hist->sz[idx] = pkt->data.frame.sz;
hist->sz[idx] = (int)pkt->data.frame.sz;
if(now < cfg->rc_buf_initial_sz)
return;
......@@ -1460,15 +1460,15 @@ static void update_rate_histogram(struct rate_hist *hist,
return;
avg_bitrate = sum_sz * 8 * 1000 / (now - then);
idx = avg_bitrate * (RATE_BINS/2) / (cfg->rc_target_bitrate * 1000);
idx = (int)(avg_bitrate * (RATE_BINS/2) / (cfg->rc_target_bitrate * 1000));
if(idx < 0)
idx = 0;
if(idx > RATE_BINS-1)
idx = RATE_BINS-1;
if(hist->bucket[idx].low > avg_bitrate)
hist->bucket[idx].low = avg_bitrate;
hist->bucket[idx].low = (int)avg_bitrate;
if(hist->bucket[idx].high < avg_bitrate)
hist->bucket[idx].high = avg_bitrate;
hist->bucket[idx].high = (int)avg_bitrate;
hist->bucket[idx].count++;
hist->total++;
}
......@@ -2011,7 +2011,7 @@ static void set_default_kf_interval(struct stream_state *stream,
{
double framerate = (double)global->framerate.num/global->framerate.den;
if (framerate > 0.0)
stream->config.cfg.kf_max_dist = 5.0*framerate;
stream->config.cfg.kf_max_dist = (unsigned int)(5.0*framerate);
}
}
......@@ -2191,7 +2191,7 @@ static void encode_frame(struct stream_state *stream,
/ cfg->g_timebase.num / global->framerate.num;
vpx_usec_timer_start(&timer);
vpx_codec_encode(&stream->encoder, img, frame_start,
next_frame_start - frame_start,
(unsigned long)(next_frame_start - frame_start),
0, global->deadline);
vpx_usec_timer_mark(&timer);
stream->cx_time += vpx_usec_timer_elapsed(&timer);
......@@ -2244,7 +2244,8 @@ static void get_cx_data(struct stream_state *stream,
/* Update the hash */
if(!stream->ebml.debug)
stream->hash = murmur(pkt->data.frame.buf,
pkt->data.frame.sz, stream->hash);
(int)pkt->data.frame.sz,
stream->hash);
write_webm_block(&stream->ebml, cfg, pkt);
}
......@@ -2317,8 +2318,8 @@ static void show_psnr(struct stream_state *stream)
return;
fprintf(stderr, "Stream %d PSNR (Overall/Avg/Y/U/V)", stream->index);
ovpsnr = vp8_mse2psnr(stream->psnr_samples_total, 255.0,
stream->psnr_sse_total);
ovpsnr = vp8_mse2psnr((double)stream->psnr_samples_total, 255.0,
(double)stream->psnr_sse_total);
fprintf(stderr, " %.3f", ovpsnr);
for (i = 0; i < 4; i++)
......@@ -2331,7 +2332,7 @@ static void show_psnr(struct stream_state *stream)
float usec_to_fps(uint64_t usec, unsigned int frames)
{
return usec > 0 ? (float)frames * 1000000.0 / (float)usec : 0;
return (float)(usec > 0 ? frames * 1000000.0 / (float)usec : 0);
}
......@@ -2495,7 +2496,7 @@ int main(int argc, const char **argv_)
frame_avail ? &raw : NULL,
frames_in));
vpx_usec_timer_mark(&timer);
cx_time += vpx_usec_timer_elapsed(&timer);
cx_time += (unsigned long)vpx_usec_timer_elapsed(&timer);
FOREACH_STREAM(update_quantizer_histogram(stream));
......
......@@ -662,7 +662,7 @@ int y4m_input_open(y4m_input *_y4m,FILE *_fin,char *_skip,int _nskip){
_nskip--;
}
else{
ret=fread(buffer+i,1,1,_fin);
ret=(int)fread(buffer+i,1,1,_fin);
if(ret<1)return -1;
}
if(buffer[i]=='\n')break;
......@@ -818,7 +818,7 @@ int y4m_input_fetch_frame(y4m_input *_y4m,FILE *_fin,vpx_image_t *_img){
int c_sz;
int ret;
/*Read and skip the frame header.*/
ret=fread(frame,1,6,_fin);
ret=(int)fread(frame,1,6,_fin);
if(ret<6)return 0;
if(memcmp(frame,"FRAME",5)){
fprintf(stderr,"Loss of framing in Y4M input data\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment