shithub: dav1d

Download patch

ref: 327b7de054ceda49529c038748644f9ebe617181
parent: d52533651f72a3e81a103b460d08059d39c1c3f2
author: Janne Grunau <[email protected]>
date: Thu Nov 29 16:47:32 EST 2018

backup_lpf: increment row by the correct stripe_h

Fixes #200.

--- a/src/lr_apply_tmpl.c
+++ b/src/lr_apply_tmpl.c
@@ -73,21 +73,23 @@
     src += (stripe_h - 2) * PXSTRIDE(src_stride);
 
     if (f->frame_hdr->super_res.enabled) {
-        for (; row + stripe_h <= row_h; row += stripe_h) {
+        while (row + stripe_h <= row_h) {
             f->dsp->mc.resize(dst, dst_stride, src, src_stride,
                               dst_w, src_w, 4, f->resize_step[ss_hor],
                               f->resize_start[ss_hor]);
+            row += stripe_h; // unmodified stripe_h for the 1st stripe
             stripe_h = 64 >> ss_ver;
             src += stripe_h * PXSTRIDE(src_stride);
             dst += 4 * PXSTRIDE(dst_stride);
         }
     } else {
-        for (; row + stripe_h <= row_h; row += stripe_h) {
+        while (row + stripe_h <= row_h) {
             for (int i = 0; i < 4; i++) {
                 pixel_copy(dst, src, src_w);
                 dst += PXSTRIDE(dst_stride);
                 src += PXSTRIDE(src_stride);
             }
+            row += stripe_h; // unmodified stripe_h for the 1st stripe
             stripe_h = 64 >> ss_ver;
             src += (stripe_h - 4) * PXSTRIDE(src_stride);
         }