diff options
author | Martin Storsjö <martin@martin.st> | 2016-11-03 09:12:02 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2016-11-03 09:12:02 +0200 |
commit | 2e55e26b40e269816bba54da7d0e03955731b8fe (patch) | |
tree | f6f3e2ec5998524f00d9172115fca48c83b04b82 /libavcodec/x86 | |
parent | e3fb74f7f9a8f1895381355f40c92cac3c1023d9 (diff) | |
download | ffmpeg-2e55e26b40e269816bba54da7d0e03955731b8fe.tar.gz |
vp9: Flip the order of arguments in MC functions
This makes it match the pattern already used for VP8 MC functions.
This also makes the signature match ffmpeg's version of these
functions, easing porting of code in both directions.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/x86')
-rw-r--r-- | libavcodec/x86/vp9dsp_init.c | 34 | ||||
-rw-r--r-- | libavcodec/x86/vp9mc.asm | 20 |
2 files changed, 27 insertions, 27 deletions
diff --git a/libavcodec/x86/vp9dsp_init.c b/libavcodec/x86/vp9dsp_init.c index 3b9e1bb0ca..58aedcbd2d 100644 --- a/libavcodec/x86/vp9dsp_init.c +++ b/libavcodec/x86/vp9dsp_init.c @@ -29,10 +29,9 @@ #if HAVE_YASM -#define fpel_func(avg, sz, opt) \ -void ff_vp9_ ## avg ## sz ## _ ## opt(uint8_t *dst, const uint8_t *src, \ - ptrdiff_t dst_stride, \ - ptrdiff_t src_stride, \ +#define fpel_func(avg, sz, opt) \ +void ff_vp9_ ## avg ## sz ## _ ## opt(uint8_t *dst, ptrdiff_t dst_stride, \ + const uint8_t *src, ptrdiff_t src_stride, \ int h, int mx, int my) fpel_func(put, 4, mmx); @@ -54,8 +53,8 @@ fpel_func(avg, 64, avx2); #define mc_func(avg, sz, dir, opt, type, f_sz) \ void \ ff_vp9_ ## avg ## _8tap_1d_ ## dir ## _ ## sz ## _ ## opt(uint8_t *dst, \ - const uint8_t *src, \ ptrdiff_t dst_stride, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int h, \ const type (*filter)[f_sz]) @@ -81,20 +80,21 @@ mc_funcs(32, avx2, int8_t, 32); #define mc_rep_func(avg, sz, hsz, dir, opt, type, f_sz) \ static av_always_inline void \ ff_vp9_ ## avg ## _8tap_1d_ ## dir ## _ ## sz ## _ ## opt(uint8_t *dst, \ - const uint8_t *src, \ ptrdiff_t dst_stride, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int h, \ const type (*filter)[f_sz]) \ { \ - ff_vp9_ ## avg ## _8tap_1d_ ## dir ## _ ## hsz ## _ ## opt(dst, src, \ + ff_vp9_ ## avg ## _8tap_1d_ ## dir ## _ ## hsz ## _ ## opt(dst, \ dst_stride, \ + src, \ src_stride, \ h, \ filter); \ ff_vp9_ ## avg ## _8tap_1d_ ## dir ## _ ## hsz ## _ ## opt(dst + hsz, \ - src + hsz, \ dst_stride, \ + src + hsz, \ src_stride, \ h, filter); \ } @@ -126,19 +126,18 @@ extern const int16_t ff_filters_sse2[3][15][8][8]; #define filter_8tap_2d_fn(op, sz, f, f_opt, fname, align, opt) \ static void \ op ## _8tap_ ## fname ## _ ## sz ## hv_ ## opt(uint8_t *dst, \ - const uint8_t *src, \ ptrdiff_t dst_stride, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int h, int mx, int my) \ { \ LOCAL_ALIGNED_ ## align(uint8_t, temp, [71 * 64]); \ - ff_vp9_put_8tap_1d_h_ ## sz ## _ ## opt(temp, src - 3 * src_stride, \ - 64, src_stride, \ - h + 7, \ + ff_vp9_put_8tap_1d_h_ ## sz ## _ ## opt(temp, 64, \ + src - 3 * src_stride, \ + src_stride, h + 7, \ ff_filters_ ## f_opt[f][mx - 1]); \ - ff_vp9_ ## op ## _8tap_1d_v_ ## sz ## _ ## opt(dst, temp + 3 * 64, \ - dst_stride, 64, \ - h, \ + ff_vp9_ ## op ## _8tap_1d_v_ ## sz ## _ ## opt(dst, dst_stride, \ + temp + 3 * 64, 64, h, \ ff_filters_ ## f_opt[f][my - 1]); \ } @@ -173,14 +172,15 @@ filters_8tap_2d_fn(avg, 32, 32, avx2, ssse3) #define filter_8tap_1d_fn(op, sz, f, f_opt, fname, dir, dvar, opt) \ static void \ op ## _8tap_ ## fname ## _ ## sz ## dir ## _ ## opt(uint8_t *dst, \ - const uint8_t *src, \ ptrdiff_t dst_stride, \ + const uint8_t *src, \ ptrdiff_t src_stride, \ int h, int mx, \ int my) \ { \ - ff_vp9_ ## op ## _8tap_1d_ ## dir ## _ ## sz ## _ ## opt(dst, src, \ + ff_vp9_ ## op ## _8tap_1d_ ## dir ## _ ## sz ## _ ## opt(dst, \ dst_stride, \ + src, \ src_stride, h,\ ff_filters_ ## f_opt[f][dvar - 1]); \ } diff --git a/libavcodec/x86/vp9mc.asm b/libavcodec/x86/vp9mc.asm index 15e93ea6cb..c9701aea18 100644 --- a/libavcodec/x86/vp9mc.asm +++ b/libavcodec/x86/vp9mc.asm @@ -107,7 +107,7 @@ SECTION .text %macro filter_sse2_h_fn 1 %assign %%px mmsize/2 -cglobal vp9_%1_8tap_1d_h_ %+ %%px, 6, 6, 15, dst, src, dstride, sstride, h, filtery +cglobal vp9_%1_8tap_1d_h_ %+ %%px, 6, 6, 15, dst, dstride, src, sstride, h, filtery pxor m5, m5 mova m6, [pw_64] mova m7, [filteryq+ 0] @@ -192,7 +192,7 @@ filter_sse2_h_fn avg %macro filter_h_fn 1 %assign %%px mmsize/2 -cglobal vp9_%1_8tap_1d_h_ %+ %%px, 6, 6, 11, dst, src, dstride, sstride, h, filtery +cglobal vp9_%1_8tap_1d_h_ %+ %%px, 6, 6, 11, dst, dstride, src, sstride, h, filtery mova m6, [pw_256] mova m7, [filteryq+ 0] %if ARCH_X86_64 && mmsize > 8 @@ -253,7 +253,7 @@ filter_h_fn avg %if ARCH_X86_64 %macro filter_hx2_fn 1 %assign %%px mmsize -cglobal vp9_%1_8tap_1d_h_ %+ %%px, 6, 6, 14, dst, src, dstride, sstride, h, filtery +cglobal vp9_%1_8tap_1d_h_ %+ %%px, 6, 6, 14, dst, dstride, src, sstride, h, filtery mova m13, [pw_256] mova m8, [filteryq+ 0] mova m9, [filteryq+32] @@ -315,9 +315,9 @@ filter_hx2_fn avg %macro filter_sse2_v_fn 1 %assign %%px mmsize/2 %if ARCH_X86_64 -cglobal vp9_%1_8tap_1d_v_ %+ %%px, 6, 8, 15, dst, src, dstride, sstride, h, filtery, src4, sstride3 +cglobal vp9_%1_8tap_1d_v_ %+ %%px, 6, 8, 15, dst, dstride, src, sstride, h, filtery, src4, sstride3 %else -cglobal vp9_%1_8tap_1d_v_ %+ %%px, 4, 7, 15, dst, src, dstride, sstride, filtery, src4, sstride3 +cglobal vp9_%1_8tap_1d_v_ %+ %%px, 4, 7, 15, dst, dstride, src, sstride, filtery, src4, sstride3 mov filteryq, r5mp %define hd r4mp %endif @@ -413,9 +413,9 @@ filter_sse2_v_fn avg %macro filter_v_fn 1 %assign %%px mmsize/2 %if ARCH_X86_64 -cglobal vp9_%1_8tap_1d_v_ %+ %%px, 6, 8, 11, dst, src, dstride, sstride, h, filtery, src4, sstride3 +cglobal vp9_%1_8tap_1d_v_ %+ %%px, 6, 8, 11, dst, dstride, src, sstride, h, filtery, src4, sstride3 %else -cglobal vp9_%1_8tap_1d_v_ %+ %%px, 4, 7, 11, dst, src, dstride, sstride, filtery, src4, sstride3 +cglobal vp9_%1_8tap_1d_v_ %+ %%px, 4, 7, 11, dst, dstride, src, sstride, filtery, src4, sstride3 mov filteryq, r5mp %define hd r4mp %endif @@ -486,7 +486,7 @@ filter_v_fn avg %macro filter_vx2_fn 1 %assign %%px mmsize -cglobal vp9_%1_8tap_1d_v_ %+ %%px, 6, 8, 14, dst, src, dstride, sstride, h, filtery, src4, sstride3 +cglobal vp9_%1_8tap_1d_v_ %+ %%px, 6, 8, 14, dst, dstride, src, sstride, h, filtery, src4, sstride3 mova m13, [pw_256] lea sstride3q, [sstrideq*3] lea src4q, [srcq+sstrideq] @@ -562,11 +562,11 @@ filter_vx2_fn avg %endif %if %2 <= mmsize -cglobal vp9_%1%2, 5, 7, 4, dst, src, dstride, sstride, h, dstride3, sstride3 +cglobal vp9_%1%2, 5, 7, 4, dst, dstride, src, sstride, h, dstride3, sstride3 lea sstride3q, [sstrideq*3] lea dstride3q, [dstrideq*3] %else -cglobal vp9_%1%2, 5, 5, 4, dst, src, dstride, sstride, h +cglobal vp9_%1%2, 5, 5, 4, dst, dstride, src, sstride, h %endif .loop: %%srcfn m0, [srcq] |