summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encodeframe.c15
-rw-r--r--vp9/encoder/vp9_encodeframe.h2
-rw-r--r--vp9/encoder/vp9_onyx_int.h4
3 files changed, 12 insertions, 9 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 8950a05a8..7a4dee4d5 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -461,18 +461,17 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
}
void vp9_setup_src_planes(MACROBLOCK *x, const YV12_BUFFER_CONFIG *src,
- int mb_row, int mb_col) {
- uint8_t *buffers[4] = {src->y_buffer, src->u_buffer, src->v_buffer, src
- ->alpha_buffer};
- int strides[4] = {src->y_stride, src->uv_stride, src->uv_stride, src
- ->alpha_stride};
+ int mi_row, int mi_col) {
+ uint8_t *const buffers[4] = {src->y_buffer, src->u_buffer, src->v_buffer,
+ src->alpha_buffer};
+ const int strides[4] = {src->y_stride, src->uv_stride, src->uv_stride,
+ src->alpha_stride};
int i;
- for (i = 0; i < MAX_MB_PLANE; i++) {
- setup_pred_plane(&x->plane[i].src, buffers[i], strides[i], mb_row, mb_col,
+ for (i = 0; i < MAX_MB_PLANE; i++)
+ setup_pred_plane(&x->plane[i].src, buffers[i], strides[i], mi_row, mi_col,
NULL, x->e_mbd.plane[i].subsampling_x,
x->e_mbd.plane[i].subsampling_y);
- }
}
static void set_offsets(VP9_COMP *cpi, int mi_row, int mi_col,
diff --git a/vp9/encoder/vp9_encodeframe.h b/vp9/encoder/vp9_encodeframe.h
index 399196927..3e9f5381c 100644
--- a/vp9/encoder/vp9_encodeframe.h
+++ b/vp9/encoder/vp9_encodeframe.h
@@ -17,6 +17,6 @@ struct yv12_buffer_config;
void vp9_setup_src_planes(struct macroblock *x,
const struct yv12_buffer_config *src,
- int mb_row, int mb_col);
+ int mi_row, int mi_col);
#endif // VP9_ENCODER_VP9_ENCODEFRAME_H_
diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h
index 1002ff756..2b2ef1655 100644
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -698,4 +698,8 @@ int vp9_calc_ss_err(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *dest);
void vp9_alloc_compressor_data(VP9_COMP *cpi);
+static int get_token_alloc(int mb_rows, int mb_cols) {
+ return mb_rows * mb_cols * (48 * 16 + 4);
+}
+
#endif // VP9_ENCODER_VP9_ONYX_INT_H_