]> granicus.if.org Git - libvpx/commitdiff
examples: use alignment > 1 w/vpx_img_alloc
authorJames Zern <jzern@google.com>
Sat, 19 May 2012 02:22:26 +0000 (19:22 -0700)
committerJames Zern <jzern@google.com>
Sat, 19 May 2012 02:22:26 +0000 (19:22 -0700)
aligned buffers improve performace. this change brings vpxenc &
vp8_scalable_patterns in line with the other examples.

Change-Id: I4cf9f3e4728b901161905dd7ccb092e774ffb15f

vp8_scalable_patterns.c
vpxenc.c

index 4311b1a04db2d32beb93431d4fb2656747385683..f3464aa7c353206d2b8fc988dcc4fdc48fa4f076 100644 (file)
@@ -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));
index d32b21b5366018e20b7bda9578fca66d61f3a288..b9aa8e170339ada37b40c6cb6f07490069a209c8 100644 (file)
--- 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,