[FFmpeg-soc] [soc]: r3773 - in dirac/libavcodec: dirac.h diracdec.c

conrad subversion at mplayerhq.hu
Mon Nov 10 04:11:15 CET 2008


Author: conrad
Date: Mon Nov 10 04:11:14 2008
New Revision: 3773

Log:
Calculate luma and chroma bitdepth


Modified:
   dirac/libavcodec/dirac.h
   dirac/libavcodec/diracdec.c

Modified: dirac/libavcodec/dirac.h
==============================================================================
--- dirac/libavcodec/dirac.h	(original)
+++ dirac/libavcodec/dirac.h	Mon Nov 10 04:11:14 2008
@@ -93,6 +93,8 @@ struct source_parameters
     /* Calculated:  */
     unsigned int chroma_width;              ///< the chroma component width
     unsigned int chroma_height;             ///< the chroma component height
+    unsigned int luma_depth;
+    unsigned int chroma_depth;
 
     AVRational frame_rate;
     AVRational aspect_ratio;

Modified: dirac/libavcodec/diracdec.c
==============================================================================
--- dirac/libavcodec/diracdec.c	(original)
+++ dirac/libavcodec/diracdec.c	Mon Nov 10 04:11:14 2008
@@ -185,6 +185,9 @@ static int parse_source_parameters(Dirac
     s->source.k_r = dirac_preset_kr[s->source.color_spec_index];
     s->source.k_b = dirac_preset_kb[s->source.color_spec_index];
 
+    s->source.luma_depth   = av_log2(s->source.luma_excursion   + 1);
+    s->source.chroma_depth = av_log2(s->source.chroma_excursion + 1);
+
     return 0;
 }
 



More information about the FFmpeg-soc mailing list