Skip to content

Commit

Permalink
Bug 555121 - Update in-tree libvorbis to 1.3.1. rs=chris.double
Browse files Browse the repository at this point in the history
  • Loading branch information
kinetiknz committed Jun 17, 2010
1 parent e131e80 commit 45464b4
Show file tree
Hide file tree
Showing 17 changed files with 564 additions and 1,179 deletions.
4 changes: 1 addition & 3 deletions media/libvorbis/README_MOZILLA
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ subversion repository using the update.sh script. The only changes
made were those applied by update.sh and the addition/upate of
Makefile.in files for the Mozilla build system.

The svn revision number used was r16597.
The upstream release used was libvorbis 1.3.1.

Some files are renamed during the copy to prevent clashes with object
file names with other Mozilla libraries.

alloca.diff - Bug 469639 - Failed to build firefox trunk on OpenSolaris
bug487519.patch: fix for bug 487519.
bug498855.patch: fix for bug 498855
bug550184.patch: fix for bug 550184 (Xiph trac 1656)
36 changes: 0 additions & 36 deletions media/libvorbis/bug498855.patch

This file was deleted.

18 changes: 0 additions & 18 deletions media/libvorbis/bug550184.patch

This file was deleted.

4 changes: 2 additions & 2 deletions media/libvorbis/include/vorbis/codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
********************************************************************
function: libvorbis codec headers
last mod: $Id: codec.h 16037 2009-05-26 21:10:58Z xiphmont $
last mod: $Id: codec.h 17021 2010-03-24 09:29:41Z xiphmont $
********************************************************************/

Expand Down Expand Up @@ -121,7 +121,7 @@ typedef struct vorbis_block{

/* vorbis_block is a single block of data to be processed as part of
the analysis/synthesis stream; it belongs to a specific logical
bitstream, but is independant from other vorbis_blocks belonging to
bitstream, but is independent from other vorbis_blocks belonging to
that logical bitstream. *************************************************/

struct alloc_chain{
Expand Down
10 changes: 5 additions & 5 deletions media/libvorbis/lib/backends.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
function: libvorbis backend and mapping structures; needed for
static mode headers
last mod: $Id: backends.h 16552 2009-09-12 02:09:04Z xiphmont $
last mod: $Id: backends.h 16962 2010-03-11 07:30:34Z xiphmont $
********************************************************************/

Expand Down Expand Up @@ -93,10 +93,10 @@ typedef struct{
void (*free_info) (vorbis_info_residue *);
void (*free_look) (vorbis_look_residue *);
long **(*class) (struct vorbis_block *,vorbis_look_residue *,
float **,int *,int);
int **,int *,int);
int (*forward) (oggpack_buffer *,struct vorbis_block *,
vorbis_look_residue *,
float **,float **,int *,int,long **);
int **,int *,int,long **,int);
int (*inverse) (struct vorbis_block *,vorbis_look_residue *,
float **,int *,int);
} vorbis_func_residue;
Expand All @@ -114,8 +114,8 @@ typedef struct vorbis_info_residue0{
int secondstages[64]; /* expanded out to pointers in lookup */
int booklist[512]; /* list of second stage books */

const float classmetric1[64];
const float classmetric2[64];
const int classmetric1[64];
const int classmetric2[64];
} vorbis_info_residue0;

/* Mapping backend generic *****************************************/
Expand Down
53 changes: 6 additions & 47 deletions media/libvorbis/lib/codebook.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
********************************************************************
function: basic shared codebook operations
last mod: $Id: codebook.h 16227 2009-07-08 06:58:46Z xiphmont $
last mod: $Id: codebook.h 17030 2010-03-25 06:52:55Z xiphmont $
********************************************************************/

Expand Down Expand Up @@ -52,50 +52,9 @@ typedef struct static_codebook{
long *quantlist; /* map == 1: (int)(entries^(1/dim)) element column map
map == 2: list of dim*entries quantized entry vals
*/

/* encode helpers ********************************************************/
struct encode_aux_nearestmatch *nearest_tree;
struct encode_aux_threshmatch *thresh_tree;
struct encode_aux_pigeonhole *pigeon_tree;

int allocedp;
} static_codebook;

/* this structures an arbitrary trained book to quickly find the
nearest cell match */
typedef struct encode_aux_nearestmatch{
/* pre-calculated partitioning tree */
long *ptr0;
long *ptr1;

long *p; /* decision points (each is an entry) */
long *q; /* decision points (each is an entry) */
long aux; /* number of tree entries */
long alloc;
} encode_aux_nearestmatch;

/* assumes a maptype of 1; encode side only, so that's OK */
typedef struct encode_aux_threshmatch{
float *quantthresh;
long *quantmap;
int quantvals;
int threshvals;
} encode_aux_threshmatch;

typedef struct encode_aux_pigeonhole{
float min;
float del;

int mapentries;
int quantvals;
long *pigeonmap;

long fittotal;
long *fitlist;
long *fitmap;
long *fitlength;
} encode_aux_pigeonhole;

