[0.11] gst-plugins-bad: codecparsers: VC1: Some cosmetics and debug logging enhancements

Wim Taymans wtay at kemper.freedesktop.org
Tue Oct 18 05:32:28 PDT 2011


Module: gst-plugins-bad
Branch: 0.11
Commit: 80906275816a27abd2943b7e4fce9f78d5062654
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=80906275816a27abd2943b7e4fce9f78d5062654

Author: Thibault Saunier <thibault.saunier at collabora.com>
Date:   Tue Oct  4 17:39:00 2011 -0300

codecparsers: VC1: Some cosmetics and debug logging enhancements

---

 gst-libs/gst/codecparsers/gstvc1parser.c |   15 ++++++++++-----
 gst-libs/gst/codecparsers/gstvc1parser.h |    6 +++---
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c
index bf555f2..b724a9e 100644
--- a/gst-libs/gst/codecparsers/gstvc1parser.c
+++ b/gst-libs/gst/codecparsers/gstvc1parser.c
@@ -401,9 +401,11 @@ decode_vlc (GstBitReader * br, guint * res, const VLCTable * table,
     }
   }
 
+  GST_DEBUG ("Did not find code");
+
 failed:
   {
-    GST_DEBUG ("Could not decode VLC returning -1");
+    GST_WARNING ("Could not decode VLC returning");
 
     return FALSE;
   }
@@ -421,6 +423,8 @@ bitplane_decoding (GstBitReader * br, guint8 * data,
   guint x, y, v;
   guint8 *pdata = data;
 
+  *is_raw = FALSE;
+
   GET_BITS (br, 1, &invert);
   invert_mask = -invert;
 
@@ -438,7 +442,7 @@ bitplane_decoding (GstBitReader * br, guint8 * data,
 
     case IMODE_DIFF2:
       invert_mask = 0;
-      // fall-through
+      /* fall-through */
     case IMODE_NORM2:
 
       GST_DEBUG ("Parsing IMODE_DIFF2 or IMODE_NORM2 biplane");
@@ -476,7 +480,7 @@ bitplane_decoding (GstBitReader * br, guint8 * data,
 
     case IMODE_DIFF6:
       invert_mask = 0;
-      // fall-through
+      /* fall-through */
     case IMODE_NORM6:
 
       GST_DEBUG ("Parsing IMODE_DIFF6 or IMODE_NORM6 biplane");
@@ -1773,13 +1777,13 @@ gst_vc1_parse_frame_layer (const guint8 * data, gsize size,
  * gst_vc1_parse_frame_header:
  * @data: The data to parse
  * @size: the size of @data
- * @entrypoint: The #GstVC1EntryPointHdr to set.
+ * @framehdr: The #GstVC1FrameHdr to fill.
  * @seqhdr: The #GstVC1SeqHdr currently being parsed
  * @bitplanes: The #GstVC1BitPlanes to store bitplanes in or %NULL
  *
  * Parses @data, and fills @entrypoint fields.
  *
- * Returns: a #GstVC1EntryPointHdr
+ * Returns: a #GstVC1ParserResult
  */
 GstVC1ParserResult
 gst_vc1_parse_frame_header (const guint8 * data, gsize size,
@@ -1885,5 +1889,6 @@ gst_vc1_bitplanes_ensure_size (GstVC1BitPlanes * bitplanes,
     bitplanes->skipmb = g_malloc0 (bitplanes->size * sizeof (guint8));
     bitplanes->directmb = g_malloc0 (bitplanes->size * sizeof (guint8));
   }
+
   return TRUE;
 }
diff --git a/gst-libs/gst/codecparsers/gstvc1parser.h b/gst-libs/gst/codecparsers/gstvc1parser.h
index 8cdb60c..dc0dc6f 100644
--- a/gst-libs/gst/codecparsers/gstvc1parser.h
+++ b/gst-libs/gst/codecparsers/gstvc1parser.h
@@ -82,9 +82,9 @@ typedef enum
 
 typedef enum
 {
-    GST_VC1_LEVEL_LOW   = 0,    /* Simple/Main profile low level */
-    GST_VC1_LEVELMEDIUM = 1,    /* Simple/Main profile medium level */
-    GST_VC1_LEVELHIGH   = 2,    /* Main profile high level */
+    GST_VC1_LEVEL_LOW    = 0,    /* Simple/Main profile low level */
+    GST_VC1_LEVEL_MEDIUM = 1,    /* Simple/Main profile medium level */
+    GST_VC1_LEVEL_HIGH   = 2,   /* Main profile high level */
 
     GST_VC1_LEVEL_L0    = 0,    /* Advanced profile level 0 */
     GST_VC1_LEVEL_L1    = 1,    /* Advanced profile level 1 */



More information about the gstreamer-commits mailing list