search for: oggpack_buffer

Displaying 20 results from an estimated 28 matches for "oggpack_buffer".

2006 Jan 13
2
libogg2 issue in revision 10730
hi all I found that in the revision 10730 of the libogg2 library it is impossible to do bitpacking. this is due to the implementation of the (at least) two functions oggpack_writeinit() and oggpack_readinit(). they both take an (oggpack_buffer *) as an argument and immediately erase all it's contents: void oggpack_readinit(oggpack_buffer *b,ogg_reference *r){ memset(b,0,sizeof(*b)); b->tail=b->head=r; b->count=0; b->headptr=b->head->buffer->data+b->head->begin; b->headend=b->head->lengt...
1999 Nov 15
1
(no subject)
Hello Monty, I tried to complile vorbis under win32 (using MS Visual C 5.0) I found some things: 1.) In bitvise.c there must be buffer cleared after malloc: void _oggpack_writeinit(oggpack_buffer *b){ memset(b,0,sizeof(oggpack_buffer)); b->ptr=b->buffer=malloc(BUFFER_INCREMENT); + memset(b->ptr,0,BUFFER_INCREMENT); b->storage=BUFFER_INCREMENT; } void _oggpack_write(oggpack_buffer *b,unsigned long value,int bits){ if(b->endbyte+4>=b->storage){ b->buffer=...
2017 Feb 06
3
libvorbis without encapulsation
...rview on the xiph.org site, but the example relies on the ogg_packet struct for final output and input to decoder, and shows now examples on how to do without it. Taking a look at the vorbis_bitstream_flush() function, which in the overview is the last step before output, it seems that there is an oggpack_buffer in an array of buffers internal to vorbis_block: (*vorbis_block.internal)(vorbis_block.internal)->packetblob[PACKETBLOBS / 2] (PACKETBLOBS = 15, the macro is not commented, so don't know what this is). This is the output of a encoder pass from gdb: (gdb) p *vbi $3 = {pcmdelay = 0x647140...
2005 Nov 09
2
Quickie: Bitpacker endianness / OggPCM
...://www.xiph.org/ogg/doc/libogg/reference.html and didn't look in the header file first. My bad. Is it correct to state that the oggpack_* functions use little endian order, and the oggpackB_* functions use big endian order? Is it safe to mix calls to the two different bitpackers on the same oggpack_buffer?
2001 Jul 13
1
Got a problem (BUG?)
Hi we run a util at work called 'bounds checker' and it came up with this little beauty: void oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes){ memset(b,0,sizeof(oggpack_buffer)); b->buffer=b->ptr=buf; b->storage=bytes; } Stack memory overrun: Copying 20 bytes to opb; Starting offset 0, destination size 4 bytes. This is in RC1 code base. Any ideas? fixes? I'll try and get more info o...
2008 Sep 12
4
[Patch] New function of libvorbis
...h" + #define GENERAL_VENDOR_STRING "Xiph.Org libVorbis 1.2.1RC2" + #define ENCODE_VENDOR_STRING "Xiph.Org libVorbis I 20080501" + /* helpers */ static int ilog2(unsigned int v){ int ret=0; *************** *** 457,464 **** } static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){ ! char temp[]="Xiph.Org libVorbis I 20080501"; ! int bytes = strlen(temp); /* preamble */ oggpack_write(opb,0x03,8); --- 460,466 ---- } static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){ ! int bytes = strlen(ENCODE_...
2006 Oct 09
1
Vorbis primitive API examples (LONG)
...e; int refcount; union { ogg_buffer_state *owner; struct ogg_buffer *next; } ptr; } ogg_buffer; typedef struct ogg_reference { ogg_buffer *buffer; long begin; long length; struct ogg_reference *next; } ogg_reference; typedef struct oggpack_buffer { int headbit; unsigned char *headptr; long headend; /* memory management */ ogg_reference *head; ogg_reference *tail; /* render the byte/bit counter API constant time */ long count; /* doesn't count the tail */ } oggpack_buffer; typedef stru...
1999 Nov 15
3
vorbis under win32
Hello Monty, I tried to complile vorbis under win32 (using MS Visual C 5.0) I found some things: 1.) In bitvise.c there must be buffer cleared after malloc: void _oggpack_writeinit(oggpack_buffer *b){ memset(b,0,sizeof(oggpack_buffer)); b->ptr=b->buffer=malloc(BUFFER_INCREMENT); + memset(b->ptr,0,BUFFER_INCREMENT); b->storage=BUFFER_INCREMENT; } void _oggpack_write(oggpack_buffer *b,unsigned long value,int bits){ if(b->endbyte+4>=b->storage){ b->buffer=...
2006 Aug 24
1
AMD64 bug
...crash when they reach the end of a movie. The patch below fixes this bug. --- libtheora-0.0.0.alpha7/lib/toplevel.c 2006-06-13 00:57:36.000000000 +0200 +++ libtheora-pdw/lib/toplevel.c 2006-08-19 16:55:30.000000000 +0200 @@ -172,7 +172,7 @@ static int _theora_unpack_comment(theora_comment *tc, oggpack_buffer *opb){ int i; - long len; + long len,tmp; _tp_readlsbint(opb,&len); if(len<0)return(OC_BADHEADER); @@ -180,7 +180,8 @@ _tp_readbuffer(opb,tc->vendor, len); tc->vendor[len]='\0'; - _tp_readlsbint(opb,(long *) &tc->comments); + _tp_readlsbint(opb,&a...
2008 Mar 28
1
[PATCH] oggmerge, various
...hat > right now, sorry. But if it is some binary encoding and not just a > gzip-type compression, maybe application/x-kate may indeed be > appropriate. This would however mean that some specialised application > is required to decode the data. In a nutshell, all data is stuffed into an oggpack_buffer. Text data often ends up non byte aligned. A packet's data is unrecognizable as text (and contains a fair amount of non-text data anyway). A specialized program is indeed required (something linking against the libkate API, which does the oggpack stuff). Interesting point about gzip however, I...
2017 Feb 06
2
libvorbis without encapulsation
...xcellent libvorbis API overview on > the xiph.org site, but the example relies on the ogg_packet struct for > final output and input to decoder, and shows now examples on how to do > without it. Why do you not want it? It is just a simple C struct to carry the packet's metadata. > oggpack_buffer comes from ogg/ogg.h, so I guess it may add some things > not native to "pure" vorbis. That looks like speculation. > Am I to understand that I am dependent on the ogg library to get data > in and out? And if not, where can I get the data along with the minimal > metadata I...
2008 Apr 29
2
More trival questions
...page struct and nothing usable if I try to use the packet structs. Hopefully this is once again something something trivial I've missed in the documentation. Neil >>> #include <stdio.h> #include "ogg/ogg.h" #define BUF_SIZE 4096 int magic_check( unsigned char test, oggpack_buffer* buffer) { return (long) test == oggpack_read(buffer, 8); } void send_to_my_decoder(unsigned char *body, long body_len) { oggpack_buffer buffer; long bits_read; oggpack_readinit(&buffer, body, body_len); bits_read = oggpack_read(&buffer, 8);...
2005 Nov 09
2
Quickie: Bitpacker endianness / OggPCM
From googling around, it seems that the ogg bitpacker has defined endianness, but I can't find anywhere that says which order it's in. Any help? The endianness of the 24 bit field in the OggPCM header should be specified. I was going to edit the wiki to specify it as network byte order, then realized that you may have standardized on something else in theora/vorbis already.
2017 Feb 06
0
libvorbis without encapulsation
...is just a simple C struct to carry the > packet's metadata. Ok. The RLP draft mentioned on the libvorbis docs page, are there sample implementations (in C) of this yet anywhere?  And would such an implementation then also use this ogg struct as an intermediary? > > > > > oggpack_buffer comes from ogg/ogg.h, so I guess it may add some > > things > > not native to "pure" vorbis. > That looks like speculation. > I didn't say it does, I said it "may" ;) Cheers > > > > Am I to understand that I am dependent on the ogg library...
2006 Aug 29
0
Bug#383793: libtheora0: not 64-bit clean
...ackages. -- no debconf information -------------- next part -------------- --- libtheora-0.0.0.alpha7/lib/toplevel.c 2006-06-13 00:57:36.000000000 +0200 +++ libtheora-pdw/lib/toplevel.c 2006-08-19 16:55:30.000000000 +0200 @@ -172,7 +172,7 @@ static int _theora_unpack_comment(theora_comment *tc, oggpack_buffer *opb){ int i; - long len; + long len,tmp; _tp_readlsbint(opb,&len); if(len<0)return(OC_BADHEADER); @@ -180,7 +180,8 @@ _tp_readbuffer(opb,tc->vendor, len); tc->vendor[len]='\0'; - _tp_readlsbint(opb,(long *) &tc->comments); + _tp_readlsbint(opb,&a...
2006 Mar 19
0
how to arrange the codeword tree into array form
...ray form. i think this process is done in _make_words in tremer code. i would be if some one could explain me the exact algorithm or where can i get it? i am attaching the code here for your reference. static int _make_words(char *l,long n,ogg_uint32_t *r,long quantvals, codebook *b, oggpack_buffer *opb,int maptype){ long i,j,count=0; long top=0; ogg_uint32_t marker[33]; if(n<2){ r[0]=0x80000000; }else{ memset(marker,0,sizeof(marker)); for(i=0;i<n;i++){ long length=l[i]; if(length){ ogg_uint32_t entry=marker[length]; long chase=0; if(count &amp...
2008 Aug 13
0
Tremor + upstream libogg
...orbis packege is built successfully, but didn't decode something properly, I got nothing but noise (being linked with native vorbis lib it decodes perfectly). I started to walk inside Ogg sources as well as its Tremor version, and found that they use quite different version of data structures, oggpack_buffer for instance. For another example, oggpack_readinit uses argument of `struct ogg_reference' type, which lacks in upstream library at all. So I guess that the functions despite from their identical name do not do identical things. So the problem is: I need to use in my application the code from...
2003 Sep 09
0
Should the vendor tag be updated for 1.0.1?
...========================================================= RCS file: /usr/local/cvsroot/vorbis/lib/info.c,v retrieving revision 1.61 diff -u -r1.61 info.c --- lib/info.c 11 Oct 2002 11:14:41 -0000 1.61 +++ lib/info.c 9 Sep 2003 12:19:32 -0000 @@ -416,7 +416,7 @@ } static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){ - char temp[]="Xiph.Org libVorbis I 20020717"; + char temp[]="Xiph.Org libVorbis I 20030902"; int bytes = strlen(temp); /* preamble */ Index: ogginfo/ogginfo2.c =================================================================== RCS file: /u...
2003 Oct 09
0
Vorbis plugin for RealOne Player
...arrowed it down to the following function in the Vorbis source.. int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){ vorbis_dsp_state *vd=vb->vd; backend_lookup_state *b=vd->backend_state; vorbis_info *vi=vd->vi; codec_setup_info *ci=vi->codec_setup; oggpack_buffer *opb=&vb->opb; int type,mode,i; /* first things first. Make sure decode is ready */ _vorbis_block_ripcord(vb); oggpack_readinit(opb,op->packet,op->bytes); /* Check the packet type */ if(oggpack_read(opb,1)!=0){ /* Oops. This is not an a...
2008 Aug 13
1
Tremor + upstream Ogg library
...orbis packege is built successfully, but didn't decode something properly, I got nothing but noise (being linked with native vorbis lib it decodes perfectly). I started to walk inside Ogg sources as well as its Tremor version, and found that they use quite different version of data structures, oggpack_buffer for instance. For another example, oggpack_readinit uses argument of `struct ogg_reference' type, which lacks in upstream library at all. So I guess that the functions despite from their identical name do not do identical things. So the problem is: I need to use in my application the code from...