[FFmpeg-soc] [PATCH][1/4] simpleCopy splitted into simpleCopy and grayuvCopy

Michael Niedermayer michaelni at gmx.at
Fri Jul 4 16:45:05 CEST 2008


On Fri, Jul 04, 2008 at 01:46:27PM +0900, Keiji Costantini wrote:
> Those patches are for the mainline branch. I am converting my patches for 
> this branch from my one.
> -- 
>
> Keiji Costantini
>
>

> >From 401dd7f0e373d75648415b69a4f80fd6ee5299b0 Mon Sep 17 00:00:00 2001
> From: Keiji Costantini <lists at strites.net>
> Date: Sun, 22 Jun 2008 17:38:13 +0200
> Subject: [PATCH] simpleCopy splitted into simpleCopy and grayuvCopy
> 
> ---
>  swscale.c |   21 ++++++++++++++-------
>  1 files changed, 14 insertions(+), 7 deletions(-)
> 
> diff --git a/swscale.c b/swscale.c
> index 069d75e..891c7f2 100644
> --- a/swscale.c
> +++ b/swscale.c

> @@ -1651,8 +1651,7 @@ static int yvu9toyv12Wrapper(SwsContext *c, uint8_t* src[], int srcStride[], int
>  static int simpleCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
>                        int srcSliceH, uint8_t* dst[], int dstStride[]){

packedCopy()


>  
> -    if (isPacked(c->srcFormat))
> -    {
> +
>          if (dstStride[0]==srcStride[0] && srcStride[0] > 0)
>              memcpy(dst[0] + dstStride[0]*srcSliceY, src[0], srcSliceH*dstStride[0]);
>          else
> @@ -1674,9 +1673,13 @@ static int simpleCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli
>                  dstPtr+= dstStride[0];
>              }
>          }
> -    }
> -    else
> -    { /* Planar YUV or gray */
> +
> +    return srcSliceH;
> +}

> +static int grayuvCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
> +                      int srcSliceH, uint8_t* dst[], int dstStride[])

planarCopy()


> +{
> +
>          int plane;
>          for (plane=0; plane<3; plane++)
>          {
> @@ -1707,7 +1710,7 @@ static int simpleCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli
>                  }
>              }
>          }
> -    }
> +
>      return srcSliceH;
>  }
>  

> @@ -2125,9 +2128,13 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH
>              || (isPlanarYUV(srcFormat) && isGray(dstFormat))
>              || (isPlanarYUV(dstFormat) && isGray(srcFormat)))
>          {
> -            c->swScale= simpleCopy;
> +             if (isPacked(c->srcFormat))
> +                 c->swScale= simpleCopy;
> +             else /* Planar YUV or gray */
> +                 c->swScale= grayuvCopy;

indention is wrong


>          }
>  
> +
>          /* gray16{le,be} conversions */

cosmetic


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I wish the Xiph folks would stop pretending they've got something they
do not.  Somehow I fear this will remain a wish. -- Måns Rullgård
-------------- 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/ffmpeg-soc/attachments/20080704/e3e7458c/attachment.pgp>


More information about the FFmpeg-soc mailing list