summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2016-09-19 18:33:10 -0700
committerJames Zern <jzern@google.com>2016-09-19 18:35:59 -0700
commit8281da74b905adf7fbfe0003df0294a683aaeb55 (patch)
tree43991fcb2e8d6daa7aeef07a3da2d3f68c558dd9
parent0ce98b423b07c719b10053a2f76ce69d957fdc3c (diff)
downloadlibvpx-8281da74b905adf7fbfe0003df0294a683aaeb55.tar
libvpx-8281da74b905adf7fbfe0003df0294a683aaeb55.tar.gz
libvpx-8281da74b905adf7fbfe0003df0294a683aaeb55.tar.bz2
libvpx-8281da74b905adf7fbfe0003df0294a683aaeb55.zip
vp8: convert some uses of unsigned long to size_t
similar to changes that were done in vp9 for encoded frame size reporting. has the side-effect of quieting a -Wshorten-64-to-32 warning. Change-Id: I89f74cb617fc29334ee351dc8dfaa3b8cfd4e5af
-rw-r--r--vp8/common/onyx.h2
-rw-r--r--vp8/encoder/bitstream.c4
-rw-r--r--vp8/encoder/onyx_if.c8
-rw-r--r--vp8/encoder/onyx_int.h2
-rw-r--r--vp8/vp8_cx_iface.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/vp8/common/onyx.h b/vp8/common/onyx.h
index eb68246b2..43e3c29b5 100644
--- a/vp8/common/onyx.h
+++ b/vp8/common/onyx.h
@@ -251,7 +251,7 @@ int vp8_receive_raw_frame(struct VP8_COMP *comp, unsigned int frame_flags,
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,
diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c
index 06c2f624f..1b100cfe8 100644
--- a/vp8/encoder/bitstream.c
+++ b/vp8/encoder/bitstream.c
@@ -1056,7 +1056,7 @@ static void put_delta_q(vp8_writer *bc, int delta_q) {
}
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 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest,
*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
{
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index 36d892716..6ebf233ed 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -2746,7 +2746,7 @@ static int decide_key_frame(VP8_COMP *cpi) {
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 @@ void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm) {
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) {
@@ -4711,7 +4711,7 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, unsigned long *size,
/* 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 @@ static int frame_is_reference(const VP8_COMP *cpi) {
}
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;
diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h
index 32080eff7..59ad5773a 100644
--- a/vp8/encoder/onyx_int.h
+++ b/vp8/encoder/onyx_int.h
@@ -687,7 +687,7 @@ void vp8_new_framerate(VP8_COMP *cpi, double framerate);
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 **);
diff --git a/vp8/vp8_cx_iface.c b/vp8/vp8_cx_iface.c
index 0ec6902e7..fac237eec 100644
--- a/vp8/vp8_cx_iface.c
+++ b/vp8/vp8_cx_iface.c
@@ -824,7 +824,7 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx,
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;