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

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