Vorbis issueshttps://gitlab.xiph.org/xiph/vorbis/-/issues2023-09-16T21:23:08Zhttps://gitlab.xiph.org/xiph/vorbis/-/issues/2348Darwin configure passes invalid flag -force_cpusubtype_ALL2023-09-16T21:23:08ZFX CoudertDarwin configure passes invalid flag -force_cpusubtype_ALLFlag -force_cpusubtype_ALL is passed by configure (see https://gitlab.xiph.org/xiph/vorbis/-/blob/master/configure.ac#L205) unconditionally. This darwin flag was was only ever valid for PowerPC, and ignored for Intel and now Apple Silico...Flag -force_cpusubtype_ALL is passed by configure (see https://gitlab.xiph.org/xiph/vorbis/-/blob/master/configure.ac#L205) unconditionally. This darwin flag was was only ever valid for PowerPC, and ignored for Intel and now Apple Silicon (ARM). In recent versions, the linker now flatly refuses is (in Xcode 15):
ld: unknown options: -force_cpusubtype_ALL
It should either be selectively passed for PowerPC or, at this stage, removed entirely.https://gitlab.xiph.org/xiph/vorbis/-/issues/2350strict-prototypes warning in lib/vorbisfile.c2023-10-28T13:03:55ZJörn Heusippstrict-prototypes warning in lib/vorbisfile.c```
lib/vorbisfile.c:1913:12: warning: function declaration isn't a prototype [-Wstrict-prototypes]
1913 | static int host_is_big_endian() {
| ^~~~~~~~~~~~~~~~~~
``````
lib/vorbisfile.c:1913:12: warning: function declaration isn't a prototype [-Wstrict-prototypes]
1913 | static int host_is_big_endian() {
| ^~~~~~~~~~~~~~~~~~
```https://gitlab.xiph.org/xiph/vorbis/-/issues/2349misleading-indentation warning in lib/block.c2023-10-28T13:04:48ZJörn Heusippmisleading-indentation warning in lib/block.c```
lib/block.c: In function 'vorbis_analysis_buffer':
lib/block.c:395:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
395 | if(b->header)_ogg_free(b->header);b->header=NULL;
| ^~
lib/block.c:395:37:...```
lib/block.c: In function 'vorbis_analysis_buffer':
lib/block.c:395:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
395 | if(b->header)_ogg_free(b->header);b->header=NULL;
| ^~
lib/block.c:395:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
395 | if(b->header)_ogg_free(b->header);b->header=NULL;
| ^
lib/block.c:396:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
396 | if(b->header1)_ogg_free(b->header1);b->header1=NULL;
| ^~
lib/block.c:396:39: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
396 | if(b->header1)_ogg_free(b->header1);b->header1=NULL;
| ^
lib/block.c:397:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
397 | if(b->header2)_ogg_free(b->header2);b->header2=NULL;
| ^~
lib/block.c:397:39: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
397 | if(b->header2)_ogg_free(b->header2);b->header2=NULL;
| ^
```https://gitlab.xiph.org/xiph/vorbis/-/issues/2347a potential bug of NPD2022-09-13T10:38:25Zash1852a potential bug of NPDHi, I found a potential null pointer dereference bug in the project source code of vorbis, and I have shown the execution sequence of the program that may generate the bug on the graph below. The red text illustrates the steps that gener...Hi, I found a potential null pointer dereference bug in the project source code of vorbis, and I have shown the execution sequence of the program that may generate the bug on the graph below. The red text illustrates the steps that generate the bug, the red arrows represent the control flow,the file path can be seen in the blue framed section.
![1662360760592](https://user-images.githubusercontent.com/87304478/188383134-07ef0506-a2c9-4a29-861a-b132c5c0d7f1.jpg)
Although the code shown is for version 1.3.6 but is still exist in current version
would you can help to check if this bug is true?thank you for your effort and patience!https://gitlab.xiph.org/xiph/vorbis/-/issues/2346About ogg123 can't adjust volumn2022-07-18T03:11:47ZHangAbout ogg123 can't adjust volumnDear All:
I'm really sorry to bother you,I am using vorbis-toos to develop and I want to adjust the volume,but I don't find the relevant usage method。
I don't know ogg123 is or not support adjust the volume with software method(Ps:I ha...Dear All:
I'm really sorry to bother you,I am using vorbis-toos to develop and I want to adjust the volume,but I don't find the relevant usage method。
I don't know ogg123 is or not support adjust the volume with software method(Ps:I have no sound card,only use pcm),Hope everybody helps answer,thanks very much!https://gitlab.xiph.org/xiph/vorbis/-/issues/2345Please give a example of how to use RTP vorbis2022-02-18T07:12:32Zyi xinPlease give a example of how to use RTP vorbishttps://gitlab.xiph.org/xiph/vorbis/-/issues/2344ov_fopen returns undocumented error value2022-01-01T03:49:16ZCarl Banksov_fopen returns undocumented error valueov_fopen is documented as returning one of several error codes, but if the call to fopen fails, it returns -1 (not among the error codes listed).
Recommend to just change documentation to say that a -1 return value means it can't open t...ov_fopen is documented as returning one of several error codes, but if the call to fopen fails, it returns -1 (not among the error codes listed).
Recommend to just change documentation to say that a -1 return value means it can't open the file. I'd guess that a lot of the code out in the field just tests if return value is -1.https://gitlab.xiph.org/xiph/vorbis/-/issues/2343Accessing elements outside of array boundaries2021-06-06T17:28:26ZdokutokuAccessing elements outside of array boundarieshttps://gitlab.xiph.org/xiph/vorbis/-/blob/4ba8efed8797016a85e57bc3cc7975bb31d65db5/lib/psy.c#L340
I think it is better to modify this line of code as the following code.
Otherwise, there is a danger of accessing outside the range of th...https://gitlab.xiph.org/xiph/vorbis/-/blob/4ba8efed8797016a85e57bc3cc7975bb31d65db5/lib/psy.c#L340
I think it is better to modify this line of code as the following code.
Otherwise, there is a danger of accessing outside the range of the array in line 347.
```c
if(halfoc>=P_BANDS-2)halfoc=P_BANDS-2;
```https://gitlab.xiph.org/xiph/vorbis/-/issues/2342Getting undefined reference to `_impure_ptr' on mingw compilation2020-07-08T14:20:51ZMoritz BenderGetting undefined reference to `_impure_ptr' on mingw compilationI downloaded the libvorbis-1.3.7 tarball because I wanted to statically compile it. Compiling on mingw fails, with the main error being this:
```
make[3]: Entering directory '/g/Downloads/libvorbis-1.3.7/lib'
CCLD test_sharedbook.e...I downloaded the libvorbis-1.3.7 tarball because I wanted to statically compile it. Compiling on mingw fails, with the main error being this:
```
make[3]: Entering directory '/g/Downloads/libvorbis-1.3.7/lib'
CCLD test_sharedbook.exe
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: test_sharedbook-sharedbook.o:sharedbook.c:(.rdata$.refptr._impure_ptr[.refptr._impure_ptr]+0x0): undefined reference to `_impure_ptr'
collect2.exe: error: ld returned 1 exit status
```
Compilation did work on my wsl, so I'm not sure what this is about. I managed to get the static library by make -j ing, but I'd still like to know why this part fails and whether there is a way to avoid this.https://gitlab.xiph.org/xiph/vorbis/-/issues/2341Broken MSDN links2020-07-04T02:02:58ZRalph GilesBroken MSDN linksThe api docs link to msdn.microsoft.com for details of how the Visual Studio 8 standard library handles stdin/out. Those links no longer work. They pages are still available through archive.org, but the docs should be reviewed to see if ...The api docs link to msdn.microsoft.com for details of how the Visual Studio 8 standard library handles stdin/out. Those links no longer work. They pages are still available through archive.org, but the docs should be reviewed to see if the details are still correct. Behaviour may well have changed in the intervening decade.https://gitlab.xiph.org/xiph/vorbis/-/issues/2337vorbis-java status? official binaries? maven?2018-11-30T19:59:19ZAndrey Bvorbis-java status? official binaries? maven?I am sorry if that's a bit off-topic, but what is the status of vorbis-java?
I see http://svn.xiph.org/trunk/vorbis-java/ is available and it's great, but are there any official versions / builds etc? Any binaries is any public maven by...I am sorry if that's a bit off-topic, but what is the status of vorbis-java?
I see http://svn.xiph.org/trunk/vorbis-java/ is available and it's great, but are there any official versions / builds etc? Any binaries is any public maven by any chance?https://gitlab.xiph.org/xiph/vorbis/-/issues/2230ov_raw_total() ignores the size of the last page2017-11-01T04:49:44ZMartin Steghöferov_raw_total() ignores the size of the last page[The maintainers of the Debian package "libogg-vorbis-decoder-perl" discovered](https://bugs.debian.org/801610) that the return value of `ov_raw_total()` with `i<0` changed after we (the Debian libvorbisfile maintainers) backported the u...[The maintainers of the Debian package "libogg-vorbis-decoder-perl" discovered](https://bugs.debian.org/801610) that the return value of `ov_raw_total()` with `i<0` changed after we (the Debian libvorbisfile maintainers) backported the upstream commit r19165. That change breaks one of their test cases. The same behavior can also be observed in the unpatched 1.3.5 release.
Indeed, their test case seems to be correct and the new libvorbisfile3 version returns an incorrect value. My analysis showed that the returned value is the difference between the offset of the last page and the offset of the first page of the only logical bitstream in the file. However, in order to comply with the specification, it should
be the difference between the first byte *after* the last page and the offset of the first page. So the returned value is missing the size of the last page.Monty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/vorbis/-/issues/2218psy.c: warning C4305: '=' : truncation from 'double' to 'float'2017-11-01T04:49:44Zirov13psy.c: warning C4305: '=' : truncation from 'double' to 'float'```
p->m_val = 1.;
if(rate < 26000) p->m_val = 0;
else if(rate < 38000) p->m_val = .94; /* 32kHz */
else if(rate > 46000) p->m_val = 1.275; /* 48kHz */
```
pls add .f
```
p->m_val = 1.f;
if(rate < 26000) p->m_val = 0.f;
...```
p->m_val = 1.;
if(rate < 26000) p->m_val = 0;
else if(rate < 38000) p->m_val = .94; /* 32kHz */
else if(rate > 46000) p->m_val = 1.275; /* 48kHz */
```
pls add .f
```
p->m_val = 1.f;
if(rate < 26000) p->m_val = 0.f;
else if(rate < 38000) p->m_val = .94f; /* 32kHz */
else if(rate > 46000) p->m_val = 1.275f; /* 48kHz */
```Monty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/vorbis/-/issues/2203infer issues on libvorbis2017-11-01T04:49:44ZGhost Userinfer issues on libvorbisFacebook's infer static analysis tool complains about some possible null dereferences in libvorbis and libvorbisfile:
Starting analysis (Infer version git-4526ada822d01728c4ac0ac30fd2f9a2aa115c0f)
Analysis done
22 files analyzed
lib/...Facebook's infer static analysis tool complains about some possible null dereferences in libvorbis and libvorbisfile:
Starting analysis (Infer version git-4526ada822d01728c4ac0ac30fd2f9a2aa115c0f)
Analysis done
22 files analyzed
lib/block.c:110: error: NULL_DEREFERENCE
pointer link last assigned on line 108 could be null and is dereferenced at line 110, column 7
lib/codebook.c:152: error: NULL_DEREFERENCE
pointer s last assigned on line 151 could be null and is dereferenced at line 152, column 3
lib/floor0.c:79: error: NULL_DEREFERENCE
pointer info last assigned on line 78 could be null and is dereferenced at line 79, column 3
lib/floor0.c:139: error: NULL_DEREFERENCE
pointer *look->linearmap[W] last assigned on line 134 could be null and is dereferenced at line 139, column 7
lib/floor0.c:153: error: NULL_DEREFERENCE
pointer look last assigned on line 149 could be null and is dereferenced at line 153, column 3
lib/floor1.c:123: error: NULL_DEREFERENCE
pointer info last assigned on line 121 could be null and is dereferenced at line 123, column 3
lib/floor1.c:191: error: NULL_DEREFERENCE
pointer look last assigned on line 186 could be null and is dereferenced at line 191, column 3
lib/floor1.c:745: error: NULL_DEREFERENCE
pointer output last assigned on line 741 could be null and is dereferenced at line 745, column 7
lib/floor1.c:968: error: NULL_DEREFERENCE
pointer fit_value last assigned on line 966 could be null and is dereferenced at line 968, column 5
lib/info.c:60: error: NULL_DEREFERENCE
pointer vc->comment_lengths last assigned on line 58 could be null and is dereferenced at line 60, column 3
lib/mdct.c:66: error: NULL_DEREFERENCE
pointer T last assigned on line 54 could be null and is dereferenced at line 66, column 5
lib/psy.c:41: error: NULL_DEREFERENCE
pointer look last assigned on line 39 could be null and is dereferenced at line 41, column 3
lib/res0.c:200: error: NULL_DEREFERENCE
pointer info last assigned on line 197 could be null and is dereferenced at line 200, column 3
lib/res0.c:268: error: NULL_DEREFERENCE
pointer look last assigned on line 262 could be null and is dereferenced at line 268, column 3
lib/res0.c:430: error: NULL_DEREFERENCE
pointer partword last assigned on line 422 could be null and is dereferenced at line 430, column 5
lib/res0.c:496: error: NULL_DEREFERENCE
pointer partword last assigned on line 489 could be null and is dereferenced at line 496, column 3
lib/res0.c:790: error: NULL_DEREFERENCE
pointer work last assigned on line 785 could be null and is dereferenced at line 790, column 7
lib/vorbisfile.c:199: error: NULL_DEREFERENCE
pointer *serialno_list last assigned on line 196 could be null and is dereferenced at line 199, column 3
lib/vorbisfile.c:2324: error: NULL_DEREFERENCE
pointer vi last assigned on line 2321 could be null and is dereferenced at line 2324, column 7
lib/vorbisfile.c:2385: error: NULL_DEREFERENCE
pointer vi last assigned on line 2382 could be null and is dereferenced at line 2385, column 7
Monty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/vorbis/-/issues/2062Simplify render_point2017-11-01T04:49:44ZSven EberhardtSimplify render_pointThe render_point function seems to fit a linear function through (x0,y0) and (x1,y1) and then finds y(x) on that line. It does some special case handling for y0>y1 vs y0<y1, which, as far as I can see, is unnecessary. I.e., the current c...The render_point function seems to fit a linear function through (x0,y0) and (x1,y1) and then finds y(x) on that line. It does some special case handling for y0>y1 vs y0<y1, which, as far as I can see, is unnecessary. I.e., the current code:
int dy=y1-y0;
int adx=x1-x0;
int ady=abs(dy);
int err=ady*(x-x0);
int off=err/adx;
if(dy<0)return(y0-off);
return(y0+off);
should be equivalent to this:
return (x - x0) * (y1 - y0) / (x1 - x0) + y0;
The only difference would be in some integer overflow cases, which cannot happen in this place anyway. I've tried the replacement and found no difference when encoding a test file.Monty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/vorbis/-/issues/2030Incorrect bark() formula in floor0 specification2017-11-01T04:49:44ZAndrew ChurchIncorrect bark() formula in floor0 specificationIn the current version of the Vorbis I specification, the bark() function used by floor 0 is defined as:
bark(x) = 13.1 arctan(.00074x) + 2.24 arctan(.0000000185x^2 + .0001x)
However, the formula actually used by libvorbis is:
bark(x)...In the current version of the Vorbis I specification, the bark() function used by floor 0 is defined as:
bark(x) = 13.1 arctan(.00074x) + 2.24 arctan(.0000000185x^2 + .0001x)
However, the formula actually used by libvorbis is:
bark(x) = 13.1 arctan(.00074x) + 2.24 arctan(.0000000185x^2) + .0001x
(note that the .0001x is not part of the arctan argument).
Since floor 0 seems to be considered obsolete, I suggest changing the specification to reflect the formula actually used by libvorbis.https://gitlab.xiph.org/xiph/vorbis/-/issues/1969Out of bounds index in psy.c2017-11-01T04:49:44ZTony WilsonOut of bounds index in psy.cV1.0.1..1.3.3
In function _vp_psy_init halfoc is limited to P_BANDS - 1 but later used +0 and +1
My guess is it should be P_BANDS - 2
Picked up when I recently translated the example enc/dec subset of ogg and vorbis to Google's Go as a...V1.0.1..1.3.3
In function _vp_psy_init halfoc is limited to P_BANDS - 1 but later used +0 and +1
My guess is it should be P_BANDS - 2
Picked up when I recently translated the example enc/dec subset of ogg and vorbis to Google's Go as a "learn 2 things at once" exercise.Monty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/vorbis/-/issues/1948[PATCH] libvorbis* uninstalled pkg-config files produce overlinking2017-11-01T04:49:44ZBrad Smith[PATCH] libvorbis* uninstalled pkg-config files produce overlinkingThe libvorbis pkg-config files were recently fixed to resolve issues with overlinking, but the uninstalled variants of the files were overlooked. Attached is a patch to fix the overlinking there.The libvorbis pkg-config files were recently fixed to resolve issues with overlinking, but the uninstalled variants of the files were overlooked. Attached is a patch to fix the overlinking there.Monty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/vorbis/-/issues/1945[PATCH] configure script should honour --docdir option2017-11-01T04:49:44ZKarl Lindén[PATCH] configure script should honour --docdir optionThe configure script should honour the --docdir option as this is the autotools standard. The build system currently overrides that the docdir variable with its own but that is not very clean. Honouring docdir gives a more standardized a...The configure script should honour the --docdir option as this is the autotools standard. The build system currently overrides that the docdir variable with its own but that is not very clean. Honouring docdir gives a more standardized and flexible behaviour that the user can control.
I'm attaching a patch that fixes the issue.Monty MontgomeryMonty Montgomeryhttps://gitlab.xiph.org/xiph/vorbis/-/issues/1920todB () function correction2017-11-01T04:49:44ZAniket BtodB () function correctionIn the mapping0_forward () function in the file mapping0.c file, while converting fft values to dB scale, a local maximum calculations are performed. In the first iteration, the max value is initialized to fft[0] (magnitude of signal) wh...In the mapping0_forward () function in the file mapping0.c file, while converting fft values to dB scale, a local maximum calculations are performed. In the first iteration, the max value is initialized to fft[0] (magnitude of signal) while in later on iterations, the maximum value is initialized to magnitude^2. In dB conversion of these values, a constant is subtracted in the todB () function. However, in the first iteration the constant is subtracted from the magnitude value, while in the further iterations the value is subtracted from magnitude^2.
logfft[0]=scale_dB+todB(pcm) + .345; /* + .345 is a hack; the
original todB estimation used on
IEEE 754 compliant machines had a
bug that returned dB values about
a third of a decibel too high.
The bug was harmless because
tunings implicitly took that into
account. However, fixing the bug
in the estimator requires
changing all the tunings as well.
For now, it's easier to sync
things back up here, and
recalibrate the tunings in the
next major model upgrade. */
local_ampmax[i]=logfft[0];
for(j=1;j<n-1;j+=2){
float temp=pcm[j]*pcm[j]+pcm[j+1]*pcm[j+1]; //magnitude square calculation
temp=logfft[(j+1)>>1]=scale_dB+.5f*todB(&temp) + .345; /* +
.345 is a hack; the original todB
estimation used on IEEE 754
compliant machines had a bug that
returned dB values about a third
of a decibel too high. The bug
was harmless because tunings
implicitly took that into
account. However, fixing the bug
in the estimator requires
changing all the tunings as well.
For now, it's easier to sync
things back up here, and
recalibrate the tunings in the
next major model upgrade. */
if(temp>local_ampmax[i])local_ampmax[i]=temp;
}
if(local_ampmax[i]>0.f)local_ampmax[i]=0.f;
if(local_ampmax[i]>global_ampmax)global_ampmax=local_ampmax[i];
//todB () function definition.
static inline float todB(const float *x){
union {
ogg_uint32_t i;
float f;
} ix;
ix.f = *x;
ix.i = ix.i&0x7fffffff;
return (float)(ix.i * 7.17711438e-7f -764.6161886f);
//764.6161886 is subtracted from fft[0] as well as amp^2.
//The constant subtraction is not consistent over the max calculations
}Monty MontgomeryMonty Montgomery