Changeset e9e8b069d0538fd3551bae5f0c30fb7457939a7e

Show
Ignore:
Timestamp:
21/11/02 22:37:46 (6 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1037914666 +0000
git-parent:

[8e3e302dffe73b199cbfbb5faf6ce95cc0247a3f]

git-author:
Gildas Bazin <gbazin@videolan.org> 1037914666 +0000
Message:

* modules/codec/Modules.am, configure.ac.in, modules/codec/vorbis.c: added

a tremor decoder module using libvorbisidec (aka tremor) from xiph.org.
This module allows decoding vorbis audio on hardware without a fpu
(--enable-tremor).

* modules/LIST: added entries for tremor and theora.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac.in

    r1fdc92c re9e8b06  
    15031503    PLUGINS="${PLUGINS} vorbis" 
    15041504    LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis -logg" 
     1505   ],[]) 
     1506fi 
     1507 
     1508dnl 
     1509dnl  Tremor plugin 
     1510dnl 
     1511AC_ARG_ENABLE(tremor, 
     1512  [  --enable-tremor         Tremor decoder support (default disabled)]) 
     1513if test "x${enable_tremor}" = "xyes" 
     1514then 
     1515  AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [ 
     1516    PLUGINS="${PLUGINS} tremor" 
     1517    LDFLAGS_tremor="${LDFLAGS_tremor} -lvorbisidec -logg" 
    15051518   ],[]) 
    15061519fi 
  • modules/LIST

    r62fd025 re9e8b06  
    11List of vlc plugins 
    2 $Id: LIST,v 1.4 2002/11/18 13:02:16 gbazin Exp $ 
     2$Id: LIST,v 1.5 2002/11/21 21:37:46 gbazin Exp $ 
    33 
    44 * a52_system: input module for A52 decapsulation. 
     
    138138 * spudec: DVD subtitles decoder. 
    139139 
     140 * theora: a theora video decoder using the libtheora library. 
     141 
     142 * tremor: a vorbis audio decoder using the libvorbisidec (aka tremor) library. 
     143 
    140144 * vcd: input module for accessing Video CDs. 
    141145 
  • modules/codec/Modules.am

    r36b7d8e re9e8b06  
    55SOURCES_tarkin = modules/codec/tarkin.c 
    66SOURCES_theora = modules/codec/theora.c 
     7SOURCES_tremor = modules/codec/vorbis.c 
    78SOURCES_dv = modules/codec/dv.c 
    89SOURCES_xvid = modules/codec/xvid.c 
  • modules/codec/vorbis.c

    r42c7869 re9e8b06  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999-2001 VideoLAN 
    5  * $Id: vorbis.c,v 1.6 2002/11/15 00:41:00 gbazin Exp $ 
     5 * $Id: vorbis.c,v 1.7 2002/11/21 21:37:46 gbazin Exp $ 
    66 * 
    77 * Authors: Gildas Bazin <gbazin@netcourrier.com> 
     
    3636 
    3737#include <ogg/ogg.h> 
     38#ifdef MODULE_NAME_IS_tremor 
     39#include <tremor/ivorbiscodec.h> 
     40#else 
    3841#include <vorbis/codec.h> 
     42#endif 
    3943 
    4044/***************************************************************************** 
     
    96100static int  GetOggPacket ( dec_thread_t *, ogg_packet *, mtime_t * ); 
    97101 
     102#ifdef MODULE_NAME_IS_tremor 
     103static void Interleave   ( int32_t *, const int32_t **, int, int ); 
     104#else 
    98105static void Interleave   ( float *, const float **, int, int ); 
     106#endif 
    99107 
    100108/***************************************************************************** 
     
    185193    vorbis_block_init( &p_dec->vd, &p_dec->vb ); 
    186194 
     195#ifdef MODULE_NAME_IS_tremor 
     196    p_dec->output_format.i_format = VLC_FOURCC('f','i','3','2'); 
     197#else 
    187198    p_dec->output_format.i_format = VLC_FOURCC('f','l','3','2'); 
     199#endif 
    188200    p_dec->output_format.i_physical_channels = 
    189201        p_dec->output_format.i_original_channels = 
     
    242254    aout_buffer_t *p_aout_buffer; 
    243255    ogg_packet    oggpacket; 
     256#ifdef MODULE_NAME_IS_tremor 
     257    int32_t       **pp_pcm; 
     258#else 
    244259    float         **pp_pcm; 
     260#endif 
    245261    int           i_samples; 
    246262    mtime_t       i_pts; 
     
    279295 
    280296        /* Interleave the samples */ 
    281         Interleave( (float *)p_aout_buffer->p_buffer, (const float **)pp_pcm, 
    282                     p_dec->vi.channels, i_samples ); 
     297#ifdef MODULE_NAME_IS_tremor 
     298        Interleave( (int32_t *)p_aout_buffer->p_buffer, 
     299                    (const int32_t **)pp_pcm, p_dec->vi.channels, i_samples ); 
     300#else 
     301        Interleave( (float *)p_aout_buffer->p_buffer, 
     302                    (const float **)pp_pcm, p_dec->vi.channels, i_samples ); 
     303#endif 
    283304 
    284305        /* Tell libvorbis how many samples we actually consumed */ 
     
    325346 * Interleave: helper function to interleave channels 
    326347 *****************************************************************************/ 
    327 static void Interleave( float *p_out, const float **pp_in, int i_nb_channels, 
    328                         int i_samples ) 
     348#ifdef MODULE_NAME_IS_tremor 
     349static void Interleave( int32_t *p_out, const int32_t **pp_in, 
     350#else 
     351static void Interleave( float *p_out, const float **pp_in, 
     352#endif 
     353                        int i_nb_channels, int i_samples ) 
    329354{ 
    330355    int i, j;