From: <sv...@op...> - 2025-03-07 20:16:35
|
Author: manx Date: Fri Mar 7 21:16:23 2025 New Revision: 22997 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22997 Log: Merged revision(s) 22984 from trunk/OpenMPT: [Var] Vorbis: Apply the following patches from git master: <https://gitlab.xiph.org/xiph/vorbis/-/commit/4e1155cc77a2c672f3dd18f9a32dbf1404693289>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/bb4047de4c05712bf1fd49b9584c360b8e4e0adf>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/315da9cc9d30484c802b2e2ea150df39e060e2b9>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/f978052c2002456c11bbe34d80ccf3fb3ceb35cf>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/13f0141eb2fc90869c4dd1957e7f300c8343a7fa>, <https://gitlab.xiph.org/xiph/vorbis/-/commit/e868e6b70dd3b444876f3e2943bc6ef2a48ee29c>. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/include/vorbis/OpenMPT.txt branches/OpenMPT-1.30/include/vorbis/include/vorbis/vorbisenc.h branches/OpenMPT-1.30/include/vorbis/lib/block.c branches/OpenMPT-1.30/include/vorbis/lib/psy.c branches/OpenMPT-1.30/include/vorbis/lib/sharedbook.c Modified: branches/OpenMPT-1.30/include/vorbis/OpenMPT.txt ============================================================================== --- branches/OpenMPT-1.30/include/vorbis/OpenMPT.txt Fri Mar 7 21:14:20 2025 (r22996) +++ branches/OpenMPT-1.30/include/vorbis/OpenMPT.txt Fri Mar 7 21:16:23 2025 (r22997) @@ -1,12 +1,17 @@ -libvorbis library version 1.3.7. +libvorbis library version 1.3.7 (2020-07-04). The following changes have been made: -- Obviously, unnecessary folders and files (doc, examples, m4, macos, macosx, - symbian, test, vq) have been removed. -- Building for DJGPP has been fixed. -- https://github.com/xiph/vorbis/pull/100 and - https://github.com/xiph/vorbis/pull/101 have been applied. -- GCC warnings in lib/lpc.c and lib/psy.c have been silenced. -- os.h has been modified to build for ARM64EC. -- All modifications have been marked with /* OpenMPT */. -- For building, premake is used to generate Visual Studio project files. - See ../build/premake/ for details. + * Obviously, unnecessary folders and files (doc, examples, m4, macos, macosx, + symbian, test, vq) have been removed. + * The following commits have been applied: + * https://gitlab.xiph.org/xiph/vorbis/-/commit/4e1155cc77a2c672f3dd18f9a32dbf1404693289 + * https://gitlab.xiph.org/xiph/vorbis/-/commit/bb4047de4c05712bf1fd49b9584c360b8e4e0adf + * https://gitlab.xiph.org/xiph/vorbis/-/commit/315da9cc9d30484c802b2e2ea150df39e060e2b9 + * https://gitlab.xiph.org/xiph/vorbis/-/commit/f978052c2002456c11bbe34d80ccf3fb3ceb35cf + * https://gitlab.xiph.org/xiph/vorbis/-/commit/13f0141eb2fc90869c4dd1957e7f300c8343a7fa + * https://gitlab.xiph.org/xiph/vorbis/-/commit/e868e6b70dd3b444876f3e2943bc6ef2a48ee29c + * GCC warnings in lib/lpc.c and lib/psy.c have been silenced. + * Building for DJGPP has been fixed. + * os.h has been modified to build for ARM64EC. + * All modifications have been marked with /* OpenMPT */. + * For building, premake is used to generate Visual Studio project files. + See ../build/premake/ for details. Modified: branches/OpenMPT-1.30/include/vorbis/include/vorbis/vorbisenc.h ============================================================================== --- branches/OpenMPT-1.30/include/vorbis/include/vorbis/vorbisenc.h Fri Mar 7 21:14:20 2025 (r22996) +++ branches/OpenMPT-1.30/include/vorbis/include/vorbis/vorbisenc.h Fri Mar 7 21:16:23 2025 (r22997) @@ -202,8 +202,8 @@ * * \param vi Pointer to an initialized vorbis_info struct. * - * \param number Specifies the desired action; See \ref encctlcodes "the list - * of available requests". + * \param number Specifies the desired action; See \ref encctlcodes + * "the list of available requests". * * \param arg void * pointing to a data structure matching the request * argument. @@ -298,7 +298,7 @@ * The type of the referent of that function's \c arg pointer depends on these * codes. */ -/*@{*/ +/**@{*/ /** * Query the current encoder bitrate management setting. @@ -424,7 +424,7 @@ */ #define OV_ECTL_RATEMANAGE_HARD 0x13 -/*@}*/ +/**@}*/ Modified: branches/OpenMPT-1.30/include/vorbis/lib/block.c ============================================================================== --- branches/OpenMPT-1.30/include/vorbis/lib/block.c Fri Mar 7 21:14:20 2025 (r22996) +++ branches/OpenMPT-1.30/include/vorbis/lib/block.c Fri Mar 7 21:16:23 2025 (r22997) @@ -392,9 +392,18 @@ private_state *b=v->backend_state; /* free header, header1, header2 */ - if(b->header){_ogg_free(b->header);b->header=NULL;} - if(b->header1){_ogg_free(b->header1);b->header1=NULL;} - if(b->header2){_ogg_free(b->header2);b->header2=NULL;} + if(b->header) { + _ogg_free(b->header); + b->header=NULL; + } + if(b->header1) { + _ogg_free(b->header1); + b->header1=NULL; + } + if(b->header2) { + _ogg_free(b->header2); + b->header2=NULL; + } /* Do we have enough storage space for the requested buffer? If not, expand the PCM (and envelope) storage */ Modified: branches/OpenMPT-1.30/include/vorbis/lib/psy.c ============================================================================== --- branches/OpenMPT-1.30/include/vorbis/lib/psy.c Fri Mar 7 21:14:20 2025 (r22996) +++ branches/OpenMPT-1.30/include/vorbis/lib/psy.c Fri Mar 7 21:16:23 2025 (r22997) @@ -339,6 +339,10 @@ if(halfoc<0)halfoc=0; if(halfoc>=P_BANDS-1)halfoc=P_BANDS-1; inthalfoc=(int)halfoc; + /*If we hit the P_BANDS-1 clamp above, inthalfoc+1 will be out of bounds, + even though it will have an interpolation weight of 0. + Shift the interval so we don't read past the end of the array.*/ + if(inthalfoc>=P_BANDS-2)inthalfoc=P_BANDS-2; del=halfoc-inthalfoc; for(j=0;j<P_NOISECURVES;j++) Modified: branches/OpenMPT-1.30/include/vorbis/lib/sharedbook.c ============================================================================== --- branches/OpenMPT-1.30/include/vorbis/lib/sharedbook.c Fri Mar 7 21:14:20 2025 (r22996) +++ branches/OpenMPT-1.30/include/vorbis/lib/sharedbook.c Fri Mar 7 21:16:23 2025 (r22997) @@ -422,7 +422,7 @@ long lo=0,hi=0; for(i=0;i<tabn;i++){ - ogg_uint32_t word=i<<(32-c->dec_firsttablen); + ogg_uint32_t word=((ogg_uint32_t)i<<(32-c->dec_firsttablen)); if(c->dec_firsttable[bitreverse(word)]==0){ while((lo+1)<n && c->codelist[lo+1]<=word)lo++; while( hi<n && word>=(c->codelist[hi]&mask))hi++; @@ -581,7 +581,7 @@ exit(1); } } - free(out); + _ogg_free(out); } int main(){ |