[FFmpeg-devel] [PATCH] Simplify getSubSampleFactors()

Michael Niedermayer michaelni
Sat Jan 2 21:04:29 CET 2010


On Sat, Jan 02, 2010 at 12:29:35PM +0100, Stefano Sabatini wrote:
[...]
> @@ -2278,7 +2278,7 @@
>  }
>  
>  
> -static void getSubSampleFactors(int *h, int *v, int format)
> +static void getSubSampleFactors_(int *h, int *v, int format)
>  {
>      switch(format) {
>      case PIX_FMT_UYVY422:

this is not the right place for your submission to the obfuscated code contest


> @@ -2329,6 +2329,12 @@
>      }
>  }
>  
> +static void getSubSampleFactors(int *h, int *v, int format)
> +{
> +    *h = av_pix_fmt_descriptors[format].log2_chroma_w;
> +    *v = av_pix_fmt_descriptors[format].log2_chroma_h;
> +}
> +
>  static uint16_t roundToInt16(int64_t f)
>  {
>      int r= (f + (1<<15))>>16;

ok

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

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- 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-devel/attachments/20100102/2637d210/attachment.pgp>



More information about the ffmpeg-devel mailing list