[MPlayer-dev-eng] [PATCH] yadif SSE2/SSSE3 optimization

Michael Niedermayer michaelni at gmx.at
Fri Nov 21 22:50:29 CET 2008


    On Wed, Nov 19, 2008 at 11:22:50PM +0800, Zhou, Zongyi wrote:
> Hi Michael,
>     Plz review the new patch. All duplicated codes are now factorized in macros.
> Regards,
> ZZ
[...]


> Index: libmpcodecs/vf_yadif.c
> ===================================================================
> --- libmpcodecs/vf_yadif.c	(revision 27958)
> +++ libmpcodecs/vf_yadif.c	(working copy)
> @@ -42,6 +42,12 @@
>  //===========================================================================//
>  
>  struct vf_priv_s {
> +#if defined(HAVE_MMX) && defined(NAMED_ASM_ARGS)
> +	DECLARE_ALIGNED(16, uint8_t, tmp0[16]);
> +	DECLARE_ALIGNED(16, uint8_t, tmp1[16]);
> +	DECLARE_ALIGNED(16, uint8_t, tmp2[16]);
> +	DECLARE_ALIGNED(16, uint8_t, tmp3[16]);
> +#endif
>      int mode;
>      int parity;
>      int buffered_i;

please dont add tabs to vf_yadif.c whitespce should be just spaces


> @@ -70,216 +76,268 @@
>  
>  #if defined(HAVE_MMX) && defined(NAMED_ASM_ARGS)
>  
> -#define LOAD4(mem,dst) \
> -            "movd      "mem", "#dst" \n\t"\
> -            "punpcklbw %%mm7, "#dst" \n\t"
> +#define LOAD(mem,dst) \
> +            _MOV mem", "_MM#dst" \n\t"\
> +			"punpcklbw "_MM"7, "_MM#dst" \n\t"

things starting with _ are reserved in C
also please split the cosmetic stuff like above into a seperate
patch from the additon of SSE2. This makes the code much easier to
review as first just needs to be checked for not "changing" anything
and the second patch likely will be rather small



[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081121/288909b9/attachment.pgp>


More information about the MPlayer-dev-eng mailing list