search for: oggopusfile

Displaying 13 results from an estimated 13 matches for "oggopusfile".

2018 Apr 06
2
Decoding Opus File in Chunks
I would like to decode an Opus file in chunks (e.g. 16K byte array). Is this possible with the Opusfile library or would I need to interface directly with libogg and libopus? It seems like the Opusfile decoder functions maintain an internal pointer/state for OggOpusFile during multiple calls to op_read(OggOpusFile *_op ...) and a complete byte array of the entire Opus file would be needed. Any help in pointing me in the right direction would be greatly appreciated. Due to the nature of the chunks coming in and the need to obtain/assemble Opus packets before deco...
2017 Nov 20
7
[PATCH 0/2] libopusfile int64 overflows
Just an attempt to avoid overflows with an explicit check, I don't know if there's a better way to identify corrupt input here. James Zern (2): op_pcm_seek: fix int64 overflow op_fetch_and_process_page: fix int64 overflow src/opusfile.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 2.15.0.448.gf294e3d99a-goog
2017 Dec 07
2
[PATCH 0/2] libopusfile int64 overflows
On Tue, Nov 28, 2017 at 3:22 PM, James Zern <jzern at google.com> wrote: > On Mon, Nov 20, 2017 at 1:07 PM, James Zern <jzern at google.com> wrote: >> Just an attempt to avoid overflows with an explicit check, I don't know if >> there's a better way to identify corrupt input here. >> >> James Zern (2): >> op_pcm_seek: fix int64 overflow
2018 Apr 06
0
Decoding Opus File in Chunks
...ris McGowan wrote: > I would like to decode an Opus file in chunks (e.g. 16K byte array).  Is > this possible with the Opusfile library or would I need to interface > directly with libogg and libopus?  It seems like the Opusfile decoder > functions maintain an internal pointer/state for OggOpusFile during > multiple calls to op_read(OggOpusFile *_op ...) and a complete byte > array of the entire Opus file would be needed. > > Any help in pointing me in the right direction would be greatly > appreciated.  Due to the nature of the chunks coming in and the need to > obtain/ass...
2017 Dec 07
1
[PATCH 0/2] libopusfile int64 overflows
...gt; that e-mail due to local trouble with my mail server. I could pull the > patches from the list archive, however. Thanks for the reports. > Thanks for recovering them and having a look. I updated both patches. > For the first patch: > >> @@ -2605,7 +2605,11 @@ int op_pcm_seek(OggOpusFile *_of,ogg_int64_t >> _pcm_offset){ >> would be better just to do a full seek.*/ >> if(OP_LIKELY(!op_granpos_diff(&diff,gp,pcm_start))){ >> ogg_int64_t discard_count; >> - discard_count=_pcm_offset-diff; >> + /*Check for...
2017 Dec 07
0
[PATCH 0/2] libopusfile int64 overflows
...> ping. Sorry, I can't reply to the original patches because I didn't actually get that e-mail due to local trouble with my mail server. I could pull the patches from the list archive, however. Thanks for the reports. For the first patch: > @@ -2605,7 +2605,11 @@ int op_pcm_seek(OggOpusFile *_of,ogg_int64_t _pcm_offset){ > would be better just to do a full seek.*/ > if(OP_LIKELY(!op_granpos_diff(&diff,gp,pcm_start))){ > ogg_int64_t discard_count; > - discard_count=_pcm_offset-diff; > + /*Check for overflow.*/ > + if(...
2015 Mar 21
0
use xmm intrinsics for lrintf() with mingw-w64
...imits.h> #include <string.h> #include <math.h> - +#if (defined(__GNUC__) && defined(_WIN64)) +#include <xmmintrin.h> +#endif #include "opusfile.h" /*This implementation is largely based off of libvorbisfile. @@ -2961,8 +2963,11 @@ int op_read_float_stereo(OggOpusFile *_of,float *_pcm,int _buf_size){ #else -# if defined(OP_HAVE_LRINTF) -# include <math.h> +# if (defined(__GNUC__) && defined(_WIN64)) + static __inline long int op_float2int(float _x) { + return _mm_cvtss_si32(_mm_load_ss(&_x)); + } +# elif defined(OP_HAVE_LRINTF) # def...
2017 Jan 28
2
How to use op_test_callbacks ?
...(StreamIn[x].Data.HandleOP); I can retrieve the tags infos, all seems ok. But for reading, using this gives 0 outframes: outframes := op_read_float(Data.HandleOP, at Buffer[0], Wantframesm, nil); I suspect that some callback must be defined. In opusfile library there is: OP_WARN_UNUSED_RESULT OggOpusFile *op_test_callbacks(void *_source, const OpusFileCallbacks *_cb,const unsigned char *_initial_data, size_t _initial_bytes,int *_error) OP_ARG_NONNULL(2); Maybe it is what I need in place of op_test_memory(). But I do not understand what is _source and initial_data. Also how to use OpusFileCallb...
2017 Nov 20
0
[PATCH 1/2] op_pcm_seek: fix int64 overflow
check for overflow with a negative diff --- src/opusfile.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/opusfile.c b/src/opusfile.c index 72f1272..df326af 100644 --- a/src/opusfile.c +++ b/src/opusfile.c @@ -2605,7 +2605,11 @@ int op_pcm_seek(OggOpusFile *_of,ogg_int64_t _pcm_offset){ would be better just to do a full seek.*/ if(OP_LIKELY(!op_granpos_diff(&diff,gp,pcm_start))){ ogg_int64_t discard_count; - discard_count=_pcm_offset-diff; + /*Check for overflow.*/ + if(diff<0&&OP_UNLIKELY...
2017 Nov 20
0
[PATCH 2/2] op_fetch_and_process_page: fix int64 overflow
check for overflow with a negative diff --- src/opusfile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/opusfile.c b/src/opusfile.c index df326af..2bef277 100644 --- a/src/opusfile.c +++ b/src/opusfile.c @@ -2078,7 +2078,10 @@ static int op_fetch_and_process_page(OggOpusFile *_of, &&OP_LIKELY(diff<total_duration)){ cur_packet_gp=prev_packet_gp; for(pi=0;pi<op_count;pi++){ - diff=durations[pi]-diff; + /*Check for overflow.*/ + if(diff<0&&OP_UNLIKELY(OP_INT64_MAX+diff<durations[p...
2018 Apr 10
2
[PATCH] opus-tools/opusfile: Support for Ambisonics
Friendly ping for supporting ambisonics in opus-tools & opusfile Please LMK any ?s you might have. Cheers, Drew -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/opus/attachments/20180410/fd4a3709/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name:
2018 May 25
0
[PATCH] opus-tools/opusfile: Support for Ambisonics
...do for mapping family 255. Finally, I don't want to use sqrt() and introduce a libm dependency for the fixed-point builds, so we should probably extract the ambisonics order from the channel count a different way. The next issue is that the demixing matrix cannot be stored directly in the OggOpusFile struct. In the case of a chained, seekable stream with multiple ambisonics projection links, we will parse all of the headers up front, and the matrix that gets stored will simply be the last one parsed, which will overwrite all of the others (and if they have different channel/stream counts, w...
2015 Nov 05
3
Opusfile seeking bug
...ge granule // position and checks to see if the target position is greater // than the last packet granule position, which it now is due to // the re-calculation and thus throws the OP_EBADLINK error. int64_t failingSeekPoint = FindBrokenSeekPoint(filename); if(failingSeekPoint >= 0) { OggOpusFile* opfile = op_open_file(filename, NULL); // Seeking to somewhere in the first packet should return // OP_EBADLINK, however seeking discards 80ms so the actual // requested point needs to be 80ms ahead of the failing point. // This is handled by FindBrokenSeekPoint which has already // adj...