From 67f256fab47e04569266b055632d57bcb3aad0bc Mon Sep 17 00:00:00 2001 From: "wu@webrtc.org" Date: Mon, 18 Jun 2012 21:15:32 +0000 Subject: [PATCH] Use 32 as the alignment if possible in VP8 wrapper. BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/663004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2420 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/video_coding/codecs/vp8/main/source/vp8.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/video_coding/codecs/vp8/main/source/vp8.cc b/src/modules/video_coding/codecs/vp8/main/source/vp8.cc index 0ba60db45b..c5fa503bd5 100644 --- a/src/modules/video_coding/codecs/vp8/main/source/vp8.cc +++ b/src/modules/video_coding/codecs/vp8/main/source/vp8.cc @@ -972,9 +972,13 @@ VideoDecoder* VP8Decoder::Copy() { if (!ref_frame_) { ref_frame_ = new vpx_ref_frame_t; + unsigned int align = 1; + if (decoded_image_._width % 32 == 0) { + align = 32; + } if (!vpx_img_alloc(&ref_frame_->img, static_cast(image_format_), - decoded_image_._width, decoded_image_._height, 1)) { + decoded_image_._width, decoded_image_._height, align)) { assert(false); delete copy; return NULL;