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

conrad subversion at mplayerhq.hu
Tue Nov 11 09:38:11 CET 2008


Author: conrad
Date: Tue Nov 11 09:38:10 2008
New Revision: 3813

Log:
It's not clear to me how to handle greater than 8 bitdepth, so remove
luma/chroma depth from source_params and warn that values greater than 8
probably won't work


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

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Tue Nov 11 09:38:10 2008
@@ -181,6 +181,7 @@ static int parse_source_parameters(AVCod
 {
     GetBitContext *gb = &s->gb;
     AVRational frame_rate;
+    unsigned luma_depth, chroma_depth;
 
     /* Override the luma dimensions. */
     if (get_bits1(gb)) {
@@ -321,8 +322,10 @@ static int parse_source_parameters(AVCod
     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);
+    luma_depth   = av_log2(s->source.luma_excursion   + 1);
+    chroma_depth = av_log2(s->source.chroma_excursion + 1);
+    if (luma_depth > 8 || chroma_depth > 8)
+        av_log(avctx, AV_LOG_WARNING, "Bitdepth greater than 8, may not work");
 
     return 0;
 }

Modified: dirac/libavcodec/dirac.h
==============================================================================
--- dirac/libavcodec/dirac.h	(original)
+++ dirac/libavcodec/dirac.h	Tue Nov 11 09:38:10 2008
@@ -92,8 +92,6 @@ typedef struct {
     /* calculated fields */
     unsigned int chroma_width;         ///< the chroma component width
     unsigned int chroma_height;        ///< the chroma component height
-    unsigned int luma_depth;
-    unsigned int chroma_depth;
 
     /* luma and chroma offsets */
     uint16_t luma_offset;



More information about the FFmpeg-soc mailing list