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

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