--- a/ChangeLog Fri Aug 29 06:34:07 2008 +0000
+++ b/ChangeLog Fri Aug 29 06:47:34 2008 +0000
@@ -1,10 +1,14 @@
+2008-08-29 Jerry Tan <[email protected]>
+ * patches/libtheora-02-signed-short.diff
+ * base-specs/libtheora.spec
+ bump to 1.0beta3, add patch to fix bug 6722237
+
2008-08-29 Jerry Tan <[email protected]>
* patches/tracker-11-removetag.diff
* base-specs/tracker.spec
add patch to fix bug 6723896
-
2008-08-29 Jerry Tan <[email protected]>
* patches/sound-juicer-03-dev.diff
--- a/base-specs/libtheora.spec Fri Aug 29 06:34:07 2008 +0000
+++ b/base-specs/libtheora.spec Fri Aug 29 06:47:34 2008 +0000
@@ -12,14 +12,17 @@
License: Xiph
Group: System Environment/Libraries
Version: 1.0
-%define tarball_version 1.0alpha7
+%define tarball_version 1.0beta3
+#%define tarball_version 1.0alpha7
Release: 2
Distribution: Java Desktop System
Vendor: Sun Microsystems, Inc.
Summary: The Theora Video Compression Codec.
Source: http://downloads.xiph.org/releases/theora/%{name}-%{tarball_version}.tar.gz
#owner:yippi date:2008-05-02 type:bug bugid:1356 state:upstream
-#Patch1: libtheora-01-fixtestlink.diff
+Patch1: libtheora-01-fixtestlink.diff
+#owner:jerrytan date:2008-08-28 type:bug bugster:6722237
+Patch2: libtheora-02-signed-short.diff
URL: http://www.theora.org/
BuildRoot: %{_tmppath}/%{name}-%{tarball_version}-build
Docdir: %{_docdir}/%{name}
@@ -50,7 +53,8 @@
%prep
%setup -q -n %{name}-%{tarball_version}
-#%patch1 -p1
+%patch1 -p1
+%patch2 -p1
%build
%ifos linux
@@ -104,6 +108,8 @@
%{_libdir}/pkgconfig/theora.pc
%changelog
+* Fri Aug 29 2008 - [email protected]
+- add patch libtheora-02-signed-short.diff to bump to 1.0beta3
* Tue Apr 29 2008 - [email protected]
- Bump to 1.0beta3. Remove upstream patch libtheora-01-fixlink.diff.
Add new patch libtheora-01-fixtestlink.diff.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/libtheora-02-signed-short.diff Fri Aug 29 06:47:34 2008 +0000
@@ -0,0 +1,51 @@
+--- libtheora-1.0beta3/lib/dec/state.c.old 2008-08-28 16:32:08.315618000 +0800
++++ libtheora-1.0beta3/lib/dec/state.c 2008-08-28 16:32:13.006914000 +0800
+@@ -832,7 +832,7 @@
+ /*Why is the iquant product rounded in this case and no others?
+ Who knows.*/
+
+- p=(ogg_int16_t)((ogg_int32_t)_frag->dc*_dc_iquant+15>>5);
++ p=(ogg_int16_t)((ogg_int32_t)(signed short)(_frag->dc)*_dc_iquant+15>>5);
+ /*LOOP VECTORIZES.*/
+ for(ci=0;ci<64;ci++)res_buf[ci]=p;
+
+@@ -863,7 +863,7 @@
+ #endif
+
+ /*First, dequantize the coefficients.*/
+- dct_buf[0]=(ogg_int16_t)((ogg_int32_t)_frag->dc*_dc_iquant);
++ dct_buf[0]=(ogg_int16_t)((ogg_int32_t)(signed short)(_frag->dc)*_dc_iquant);
+ for(zzi=1;zzi<_ncoefs;zzi++){
+ int ci;
+ ci=OC_FZIG_ZAG[zzi];
+--- libtheora-1.0beta3/lib/dec/decode.c.old 2008-08-28 16:31:28.571642000 +0800
++++ libtheora-1.0beta3/lib/dec/decode.c 2008-08-28 16:32:13.004314000 +0800
+@@ -1017,7 +1017,7 @@
+ run_counts[skip-1]++;
+ cfi++;
+ eobs=0;
+- _dec->state.frags[*coded_fragi++].dc=oc_dct_token_dec1val(token,eb);
++ _dec->state.frags[*coded_fragi++].dc=(ogg_int16_t)oc_dct_token_dec1val(token,eb);
+ }
+ }
+ _dec->ti0[pli][0]=ti;
+@@ -1504,7 +1504,7 @@
+ for(fragx=0;fragx<fplane->nhfrags;fragx++,frag++){
+ if(!frag->coded)continue;
+ #ifdef _TH_DEBUG_
+- frag->quant[0] = frag->dc; /* stash un-predicted dc for debug output */
++ frag->quant[0] = (signed short)frag->dc; /* stash un-predicted dc for debug output */
+ #endif
+ pred_last[OC_FRAME_FOR_MODE[frag->mbmode]]=frag->dc+=
+ oc_frag_pred_dc(frag,fplane,fragx,fragy,pred_last);
+--- libtheora-1.0beta3/lib/dec/fragment.c.old 2008-08-28 16:31:58.138938000 +0800
++++ libtheora-1.0beta3/lib/dec/fragment.c 2008-08-28 16:32:13.005838000 +0800
+@@ -179,7 +179,7 @@
+ pflag=1<<i;
+ if((BC_MASK[bc]&pflag)&&predfr[i]->coded&&
+ OC_FRAME_FOR_MODE[predfr[i]->mbmode]==pred_frame){
+- p[np++]=predfr[i]->dc;
++ p[np++]=(signed short)predfr[i]->dc;
+ pflags|=pflag;
+ }
+ }