diff options
author | Paul Wilkins <paulwilkins@google.com> | 2014-05-14 13:27:16 +0100 |
---|---|---|
committer | Paul Wilkins <paulwilkins@google.com> | 2014-05-14 16:31:17 +0100 |
commit | 2493e0f33270f81aed1c51053e937a37d8db6879 (patch) | |
tree | b0a5260bcc7a1d95d4409f952d28ceaac2f6fdbb | |
parent | eecc750b33521b4b46579751fa6495c18e4ceecd (diff) | |
download | libvpx-2493e0f33270f81aed1c51053e937a37d8db6879.tar libvpx-2493e0f33270f81aed1c51053e937a37d8db6879.tar.gz libvpx-2493e0f33270f81aed1c51053e937a37d8db6879.tar.bz2 libvpx-2493e0f33270f81aed1c51053e937a37d8db6879.zip |
Fix int compared to unsigned int warnings.
Also delete vp9_set_roimap() which is not used in VP9.
Change-Id: I48c60b1dc8794c6a234f9c3d95e2debb7bdb3fd5
-rw-r--r-- | vp9/encoder/vp9_encoder.c | 52 | ||||
-rw-r--r-- | vp9/encoder/vp9_encoder.h | 9 | ||||
-rw-r--r-- | vp9/vp9_cx_iface.c | 3 |
3 files changed, 4 insertions, 60 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 64747638c..5dff00216 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -2805,57 +2805,7 @@ int vp9_get_preview_raw_frame(VP9_COMP *cpi, YV12_BUFFER_CONFIG *dest, } } -int vp9_set_roimap(VP9_COMP *cpi, unsigned char *map, unsigned int rows, - unsigned int cols, int delta_q[MAX_SEGMENTS], - int delta_lf[MAX_SEGMENTS], - unsigned int threshold[MAX_SEGMENTS]) { - signed char feature_data[SEG_LVL_MAX][MAX_SEGMENTS]; - struct segmentation *seg = &cpi->common.seg; - const VP9_COMMON *const cm = &cpi->common; - int i; - - if (cm->mb_rows != rows || cm->mb_cols != cols) - return -1; - - if (!map) { - vp9_disable_segmentation(seg); - return 0; - } - - vpx_memcpy(cpi->segmentation_map, map, cm->mi_rows * cm->mi_cols); - - // Activate segmentation. - vp9_enable_segmentation(seg); - - // Set up the quant, LF and breakout threshold segment data - for (i = 0; i < MAX_SEGMENTS; i++) { - feature_data[SEG_LVL_ALT_Q][i] = delta_q[i]; - feature_data[SEG_LVL_ALT_LF][i] = delta_lf[i]; - cpi->segment_encode_breakout[i] = threshold[i]; - } - - // Enable the loop and quant changes in the feature mask - for (i = 0; i < MAX_SEGMENTS; i++) { - if (delta_q[i]) - vp9_enable_segfeature(seg, i, SEG_LVL_ALT_Q); - else - vp9_disable_segfeature(seg, i, SEG_LVL_ALT_Q); - - if (delta_lf[i]) - vp9_enable_segfeature(seg, i, SEG_LVL_ALT_LF); - else - vp9_disable_segfeature(seg, i, SEG_LVL_ALT_LF); - } - - // Initialize the feature data structure - // SEGMENT_DELTADATA 0, SEGMENT_ABSDATA 1 - vp9_set_segment_data(seg, &feature_data[0][0], SEGMENT_DELTADATA); - - return 0; -} - -int vp9_set_active_map(VP9_COMP *cpi, unsigned char *map, - unsigned int rows, unsigned int cols) { +int vp9_set_active_map(VP9_COMP *cpi, unsigned char *map, int rows, int cols) { if (rows == cpi->common.mb_rows && cols == cpi->common.mb_cols) { if (map) { vpx_memcpy(cpi->active_map, map, rows * cols); diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h index f48909e47..a69226fb9 100644 --- a/vp9/encoder/vp9_encoder.h +++ b/vp9/encoder/vp9_encoder.h @@ -552,14 +552,7 @@ int vp9_set_reference_enc(VP9_COMP *cpi, VP9_REFFRAME ref_frame_flag, int vp9_update_entropy(VP9_COMP *cpi, int update); -int vp9_set_roimap(VP9_COMP *cpi, unsigned char *map, - unsigned int rows, unsigned int cols, - int delta_q[MAX_SEGMENTS], - int delta_lf[MAX_SEGMENTS], - unsigned int threshold[MAX_SEGMENTS]); - -int vp9_set_active_map(VP9_COMP *cpi, unsigned char *map, - unsigned int rows, unsigned int cols); +int vp9_set_active_map(VP9_COMP *cpi, unsigned char *map, int rows, int cols); int vp9_set_internal_size(VP9_COMP *cpi, VPX_SCALING horiz_mode, VPX_SCALING vert_mode); diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index c4058bb78..2a3964ae0 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -1004,7 +1004,8 @@ static vpx_codec_err_t ctrl_set_active_map(vpx_codec_alg_priv_t *ctx, vpx_active_map_t *const map = va_arg(args, vpx_active_map_t *); if (map) { - if (!vp9_set_active_map(ctx->cpi, map->active_map, map->rows, map->cols)) + if (!vp9_set_active_map(ctx->cpi, map->active_map, + (int)map->rows, (int)map->cols)) return VPX_CODEC_OK; else return VPX_CODEC_INVALID_PARAM; |