Bug 752668 - Fix pp_sharp_mod calculation. r=kinetik, a=akeybl
authorTimothy B. Terriberry <tterribe@vt.edu>
Tue, 15 May 2012 08:42:02 -0400
changeset 95757 12fa346baa18b98a092217e2431cc72a52cdb582
parent 95756 cfeda9529635d0fda66718b23431c9a9ed00369d
child 95758 14759622c2e5f5812dc1e565b9952615d590b61e
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik, akeybl
bugs752668
milestone14.0a2
Bug 752668 - Fix pp_sharp_mod calculation. r=kinetik, a=akeybl
media/libtheora/bug752668-r18268.patch
media/libtheora/lib/decode.c
media/libtheora/update.sh
new file mode 100644
--- /dev/null
+++ b/media/libtheora/bug752668-r18268.patch
@@ -0,0 +1,28 @@
+diff -r 1092c1a3ac50 media/libtheora/lib/decode.c
+--- a/media/libtheora/lib/decode.c	Tue May 08 08:53:50 2012 +0200
++++ b/media/libtheora/lib/decode.c	Tue May 08 01:00:59 2012 -0700
+@@ -395,20 +395,20 @@ static int oc_dec_init(oc_dec_ctx *_dec,
+      _dec->state.dequant_table_data[qi][pli][qti];
+   }
+   oc_dequant_tables_init(_dec->state.dequant_tables,_dec->pp_dc_scale,
+    &_setup->qinfo);
+   for(qi=0;qi<64;qi++){
+     int qsum;
+     qsum=0;
+     for(qti=0;qti<2;qti++)for(pli=0;pli<3;pli++){
+-      qsum+=_dec->state.dequant_tables[qti][pli][qi][12]+
+-       _dec->state.dequant_tables[qti][pli][qi][17]+
+-       _dec->state.dequant_tables[qti][pli][qi][18]+
+-       _dec->state.dequant_tables[qti][pli][qi][24]<<(pli==0);
++      qsum+=_dec->state.dequant_tables[qi][pli][qti][12]+
++       _dec->state.dequant_tables[qi][pli][qti][17]+
++       _dec->state.dequant_tables[qi][pli][qti][18]+
++       _dec->state.dequant_tables[qi][pli][qti][24]<<(pli==0);
+     }
+     _dec->pp_sharp_mod[qi]=-(qsum>>11);
+   }
+   memcpy(_dec->state.loop_filter_limits,_setup->qinfo.loop_filter_limits,
+    sizeof(_dec->state.loop_filter_limits));
+   oc_dec_accel_init(_dec);
+   _dec->pp_level=OC_PP_LEVEL_DISABLED;
+   _dec->dc_qis=NULL;
--- a/media/libtheora/lib/decode.c
+++ b/media/libtheora/lib/decode.c
@@ -395,20 +395,20 @@ static int oc_dec_init(oc_dec_ctx *_dec,
      _dec->state.dequant_table_data[qi][pli][qti];
   }
   oc_dequant_tables_init(_dec->state.dequant_tables,_dec->pp_dc_scale,
    &_setup->qinfo);
   for(qi=0;qi<64;qi++){
     int qsum;
     qsum=0;
     for(qti=0;qti<2;qti++)for(pli=0;pli<3;pli++){
-      qsum+=_dec->state.dequant_tables[qti][pli][qi][12]+
-       _dec->state.dequant_tables[qti][pli][qi][17]+
-       _dec->state.dequant_tables[qti][pli][qi][18]+
-       _dec->state.dequant_tables[qti][pli][qi][24]<<(pli==0);
+      qsum+=_dec->state.dequant_tables[qi][pli][qti][12]+
+       _dec->state.dequant_tables[qi][pli][qti][17]+
+       _dec->state.dequant_tables[qi][pli][qti][18]+
+       _dec->state.dequant_tables[qi][pli][qti][24]<<(pli==0);
     }
     _dec->pp_sharp_mod[qi]=-(qsum>>11);
   }
   memcpy(_dec->state.loop_filter_limits,_setup->qinfo.loop_filter_limits,
    sizeof(_dec->state.loop_filter_limits));
   oc_dec_accel_init(_dec);
   _dec->pp_level=OC_PP_LEVEL_DISABLED;
   _dec->dc_qis=NULL;
--- a/media/libtheora/update.sh
+++ b/media/libtheora/update.sh
@@ -75,8 +75,9 @@ cp $1/lib/x86_vc/x86cpu.h ./lib/x86_vc/
 cp $1/lib/x86_vc/x86int.h ./lib/x86_vc/
 cp $1/lib/x86_vc/x86state.c ./lib/x86_vc/
 cp $1/include/theora/theora.h ./include/theora/theora.h
 cp $1/include/theora/theoradec.h ./include/theora/theoradec.h
 cp $1/include/theora/theoraenc.h ./include/theora/theoraenc.h
 cp $1/include/theora/codec.h ./include/theora/codec.h
 patch -p3 < ./bug625773-r17780.patch
 patch -p3 < ./bug468275-r18219.patch
+patch -p3 < ./bug752668-r18268.patch