[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec vorbis.c, NONE, 1.1 vorbis.h, NONE, 1.1 Makefile, 1.186, 1.187 avcodec.h, 1.396, 1.397 allcodecs.c, 1.103, 1.104

Michael Niedermayer CVS michael
Tue May 17 21:02:47 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv3061

Modified Files:
	Makefile avcodec.h allcodecs.c 
Added Files:
	vorbis.c vorbis.h 
Log Message:
Vorbis decoder by (Balatoni Denes | dbalatoni programozo hu)


--- NEW FILE: vorbis.c ---
/**
 * @file vorbis.c
 * Vorbis I decoder
 * @author Denes Balatoni  ( dbalatoni programozo hu )
 */

#undef V_DEBUG

#include <math.h>

#define ALT_BITSTREAM_READER_LE
#include "avcodec.h"
#include "bitstream.h"
#include "dsputil.h"

#include "vorbis.h"

#define V_NB_BITS 11
#define V_MAX_VLCS (1<<16)
[...1375 lines suppressed...]

static int vorbis_decode_close(AVCodecContext *avccontext) {
    vorbis_context *vc = avccontext->priv_data;

    vorbis_free(vc);

    return 0 ;
}

AVCodec vorbis_decoder = {
    "vorbis",
    CODEC_TYPE_AUDIO,
    CODEC_ID_VORBIS,
    sizeof(vorbis_context),
    vorbis_decode_init,
    NULL,
    vorbis_decode_close,
    vorbis_decode_frame,
};


--- NEW FILE: vorbis.h ---
#define ALT_BITSTREAM_READER_LE
#include "avcodec.h"
#include "bitstream.h"
#include "dsputil.h"

typedef struct {
    uint_fast8_t dimensions;
    uint_fast8_t lookup_type;
    uint_fast8_t maxdepth;
    VLC vlc;
    float *codevectors;
} vorbis_codebook;

typedef struct {
    uint_fast8_t floor_type;
    uint_fast8_t partitions;
    uint_fast8_t maximum_class;
    uint_fast8_t partition_class[32];
    uint_fast8_t class_dimensions[16];
[...2186 lines suppressed...]
  0.011444421F, 0.012188144F, 0.012980198F, 0.013823725F,
  0.014722068F, 0.015678791F, 0.016697687F, 0.017782797F,
  0.018938423F, 0.020169149F, 0.021479854F, 0.022875735F,
  0.024362330F, 0.025945531F, 0.027631618F, 0.029427276F,
  0.031339626F, 0.033376252F, 0.035545228F, 0.037855157F,
  0.040315199F, 0.042935108F, 0.045725273F, 0.048696758F,
  0.051861348F, 0.055231591F, 0.058820850F, 0.062643361F,
  0.066714279F, 0.071049749F, 0.075666962F, 0.080584227F,
  0.085821044F, 0.091398179F, 0.097337747F, 0.10366330F,
  0.11039993F, 0.11757434F, 0.12521498F, 0.13335215F,
  0.14201813F, 0.15124727F, 0.16107617F, 0.17154380F,
  0.18269168F, 0.19456402F, 0.20720788F, 0.22067342F,
  0.23501402F, 0.25028656F, 0.26655159F, 0.28387361F,
  0.30232132F, 0.32196786F, 0.34289114F, 0.36517414F,
  0.38890521F, 0.41417847F, 0.44109412F, 0.46975890F,
  0.50028648F, 0.53279791F, 0.56742212F, 0.60429640F,
  0.64356699F, 0.68538959F, 0.72993007F, 0.77736504F,
  0.82788260F, 0.88168307F, 0.9389798F, 1.F,
};


Index: Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/Makefile,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -d -r1.186 -r1.187
--- Makefile	10 May 2005 21:02:20 -0000	1.186
+++ Makefile	17 May 2005 19:02:43 -0000	1.187
@@ -151,6 +151,9 @@
 ifneq ($(CONFIG_VMDVIDEO_DECODER)$(CONFIG_VMDAUDIO_DECODER),)
     OBJS+= vmdav.o
 endif
+ifeq ($(CONFIG_VORBIS_DECODER),yes)
+    OBJS+= vorbis.o
+endif
 ifneq ($(CONFIG_VP3_DECODER)$(CONFIG_THEORA_DECODER),)
     OBJS+= vp3.o
 endif

Index: avcodec.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/avcodec.h,v
retrieving revision 1.396
retrieving revision 1.397
diff -u -d -r1.396 -r1.397
--- avcodec.h	17 May 2005 11:12:04 -0000	1.396
+++ avcodec.h	17 May 2005 19:02:43 -0000	1.397
@@ -2018,6 +2018,7 @@
 extern AVCodec alac_decoder;
 extern AVCodec ws_snd1_decoder;
 extern AVCodec indeo2_decoder;
+extern AVCodec vorbis_decoder;
 
 /* pcm codecs */
 #define PCM_CODEC(id, name) \

Index: allcodecs.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/allcodecs.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- allcodecs.c	11 May 2005 16:42:15 -0000	1.103
+++ allcodecs.c	17 May 2005 19:02:43 -0000	1.104
@@ -55,7 +55,7 @@
 #ifdef CONFIG_OGGVORBIS_ENCODER
     register_avcodec(&oggvorbis_encoder);
 #endif //CONFIG_OGGVORBIS_ENCODER
-#ifdef CONFIG_OGGVORBIS_DECODER
+#if (defined CONFIG_OGGVORBIS_DECODER && !defined CONFIG_VORBIS_DECODER)
     register_avcodec(&oggvorbis_decoder);
 #endif //CONFIG_OGGVORBIS_DECODER
 #endif
@@ -476,6 +476,9 @@
 #ifdef CONFIG_WS_SND1_DECODER
     register_avcodec(&ws_snd1_decoder);
 #endif //CONFIG_WS_SND1_DECODER
+#ifdef CONFIG_VORBIS_DECODER
+    register_avcodec(&vorbis_decoder);
+#endif
 #endif /* CONFIG_DECODERS */
 
 #ifdef AMR_NB





More information about the ffmpeg-cvslog mailing list