[xiph-commits] r15985 - branches/theora-thusnelda/lib/enc
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Thu May 7 12:37:06 PDT 2009
Author: tterribe
Date: 2009-05-07 12:37:05 -0700 (Thu, 07 May 2009)
New Revision: 15985
Modified:
branches/theora-thusnelda/lib/enc/frarray.c
Log:
Check for SB run breaks in the correct place, otherwise they won't actuall get
coded.
Modified: branches/theora-thusnelda/lib/enc/frarray.c
===================================================================
--- branches/theora-thusnelda/lib/enc/frarray.c 2009-05-06 21:56:27 UTC (rev 15984)
+++ branches/theora-thusnelda/lib/enc/frarray.c 2009-05-07 19:37:05 UTC (rev 15985)
@@ -264,19 +264,18 @@
fr->cost++;
fr->sb_partial_last = partial;
}
-
+
+ if(fr->sb_partial_break){
+ if(cpi){
+ cpi->fr_partial[cpi->fr_partial_count] = partial;
+ cpi->fr_partial_bits[cpi->fr_partial_count++] = 1;
+ }
+ fr->cost++;
+ fr->sb_partial_break=0;
+ }
if(fr->sb_partial_last == partial && fr->sb_partial_count < 4129){
fr->sb_partial_count++;
}else{
- if(fr->sb_partial_break){
- if(cpi){
- cpi->fr_partial[cpi->fr_partial_count] = partial;
- cpi->fr_partial_bits[cpi->fr_partial_count++] = 1;
- }
- fr->cost++;
- }
-
- fr->sb_partial_break=0;
if(cpi){
fr->cost+=
cpi->fr_partial_bits[cpi->fr_partial_count] =
@@ -284,7 +283,6 @@
cpi->fr_partial_count++;
}else
fr->cost+=SBRunCost(fr->sb_partial_count);
-
if(fr->sb_partial_count >= 4129) fr->sb_partial_break = 1;
fr->sb_partial_count=1;
}
@@ -301,19 +299,17 @@
fr->cost++;
fr->sb_full_last = fr->sb_coded;
}
-
+ if(fr->sb_full_break){
+ if(cpi){
+ cpi->fr_full[cpi->fr_full_count] = fr->sb_coded;
+ cpi->fr_full_bits[cpi->fr_full_count++] = 1;
+ }
+ fr->cost++;
+ fr->sb_full_break=0;
+ }
if(fr->sb_full_last == fr->sb_coded && fr->sb_full_count < 4129){
fr->sb_full_count++;
}else{
- if(fr->sb_full_break){
- if(cpi){
- cpi->fr_full[cpi->fr_full_count] = fr->sb_coded;
- cpi->fr_full_bits[cpi->fr_full_count++] = 1;
- }
- fr->cost++;
- }
-
- fr->sb_full_break=0;
if(cpi){
fr->cost+=
cpi->fr_full_bits[cpi->fr_full_count] =
More information about the commits
mailing list