[FFmpeg-devel] [PATCH] v210enc: Add SIMD optimised 8-bit and 10-bit encoders

Michael Niedermayer michaelni at gmx.at
Wed Nov 26 20:25:54 CET 2014


On Wed, Nov 26, 2014 at 05:44:37PM +0100, Michael Niedermayer wrote:
> On Wed, Nov 26, 2014 at 03:59:14PM +0000, Kieran Kunhya wrote:
> > ---
> >  libavcodec/v210enc.c          | 191 +++++++++++++++++++++++++++++++++---------
> >  libavcodec/v210enc.h          |  33 ++++++++
> >  libavcodec/x86/Makefile       |   2 +
> >  libavcodec/x86/v210enc.asm    | 146 ++++++++++++++++++++++++++++++++
> >  libavcodec/x86/v210enc_init.c |  37 ++++++++
> >  libavutil/x86/x86util.asm     |   5 ++
> >  6 files changed, 373 insertions(+), 41 deletions(-)
> >  create mode 100644 libavcodec/v210enc.h
> >  create mode 100644 libavcodec/x86/v210enc.asm
> >  create mode 100644 libavcodec/x86/v210enc_init.c
> 
> breaks fate, also judging purely from the numbers it would be worse
> quality wise
> 
> --- ./tests/ref/vsynth/vsynth1-v210     2014-11-26 16:30:08.642024147 +0100
> +++ tests/data/fate/vsynth1-v210        2014-11-26 17:41:43.134114620 +0100
> @@ -1,4 +1,4 @@
> -895d30660eb4da017568141a8d1df4e8 *tests/data/fate/vsynth1-v210.avi
> +a98ae536d6362c6841744ef42e9ea8e1 *tests/data/fate/vsynth1-v210.avi
>  14752448 tests/data/fate/vsynth1-v210.avi
> -50973792d3f1abe04a51ee0121f077f2 *tests/data/fate/vsynth1-v210.out.rawvideo
> -stddev:    1.85 PSNR: 42.78 MAXDIFF:   29 bytes:  7603200/  7603200
> +fc1d9531a1d2c05b0099fb93a47f4e05 *tests/data/fate/vsynth1-v210.out.rawvideo
> +stddev:    9.56 PSNR: 28.52 MAXDIFF:  196 bytes:  7603200/  7603200

this fixes it (only remainig is some ronding difference from sws and
v210 converting a bit different

diff --git a/libavcodec/x86/v210enc.asm b/libavcodec/x86/v210enc.asm
index 9442bb2..3245de3 100644
--- a/libavcodec/x86/v210enc.asm
+++ b/libavcodec/x86/v210enc.asm
@@ -39,7 +39,7 @@ v210_enc_luma_shuf_8: db 6,-1,7,-1,8,-1,9,-1,10,-1,11,-1,-1,-1,-1,-1
 v210_enc_luma_mult_8: dw 16,4,64,16,4,64,0,0

 v210_enc_chroma_shuf1_8: db 0,-1,1,-1,2,-1,3,-1,8,-1,9,-1,10,-1,11,-1
-v210_enc_chroma_shuf2_8: db 4,-1,5,-1,6,-1,7,-1,12,-1,13,-1,14,-1,15,-1
+v210_enc_chroma_shuf2_8: db 3,-1,4,-1,5,-1,7,-1,11,-1,12,-1,13,-1,15,-1

 v210_enc_chroma_mult_8: dw 4,16,64,0,64,4,16,0







> 
> PS: Thanks for posting a patch which applied cleanly!
> 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> No human being will ever know the Truth, for even if they happen to say it
> by chance, they would not even known they had done so. -- Xenophanes



> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141126/6441d6f7/attachment.asc>


More information about the ffmpeg-devel mailing list