[FFmpeg-soc] [soc]: r885 - dirac/libavcodec/dirac.c

marco subversion at mplayerhq.hu
Thu Aug 16 17:29:29 CEST 2007


Author: marco
Date: Thu Aug 16 17:29:29 2007
New Revision: 885

Log:
simplify calculation of hshift and vshift

Modified:
   dirac/libavcodec/dirac.c

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Thu Aug 16 17:29:29 2007
@@ -425,8 +425,8 @@ static void parse_sequence_parameters(Di
         s->sequence.chroma_format = svq3_get_ue_golomb(gb);
 
     /* Calculate the chroma dimensions.  */
-    s->chroma_hshift = (s->sequence.chroma_format == 0 ? 0 : 1);
-    s->chroma_vshift = (s->sequence.chroma_format <= 1 ? 0 : 1);
+    s->chroma_hshift = s->sequence.chroma_format > 0;
+    s->chroma_vshift = s->sequence.chroma_format > 1;
     s->sequence.chroma_width  = s->sequence.luma_width  >> s->chroma_hshift;
     s->sequence.chroma_height = s->sequence.luma_height >> s->chroma_vshift;
 



More information about the FFmpeg-soc mailing list