mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
libtremor: updated to upstream rev 7c30a6634
This commit is contained in:
parent
d2b75f4d79
commit
3a0a313864
6 changed files with 20 additions and 7 deletions
|
|
@ -49,7 +49,9 @@ union magic {
|
|||
} halves;
|
||||
ogg_int64_t whole;
|
||||
};
|
||||
#elif BYTE_ORDER==BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#if BYTE_ORDER==BIG_ENDIAN
|
||||
union magic {
|
||||
struct {
|
||||
ogg_int32_t hi;
|
||||
|
|
|
|||
|
|
@ -328,6 +328,7 @@ static vorbis_info_floor *floor0_unpack (vorbis_info *vi,oggpack_buffer *opb){
|
|||
info->books[j]=oggpack_read(opb,8);
|
||||
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]]->dim<1)goto err_out;
|
||||
}
|
||||
return(info);
|
||||
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo,
|
|||
int hx=0;
|
||||
int lx=0;
|
||||
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);
|
||||
|
||||
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];
|
||||
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);
|
||||
|
||||
|
||||
render_line(n,lx,hx,ly,hy,out);
|
||||
|
||||
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){
|
||||
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
|
||||
int i;
|
||||
if(!ci)return(OV_EFAULT);
|
||||
|
||||
/* codebooks */
|
||||
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 */
|
||||
return(OV_EBADHEADER);
|
||||
}
|
||||
if(vc->vendor!=NULL){
|
||||
/* previously initialized comment header */
|
||||
return(OV_EBADHEADER);
|
||||
}
|
||||
|
||||
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 */
|
||||
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));
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
function: normalized modified discrete cosine transform
|
||||
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
|
||||
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 */
|
||||
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;
|
||||
|
||||
if(decodep){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue