diff --git a/vp8/common/postproc.c b/vp8/common/postproc.c
index 0dc14b8bdea04ae85d06e24202293cc2009a81b6..87e999772482dc2bd6ae66b25ac90ee7b5792ee4 100644
--- a/vp8/common/postproc.c
+++ b/vp8/common/postproc.c
@@ -930,10 +930,16 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
     {
         if ((flags & VP8D_DEBLOCK) || (flags & VP8D_DEMACROBLOCK))
         {
-            if (vp8_yv12_alloc_frame_buffer(&oci->post_proc_buffer_int, oci->Width, oci->Height, VP8BORDERINPIXELS) >= 0)
-            {
-                oci->post_proc_buffer_int_used = 1;
-            }
+            int width = (oci->Width + 15) & ~15;
+            int height = (oci->Height + 15) & ~15;
+
+            if (vp8_yv12_alloc_frame_buffer(&oci->post_proc_buffer_int,
+                                            width, height, VP8BORDERINPIXELS))
+                vpx_internal_error(&oci->error, VPX_CODEC_MEM_ERROR,
+                                   "Failed to allocate MFQE framebuffer");
+
+            oci->post_proc_buffer_int_used = 1;
+
             // insure that postproc is set to all 0's so that post proc
             // doesn't pull random data in from edge
             vpx_memset((&oci->post_proc_buffer_int)->buffer_alloc,126,(&oci->post_proc_buffer)->frame_size);