[Ffmpeg-devel] [PATCH] Vorbis I floor type 0 support

Benjamin Larsson banan
Fri Jan 27 18:40:24 CET 2006


Alexander Strasser wrote:

>Hi,
>
>  i extended the ffmpeg vorbis decoder to decode
>vorbis floor0 files. It is my first try at this
>kind of stuff. I only had one sample tho testing
>wasn't too exhaustive. I tested the code on linux
>x86 and Solaris SPARC so far.
>
>  As always comments and testers welcome.
>
>Have fun,
>  Alex (beastd)
>  
>
>------------------------------------------------------------------------
>
>[...]
>+            /* 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.
[...]

>@@ -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 ?

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.

MvH
Benjamin Larsson

-- 
"incorrect information" is an oxymoron. Information is, by definition, factual, correct.





More information about the ffmpeg-devel mailing list