mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-23 15:47:30 +09:00
Issue #1964 - Update libtremor.
Also removed mozilla patches that are already applied upstream.
This commit is contained in:
parent
065e8bc77b
commit
34d0e86b61
12 changed files with 31 additions and 56 deletions
7
media/libtremor/README_MCP
Normal file
7
media/libtremor/README_MCP
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
The source from this directory was copied from the libtremor
|
||||||
|
git repository using the update.sh script. The only changes
|
||||||
|
made were those applied by update.sh and the addition/update of
|
||||||
|
Makefile.in files for the UXP build system.
|
||||||
|
|
||||||
|
The upstream release used was https://gitlab.xiph.org/xiph/tremor
|
||||||
|
The git revision used was 7c30a66346199f3f09017a09567c6c8a3a0eedc8.
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
The source from this directory was copied from the libtremor
|
|
||||||
subversion repository using the update.sh script. The only changes
|
|
||||||
made were those applied by update.sh and the addition/upate of
|
|
||||||
Makefile.in files for the Mozilla build system.
|
|
||||||
|
|
||||||
The upstream release used was http://svn.xiph.org/trunk/Tremor/
|
|
||||||
The subversion revision used was r17547.
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
diff -r 55f3224d7513 media/libtremor/lib/tremor_synthesis.c
|
|
||||||
--- a/media/libtremor/lib/tremor_synthesis.c Sat Jan 03 20:02:33 2015 -0800
|
|
||||||
+++ b/media/libtremor/lib/tremor_synthesis.c Sun Jan 04 11:17:29 2015 -0800
|
|
||||||
@@ -119,13 +119,13 @@ long vorbis_packet_blocksize(vorbis_info
|
|
||||||
while(v>1){
|
|
||||||
modebits++;
|
|
||||||
v>>=1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* read our mode and pre/post windowsize */
|
|
||||||
mode=oggpack_read(&opb,modebits);
|
|
||||||
}
|
|
||||||
- if(mode==-1)return(OV_EBADPACKET);
|
|
||||||
+ if(mode==-1 || !ci->mode_param[mode])return(OV_EBADPACKET);
|
|
||||||
return(ci->blocksizes[ci->mode_param[mode]->blockflag]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
diff --git a/media/libtremor/lib/tremor_floor1.c b/media/libtremor/lib/tremor_floor1.c
|
|
||||||
--- a/media/libtremor/lib/tremor_floor1.c
|
|
||||||
+++ b/media/libtremor/lib/tremor_floor1.c
|
|
||||||
@@ -103,16 +103,17 @@ static vorbis_info_floor *floor1_unpack
|
|
||||||
|
|
||||||
/* read the post list */
|
|
||||||
info->mult=oggpack_read(opb,2)+1; /* only 1,2,3,4 legal now */
|
|
||||||
rangebits=oggpack_read(opb,4);
|
|
||||||
if(rangebits<0)goto err_out;
|
|
||||||
|
|
||||||
for(j=0,k=0;j<info->partitions;j++){
|
|
||||||
count+=info->class_dim[info->partitionclass[j]];
|
|
||||||
+ if(count>VIF_POSIT)goto err_out;
|
|
||||||
for(;k<count;k++){
|
|
||||||
int t=info->postlist[k+2]=oggpack_read(opb,rangebits);
|
|
||||||
if(t<0 || t>=(1<<rangebits))
|
|
||||||
goto err_out;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
info->postlist[0]=0;
|
|
||||||
info->postlist[1]=1<<rangebits;
|
|
||||||
|
|
@ -49,7 +49,9 @@ union magic {
|
||||||
} halves;
|
} halves;
|
||||||
ogg_int64_t whole;
|
ogg_int64_t whole;
|
||||||
};
|
};
|
||||||
#elif BYTE_ORDER==BIG_ENDIAN
|
#endif
|
||||||
|
|
||||||
|
#if BYTE_ORDER==BIG_ENDIAN
|
||||||
union magic {
|
union magic {
|
||||||
struct {
|
struct {
|
||||||
ogg_int32_t hi;
|
ogg_int32_t hi;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||||
|
# vim: set filetype=python:
|
||||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
@ -23,7 +24,7 @@ FINAL_LIBRARY = 'gkmedias'
|
||||||
if CONFIG['OS_ARCH'] == 'AIX':
|
if CONFIG['OS_ARCH'] == 'AIX':
|
||||||
DEFINES['alloca'] = '__alloca'
|
DEFINES['alloca'] = '__alloca'
|
||||||
|
|
||||||
if CONFIG['TARGET_CPU'] == 'arm' and CONFIG['GNU_CC'] and not CONFIG['MOZ_THUMB2']:
|
if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['CC_TYPE'] in ('clang', 'gcc') and not CONFIG['MOZ_THUMB2']:
|
||||||
DEFINES['_ARM_ASSEM_'] = True
|
DEFINES['_ARM_ASSEM_'] = True
|
||||||
|
|
||||||
LOCAL_INCLUDES += [
|
LOCAL_INCLUDES += [
|
||||||
|
|
|
||||||
|
|
@ -328,6 +328,7 @@ static vorbis_info_floor *floor0_unpack (vorbis_info *vi,oggpack_buffer *opb){
|
||||||
info->books[j]=oggpack_read(opb,8);
|
info->books[j]=oggpack_read(opb,8);
|
||||||
if(info->books[j]<0 || info->books[j]>=ci->books)goto err_out;
|
if(info->books[j]<0 || info->books[j]>=ci->books)goto err_out;
|
||||||
if(ci->book_param[info->books[j]]->maptype==0)goto err_out;
|
if(ci->book_param[info->books[j]]->maptype==0)goto err_out;
|
||||||
|
if(ci->book_param[info->books[j]]->dim<1)goto err_out;
|
||||||
}
|
}
|
||||||
return(info);
|
return(info);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -426,7 +426,7 @@ static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo,
|
||||||
int hx=0;
|
int hx=0;
|
||||||
int lx=0;
|
int lx=0;
|
||||||
int ly=fit_value[0]*info->mult;
|
int ly=fit_value[0]*info->mult;
|
||||||
/* guard lookup against out-of-rage values */
|
/* guard lookup against out-of-range values */
|
||||||
ly=(ly<0?0:ly>255?255:ly);
|
ly=(ly<0?0:ly>255?255:ly);
|
||||||
|
|
||||||
for(j=1;j<look->posts;j++){
|
for(j=1;j<look->posts;j++){
|
||||||
|
|
@ -436,10 +436,9 @@ static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo,
|
||||||
|
|
||||||
hx=info->postlist[current];
|
hx=info->postlist[current];
|
||||||
hy*=info->mult;
|
hy*=info->mult;
|
||||||
/* guard lookup against out-of-rage values */
|
/* guard lookup against out-of-range values */
|
||||||
hy=(hy<0?0:hy>255?255:hy);
|
hy=(hy<0?0:hy>255?255:hy);
|
||||||
|
|
||||||
|
|
||||||
render_line(n,lx,hx,ly,hy,out);
|
render_line(n,lx,hx,ly,hy,out);
|
||||||
|
|
||||||
lx=hx;
|
lx=hx;
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,6 @@ static int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){
|
||||||
static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){
|
static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){
|
||||||
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
|
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
|
||||||
int i;
|
int i;
|
||||||
if(!ci)return(OV_EFAULT);
|
|
||||||
|
|
||||||
/* codebooks */
|
/* codebooks */
|
||||||
ci->books=oggpack_read(opb,8)+1;
|
ci->books=oggpack_read(opb,8)+1;
|
||||||
|
|
@ -367,6 +366,10 @@ int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op)
|
||||||
/* um... we didn't get the initial header */
|
/* um... we didn't get the initial header */
|
||||||
return(OV_EBADHEADER);
|
return(OV_EBADHEADER);
|
||||||
}
|
}
|
||||||
|
if(vc->vendor!=NULL){
|
||||||
|
/* previously initialized comment header */
|
||||||
|
return(OV_EBADHEADER);
|
||||||
|
}
|
||||||
|
|
||||||
return(_vorbis_unpack_comment(vc,&opb));
|
return(_vorbis_unpack_comment(vc,&opb));
|
||||||
|
|
||||||
|
|
@ -375,6 +378,14 @@ int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op)
|
||||||
/* um... we didn;t get the initial header or comments yet */
|
/* um... we didn;t get the initial header or comments yet */
|
||||||
return(OV_EBADHEADER);
|
return(OV_EBADHEADER);
|
||||||
}
|
}
|
||||||
|
if(vi->codec_setup==NULL){
|
||||||
|
/* improperly initialized vorbis_info */
|
||||||
|
return(OV_EFAULT);
|
||||||
|
}
|
||||||
|
if(((codec_setup_info *)vi->codec_setup)->books>0){
|
||||||
|
/* previously initialized setup header */
|
||||||
|
return(OV_EBADHEADER);
|
||||||
|
}
|
||||||
|
|
||||||
return(_vorbis_unpack_books(vi,&opb));
|
return(_vorbis_unpack_books(vi,&opb));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
function: normalized modified discrete cosine transform
|
function: normalized modified discrete cosine transform
|
||||||
power of two length transform only [64 <= n ]
|
power of two length transform only [64 <= n ]
|
||||||
last mod: $Id: mdct.c,v 1.9 2002/10/16 09:17:39 xiphmont Exp $
|
last mod: $Id$
|
||||||
|
|
||||||
Original algorithm adapted long ago from _The use of multirate filter
|
Original algorithm adapted long ago from _The use of multirate filter
|
||||||
banks for coding of high quality digital audio_, by T. Sporer,
|
banks for coding of high quality digital audio_, by T. Sporer,
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ static int _vorbis_synthesis1(vorbis_block *vb,ogg_packet *op,int decodep){
|
||||||
|
|
||||||
/* more setup */
|
/* more setup */
|
||||||
vb->granulepos=op->granulepos;
|
vb->granulepos=op->granulepos;
|
||||||
vb->sequence=op->packetno-3; /* first block is third packet */
|
vb->sequence=op->packetno; /* first block is third packet */
|
||||||
vb->eofflag=op->e_o_s;
|
vb->eofflag=op->e_o_s;
|
||||||
|
|
||||||
if(decodep){
|
if(decodep){
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ cp $1/ivorbiscodec.h ./include/tremor/ivorbiscodec.h
|
||||||
cp $1/os.h ./lib/os.h
|
cp $1/os.h ./lib/os.h
|
||||||
cp $1/COPYING ./COPYING
|
cp $1/COPYING ./COPYING
|
||||||
cp $1/README ./README
|
cp $1/README ./README
|
||||||
patch -p3 < ./bug719612.patch
|
|
||||||
patch -p3 < ./bug1117571-r19420.patch
|
echo "Remember to update the version details at README_MCP."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue