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
This commit is contained in:
parent
df596ae444
commit
67f256fab4
@ -972,9 +972,13 @@ VideoDecoder* VP8Decoder::Copy() {
|
|||||||
if (!ref_frame_) {
|
if (!ref_frame_) {
|
||||||
ref_frame_ = new vpx_ref_frame_t;
|
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,
|
if (!vpx_img_alloc(&ref_frame_->img,
|
||||||
static_cast<vpx_img_fmt_t>(image_format_),
|
static_cast<vpx_img_fmt_t>(image_format_),
|
||||||
decoded_image_._width, decoded_image_._height, 1)) {
|
decoded_image_._width, decoded_image_._height, align)) {
|
||||||
assert(false);
|
assert(false);
|
||||||
delete copy;
|
delete copy;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user