[xiph-commits] r15218 - trunk/theora/lib/dec

tterribe at svn.xiph.org tterribe at svn.xiph.org
Fri Aug 29 06:34:43 PDT 2008


Author: tterribe
Date: 2008-08-29 06:34:42 -0700 (Fri, 29 Aug 2008)
New Revision: 15218

Modified:
   trunk/theora/lib/dec/decode.c
Log:
Drop an unused variable that escaped the debugging code cleanup, and save two
 cycles in the block qi decode that no one even uses yet.


Modified: trunk/theora/lib/dec/decode.c
===================================================================
--- trunk/theora/lib/dec/decode.c	2008-08-29 00:04:16 UTC (rev 15217)
+++ trunk/theora/lib/dec/decode.c	2008-08-29 13:34:42 UTC (rev 15218)
@@ -443,7 +443,7 @@
   oc_mb               *mb;
   oc_mb               *mb_end;
   const int           *alphabet;
-  long                 val,j;
+  long                 val;
   int                  scheme0_alphabet[8];
   int                  mode_scheme;
   theorapackB_read(&_dec->opb,3,&val);
@@ -654,7 +654,7 @@
   else{
     long val;
     int  flag;
-    int  nqi0;
+    int  nqi1;
     int  run_count;
     /*Otherwise, we decode a qi index for each fragment, using two passes of
       the same binary RLE scheme used for super-block coded bits.
@@ -666,14 +666,14 @@
       with the corresponding qi's for this frame.*/
     theorapackB_read1(&_dec->opb,&val);
     flag=(int)val;
-    run_count=nqi0=0;
+    run_count=nqi1=0;
     while(coded_fragi<coded_fragi_end){
       int full_run;
       run_count=oc_sb_run_unpack(&_dec->opb);
       full_run=run_count>=4129;
       do{
         _dec->state.frags[*coded_fragi++].qi=flag;
-        nqi0+=!flag;
+        nqi1+=flag;
       }
       while(--run_count>0&&coded_fragi<coded_fragi_end);
       if(full_run&&coded_fragi<coded_fragi_end){
@@ -686,7 +686,7 @@
       If it's not, we should issue a warning of some kind.*/
     /*If we have 3 different qi's for this frame, and there was at least one
        fragment with a non-zero qi, make the second pass.*/
-    if(_dec->state.nqis==3&&nqi0<ncoded_fragis){
+    if(_dec->state.nqis==3&&nqi1>0){
       /*Skip qii==0 fragments.*/
       for(coded_fragi=_dec->state.coded_fragis;
        _dec->state.frags[*coded_fragi].qi==0;coded_fragi++);



More information about the commits mailing list