shithub: libvpx

Download patch

ref: 21c0306187fbf294bf85f2f6a1c62baf6b8674f2
parent: 2fe1bfa5ade46b7f9f3505801071493a7afd4ad0
author: Jingning Han <jingning@google.com>
date: Sat Jan 3 07:34:44 EST 2015

Fix denoised video output function

This commit fixes the buffer alignment control in denoised video
output function. The encoder is now able to properly store the
denoised input video into provided file when enabled.

Change-Id: I258e272c8d4a9b52592e16d6d09976c6f5c21728

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2139,19 +2139,19 @@
   } while (--h);
 
   src = s->u_buffer;
-  h = s->uv_height / 2;
+  h = s->uv_height;
 
   do {
-    fwrite(src, s->uv_width / 2, 1, f);
-    src += s->uv_stride + s->uv_width / 2;
+    fwrite(src, s->uv_width, 1, f);
+    src += s->uv_stride;
   } while (--h);
 
   src = s->v_buffer;
-  h = s->uv_height / 2;
+  h = s->uv_height;
 
   do {
-    fwrite(src, s->uv_width / 2, 1, f);
-    src += s->uv_stride + s->uv_width / 2;
+    fwrite(src, s->uv_width, 1, f);
+    src += s->uv_stride;
   } while (--h);
 }
 #endif