[Ffmpeg-devel] [PATCH] Vorbis I floor type 0 support
Alexander Strasser
eclipse7
Fri Jan 27 18:07:58 CET 2006
Hi,
Benjamin Larsson wrote:
> Alexander Strasser wrote:
[...]
> >[...]
> >+ /* allocate mem for lsp coefficients */
> >+ {
> >+ /* codebook dim is for padding if codebook dim doesn't *
> >+ * divide order+1 then we need to read more data */
> >+ floor_setup->data.t0.lsp=
> >+ av_malloc((floor_setup->data.t0.order+1 + max_codebook_dim) *
> >+ sizeof(float));
> >+ if( !floor_setup->data.t0.book_list ) { return 1; }
> >+ }
> >
> >
> Indentation. It's some more also.
Right, there were some more remaining style errors than i thought.
( This happens when you look at your own code too many times ^^" )
Hopefully i caught all of them now; new patch attached.
> [...]
>
> >@@ -653,6 +734,41 @@
> >
> > // Process modes part
> >
> >+static void create_map( vorbis_context * vc, uint_fast8_t mode_number )
> >+{
> >+ vorbis_floor * floors=vc->floors;
> >+ vorbis_floor0 * vf;
> >+ int idx;
> >+ int_fast32_t * map;
> >+ int_fast32_t n; //TODO: could theoretically be smaller?
> >
> >
> Why not int ?
The convention in the vorbis decoder is to use the smallest intXY_fast
types. This was discussed at the inclusion back then and is inteded to
help when porting to environments with lower capablities.
> Anyway the code compiled fine under gcc 3.4.4 on amd64.
> I don't have any samples to test with so I don't know if it
> works.
Nice to hear. I try to upload my sample somewhere.
Alex (beastd)
More information about the ffmpeg-devel
mailing list