[xiph-commits] r13974 - trunk/theora/doc/spec

giles at svn.xiph.org giles at svn.xiph.org
Fri Oct 12 21:06:59 PDT 2007


Author: giles
Date: 2007-10-12 21:06:59 -0700 (Fri, 12 Oct 2007)
New Revision: 13974

Modified:
   trunk/theora/doc/spec/vp3huff.c
Log:
Add a copyright header and th namespace prefixes to vp3huff.


Modified: trunk/theora/doc/spec/vp3huff.c
===================================================================
--- trunk/theora/doc/spec/vp3huff.c	2007-10-12 22:11:16 UTC (rev 13973)
+++ trunk/theora/doc/spec/vp3huff.c	2007-10-13 04:06:59 UTC (rev 13974)
@@ -1,3 +1,20 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2007                *
+ * by the Xiph.Org Foundation http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+    function: dump the VP3.1 huffman tables in a form suitable for
+	inclusion in the spec.
+    last mod: $Id$
+
+ ********************************************************************/
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -14,7 +31,7 @@
 /*The default Huffman codes used for VP3.1.
   These tables were generated by /experimental/derf/theora-exp/tools/huffgen.c
    using the same algorithm and sampled frequency counts used by VP3.*/
-const theora_huff_code OC_VP31_HUFF_CODES[80][32]={
+const theora_huff_code TH_VP31_HUFF_CODES[80][32]={
   {
     {0x002D, 6},{0x0026, 7},{0x0166, 9},{0x004E, 8},
     {0x02CE,10},{0x059E,11},{0x027D,11},{0x0008, 5},
@@ -828,27 +845,27 @@
   int           shift;
   /*The token this bit pattern represents.*/
   int           token;
-}oc_huff_entry;
+}th_huff_entry;
 
 
 
-/*Compares two oc_huff_entry structures by their bit patterns.
+/*Compares two th_huff_entry structures by their bit patterns.
   _c1: The first entry to compare.
   _c2: The second entry to compare.
   Return: <0 if _c1<_c2, >0 if _c1>_c2.*/
 static int huff_entry_cmp(const void *_c1,const void *_c2){
   unsigned long b1;
   unsigned long b2;
-  b1=((const oc_huff_entry *)_c1)->pattern;
-  b2=((const oc_huff_entry *)_c2)->pattern;
+  b1=((const th_huff_entry *)_c1)->pattern;
+  b2=((const th_huff_entry *)_c2)->pattern;
   return b1<b2?-1:b1>b2?1:0;
 }
 
-int oc_huff_codes2latex(const theora_huff_code _codes[80][32]){
+int th_huff_codes2latex(const theora_huff_code _codes[80][32]){
   int i;
   printf("\\twocolumn\n");
   for(i=0;i<80;i++){
-    oc_huff_entry entries[32];
+    th_huff_entry entries[32];
     int           bpos;
     int           maxlen;
     int           mask;
@@ -897,6 +914,6 @@
 }
 
 int main(int _argc,char **_argv){
-  oc_huff_codes2latex(OC_VP31_HUFF_CODES);
+  th_huff_codes2latex(TH_VP31_HUFF_CODES);
   return 0;
 }


Property changes on: trunk/theora/doc/spec/vp3huff.c
___________________________________________________________________
Name: svn:keywords
   + Id



More information about the commits mailing list