From e33855cc47cba96ef75a479812342aee6268b5ce Mon Sep 17 00:00:00 2001 From: Deb Mukherjee Date: Thu, 5 Dec 2013 17:20:01 -0800 Subject: [PATCH] Changes interfaces to vp9_get_compressed_data fn Silences some lint warnings in previous patches Change-Id: I04bf47ebe7e63a95fd322719a3154e589c115d78 --- vp9/common/vp9_onyx.h | 2 +- vp9/encoder/vp9_bitstream.c | 2 +- vp9/encoder/vp9_onyx_if.c | 14 +++++++------- vp9/encoder/vp9_onyx_int.h | 3 +-- vp9/vp9_cx_iface.c | 12 ++++++------ 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/vp9/common/vp9_onyx.h b/vp9/common/vp9_onyx.h index c5faf88..65a2a5e 100644 --- a/vp9/common/vp9_onyx.h +++ b/vp9/common/vp9_onyx.h @@ -193,7 +193,7 @@ extern "C" int64_t end_time_stamp); int vp9_get_compressed_data(VP9_PTR comp, unsigned int *frame_flags, - unsigned long *size, unsigned char *dest, + size_t *size, uint8_t *dest, int64_t *time_stamp, int64_t *time_end, int flush); diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 97717fb..95d6e92 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -1314,7 +1314,7 @@ static size_t write_compressed_header(VP9_COMP *cpi, uint8_t *data) { return header_bc.pos; } -void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, unsigned long *size) { +void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, size_t *size) { uint8_t *data = dest; size_t first_part_size; struct vp9_write_bit_buffer wb = {data, 0}; diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 4632b07..6b7d9fb 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -2664,7 +2664,7 @@ static void output_frame_level_debug_stats(VP9_COMP *cpi) { #endif static void encode_with_recode_loop(VP9_COMP *cpi, - unsigned long *size, + size_t *size, uint8_t *dest, int *q, int bottom_index, @@ -2861,7 +2861,7 @@ static void encode_with_recode_loop(VP9_COMP *cpi, } static void encode_frame_to_data_rate(VP9_COMP *cpi, - unsigned long *size, + size_t *size, uint8_t *dest, unsigned int *frame_flags) { VP9_COMMON *const cm = &cpi->common; @@ -3241,12 +3241,12 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, cm->prev_mi_grid_visible = cm->prev_mi_grid_base + cm->mode_info_stride + 1; } -static void Pass0Encode(VP9_COMP *cpi, unsigned long *size, unsigned char *dest, +static void Pass0Encode(VP9_COMP *cpi, size_t *size, uint8_t *dest, unsigned int *frame_flags) { encode_frame_to_data_rate(cpi, size, dest, frame_flags); } -static void Pass1Encode(VP9_COMP *cpi, unsigned long *size, unsigned char *dest, +static void Pass1Encode(VP9_COMP *cpi, size_t *size, uint8_t *dest, unsigned int *frame_flags) { (void) size; (void) dest; @@ -3256,8 +3256,8 @@ static void Pass1Encode(VP9_COMP *cpi, unsigned long *size, unsigned char *dest, vp9_first_pass(cpi); } -static void Pass2Encode(VP9_COMP *cpi, unsigned long *size, - unsigned char *dest, unsigned int *frame_flags) { +static void Pass2Encode(VP9_COMP *cpi, size_t *size, + uint8_t *dest, unsigned int *frame_flags) { cpi->enable_encode_breakout = 1; if (!cpi->refresh_alt_ref_frame) @@ -3322,7 +3322,7 @@ int is_next_frame_arf(VP9_COMP *cpi) { #endif int vp9_get_compressed_data(VP9_PTR ptr, unsigned int *frame_flags, - unsigned long *size, unsigned char *dest, + size_t *size, uint8_t *dest, int64_t *time_stamp, int64_t *time_end, int flush) { VP9_COMP *cpi = (VP9_COMP *) ptr; VP9_COMMON *cm = &cpi->common; diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h index c631565..360ce82 100644 --- a/vp9/encoder/vp9_onyx_int.h +++ b/vp9/encoder/vp9_onyx_int.h @@ -684,8 +684,7 @@ static int get_scale_ref_frame_idx(VP9_COMP *cpi, void vp9_encode_frame(VP9_COMP *cpi); -void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest, - unsigned long *size); +void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, size_t *size); void vp9_activity_masking(VP9_COMP *cpi, MACROBLOCK *x); diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 5d53a41..ee0aa1b 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -77,14 +77,14 @@ struct vpx_codec_alg_priv { vpx_codec_enc_cfg_t cfg; struct vp9_extracfg vp8_cfg; VP9_CONFIG oxcf; - VP9_PTR cpi; + VP9_PTR cpi; unsigned char *cx_data; - unsigned int cx_data_sz; + size_t cx_data_sz; unsigned char *pending_cx_data; - unsigned int pending_cx_data_sz; + size_t pending_cx_data_sz; int pending_frame_count; - uint32_t pending_frame_sizes[8]; - uint32_t pending_frame_magnitude; + size_t pending_frame_sizes[8]; + size_t pending_frame_magnitude; vpx_image_t preview_img; vp8_postproc_cfg_t preview_ppcfg; vpx_codec_pkt_list_decl(64) pkt_list; @@ -708,7 +708,7 @@ static vpx_codec_err_t vp9e_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; /* Set up internal flags */ -- 2.7.4