Merge "Little cleanup in vp9_encode_block_intra()."
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 @@
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 1bbb12c..5a337b5 100644
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -1304,7 +1304,7 @@
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_mbgraph.c b/vp9/encoder/vp9_mbgraph.c
index 544f130..e2ef256 100644
--- a/vp9/encoder/vp9_mbgraph.c
+++ b/vp9/encoder/vp9_mbgraph.c
@@ -42,7 +42,7 @@
(cpi->speed < 8 ? (cpi->speed > 5 ? 1 : 0) : 2);
step_param = MIN(step_param, (cpi->sf.max_step_search_steps - 2));
- vp9_clamp_mv_min_max(x, &ref_mv->as_mv);
+ vp9_set_mv_search_range(x, &ref_mv->as_mv);
ref_full.as_mv.col = ref_mv->as_mv.col >> 3;
ref_full.as_mv.row = ref_mv->as_mv.row >> 3;
diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c
index fee11fd..4d4fd35 100644
--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -24,7 +24,7 @@
// #define NEW_DIAMOND_SEARCH
-void vp9_clamp_mv_min_max(MACROBLOCK *x, MV *mv) {
+void vp9_set_mv_search_range(MACROBLOCK *x, MV *mv) {
const int col_min = (mv->col >> 3) - MAX_FULL_PEL_VAL + (mv->col & 7 ? 1 : 0);
const int row_min = (mv->row >> 3) - MAX_FULL_PEL_VAL + (mv->row & 7 ? 1 : 0);
const int col_max = (mv->col >> 3) + MAX_FULL_PEL_VAL;
diff --git a/vp9/encoder/vp9_mcomp.h b/vp9/encoder/vp9_mcomp.h
index 10c2e4f..68e6675 100644
--- a/vp9/encoder/vp9_mcomp.h
+++ b/vp9/encoder/vp9_mcomp.h
@@ -28,7 +28,7 @@
#define BORDER_MV_PIXELS_B16 (16 + VP9_INTERP_EXTEND)
-void vp9_clamp_mv_min_max(MACROBLOCK *x, MV *mv);
+void vp9_set_mv_search_range(MACROBLOCK *x, MV *mv);
int vp9_mv_bit_cost(const MV *mv, const MV *ref,
const int *mvjcost, int *mvcost[2], int weight);
void vp9_init_dsmotion_compensation(MACROBLOCK *x, int stride);
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index b10d9f8..578fb42 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -2662,7 +2662,7 @@
#endif
static void encode_with_recode_loop(VP9_COMP *cpi,
- unsigned long *size,
+ size_t *size,
uint8_t *dest,
int *q,
int bottom_index,
@@ -2859,7 +2859,7 @@
}
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;
@@ -3239,12 +3239,12 @@
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;
@@ -3254,8 +3254,8 @@
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)
@@ -3320,7 +3320,7 @@
#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 72e9196..13ab753 100644
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -683,8 +683,7 @@
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/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 3e18327..9bade98 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1781,7 +1781,7 @@
// adjust src pointer for this block
mi_buf_shift(x, i);
- vp9_clamp_mv_min_max(x, &bsi->ref_mv->as_mv);
+ vp9_set_mv_search_range(x, &bsi->ref_mv->as_mv);
if (cpi->sf.search_method == HEX) {
bestsme = vp9_hex_search(x, &mvp_full.as_mv,
@@ -2344,7 +2344,7 @@
setup_pre_planes(xd, 0, scaled_ref_frame, mi_row, mi_col, NULL);
}
- vp9_clamp_mv_min_max(x, &ref_mv.as_mv);
+ vp9_set_mv_search_range(x, &ref_mv.as_mv);
// Adjust search parameters based on small partitions' result.
if (x->fast_ms) {
@@ -2523,7 +2523,7 @@
// Compound motion search on first ref frame.
if (id)
xd->plane[0].pre[0] = ref_yv12[id];
- vp9_clamp_mv_min_max(x, &ref_mv[id].as_mv);
+ vp9_set_mv_search_range(x, &ref_mv[id].as_mv);
// Use mv result from single mode as mvp.
tmp_mv.as_int = frame_mv[refs[id]].as_int;
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 @@
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 @@
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 */