Blame SOURCES/libtheora-1.1.1-fix-pp_sharp_mod-calc.patch

bad9ab
pp_sharp_modr18268 | tterribe | 2012-05-08 03:51:57 +0100 (Tue, 08 May 2012) | 8 lines
bad9ab
bad9ab
Fix pp_sharp_mod calculation.
bad9ab
bad9ab
This was broken when the dequant_tables indexing changed in commit
bad9ab
 r16102, but it only affected post-processing quality, so we never
bad9ab
 noticed.
bad9ab
With gcc 4.8.0, this can now trigger a segfault during decoder
bad9ab
 initialization.
bad9ab
bad9ab
--- a/lib/decode.c	(revision 18267)
bad9ab
+++ b/lib/decode.c	(revision 18268)
bad9ab
@@ -400,10 +400,10 @@
bad9ab
     int qsum;
bad9ab
     qsum=0;
bad9ab
     for(qti=0;qti<2;qti++)for(pli=0;pli<3;pli++){
bad9ab
-      qsum+=_dec->state.dequant_tables[qti][pli][qi][12]+
bad9ab
-       _dec->state.dequant_tables[qti][pli][qi][17]+
bad9ab
-       _dec->state.dequant_tables[qti][pli][qi][18]+
bad9ab
-       _dec->state.dequant_tables[qti][pli][qi][24]<<(pli==0);
bad9ab
+      qsum+=_dec->state.dequant_tables[qi][pli][qti][12]+
bad9ab
+       _dec->state.dequant_tables[qi][pli][qti][17]+
bad9ab
+       _dec->state.dequant_tables[qi][pli][qti][18]+
bad9ab
+       _dec->state.dequant_tables[qi][pli][qti][24]<<(pli==0);
bad9ab
     }
bad9ab
     _dec->pp_sharp_mod[qi]=-(qsum>>11);
bad9ab
   }