[FFmpeg-devel] [PATCH v2 2/2] avfilter/interlace: add complex vertical low-pass filter
Michael Niedermayer
michael at niedermayer.cc
Thu Apr 13 00:09:25 EEST 2017
On Thu, Mar 30, 2017 at 12:21:58AM +0000, Thomas Mundt wrote:
> >>Lou Logan <lou at lrcd.com> schrieb am Do, 30.3.2017:
> > On Mon, 13 Mar 2017 16:23:46 +0000 (UTC)
> > Thomas Mundt <loudmax-at-yahoo.de at ffmpeg.org> wrote:
> >
> > [...]
> >> index 09ca4d3..0b5b858 100644
> >> --- a/libavfilter/vf_tinterlace.c
> >> +++ b/libavfilter/vf_tinterlace.c
> > [...]
> >> +static void lowpass_line_complex_c(uint8_t *dstp, ptrdiff_t width, const uint8_t *srcp,
> >> + ptrdiff_t mref, ptrdiff_t pref)
> >
> > Trailing whitespace should be avoided. It prevents the patch from being
> > applied.
>
> Oh, didnĀ“t notice. Thanks.
> New patch set attached.
[...]
> --- a/libavfilter/x86/vf_interlace.asm
> +++ b/libavfilter/x86/vf_interlace.asm
> @@ -28,33 +28,28 @@ SECTION_RODATA
> SECTION .text
>
> %macro LOWPASS_LINE 0
> -cglobal lowpass_line, 5, 5, 7
> - add r0, r1
> - add r2, r1
> - add r3, r1
> - add r4, r1
> - neg r1
> -
> +cglobal lowpass_line, 5, 5, 7, dst, h, src, mref, pref
> pcmpeqb m6, m6
> -
> .loop:
> - mova m0, [r3+r1]
> - mova m1, [r3+r1+mmsize]
> - pavgb m0, [r4+r1]
> - pavgb m1, [r4+r1+mmsize]
> + mova m0, [srcq+mrefq]
> + mova m1, [srcq+mrefq+mmsize]
> + pavgb m0, [srcq+prefq]
> + pavgb m1, [srcq+prefq+mmsize]
> pxor m0, m6
> pxor m1, m6
> - pxor m2, m6, [r2+r1]
> - pxor m3, m6, [r2+r1+mmsize]
> + pxor m2, m6, [srcq]
> + pxor m3, m6, [srcq+mmsize]
> pavgb m0, m2
> pavgb m1, m3
> pxor m0, m6
> pxor m1, m6
> - mova [r0+r1], m0
> - mova [r0+r1+mmsize], m1
> + mova [dstq], m0
> + mova [dstq+mmsize], m1
>
> - add r1, 2*mmsize
> - jl .loop
> + add dstq, 2*mmsize
> + add srcq, 2*mmsize
> + sub hd, 2*mmsize
> + jg .loop
this increases the number of instructions in the inner loop by 2
also can you add a fate test for the -1 2 6 2-1 filter ?
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170412/f66109de/attachment.sig>
More information about the ffmpeg-devel
mailing list