Index: source/libvpx/vpx_scale/generic/yv12extend.c |
=================================================================== |
--- source/libvpx/vpx_scale/generic/yv12extend.c (revision 290053) |
+++ source/libvpx/vpx_scale/generic/yv12extend.c (working copy) |
@@ -56,6 +56,9 @@ |
} |
void vp8_yv12_extend_frame_borders_c(YV12_BUFFER_CONFIG *ybf) { |
+ const int uv_border = ybf->border / 2; |
+ |
+ assert(ybf->border % 2 == 0); |
assert(ybf->y_height - ybf->y_crop_height < 16); |
assert(ybf->y_width - ybf->y_crop_width < 16); |
assert(ybf->y_height - ybf->y_crop_height >= 0); |
@@ -68,16 +71,16 @@ |
ybf->border + ybf->y_width - ybf->y_crop_width); |
extend_plane(ybf->u_buffer, ybf->uv_stride, |
- (ybf->y_crop_width + 1) / 2, (ybf->y_crop_height + 1) / 2, |
- ybf->border / 2, ybf->border / 2, |
- (ybf->border + ybf->y_height - ybf->y_crop_height + 1) / 2, |
- (ybf->border + ybf->y_width - ybf->y_crop_width + 1) / 2); |
+ ybf->uv_crop_width, ybf->uv_crop_height, |
+ uv_border, uv_border, |
+ uv_border + ybf->uv_height - ybf->uv_crop_height, |
+ uv_border + ybf->uv_width - ybf->uv_crop_width); |
extend_plane(ybf->v_buffer, ybf->uv_stride, |
- (ybf->y_crop_width + 1) / 2, (ybf->y_crop_height + 1) / 2, |
- ybf->border / 2, ybf->border / 2, |
- (ybf->border + ybf->y_height - ybf->y_crop_height + 1) / 2, |
- (ybf->border + ybf->y_width - ybf->y_crop_width + 1) / 2); |
+ ybf->uv_crop_width, ybf->uv_crop_height, |
+ uv_border, uv_border, |
+ uv_border + ybf->uv_height - ybf->uv_crop_height, |
+ uv_border + ybf->uv_width - ybf->uv_crop_width); |
} |
#if CONFIG_VP9 |