shithub: dav1d

Download patch

ref: aa1866f2ba8fd8383544272c1bf3b91273b85ac2
parent: 8fd5dc3a5cea402114d59e509b52d869d6a86cb4
author: Ronald S. Bultje <[email protected]>
date: Fri Mar 27 07:51:05 EDT 2020

Invert src_w/h argument in mc.resize()

--- a/src/lr_apply_tmpl.c
+++ b/src/lr_apply_tmpl.c
@@ -77,7 +77,7 @@
         while (row + stripe_h <= row_h) {
             const int n_lines = 4 - (row + stripe_h + 1 == h);
             f->dsp->mc.resize(dst, dst_stride, src, src_stride,
-                              dst_w, src_w, n_lines, f->resize_step[ss_hor],
+                              dst_w, n_lines, src_w, f->resize_step[ss_hor],
                               f->resize_start[ss_hor] HIGHBD_CALL_SUFFIX);
             row += stripe_h; // unmodified stripe_h for the 1st stripe
             stripe_h = 64 >> ss_ver;
--- a/src/mc.h
+++ b/src/mc.h
@@ -110,7 +110,7 @@
 #define decl_resize_fn(name) \
 void (name)(pixel *dst, ptrdiff_t dst_stride, \
             const pixel *src, ptrdiff_t src_stride, \
-            int dst_w, int src_w, int h, int dx, int mx HIGHBD_DECL_SUFFIX)
+            int dst_w, int h, int src_w, int dx, int mx HIGHBD_DECL_SUFFIX)
 typedef decl_resize_fn(*resize_fn);
 
 typedef struct Dav1dMCDSPContext {
--- a/src/mc_tmpl.c
+++ b/src/mc_tmpl.c
@@ -885,7 +885,7 @@
 
 static void resize_c(pixel *dst, const ptrdiff_t dst_stride,
                      const pixel *src, const ptrdiff_t src_stride,
-                     const int dst_w, const int src_w, int h,
+                     const int dst_w, int h, const int src_w,
                      const int dx, const int mx0 HIGHBD_DECL_SUFFIX)
 {
     do {
--- a/src/recon_tmpl.c
+++ b/src/recon_tmpl.c
@@ -2013,9 +2013,10 @@
             const int src_w = (4 * f->bw + ss_hor) >> ss_hor;
             const int img_h = (f->cur.p.h - sbsz * 4 * sby + ss_ver) >> ss_ver;
 
-            f->dsp->mc.resize(dst, dst_stride, src, src_stride, dst_w, src_w,
-                              imin(img_h, h_end) + h_start, f->resize_step[!!pl],
-                              f->resize_start[!!pl] HIGHBD_CALL_SUFFIX);
+            f->dsp->mc.resize(dst, dst_stride, src, src_stride, dst_w,
+                              imin(img_h, h_end) + h_start, src_w,
+                              f->resize_step[!!pl], f->resize_start[!!pl]
+                              HIGHBD_CALL_SUFFIX);
         }
     }
     if (f->lf.restore_planes) {