ref: b6e686b1ea0cb5d609de85836b829557660e7d55
parent: c31d02615dbcf2d25bd24be83451a5a864b00fef
parent: 8281da74b905adf7fbfe0003df0294a683aaeb55
author: James Zern <[email protected]>
date: Tue Sep 20 19:17:20 EDT 2016
Merge changes from topic 'Wshorten' * changes: vp8: convert some uses of unsigned long to size_t vp8/encoder: quiet some -Wshorten-64-to-32 warnings
--- a/vp8/common/onyx.h
+++ b/vp8/common/onyx.h
@@ -251,7 +251,7 @@
YV12_BUFFER_CONFIG *sd, int64_t time_stamp,
int64_t end_time_stamp);
int vp8_get_compressed_data(struct VP8_COMP *comp, unsigned int *frame_flags,
- unsigned long *size, unsigned char *dest,
+ size_t *size, unsigned char *dest,
unsigned char *dest_end, int64_t *time_stamp,
int64_t *time_end, int flush);
int vp8_get_preview_raw_frame(struct VP8_COMP *comp, YV12_BUFFER_CONFIG *dest,
--- a/vp8/encoder/bitstream.c
+++ b/vp8/encoder/bitstream.c
@@ -1056,7 +1056,7 @@
}
void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest,
- unsigned char *dest_end, unsigned long *size) {
+ unsigned char *dest_end, size_t *size) {
int i, j;
VP8_HEADER oh;
VP8_COMMON *const pc = &cpi->common;
@@ -1347,7 +1347,7 @@
*size = VP8_HEADER_SIZE + extra_bytes_packed + cpi->bc->pos;
- cpi->partition_sz[0] = *size;
+ cpi->partition_sz[0] = (unsigned int)*size;
#if CONFIG_REALTIME_ONLY & CONFIG_ONTHEFLY_BITPACKING
{
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -2746,7 +2746,7 @@
return code_key_frame;
}
-static void Pass1Encode(VP8_COMP *cpi, unsigned long *size, unsigned char *dest,
+static void Pass1Encode(VP8_COMP *cpi, size_t *size, unsigned char *dest,
unsigned int *frame_flags) {
(void)size;
(void)dest;
@@ -3185,7 +3185,7 @@
vp8_yv12_extend_frame_borders(cm->frame_to_show);
}
-static void encode_frame_to_data_rate(VP8_COMP *cpi, unsigned long *size,
+static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size,
unsigned char *dest,
unsigned char *dest_end,
unsigned int *frame_flags) {
@@ -4384,7 +4384,7 @@
/* Update rate control heuristics */
cpi->total_byte_count += (*size);
- cpi->projected_frame_size = (*size) << 3;
+ cpi->projected_frame_size = (int)(*size) << 3;
if (cpi->oxcf.number_of_layers > 1) {
unsigned int i;
@@ -4711,7 +4711,7 @@
/* vp8_write_yuv_frame("encoder_recon.yuv", cm->frame_to_show); */
}
#if !CONFIG_REALTIME_ONLY
-static void Pass2Encode(VP8_COMP *cpi, unsigned long *size, unsigned char *dest,
+static void Pass2Encode(VP8_COMP *cpi, size_t *size, unsigned char *dest,
unsigned char *dest_end, unsigned int *frame_flags) {
if (!cpi->common.refresh_alt_ref_frame) vp8_second_pass(cpi);
@@ -4764,7 +4764,7 @@
}
int vp8_get_compressed_data(VP8_COMP *cpi, unsigned int *frame_flags,
- unsigned long *size, unsigned char *dest,
+ size_t *size, unsigned char *dest,
unsigned char *dest_end, int64_t *time_stamp,
int64_t *time_end, int flush) {
VP8_COMMON *cm;
--- a/vp8/encoder/onyx_int.h
+++ b/vp8/encoder/onyx_int.h
@@ -687,7 +687,7 @@
void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm);
void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest,
- unsigned char *dest_end, unsigned long *size);
+ unsigned char *dest_end, size_t *size);
void vp8_tokenize_mb(VP8_COMP *, MACROBLOCK *, TOKENEXTRA **);
--- a/vp8/encoder/pickinter.c
+++ b/vp8/encoder/pickinter.c
@@ -570,7 +570,7 @@
// No adjustment if block is considered to be skin area.
if (x->is_skin) rd_adj = 100;
- this_rd = ((int64_t)this_rd) * rd_adj / 100;
+ this_rd = (int)(((int64_t)this_rd) * rd_adj / 100);
}
check_for_encode_breakout(*sse, x);
--- a/vp8/vp8_cx_iface.c
+++ b/vp8/vp8_cx_iface.c
@@ -824,7 +824,7 @@
unsigned int lib_flags;
YV12_BUFFER_CONFIG sd;
int64_t dst_time_stamp, dst_end_time_stamp;
- unsigned long size, cx_data_sz;
+ size_t size, cx_data_sz;
unsigned char *cx_data;
unsigned char *cx_data_end;
int comp_data_state = 0;