ref: def6bc765cca51d3c6bd1c3d57b8c608c32f93ff
parent: 576c2bb02127d6d3b898bf4737e9f4c5f9ca72df
parent: e7d306aae6e00482544d5f0f15cc1bfb7c6a2248
author: Ronald S. Bultje <rbultje@google.com>
date: Fri Jun 7 05:01:33 EDT 2013
Merge "Revert "Align frame size to 8 instead of 16."" into experimental
--- a/vp9/common/vp9_alloccommon.c
+++ b/vp9/common/vp9_alloccommon.c
@@ -68,8 +68,8 @@
}
static void set_mb_mi(VP9_COMMON *cm, int aligned_width, int aligned_height) {
- cm->mb_cols = (aligned_width + 8) >> 4;
- cm->mb_rows = (aligned_height + 8) >> 4;
+ cm->mb_cols = aligned_width >> 4;
+ cm->mb_rows = aligned_height >> 4;
cm->MBs = cm->mb_rows * cm->mb_cols;
cm->mi_cols = aligned_width >> LOG2_MI_SIZE;
@@ -95,8 +95,8 @@
int i, mi_cols;
// Our internal buffers are always multiples of 16
- const int aligned_width = multiple8(width);
- const int aligned_height = multiple8(height);
+ const int aligned_width = multiple16(width);
+ const int aligned_height = multiple16(height);
const int ss_x = oci->subsampling_x;
const int ss_y = oci->subsampling_y;
@@ -223,8 +223,8 @@
}
void vp9_update_frame_size(VP9_COMMON *cm) {
- const int aligned_width = multiple8(cm->width);
- const int aligned_height = multiple8(cm->height);
+ const int aligned_width = multiple16(cm->width);
+ const int aligned_height = multiple16(cm->height);
set_mb_mi(cm, aligned_width, aligned_height);
setup_mi(cm);
--- a/vp9/common/vp9_common.h
+++ b/vp9/common/vp9_common.h
@@ -56,8 +56,8 @@
return value < low ? low : (value > high ? high : value);
}
-static INLINE int multiple8(int value) {
- return (value + 7) & ~7;
+static INLINE int multiple16(int value) {
+ return (value + 15) & ~15;
}
#define SYNC_CODE_0 0x49
--- a/vp9/vp9_iface_common.h
+++ b/vp9/vp9_iface_common.h
@@ -29,7 +29,7 @@
img->fmt = VPX_IMG_FMT_I420;
}
img->w = yv12->y_stride;
- img->h = multiple8(yv12->y_height + 2 * VP9BORDERINPIXELS);
+ img->h = multiple16(yv12->y_height + 2 * VP9BORDERINPIXELS);
img->d_w = yv12->y_crop_width;
img->d_h = yv12->y_crop_height;
img->x_chroma_shift = yv12->uv_width < yv12->y_width;
--
⑨