From: James Zern Date: Sat, 19 May 2012 02:22:26 +0000 (-0700) Subject: examples: use alignment > 1 w/vpx_img_alloc X-Git-Tag: v1.2.0~201^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e1799c9cb5060246b09021810b2a0e0651611a6;p=libvpx examples: use alignment > 1 w/vpx_img_alloc aligned buffers improve performace. this change brings vpxenc & vp8_scalable_patterns in line with the other examples. Change-Id: I4cf9f3e4728b901161905dd7ccb092e774ffb15f --- diff --git a/vp8_scalable_patterns.c b/vp8_scalable_patterns.c index 4311b1a04..f3464aa7c 100644 --- a/vp8_scalable_patterns.c +++ b/vp8_scalable_patterns.c @@ -156,7 +156,7 @@ int main(int argc, char **argv) { if (argc != 8+mode_to_num_layers[layering_mode]) die ("Invalid number of arguments"); - if (!vpx_img_alloc (&raw, VPX_IMG_FMT_I420, width, height, 1)) + if (!vpx_img_alloc (&raw, VPX_IMG_FMT_I420, width, height, 32)) die ("Failed to allocate image", width, height); printf("Using %s\n",vpx_codec_iface_name(interface)); diff --git a/vpxenc.c b/vpxenc.c index d32b21b53..b9aa8e170 100644 --- a/vpxenc.c +++ b/vpxenc.c @@ -2437,7 +2437,7 @@ int main(int argc, const char **argv_) vpx_img_alloc(&raw, input.use_i420 ? VPX_IMG_FMT_I420 : VPX_IMG_FMT_YV12, - input.w, input.h, 1); + input.w, input.h, 32); FOREACH_STREAM(init_rate_histogram(&stream->rate_hist, &stream->config.cfg,