typedef struct codebook{
long dim; /* codebook dimensions (elements per vector) */
long entries; /* codebook entries */
Expand All @@ -114,9 +73,12 @@ typedef struct codebook{
int dec_firsttablen;
int dec_maxlength;

/* The current encoder uses only centered, integer-only lattice books. */
int quantvals;
int minval;
int delta;
} codebook;

extern void vorbis_staticbook_clear(static_codebook *b);
extern void vorbis_staticbook_destroy(static_codebook *b);
extern int vorbis_book_init_encode(codebook *dest,const static_codebook *source);
extern int vorbis_book_init_decode(codebook *dest,const static_codebook *source);
Expand All @@ -137,12 +99,9 @@ extern long vorbis_book_codelen(codebook *book,int entry);


extern int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *b);
extern int vorbis_staticbook_unpack(oggpack_buffer *b,static_codebook *c);
extern static_codebook *vorbis_staticbook_unpack(oggpack_buffer *b);

extern int vorbis_book_encode(codebook *book, int a, oggpack_buffer *b);
extern int vorbis_book_errorv(codebook *book, float *a);
extern int vorbis_book_encodev(codebook *book, int best,float *a,
oggpack_buffer *b);

extern long vorbis_book_decode(codebook *book, oggpack_buffer *b);
extern long vorbis_book_decodevs_add(codebook *book, float *a,
Expand Down
12 changes: 7 additions & 5 deletions media/libvorbis/lib/highlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
********************************************************************
function: highlevel encoder setup struct seperated out for vorbisenc clarity
last mod: $Id: highlevel.h 16227 2009-07-08 06:58:46Z xiphmont $
last mod: $Id: highlevel.h 16995 2010-03-23 03:44:44Z xiphmont $
********************************************************************/

Expand All @@ -23,14 +23,14 @@ typedef struct highlevel_byblocktype {
} highlevel_byblocktype;

typedef struct highlevel_encode_setup {
const void *setup;
int set_in_stone;

const void *setup;
double base_setting;
double long_setting;
double short_setting;

double impulse_noisetune;

/* bitrate management below all settable */
float req;
int managed;
long bitrate_min;
long bitrate_av;
Expand All @@ -41,9 +41,11 @@ typedef struct highlevel_encode_setup {

int impulse_block_p;
int noise_normalize_p;
int coupling_p;

double stereo_point_setting;
double lowpass_kHz;
int lowpass_altered;

double ath_floating_dB;
double ath_absolute_dB;
Expand Down
53 changes: 11 additions & 42 deletions media/libvorbis/lib/psy.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
********************************************************************
function: random psychoacoustics (not including preecho)
last mod: $Id: psy.h 16227 2009-07-08 06:58:46Z xiphmont $
last mod: $Id: psy.h 16946 2010-03-03 16:12:40Z xiphmont $
********************************************************************/

Expand Down Expand Up @@ -57,8 +57,7 @@ typedef struct vorbis_info_psy{

float max_curve_dB;

int normal_channel_p;
int normal_point_p;
int normal_p;
int normal_start;
int normal_partition;
double normal_thresh;
Expand Down Expand Up @@ -122,12 +121,6 @@ extern void *_vi_psy_dup(void *source);
extern void _vi_psy_free(vorbis_info_psy *i);
extern vorbis_info_psy *_vi_psy_copy(vorbis_info_psy *i);

extern void _vp_remove_floor(vorbis_look_psy *p,
float *mdct,
int *icodedflr,
float *residue,
int sliding_lowpass);

extern void _vp_noisemask(vorbis_look_psy *p,
float *logmdct,
float *logmask);
Expand All @@ -148,38 +141,14 @@ extern void _vp_offset_and_mix(vorbis_look_psy *p,

extern float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd);

extern float **_vp_quantize_couple_memo(vorbis_block *vb,
vorbis_info_psy_global *g,
vorbis_look_psy *p,
vorbis_info_mapping0 *vi,
float **mdct);

extern void _vp_couple(int blobno,
vorbis_info_psy_global *g,
vorbis_look_psy *p,
vorbis_info_mapping0 *vi,
float **res,
float **mag_memo,
int **mag_sort,
int **ifloor,
int *nonzero,
int sliding_lowpass);

extern void _vp_noise_normalize(vorbis_look_psy *p,
float *in,float *out,int *sortedindex);

extern void _vp_noise_normalize_sort(vorbis_look_psy *p,
float *magnitudes,int *sortedindex);

extern int **_vp_quantize_couple_sort(vorbis_block *vb,
vorbis_look_psy *p,
vorbis_info_mapping0 *vi,
float **mags);

extern void hf_reduction(vorbis_info_psy_global *g,
vorbis_look_psy *p,
vorbis_info_mapping0 *vi,
float **mdct);

extern void _vp_couple_quantize_normalize(int blobno,
vorbis_info_psy_global *g,
vorbis_look_psy *p,
vorbis_info_mapping0 *vi,
float **mdct,
int **iwork,
int *nonzero,
int sliding_lowpass,
int ch);

#endif
Loading

0 comments on commit 45464b4

Please sign in to comment.