Bug 931060 - Add encoder files to in-tree libvorbis. r=xiphmont

Add vorbisenc.c and its dependent headers to the libvorbis build
and export the relevant symbols. Based on a patch by Benjamin Chen.
This commit is contained in:
Ralph Giles 2013-11-12 09:30:16 +13:00
parent 29894017e6
commit c7923e2ca1
28 changed files with 42756 additions and 0 deletions

View File

@ -71,11 +71,19 @@ ogg_sync_init
ogg_sync_pageseek
ogg_sync_reset
ogg_sync_wrote
vorbis_analysis
vorbis_analysis_blockout
vorbis_analysis_buffer
vorbis_analysis_init
vorbis_analysis_headerout
vorbis_analysis_wrote
vorbis_block_clear
vorbis_block_init
vorbis_comment_add_tag
vorbis_comment_clear
vorbis_comment_init
vorbis_dsp_clear
vorbis_encode_init_vbr
vorbis_info_clear
vorbis_info_init
vorbis_packet_blocksize

View File

@ -0,0 +1,436 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: vorbis encode-engine setup
last mod: $Id: vorbisenc.h 17021 2010-03-24 09:29:41Z xiphmont $
********************************************************************/
/** \file
* Libvorbisenc is a convenient API for setting up an encoding
* environment using libvorbis. Libvorbisenc encapsulates the
* actions needed to set up the encoder properly.
*/
#ifndef _OV_ENC_H_
#define _OV_ENC_H_
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
#include "codec.h"
/**
* This is the primary function within libvorbisenc for setting up managed
* bitrate modes.
*
* Before this function is called, the \ref vorbis_info
* struct should be initialized by using vorbis_info_init() from the libvorbis
* API. After encoding, vorbis_info_clear() should be called.
*
* The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set
* constraints for the encoded file. This function uses these settings to
* select the appropriate encoding mode and set it up.
*
* \param vi Pointer to an initialized \ref vorbis_info struct.
* \param channels The number of channels to be encoded.
* \param rate The sampling rate of the source audio.
* \param max_bitrate Desired maximum bitrate (limit). -1 indicates unset.
* \param nominal_bitrate Desired average, or central, bitrate. -1 indicates unset.
* \param min_bitrate Desired minimum bitrate. -1 indicates unset.
*
* \return Zero for success, and negative values for failure.
*
* \retval 0 Success.
* \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption.
* \retval OV_EINVAL Invalid setup request, eg, out of range argument.
* \retval OV_EIMPL Unimplemented mode; unable to comply with bitrate request.
*/
extern int vorbis_encode_init(vorbis_info *vi,
long channels,
long rate,
long max_bitrate,
long nominal_bitrate,
long min_bitrate);
/**
* This function performs step-one of a three-step bitrate-managed encode
* setup. It functions similarly to the one-step setup performed by \ref
* vorbis_encode_init but allows an application to make further encode setup
* tweaks using \ref vorbis_encode_ctl before finally calling \ref
* vorbis_encode_setup_init to complete the setup process.
*
* Before this function is called, the \ref vorbis_info struct should be
* initialized by using vorbis_info_init() from the libvorbis API. After
* encoding, vorbis_info_clear() should be called.
*
* The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set
* constraints for the encoded file. This function uses these settings to
* select the appropriate encoding mode and set it up.
*
* \param vi Pointer to an initialized vorbis_info struct.
* \param channels The number of channels to be encoded.
* \param rate The sampling rate of the source audio.
* \param max_bitrate Desired maximum bitrate (limit). -1 indicates unset.
* \param nominal_bitrate Desired average, or central, bitrate. -1 indicates unset.
* \param min_bitrate Desired minimum bitrate. -1 indicates unset.
*
* \return Zero for success, and negative for failure.
*
* \retval 0 Success
* \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption.
* \retval OV_EINVAL Invalid setup request, eg, out of range argument.
* \retval OV_EIMPL Unimplemented mode; unable to comply with bitrate request.
*/
extern int vorbis_encode_setup_managed(vorbis_info *vi,
long channels,
long rate,
long max_bitrate,
long nominal_bitrate,
long min_bitrate);
/**
* This function performs step-one of a three-step variable bitrate
* (quality-based) encode setup. It functions similarly to the one-step setup
* performed by \ref vorbis_encode_init_vbr() but allows an application to
* make further encode setup tweaks using \ref vorbis_encode_ctl() before
* finally calling \ref vorbis_encode_setup_init to complete the setup
* process.
*
* Before this function is called, the \ref vorbis_info struct should be
* initialized by using \ref vorbis_info_init() from the libvorbis API. After
* encoding, vorbis_info_clear() should be called.
*
* \param vi Pointer to an initialized vorbis_info struct.
* \param channels The number of channels to be encoded.
* \param rate The sampling rate of the source audio.
* \param quality Desired quality level, currently from -0.1 to 1.0 (lo to hi).
*
* \return Zero for success, and negative values for failure.
*
* \retval 0 Success
* \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption.
* \retval OV_EINVAL Invalid setup request, eg, out of range argument.
* \retval OV_EIMPL Unimplemented mode; unable to comply with quality level request.
*/
extern int vorbis_encode_setup_vbr(vorbis_info *vi,
long channels,
long rate,
float quality
);
/**
* This is the primary function within libvorbisenc for setting up variable
* bitrate ("quality" based) modes.
*
*
* Before this function is called, the vorbis_info struct should be
* initialized by using vorbis_info_init() from the libvorbis API. After
* encoding, vorbis_info_clear() should be called.
*
* \param vi Pointer to an initialized vorbis_info struct.
* \param channels The number of channels to be encoded.
* \param rate The sampling rate of the source audio.
* \param base_quality Desired quality level, currently from -0.1 to 1.0 (lo to hi).
*
*
* \return Zero for success, or a negative number for failure.
*
* \retval 0 Success
* \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption.
* \retval OV_EINVAL Invalid setup request, eg, out of range argument.
* \retval OV_EIMPL Unimplemented mode; unable to comply with quality level request.
*/
extern int vorbis_encode_init_vbr(vorbis_info *vi,
long channels,
long rate,
float base_quality
);
/**
* This function performs the last stage of three-step encoding setup, as
* described in the API overview under managed bitrate modes.
*
* Before this function is called, the \ref vorbis_info struct should be
* initialized by using vorbis_info_init() from the libvorbis API, one of
* \ref vorbis_encode_setup_managed() or \ref vorbis_encode_setup_vbr() called to
* initialize the high-level encoding setup, and \ref vorbis_encode_ctl()
* called if necessary to make encoding setup changes.
* vorbis_encode_setup_init() finalizes the highlevel encoding structure into
* a complete encoding setup after which the application may make no further
* setup changes.
*
* After encoding, vorbis_info_clear() should be called.
*
* \param vi Pointer to an initialized \ref vorbis_info struct.
*
* \return Zero for success, and negative values for failure.
*
* \retval 0 Success.
* \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption.
*
* \retval OV_EINVAL Attempt to use vorbis_encode_setup_init() without first
* calling one of vorbis_encode_setup_managed() or vorbis_encode_setup_vbr() to
* initialize the high-level encoding setup
*
*/
extern int vorbis_encode_setup_init(vorbis_info *vi);
/**
* This function implements a generic interface to miscellaneous encoder
* settings similar to the classic UNIX 'ioctl()' system call. Applications
* may use vorbis_encode_ctl() to query or set bitrate management or quality
* mode details by using one of several \e request arguments detailed below.
* vorbis_encode_ctl() must be called after one of
* vorbis_encode_setup_managed() or vorbis_encode_setup_vbr(). When used
* to modify settings, \ref vorbis_encode_ctl() must be called before \ref
* vorbis_encode_setup_init().
*
* \param vi Pointer to an initialized vorbis_info struct.
*
* \param number Specifies the desired action; See \ref encctlcodes "the list
* of available requests".
*
* \param arg void * pointing to a data structure matching the request
* argument.
*
* \retval 0 Success. Any further return information (such as the result of a
* query) is placed into the storage pointed to by *arg.
*
* \retval OV_EINVAL Invalid argument, or an attempt to modify a setting after
* calling vorbis_encode_setup_init().
*
* \retval OV_EIMPL Unimplemented or unknown request
*/
extern int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg);
/**
* \deprecated This is a deprecated interface. Please use vorbis_encode_ctl()
* with the \ref ovectl_ratemanage2_arg struct and \ref
* OV_ECTL_RATEMANAGE2_GET and \ref OV_ECTL_RATEMANAGE2_SET calls in new code.
*
* The \ref ovectl_ratemanage_arg structure is used with vorbis_encode_ctl()
* and the \ref OV_ECTL_RATEMANAGE_GET, \ref OV_ECTL_RATEMANAGE_SET, \ref
* OV_ECTL_RATEMANAGE_AVG, \ref OV_ECTL_RATEMANAGE_HARD calls in order to
* query and modify specifics of the encoder's bitrate management
* configuration.
*/
struct ovectl_ratemanage_arg {
int management_active; /**< nonzero if bitrate management is active*/
/** hard lower limit (in kilobits per second) below which the stream bitrate
will never be allowed for any given bitrate_hard_window seconds of time.*/
long bitrate_hard_min;
/** hard upper limit (in kilobits per second) above which the stream bitrate
will never be allowed for any given bitrate_hard_window seconds of time.*/
long bitrate_hard_max;
/** the window period (in seconds) used to regulate the hard bitrate minimum
and maximum*/
double bitrate_hard_window;
/** soft lower limit (in kilobits per second) below which the average bitrate
tracker will start nudging the bitrate higher.*/
long bitrate_av_lo;
/** soft upper limit (in kilobits per second) above which the average bitrate
tracker will start nudging the bitrate lower.*/
long bitrate_av_hi;
/** the window period (in seconds) used to regulate the average bitrate
minimum and maximum.*/
double bitrate_av_window;
/** Regulates the relative centering of the average and hard windows; in
libvorbis 1.0 and 1.0.1, the hard window regulation overlapped but
followed the average window regulation. In libvorbis 1.1 a bit-reservoir
interface replaces the old windowing interface; the older windowing
interface is simulated and this field has no effect.*/
double bitrate_av_window_center;
};
/**
* \name struct ovectl_ratemanage2_arg
*
* The ovectl_ratemanage2_arg structure is used with vorbis_encode_ctl() and
* the OV_ECTL_RATEMANAGE2_GET and OV_ECTL_RATEMANAGE2_SET calls in order to
* query and modify specifics of the encoder's bitrate management
* configuration.
*
*/
struct ovectl_ratemanage2_arg {
int management_active; /**< nonzero if bitrate management is active */
/** Lower allowed bitrate limit in kilobits per second */
long bitrate_limit_min_kbps;
/** Upper allowed bitrate limit in kilobits per second */
long bitrate_limit_max_kbps;
long bitrate_limit_reservoir_bits; /**<Size of the bitrate reservoir in bits */
/** Regulates the bitrate reservoir's preferred fill level in a range from 0.0
* to 1.0; 0.0 tries to bank bits to buffer against future bitrate spikes, 1.0
* buffers against future sudden drops in instantaneous bitrate. Default is
* 0.1
*/
double bitrate_limit_reservoir_bias;
/** Average bitrate setting in kilobits per second */
long bitrate_average_kbps;
/** Slew rate limit setting for average bitrate adjustment; sets the minimum
* time in seconds the bitrate tracker may swing from one extreme to the
* other when boosting or damping average bitrate.
*/
double bitrate_average_damping;
};
/**
* \name vorbis_encode_ctl() codes
*
* \anchor encctlcodes
*
* These values are passed as the \c number parameter of vorbis_encode_ctl().
* The type of the referent of that function's \c arg pointer depends on these
* codes.
*/
/*@{*/
/**
* Query the current encoder bitrate management setting.
*
*Argument: <tt>struct ovectl_ratemanage2_arg *</tt>
*
* Used to query the current encoder bitrate management setting. Also used to
* initialize fields of an ovectl_ratemanage2_arg structure for use with
* \ref OV_ECTL_RATEMANAGE2_SET.
*/
#define OV_ECTL_RATEMANAGE2_GET 0x14
/**
* Set the current encoder bitrate management settings.
*
* Argument: <tt>struct ovectl_ratemanage2_arg *</tt>
*
* Used to set the current encoder bitrate management settings to the values
* listed in the ovectl_ratemanage2_arg. Passing a NULL pointer will disable
* bitrate management.
*/
#define OV_ECTL_RATEMANAGE2_SET 0x15
/**
* Returns the current encoder hard-lowpass setting (kHz) in the double
* pointed to by arg.
*
* Argument: <tt>double *</tt>
*/
#define OV_ECTL_LOWPASS_GET 0x20
/**
* Sets the encoder hard-lowpass to the value (kHz) pointed to by arg. Valid
* lowpass settings range from 2 to 99.
*
* Argument: <tt>double *</tt>
*/
#define OV_ECTL_LOWPASS_SET 0x21
/**
* Returns the current encoder impulse block setting in the double pointed
* to by arg.
*
* Argument: <tt>double *</tt>
*/
#define OV_ECTL_IBLOCK_GET 0x30
/**
* Sets the impulse block bias to the the value pointed to by arg.
*
* Argument: <tt>double *</tt>
*
* Valid range is -15.0 to 0.0 [default]. A negative impulse block bias will
* direct to encoder to use more bits when incoding short blocks that contain
* strong impulses, thus improving the accuracy of impulse encoding.
*/
#define OV_ECTL_IBLOCK_SET 0x31
/**
* Returns the current encoder coupling setting in the int pointed
* to by arg.
*
* Argument: <tt>int *</tt>
*/
#define OV_ECTL_COUPLING_GET 0x40
/**
* Enables/disables channel coupling in multichannel encoding according to arg.
*
* Argument: <tt>int *</tt>
*
* Zero disables channel coupling for multichannel inputs, nonzer enables
* channel coupling. Setting has no effect on monophonic encoding or
* multichannel counts that do not offer coupling. At present, coupling is
* available for stereo and 5.1 encoding.
*/
#define OV_ECTL_COUPLING_SET 0x41
/* deprecated rate management supported only for compatibility */
/**
* Old interface to querying bitrate management settings.
*
* Deprecated after move to bit-reservoir style management in 1.1 rendered
* this interface partially obsolete.
* \deprecated Please use \ref OV_ECTL_RATEMANAGE2_GET instead.
*
* Argument: <tt>struct ovectl_ratemanage_arg *</tt>
*/
#define OV_ECTL_RATEMANAGE_GET 0x10
/**
* Old interface to modifying bitrate management settings.
*
* deprecated after move to bit-reservoir style management in 1.1 rendered
* this interface partially obsolete.
*
* \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead.
*
* Argument: <tt>struct ovectl_ratemanage_arg *</tt>
*/
#define OV_ECTL_RATEMANAGE_SET 0x11
/**
* Old interface to setting average-bitrate encoding mode.
*
* Deprecated after move to bit-reservoir style management in 1.1 rendered
* this interface partially obsolete.
*
* \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead.
*
* Argument: <tt>struct ovectl_ratemanage_arg *</tt>
*/
#define OV_ECTL_RATEMANAGE_AVG 0x12
/**
* Old interface to setting bounded-bitrate encoding modes.
*
* deprecated after move to bit-reservoir style management in 1.1 rendered
* this interface partially obsolete.
*
* \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead.
*
* Argument: <tt>struct ovectl_ratemanage_arg *</tt>
*/
#define OV_ECTL_RATEMANAGE_HARD 0x13
/*@}*/
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,260 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: key floor settings
last mod: $Id: floor_all.h 17050 2010-03-26 01:34:42Z xiphmont $
********************************************************************/
#include "vorbis/codec.h"
#include "backends.h"
#include "books/floor/floor_books.h"
static const static_codebook*const _floor_128x4_books[]={
&_huff_book_line_128x4_class0,
&_huff_book_line_128x4_0sub0,
&_huff_book_line_128x4_0sub1,
&_huff_book_line_128x4_0sub2,
&_huff_book_line_128x4_0sub3,
};
static const static_codebook*const _floor_256x4_books[]={
&_huff_book_line_256x4_class0,
&_huff_book_line_256x4_0sub0,
&_huff_book_line_256x4_0sub1,
&_huff_book_line_256x4_0sub2,
&_huff_book_line_256x4_0sub3,
};
static const static_codebook*const _floor_128x7_books[]={
&_huff_book_line_128x7_class0,
&_huff_book_line_128x7_class1,
&_huff_book_line_128x7_0sub1,
&_huff_book_line_128x7_0sub2,
&_huff_book_line_128x7_0sub3,
&_huff_book_line_128x7_1sub1,
&_huff_book_line_128x7_1sub2,
&_huff_book_line_128x7_1sub3,
};
static const static_codebook*const _floor_256x7_books[]={
&_huff_book_line_256x7_class0,
&_huff_book_line_256x7_class1,
&_huff_book_line_256x7_0sub1,
&_huff_book_line_256x7_0sub2,
&_huff_book_line_256x7_0sub3,
&_huff_book_line_256x7_1sub1,
&_huff_book_line_256x7_1sub2,
&_huff_book_line_256x7_1sub3,
};
static const static_codebook*const _floor_128x11_books[]={
&_huff_book_line_128x11_class1,
&_huff_book_line_128x11_class2,
&_huff_book_line_128x11_class3,
&_huff_book_line_128x11_0sub0,
&_huff_book_line_128x11_1sub0,
&_huff_book_line_128x11_1sub1,
&_huff_book_line_128x11_2sub1,
&_huff_book_line_128x11_2sub2,
&_huff_book_line_128x11_2sub3,
&_huff_book_line_128x11_3sub1,
&_huff_book_line_128x11_3sub2,
&_huff_book_line_128x11_3sub3,
};
static const static_codebook*const _floor_128x17_books[]={
&_huff_book_line_128x17_class1,
&_huff_book_line_128x17_class2,
&_huff_book_line_128x17_class3,
&_huff_book_line_128x17_0sub0,
&_huff_book_line_128x17_1sub0,
&_huff_book_line_128x17_1sub1,
&_huff_book_line_128x17_2sub1,
&_huff_book_line_128x17_2sub2,
&_huff_book_line_128x17_2sub3,
&_huff_book_line_128x17_3sub1,
&_huff_book_line_128x17_3sub2,
&_huff_book_line_128x17_3sub3,
};
static const static_codebook*const _floor_256x4low_books[]={
&_huff_book_line_256x4low_class0,
&_huff_book_line_256x4low_0sub0,
&_huff_book_line_256x4low_0sub1,
&_huff_book_line_256x4low_0sub2,
&_huff_book_line_256x4low_0sub3,
};
static const static_codebook*const _floor_1024x27_books[]={
&_huff_book_line_1024x27_class1,
&_huff_book_line_1024x27_class2,
&_huff_book_line_1024x27_class3,
&_huff_book_line_1024x27_class4,
&_huff_book_line_1024x27_0sub0,
&_huff_book_line_1024x27_1sub0,
&_huff_book_line_1024x27_1sub1,
&_huff_book_line_1024x27_2sub0,
&_huff_book_line_1024x27_2sub1,
&_huff_book_line_1024x27_3sub1,
&_huff_book_line_1024x27_3sub2,
&_huff_book_line_1024x27_3sub3,
&_huff_book_line_1024x27_4sub1,
&_huff_book_line_1024x27_4sub2,
&_huff_book_line_1024x27_4sub3,
};
static const static_codebook*const _floor_2048x27_books[]={
&_huff_book_line_2048x27_class1,
&_huff_book_line_2048x27_class2,
&_huff_book_line_2048x27_class3,
&_huff_book_line_2048x27_class4,
&_huff_book_line_2048x27_0sub0,
&_huff_book_line_2048x27_1sub0,
&_huff_book_line_2048x27_1sub1,
&_huff_book_line_2048x27_2sub0,
&_huff_book_line_2048x27_2sub1,
&_huff_book_line_2048x27_3sub1,
&_huff_book_line_2048x27_3sub2,
&_huff_book_line_2048x27_3sub3,
&_huff_book_line_2048x27_4sub1,
&_huff_book_line_2048x27_4sub2,
&_huff_book_line_2048x27_4sub3,
};
static const static_codebook*const _floor_512x17_books[]={
&_huff_book_line_512x17_class1,
&_huff_book_line_512x17_class2,
&_huff_book_line_512x17_class3,
&_huff_book_line_512x17_0sub0,
&_huff_book_line_512x17_1sub0,
&_huff_book_line_512x17_1sub1,
&_huff_book_line_512x17_2sub1,
&_huff_book_line_512x17_2sub2,
&_huff_book_line_512x17_2sub3,
&_huff_book_line_512x17_3sub1,
&_huff_book_line_512x17_3sub2,
&_huff_book_line_512x17_3sub3,
};
static const static_codebook*const _floor_Xx0_books[]={
0
};
static const static_codebook*const *const _floor_books[11]={
_floor_128x4_books,
_floor_256x4_books,
_floor_128x7_books,
_floor_256x7_books,
_floor_128x11_books,
_floor_128x17_books,
_floor_256x4low_books,
_floor_1024x27_books,
_floor_2048x27_books,
_floor_512x17_books,
_floor_Xx0_books,
};
static const vorbis_info_floor1 _floor[11]={
/* 0: 128 x 4 */
{
1,{0},{4},{2},{0},
{{1,2,3,4}},
4,{0,128, 33,8,16,70},
60,30,500, 1.,18., 128
},
/* 1: 256 x 4 */
{
1,{0},{4},{2},{0},
{{1,2,3,4}},
4,{0,256, 66,16,32,140},
60,30,500, 1.,18., 256
},
/* 2: 128 x 7 */
{
2,{0,1},{3,4},{2,2},{0,1},
{{-1,2,3,4},{-1,5,6,7}},
4,{0,128, 14,4,58, 2,8,28,90},
60,30,500, 1.,18., 128
},
/* 3: 256 x 7 */
{
2,{0,1},{3,4},{2,2},{0,1},
{{-1,2,3,4},{-1,5,6,7}},
4,{0,256, 28,8,116, 4,16,56,180},
60,30,500, 1.,18., 256
},
/* 4: 128 x 11 */
{
4,{0,1,2,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
{{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
2,{0,128, 8,33, 4,16,70, 2,6,12, 23,46,90},
60,30,500, 1,18., 128
},
/* 5: 128 x 17 */
{
6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
{{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
2,{0,128, 12,46, 4,8,16, 23,33,70, 2,6,10, 14,19,28, 39,58,90},
60,30,500, 1,18., 128
},
/* 6: 256 x 4 (low bitrate version) */
{
1,{0},{4},{2},{0},
{{1,2,3,4}},
4,{0,256, 66,16,32,140},
60,30,500, 1.,18., 256
},
/* 7: 1024 x 27 */
{
8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
{{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
2,{0,1024, 93,23,372, 6,46,186,750, 14,33,65, 130,260,556,
3,10,18,28, 39,55,79,111, 158,220,312, 464,650,850},
60,30,500, 3,18., 1024
},
/* 8: 2048 x 27 */
{
8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
{{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
2,{0,2048, 186,46,744, 12,92,372,1500, 28,66,130, 260,520,1112,
6,20,36,56, 78,110,158,222, 316,440,624, 928,1300,1700},
60,30,500, 3,18., 2048
},
/* 9: 512 x 17 */
{
6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
{{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
2,{0,512, 46,186, 16,33,65, 93,130,278,
7,23,39, 55,79,110, 156,232,360},
60,30,500, 1,18., 512
},
/* 10: X x 0 (LFE floor; edge posts only) */
{
0,{0}, {0},{0},{-1},
{{-1}},
2,{0,12},
60,30,500, 1.,18., 10
},
};

View File

@ -0,0 +1,51 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: 11kHz settings
last mod: $Id: psych_11.h 16227 2009-07-08 06:58:46Z xiphmont $
********************************************************************/
static const double _psy_lowpass_11[3]={4.5,5.5,30.,};
static const att3 _psy_tone_masteratt_11[3]={
{{ 30, 25, 12}, 0, 0}, /* 0 */
{{ 30, 25, 12}, 0, 0}, /* 0 */
{{ 20, 0, -14}, 0, 0}, /* 0 */
};
static const vp_adjblock _vp_tonemask_adj_11[3]={
/* adjust for mode zero */
/* 63 125 250 500 1 2 4 8 16 */
{{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 2, 0,99,99,99}}, /* 0 */
{{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 5, 0, 0,99,99,99}}, /* 1 */
{{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 2 */
};
static const noise3 _psy_noisebias_11[3]={
/* 63 125 250 500 1k 2k 4k 8k 16k*/
{{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 10, 10, 12, 12, 12, 99, 99, 99},
{-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 4, 5, 5, 10, 99, 99, 99},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
{{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 10, 10, 12, 12, 12, 99, 99, 99},
{-15,-15,-15,-15,-10,-10, -5, -5, -5, 0, 0, 0, 0, 0, 99, 99, 99},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 99, 99, 99},
{-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10, 99, 99, 99},
{-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}},
};
static const double _noise_thresh_11[3]={ .3,.5,.5 };

View File

@ -0,0 +1,133 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: 16kHz settings
last mod: $Id: psych_16.h 16227 2009-07-08 06:58:46Z xiphmont $
********************************************************************/
/* stereo mode by base quality level */
static const adj_stereo _psy_stereo_modes_16[4]={
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
{{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
{ 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
{ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
{{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
{ 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
{ 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
{{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
{ 5, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
};
static const double _psy_lowpass_16[4]={6.5,8,30.,99.};
static const att3 _psy_tone_masteratt_16[4]={
{{ 30, 25, 12}, 0, 0}, /* 0 */
{{ 25, 22, 12}, 0, 0}, /* 0 */
{{ 20, 12, 0}, 0, 0}, /* 0 */
{{ 15, 0, -14}, 0, 0}, /* 0 */
};
static const vp_adjblock _vp_tonemask_adj_16[4]={
/* adjust for mode zero */
/* 63 125 250 500 1 2 4 8 16 */
{{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 0 */
{{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 1 */
{{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */
{{-30,-30,-30,-30,-30,-26,-20,-10, -5, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */
};
static const noise3 _psy_noisebias_16_short[4]={
/* 63 125 250 500 1k 2k 4k 8k 16k*/
{{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20},
{-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}},
{{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 6, 6, 6, 6, 8, 10, 12, 20},
{-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5, 4, 5, 6, 8, 8, 15},
{-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}},
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 12},
{-20,-20,-20,-20,-16,-12,-20,-14,-10,-10, -8, 0, 0, 0, 0, 2, 5},
{-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
{{{-15,-15,-15,-15,-15,-12,-10, -8, -5, -5, -5, -5, -5, 0, 0, 0, 6},
{-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10,-10,-10, -6},
{-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
};
static const noise3 _psy_noisebias_16_impulse[4]={
/* 63 125 250 500 1k 2k 4k 8k 16k*/
{{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20},
{-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}},
{{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 4, 4, 4, 5, 5, 6, 8, 15},
{-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5, 0, 0, 0, 0, 4, 10},
{-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}},
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 4, 10},
{-20,-20,-20,-20,-16,-12,-20,-14,-10,-10,-10,-10,-10,-10,-10, -7, -5},
{-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
{{{-15,-15,-15,-15,-15,-12,-10, -8, -5, -5, -5, -5, -5, 0, 0, 0, 6},
{-30,-30,-30,-30,-26,-22,-20,-18,-18,-18,-20,-20,-20,-20,-20,-20,-16},
{-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
};
static const noise3 _psy_noisebias_16[4]={
/* 63 125 250 500 1k 2k 4k 8k 16k*/
{{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 6, 8, 8, 10, 10, 10, 14, 20},
{-10,-10,-10,-10,-10, -5, -2, -2, 0, 0, 0, 4, 5, 6, 8, 8, 15},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}},
{{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 6, 6, 6, 6, 8, 10, 12, 20},
{-15,-15,-15,-15,-15,-10, -5, -5, 0, 0, 0, 4, 5, 6, 8, 8, 15},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}},
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 12},
{-20,-20,-20,-20,-16,-12,-20,-10, -5, -5, 0, 0, 0, 0, 0, 2, 5},
{-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
{{{-15,-15,-15,-15,-15,-12,-10, -8, -5, -5, -5, -5, -5, 0, 0, 0, 6},
{-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10,-10,-10, -6},
{-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}},
};
static const noiseguard _psy_noiseguards_16[4]={
{10,10,-1},
{10,10,-1},
{20,20,-1},
{20,20,-1},
};
static const double _noise_thresh_16[4]={ .3,.5,.5,.5 };
static const int _noise_start_16[3]={ 256,256,9999 };
static const int _noise_part_16[4]={ 8,8,8,8 };
static const int _psy_ath_floater_16[4]={
-100,-100,-100,-105,
};
static const int _psy_ath_abs_16[4]={
-130,-130,-130,-140,
};

View File

@ -0,0 +1,642 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: key psychoacoustic settings for 44.1/48kHz
last mod: $Id: psych_44.h 16962 2010-03-11 07:30:34Z xiphmont $
********************************************************************/
/* preecho trigger settings *****************************************/
static const vorbis_info_psy_global _psy_global_44[5]={
{8, /* lines per eighth octave */
{20.f,14.f,12.f,12.f,12.f,12.f,12.f},
{-60.f,-30.f,-40.f,-40.f,-40.f,-40.f,-40.f}, 2,-75.f,
-6.f,
{99.},{{99.},{99.}},{0},{0},{{0.},{0.}}
},
{8, /* lines per eighth octave */
{14.f,10.f,10.f,10.f,10.f,10.f,10.f},
{-40.f,-30.f,-25.f,-25.f,-25.f,-25.f,-25.f}, 2,-80.f,
-6.f,
{99.},{{99.},{99.}},{0},{0},{{0.},{0.}}
},
{8, /* lines per eighth octave */
{12.f,10.f,10.f,10.f,10.f,10.f,10.f},
{-20.f,-20.f,-15.f,-15.f,-15.f,-15.f,-15.f}, 0,-80.f,
-6.f,
{99.},{{99.},{99.}},{0},{0},{{0.},{0.}}
},
{8, /* lines per eighth octave */
{10.f,8.f,8.f,8.f,8.f,8.f,8.f},
{-20.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-80.f,
-6.f,
{99.},{{99.},{99.}},{0},{0},{{0.},{0.}}
},
{8, /* lines per eighth octave */
{10.f,6.f,6.f,6.f,6.f,6.f,6.f},
{-15.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-85.f,
-6.f,
{99.},{{99.},{99.}},{0},{0},{{0.},{0.}}
},
};
/* noise compander lookups * low, mid, high quality ****************/
static const compandblock _psy_compand_44[6]={
/* sub-mode Z short */
{{
0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */
8, 9,10,11,12,13,14, 15, /* 15dB */
16,17,18,19,20,21,22, 23, /* 23dB */
24,25,26,27,28,29,30, 31, /* 31dB */
32,33,34,35,36,37,38, 39, /* 39dB */
}},
/* mode_Z nominal short */
{{
0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */
7, 7, 7, 7, 6, 6, 6, 7, /* 15dB */
7, 8, 9,10,11,12,13, 14, /* 23dB */
15,16,17,17,17,18,18, 19, /* 31dB */
19,19,20,21,22,23,24, 25, /* 39dB */
}},
/* mode A short */
{{
0, 1, 2, 3, 4, 5, 5, 5, /* 7dB */
6, 6, 6, 5, 4, 4, 4, 4, /* 15dB */
4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */
7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */
11,12,13,14,15,16,17, 18, /* 39dB */
}},
/* sub-mode Z long */
{{
0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */
8, 9,10,11,12,13,14, 15, /* 15dB */
16,17,18,19,20,21,22, 23, /* 23dB */
24,25,26,27,28,29,30, 31, /* 31dB */
32,33,34,35,36,37,38, 39, /* 39dB */
}},
/* mode_Z nominal long */
{{
0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */
8, 9,10,11,12,12,13, 13, /* 15dB */
13,14,14,14,15,15,15, 15, /* 23dB */
16,16,17,17,17,18,18, 19, /* 31dB */
19,19,20,21,22,23,24, 25, /* 39dB */
}},
/* mode A long */
{{
0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */
8, 8, 7, 6, 5, 4, 4, 4, /* 15dB */
4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */
7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */
11,12,13,14,15,16,17, 18, /* 39dB */
}}
};
/* tonal masking curve level adjustments *************************/
static const vp_adjblock _vp_tonemask_adj_longblock[12]={
/* 63 125 250 500 1 2 4 8 16 */
{{ -3, -8,-13,-15,-10,-10,-10,-10,-10,-10,-10, 0, 0, 0, 0, 0, 0}}, /* -1 */
/* {{-15,-15,-15,-15,-10, -8, -4, -2, 0, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */
{{ -4,-10,-14,-16,-15,-14,-13,-12,-12,-12,-11, -1, -1, -1, -1, -1, 0}}, /* 0 */
/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */
{{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, -1, -1, 0}}, /* 1 */
/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */
{{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -6, -3, -1, -1, -1, 0}}, /* 2 */
/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */
{{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, -1, -1, 0}}, /* 3 */
/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, *//* 4 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 4 */
/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */
/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2, 0}}, /* 6 */
/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 7 */
/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 8 */
/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 9 */
/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 10 */
};
static const vp_adjblock _vp_tonemask_adj_otherblock[12]={
/* 63 125 250 500 1 2 4 8 16 */
{{ -3, -8,-13,-15,-10,-10, -9, -9, -9, -9, -9, 1, 1, 1, 1, 1, 1}}, /* -1 */
/* {{-20,-20,-20,-20,-14,-12,-10, -8, -4, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */
{{ -4,-10,-14,-16,-14,-13,-12,-12,-11,-11,-10, 0, 0, 0, 0, 0, 0}}, /* 0 */
/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */
{{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, 0, 0, 0}}, /* 1 */
/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */
{{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -5, -2, -1, 0, 0, 0}}, /* 2 */
/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */
{{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, 0, 0, 0}}, /* 3 */
/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 4 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 4 */
/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */
/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2, 0}}, /* 6 */
/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 7 */
/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 8 */
/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 9 */
/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */
{{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 10 */
};
/* noise bias (transition block) */
static const noise3 _psy_noisebias_trans[12]={
/* 63 125 250 500 1k 2k 4k 8k 16k*/
/* -1 */
{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20},
{-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
/* 0
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10},
{-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 4, 10},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}},*/
{{{-15,-15,-15,-15,-15,-12, -6, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10},
{-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 3, 6},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}},
/* 1
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},
/* 2
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6},
{-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, */
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -2, -1, 0, 3},
{-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -7, -4}}},
/* 3
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6},
{-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2},
{-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},
/* 4
{{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5},
{-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/
{{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1},
{-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},
/* 5
{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7},
{-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2},
{-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}}, */
{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7},
{-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0},
{-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}},
/* 6
{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7},
{-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1},
{-34,-34,-34,-34,-30,-26,-24,-18,-17,-15,-15,-15,-15,-13,-13,-12, -8}}},*/
{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7},
{-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2, 0},
{-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}},
/* 7
{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7},
{-32,-32,-32,-32,-28,-24,-24,-18,-14,-12,-10, -8, -8, -8, -6, -4, 0},
{-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}},*/
{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7},
{-32,-32,-32,-32,-28,-24,-24,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2},
{-34,-34,-34,-34,-30,-26,-26,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},
/* 8
{{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7},
{-36,-36,-36,-36,-30,-30,-30,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2},
{-36,-36,-36,-36,-34,-30,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/
{{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7},
{-36,-36,-36,-36,-30,-30,-30,-24,-20,-16,-16,-16,-16,-14,-12,-10, -7},
{-36,-36,-36,-36,-34,-30,-28,-26,-24,-30,-30,-30,-30,-30,-30,-24,-20}}},
/* 9
{{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2},
{-36,-36,-36,-36,-34,-32,-32,-28,-20,-16,-16,-16,-16,-14,-12,-10, -7},
{-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/
{{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2},
{-38,-38,-38,-38,-36,-34,-34,-30,-24,-20,-20,-20,-20,-18,-16,-12,-10},
{-40,-40,-40,-40,-40,-40,-40,-38,-35,-35,-35,-35,-35,-35,-35,-35,-30}}},
/* 10 */
{{{-30,-30,-30,-30,-30,-30,-30,-28,-20,-14,-14,-14,-14,-14,-14,-12,-10},
{-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-20},
{-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
};
/* noise bias (long block) */
static const noise3 _psy_noisebias_long[12]={
/*63 125 250 500 1k 2k 4k 8k 16k*/
/* -1 */
{{{-10,-10,-10,-10,-10, -4, 0, 0, 0, 6, 6, 6, 6, 10, 10, 12, 20},
{-20,-20,-20,-20,-20,-20,-10, -2, 0, 0, 0, 0, 0, 2, 4, 6, 15},
{-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},
/* 0 */
/* {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10},
{-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 4, 10},
{-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}},*/
{{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10},
{-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 3, 6},
{-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}},
/* 1 */
/* {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10},
{-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8},
{-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/
{{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10},
{-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4},
{-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},
/* 2 */
/* {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10},
{-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6},
{-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/
{{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10},
{-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -2, -1, 0, 3},
{-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},
/* 3 */
/* {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8},
{-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6},
{-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/
{{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8},
{-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2},
{-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -5}}},
/* 4 */
/* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7},
{-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5},
{-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/
{{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7},
{-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1},
{-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -7}}},
/* 5 */
/* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7},
{-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2},
{-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}},*/
{{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7},
{-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0},
{-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -8}}},
/* 6 */
/* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7},
{-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1},
{-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}},*/
{{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7},
{-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2, 0},
{-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12,-10}}},
/* 7 */
{{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7},
{-24,-24,-24,-24,-24,-24,-24,-18,-14,-10, -8, -8, -8, -8, -6, -4, 0},
{-26,-26,-26,-26,-26,-26,-26,-22,-20,-19,-19,-19,-19,-18,-17,-16,-12}}},
/* 8 */
{{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 0, 0, 0, 0, 1, 2, 3, 7},
{-26,-26,-26,-26,-26,-26,-26,-20,-16,-12,-10,-10,-10,-10, -8, -6, -2},
{-28,-28,-28,-28,-28,-28,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},
/* 9 */
{{{-22,-22,-22,-22,-22,-22,-22,-18,-14, -8, -4, -4, -4, -4, -4, -2, 2},
{-26,-26,-26,-26,-26,-26,-26,-22,-18,-16,-16,-16,-16,-14,-12,-10, -7},
{-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},
/* 10 */
{{{-24,-24,-24,-24,-24,-24,-24,-24,-24,-18,-14,-14,-14,-14,-14,-12,-10},
{-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-20},
{-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
};
/* noise bias (impulse block) */
static const noise3 _psy_noisebias_impulse[12]={
/* 63 125 250 500 1k 2k 4k 8k 16k*/
/* -1 */
{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20},
{-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
/* 0 */
/* {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20},
{-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 4, 10},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/
{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20},
{-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 3, 6},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
/* 1 */
{{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -4, -4, -2, -2, -2, -2, 2},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -8,-10,-10, -8, -8, -8, -6, -4}}},
/* 2 */
{{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0},
{-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}},
/* 3 */
{{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0},
{-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}},
/* 4 */
{{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0},
{-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}},
/* 5 */
{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11},
{-32,-32,-32,-32,-28,-24,-22,-16,-10, -6, -8, -8, -6, -6, -6, -4, -2},
{-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}},
/* 6
{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11},
{-34,-34,-34,-34,-30,-30,-24,-20,-12,-12,-14,-14,-10, -9, -8, -6, -4},
{-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}},*/
{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11},
{-34,-34,-34,-34,-30,-30,-30,-24,-16,-16,-16,-16,-16,-16,-14,-14,-12},
{-36,-36,-36,-36,-36,-34,-28,-24,-20,-20,-20,-20,-20,-20,-20,-18,-16}}},
/* 7 */
/* {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11},
{-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-16,-16,-14,-12,-10,-10,-10},
{-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}},*/
{{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11},
{-34,-34,-34,-34,-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-24,-22},
{-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}},
/* 8 */
/* {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10},
{-34,-34,-34,-34,-30,-30,-30,-24,-20,-20,-20,-20,-20,-18,-16,-16,-14},
{-36,-36,-36,-36,-36,-34,-28,-24,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/
{{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10},
{-34,-34,-34,-34,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-24},
{-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}},
/* 9 */
/* {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2},
{-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-22,-20,-20,-18},
{-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/
{{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2},
{-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26},
{-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},
/* 10 */
{{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-16,-16,-16,-16,-16,-14,-12},
{-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-26},
{-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
};
/* noise bias (padding block) */
static const noise3 _psy_noisebias_padding[12]={
/* 63 125 250 500 1k 2k 4k 8k 16k*/
/* -1 */
{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20},
{-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
/* 0 */
{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, 2, 3, 6, 6, 8, 10},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -4, -4, -4, -4, -2, 0, 2}}},
/* 1 */
{{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -6, -4, -2, 0}}},
/* 2 */
/* {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},*/
{{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, 0, 0, 2, 6},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},
/* 3 */
{{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, 0, 0, 2, 6},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},
/* 4 */
{{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, -1, 0, 2, 6},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},
/* 5 */
{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12},
{-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -3, -3, -3, -3, -2, 0, 4},
{-34,-34,-34,-34,-30,-26,-24,-18,-14,-10,-10,-10,-10,-10, -8, -5, -3}}},
/* 6 */
{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12},
{-34,-34,-34,-34,-30,-30,-24,-20,-14, -8, -4, -4, -4, -4, -3, -1, 4},
{-34,-34,-34,-34,-34,-30,-26,-20,-16,-13,-13,-13,-13,-13,-11, -8, -6}}},
/* 7 */
{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12},
{-34,-34,-34,-34,-30,-30,-30,-24,-16,-10, -8, -6, -6, -6, -5, -3, 1},
{-34,-34,-34,-34,-32,-32,-28,-22,-18,-16,-16,-16,-16,-16,-14,-12,-10}}},
/* 8 */
{{{-22,-22,-22,-22,-22,-20,-14,-10, -4, 0, 0, 0, 0, 3, 5, 5, 11},
{-34,-34,-34,-34,-30,-30,-30,-24,-16,-12,-10, -8, -8, -8, -7, -5, -2},
{-36,-36,-36,-36,-36,-34,-28,-22,-20,-20,-20,-20,-20,-20,-20,-16,-14}}},
/* 9 */
{{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -2, -2, -2, -2, 0, 2, 6},
{-36,-36,-36,-36,-34,-32,-32,-24,-16,-12,-12,-12,-12,-12,-10, -8, -5},
{-40,-40,-40,-40,-40,-40,-40,-32,-26,-24,-24,-24,-24,-24,-24,-20,-18}}},
/* 10 */
{{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-12,-12,-12,-12,-12,-10, -8},
{-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-25,-25,-25,-25,-25,-25,-15},
{-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
};
static const noiseguard _psy_noiseguards_44[4]={
{3,3,15},
{3,3,15},
{10,10,100},
{10,10,100},
};
static const int _psy_tone_suppress[12]={
-20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45,
};
static const int _psy_tone_0dB[12]={
90,90,95,95,95,95,105,105,105,105,105,105,
};
static const int _psy_noise_suppress[12]={
-20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45,
};
static const vorbis_info_psy _psy_info_template={
/* blockflag */
-1,
/* ath_adjatt, ath_maxatt */
-140.,-140.,
/* tonemask att boost/decay,suppr,curves */
{0.f,0.f,0.f}, 0.,0., -40.f, {0.},
/*noisemaskp,supp, low/high window, low/hi guard, minimum */
1, -0.f, .5f, .5f, 0,0,0,
/* noiseoffset*3, noisecompand, max_curve_dB */
{{-1},{-1},{-1}},{-1},105.f,
/* noise normalization - noise_p, start, partition, thresh. */
0,-1,-1,0.,
};
/* ath ****************/
static const int _psy_ath_floater[12]={
-100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120,
};
static const int _psy_ath_abs[12]={
-130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150,
};
/* stereo setup. These don't map directly to quality level, there's
an additional indirection as several of the below may be used in a
single bitmanaged stream
****************/
/* various stereo possibilities */
/* stereo mode by base quality level */
static const adj_stereo _psy_stereo_modes_44[12]={
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -1 */
{{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3},
{ 1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8},
{ 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}},
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */
{{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0, 0, 0, 0, 0},
{ 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3},
{ 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8},
{ 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}},
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 */
{{ 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0},
{ 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3},
{ 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 */
{{ 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 0, 0, 0, 0, 0},
{ 8, 8, 6, 6, 5, 5, 4, 4, 4, 4, 4, 4, 3, 2, 1},
{ 3, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 */
{{ 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0},
{ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1},
{ 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 10, 10, 10, 10, 10},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 */
{{ 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 2, 1, 0},
{ 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 */
{{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0},
{ 6, 7, 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 */
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 */
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 */
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 */
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 */
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
};
/* tone master attenuation by base quality mode and bitrate tweak */
static const att3 _psy_tone_masteratt_44[12]={
{{ 35, 21, 9}, 0, 0}, /* -1 */
{{ 30, 20, 8}, -2, 1.25}, /* 0 */
/* {{ 25, 14, 4}, 0, 0}, *//* 1 */
{{ 25, 12, 2}, 0, 0}, /* 1 */
/* {{ 20, 10, -2}, 0, 0}, *//* 2 */
{{ 20, 9, -3}, 0, 0}, /* 2 */
{{ 20, 9, -4}, 0, 0}, /* 3 */
{{ 20, 9, -4}, 0, 0}, /* 4 */
{{ 20, 6, -6}, 0, 0}, /* 5 */
{{ 20, 3, -10}, 0, 0}, /* 6 */
{{ 18, 1, -14}, 0, 0}, /* 7 */
{{ 18, 0, -16}, 0, 0}, /* 8 */
{{ 18, -2, -16}, 0, 0}, /* 9 */
{{ 12, -2, -20}, 0, 0}, /* 10 */
};
/* lowpass by mode **************/
static const double _psy_lowpass_44[12]={
/* 15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999. */
13.9,15.1,15.8,16.5,17.2,18.9,20.1,48.,999.,999.,999.,999.
};
/* noise normalization **********/
static const int _noise_start_short_44[11]={
/* 16,16,16,16,32,32,9999,9999,9999,9999 */
32,16,16,16,32,9999,9999,9999,9999,9999,9999
};
static const int _noise_start_long_44[11]={
/* 128,128,128,256,512,512,9999,9999,9999,9999 */
256,128,128,256,512,9999,9999,9999,9999,9999,9999
};
static const int _noise_part_short_44[11]={
8,8,8,8,8,8,8,8,8,8,8
};
static const int _noise_part_long_44[11]={
32,32,32,32,32,32,32,32,32,32,32
};
static const double _noise_thresh_44[11]={
/* .2,.2,.3,.4,.5,.5,9999.,9999.,9999.,9999., */
.2,.2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999.,
};
static const double _noise_thresh_5only[2]={
.5,.5,
};

View File

@ -0,0 +1,101 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: 8kHz psychoacoustic settings
last mod: $Id: psych_8.h 16227 2009-07-08 06:58:46Z xiphmont $
********************************************************************/
static const att3 _psy_tone_masteratt_8[3]={
{{ 32, 25, 12}, 0, 0}, /* 0 */
{{ 30, 25, 12}, 0, 0}, /* 0 */
{{ 20, 0, -14}, 0, 0}, /* 0 */
};
static const vp_adjblock _vp_tonemask_adj_8[3]={
/* adjust for mode zero */
/* 63 125 250 500 1 2 4 8 16 */
{{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */
{{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */
{{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 1 */
};
static const noise3 _psy_noisebias_8[3]={
/* 63 125 250 500 1k 2k 4k 8k 16k*/
{{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99},
{-10,-10,-10,-10, -5, -5, -5, 0, 0, 4, 4, 4, 4, 4, 99, 99, 99},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
{{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99},
{-10,-10,-10,-10,-10,-10, -5, -5, -5, 0, 0, 0, 0, 0, 99, 99, 99},
{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},
{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 99, 99, 99},
{-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10, 99, 99, 99},
{-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}},
};
/* stereo mode by base quality level */
static const adj_stereo _psy_stereo_modes_8[3]={
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
{{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
{ 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
{{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
{ 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
{{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},
};
static const noiseguard _psy_noiseguards_8[2]={
{10,10,-1},
{10,10,-1},
};
static const compandblock _psy_compand_8[2]={
{{
0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */
8, 8, 9, 9,10,10,11, 11, /* 15dB */
12,12,13,13,14,14,15, 15, /* 23dB */
16,16,17,17,17,18,18, 19, /* 31dB */
19,19,20,21,22,23,24, 25, /* 39dB */
}},
{{
0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */
7, 7, 6, 6, 5, 5, 4, 4, /* 15dB */
3, 3, 3, 4, 5, 6, 7, 8, /* 23dB */
9,10,11,12,13,14,15, 16, /* 31dB */
17,18,19,20,21,22,23, 24, /* 39dB */
}},
};
static const double _psy_lowpass_8[3]={3.,4.,4.};
static const int _noise_start_8[2]={
64,64,
};
static const int _noise_part_8[2]={
8,8,
};
static const int _psy_ath_floater_8[3]={
-100,-100,-105,
};
static const int _psy_ath_abs_8[3]={
-130,-130,-140,
};

View File

@ -0,0 +1,163 @@
/********************************************************************
* *
* This FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: toplevel residue templates 16/22kHz
last mod: $Id: residue_16.h 16962 2010-03-11 07:30:34Z xiphmont $
********************************************************************/
/***** residue backends *********************************************/
static const static_bookblock _resbook_16s_0={
{
{0},
{0,0,&_16c0_s_p1_0},
{0},
{0,0,&_16c0_s_p3_0},
{0,0,&_16c0_s_p4_0},
{0,0,&_16c0_s_p5_0},
{0,0,&_16c0_s_p6_0},
{&_16c0_s_p7_0,&_16c0_s_p7_1},
{&_16c0_s_p8_0,&_16c0_s_p8_1},
{&_16c0_s_p9_0,&_16c0_s_p9_1,&_16c0_s_p9_2}
}
};
static const static_bookblock _resbook_16s_1={
{
{0},
{0,0,&_16c1_s_p1_0},
{0},
{0,0,&_16c1_s_p3_0},
{0,0,&_16c1_s_p4_0},
{0,0,&_16c1_s_p5_0},
{0,0,&_16c1_s_p6_0},
{&_16c1_s_p7_0,&_16c1_s_p7_1},
{&_16c1_s_p8_0,&_16c1_s_p8_1},
{&_16c1_s_p9_0,&_16c1_s_p9_1,&_16c1_s_p9_2}
}
};
static const static_bookblock _resbook_16s_2={
{
{0},
{0,0,&_16c2_s_p1_0},
{0,0,&_16c2_s_p2_0},
{0,0,&_16c2_s_p3_0},
{0,0,&_16c2_s_p4_0},
{&_16c2_s_p5_0,&_16c2_s_p5_1},
{&_16c2_s_p6_0,&_16c2_s_p6_1},
{&_16c2_s_p7_0,&_16c2_s_p7_1},
{&_16c2_s_p8_0,&_16c2_s_p8_1},
{&_16c2_s_p9_0,&_16c2_s_p9_1,&_16c2_s_p9_2}
}
};
static const vorbis_residue_template _res_16s_0[]={
{2,0,32, &_residue_44_mid,
&_huff_book__16c0_s_single,&_huff_book__16c0_s_single,
&_resbook_16s_0,&_resbook_16s_0},
};
static const vorbis_residue_template _res_16s_1[]={
{2,0,32, &_residue_44_mid,
&_huff_book__16c1_s_short,&_huff_book__16c1_s_short,
&_resbook_16s_1,&_resbook_16s_1},
{2,0,32, &_residue_44_mid,
&_huff_book__16c1_s_long,&_huff_book__16c1_s_long,
&_resbook_16s_1,&_resbook_16s_1}
};
static const vorbis_residue_template _res_16s_2[]={
{2,0,32, &_residue_44_high,
&_huff_book__16c2_s_short,&_huff_book__16c2_s_short,
&_resbook_16s_2,&_resbook_16s_2},
{2,0,32, &_residue_44_high,
&_huff_book__16c2_s_long,&_huff_book__16c2_s_long,
&_resbook_16s_2,&_resbook_16s_2}
};
static const vorbis_mapping_template _mapres_template_16_stereo[3]={
{ _map_nominal, _res_16s_0 }, /* 0 */
{ _map_nominal, _res_16s_1 }, /* 1 */
{ _map_nominal, _res_16s_2 }, /* 2 */
};
static const static_bookblock _resbook_16u_0={
{
{0},
{0,0,&_16u0__p1_0},
{0,0,&_16u0__p2_0},
{0,0,&_16u0__p3_0},
{0,0,&_16u0__p4_0},
{0,0,&_16u0__p5_0},
{&_16u0__p6_0,&_16u0__p6_1},
{&_16u0__p7_0,&_16u0__p7_1,&_16u0__p7_2}
}
};
static const static_bookblock _resbook_16u_1={
{
{0},
{0,0,&_16u1__p1_0},
{0,0,&_16u1__p2_0},
{0,0,&_16u1__p3_0},
{0,0,&_16u1__p4_0},
{0,0,&_16u1__p5_0},
{0,0,&_16u1__p6_0},
{&_16u1__p7_0,&_16u1__p7_1},
{&_16u1__p8_0,&_16u1__p8_1},
{&_16u1__p9_0,&_16u1__p9_1,&_16u1__p9_2}
}
};
static const static_bookblock _resbook_16u_2={
{
{0},
{0,0,&_16u2_p1_0},
{0,0,&_16u2_p2_0},
{0,0,&_16u2_p3_0},
{0,0,&_16u2_p4_0},
{&_16u2_p5_0,&_16u2_p5_1},
{&_16u2_p6_0,&_16u2_p6_1},
{&_16u2_p7_0,&_16u2_p7_1},
{&_16u2_p8_0,&_16u2_p8_1},
{&_16u2_p9_0,&_16u2_p9_1,&_16u2_p9_2}
}
};
static const vorbis_residue_template _res_16u_0[]={
{1,0,32, &_residue_44_low_un,
&_huff_book__16u0__single,&_huff_book__16u0__single,
&_resbook_16u_0,&_resbook_16u_0},
};
static const vorbis_residue_template _res_16u_1[]={
{1,0,32, &_residue_44_mid_un,
&_huff_book__16u1__short,&_huff_book__16u1__short,
&_resbook_16u_1,&_resbook_16u_1},
{1,0,32, &_residue_44_mid_un,
&_huff_book__16u1__long,&_huff_book__16u1__long,
&_resbook_16u_1,&_resbook_16u_1}
};
static const vorbis_residue_template _res_16u_2[]={
{1,0,32, &_residue_44_hi_un,
&_huff_book__16u2__short,&_huff_book__16u2__short,
&_resbook_16u_2,&_resbook_16u_2},
{1,0,32, &_residue_44_hi_un,
&_huff_book__16u2__long,&_huff_book__16u2__long,
&_resbook_16u_2,&_resbook_16u_2}
};
static const vorbis_mapping_template _mapres_template_16_uncoupled[3]={
{ _map_nominal_u, _res_16u_0 }, /* 0 */
{ _map_nominal_u, _res_16u_1 }, /* 1 */
{ _map_nominal_u, _res_16u_2 }, /* 2 */
};

View File

@ -0,0 +1,292 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: toplevel residue templates for 32/44.1/48kHz
last mod: $Id: residue_44.h 16962 2010-03-11 07:30:34Z xiphmont $
********************************************************************/
#include "vorbis/codec.h"
#include "backends.h"
#include "books/coupled/res_books_stereo.h"
/***** residue backends *********************************************/
static const vorbis_info_residue0 _residue_44_low={
0,-1, -1, 9,-1,-1,
/* 0 1 2 3 4 5 6 7 */
{0},
{-1},
{ 0, 1, 2, 2, 4, 8, 16, 32},
{ 0, 0, 0,999, 4, 8, 16, 32},
};
static const vorbis_info_residue0 _residue_44_mid={
0,-1, -1, 10,-1,-1,
/* 0 1 2 3 4 5 6 7 8 */
{0},
{-1},
{ 0, 1, 1, 2, 2, 4, 8, 16, 32},
{ 0, 0,999, 0,999, 4, 8, 16, 32},
};
static const vorbis_info_residue0 _residue_44_high={
0,-1, -1, 10,-1,-1,
/* 0 1 2 3 4 5 6 7 8 */
{0},
{-1},
{ 0, 1, 2, 4, 8, 16, 32, 71,157},
{ 0, 1, 2, 3, 4, 8, 16, 71,157},
};
static const static_bookblock _resbook_44s_n1={
{
{0},{0,0,&_44cn1_s_p1_0},{0,0,&_44cn1_s_p2_0},
{0,0,&_44cn1_s_p3_0},{0,0,&_44cn1_s_p4_0},{0,0,&_44cn1_s_p5_0},
{&_44cn1_s_p6_0,&_44cn1_s_p6_1},{&_44cn1_s_p7_0,&_44cn1_s_p7_1},
{&_44cn1_s_p8_0,&_44cn1_s_p8_1,&_44cn1_s_p8_2}
}
};
static const static_bookblock _resbook_44sm_n1={
{
{0},{0,0,&_44cn1_sm_p1_0},{0,0,&_44cn1_sm_p2_0},
{0,0,&_44cn1_sm_p3_0},{0,0,&_44cn1_sm_p4_0},{0,0,&_44cn1_sm_p5_0},
{&_44cn1_sm_p6_0,&_44cn1_sm_p6_1},{&_44cn1_sm_p7_0,&_44cn1_sm_p7_1},
{&_44cn1_sm_p8_0,&_44cn1_sm_p8_1,&_44cn1_sm_p8_2}
}
};
static const static_bookblock _resbook_44s_0={
{
{0},{0,0,&_44c0_s_p1_0},{0,0,&_44c0_s_p2_0},
{0,0,&_44c0_s_p3_0},{0,0,&_44c0_s_p4_0},{0,0,&_44c0_s_p5_0},
{&_44c0_s_p6_0,&_44c0_s_p6_1},{&_44c0_s_p7_0,&_44c0_s_p7_1},
{&_44c0_s_p8_0,&_44c0_s_p8_1,&_44c0_s_p8_2}
}
};
static const static_bookblock _resbook_44sm_0={
{
{0},{0,0,&_44c0_sm_p1_0},{0,0,&_44c0_sm_p2_0},
{0,0,&_44c0_sm_p3_0},{0,0,&_44c0_sm_p4_0},{0,0,&_44c0_sm_p5_0},
{&_44c0_sm_p6_0,&_44c0_sm_p6_1},{&_44c0_sm_p7_0,&_44c0_sm_p7_1},
{&_44c0_sm_p8_0,&_44c0_sm_p8_1,&_44c0_sm_p8_2}
}
};
static const static_bookblock _resbook_44s_1={
{
{0},{0,0,&_44c1_s_p1_0},{0,0,&_44c1_s_p2_0},
{0,0,&_44c1_s_p3_0},{0,0,&_44c1_s_p4_0},{0,0,&_44c1_s_p5_0},
{&_44c1_s_p6_0,&_44c1_s_p6_1},{&_44c1_s_p7_0,&_44c1_s_p7_1},
{&_44c1_s_p8_0,&_44c1_s_p8_1,&_44c1_s_p8_2}
}
};
static const static_bookblock _resbook_44sm_1={
{
{0},{0,0,&_44c1_sm_p1_0},{0,0,&_44c1_sm_p2_0},
{0,0,&_44c1_sm_p3_0},{0,0,&_44c1_sm_p4_0},{0,0,&_44c1_sm_p5_0},
{&_44c1_sm_p6_0,&_44c1_sm_p6_1},{&_44c1_sm_p7_0,&_44c1_sm_p7_1},
{&_44c1_sm_p8_0,&_44c1_sm_p8_1,&_44c1_sm_p8_2}
}
};
static const static_bookblock _resbook_44s_2={
{
{0},{0,0,&_44c2_s_p1_0},{0,0,&_44c2_s_p2_0},{0,0,&_44c2_s_p3_0},
{0,0,&_44c2_s_p4_0},{0,0,&_44c2_s_p5_0},{0,0,&_44c2_s_p6_0},
{&_44c2_s_p7_0,&_44c2_s_p7_1},{&_44c2_s_p8_0,&_44c2_s_p8_1},
{&_44c2_s_p9_0,&_44c2_s_p9_1,&_44c2_s_p9_2}
}
};
static const static_bookblock _resbook_44s_3={
{
{0},{0,0,&_44c3_s_p1_0},{0,0,&_44c3_s_p2_0},{0,0,&_44c3_s_p3_0},
{0,0,&_44c3_s_p4_0},{0,0,&_44c3_s_p5_0},{0,0,&_44c3_s_p6_0},
{&_44c3_s_p7_0,&_44c3_s_p7_1},{&_44c3_s_p8_0,&_44c3_s_p8_1},
{&_44c3_s_p9_0,&_44c3_s_p9_1,&_44c3_s_p9_2}
}
};
static const static_bookblock _resbook_44s_4={
{
{0},{0,0,&_44c4_s_p1_0},{0,0,&_44c4_s_p2_0},{0,0,&_44c4_s_p3_0},
{0,0,&_44c4_s_p4_0},{0,0,&_44c4_s_p5_0},{0,0,&_44c4_s_p6_0},
{&_44c4_s_p7_0,&_44c4_s_p7_1},{&_44c4_s_p8_0,&_44c4_s_p8_1},
{&_44c4_s_p9_0,&_44c4_s_p9_1,&_44c4_s_p9_2}
}
};
static const static_bookblock _resbook_44s_5={
{
{0},{0,0,&_44c5_s_p1_0},{0,0,&_44c5_s_p2_0},{0,0,&_44c5_s_p3_0},
{0,0,&_44c5_s_p4_0},{0,0,&_44c5_s_p5_0},{0,0,&_44c5_s_p6_0},
{&_44c5_s_p7_0,&_44c5_s_p7_1},{&_44c5_s_p8_0,&_44c5_s_p8_1},
{&_44c5_s_p9_0,&_44c5_s_p9_1,&_44c5_s_p9_2}
}
};
static const static_bookblock _resbook_44s_6={
{
{0},{0,0,&_44c6_s_p1_0},{0,0,&_44c6_s_p2_0},{0,0,&_44c6_s_p3_0},
{0,0,&_44c6_s_p4_0},
{&_44c6_s_p5_0,&_44c6_s_p5_1},
{&_44c6_s_p6_0,&_44c6_s_p6_1},
{&_44c6_s_p7_0,&_44c6_s_p7_1},
{&_44c6_s_p8_0,&_44c6_s_p8_1},
{&_44c6_s_p9_0,&_44c6_s_p9_1,&_44c6_s_p9_2}
}
};
static const static_bookblock _resbook_44s_7={
{
{0},{0,0,&_44c7_s_p1_0},{0,0,&_44c7_s_p2_0},{0,0,&_44c7_s_p3_0},
{0,0,&_44c7_s_p4_0},
{&_44c7_s_p5_0,&_44c7_s_p5_1},
{&_44c7_s_p6_0,&_44c7_s_p6_1},
{&_44c7_s_p7_0,&_44c7_s_p7_1},
{&_44c7_s_p8_0,&_44c7_s_p8_1},
{&_44c7_s_p9_0,&_44c7_s_p9_1,&_44c7_s_p9_2}
}
};
static const static_bookblock _resbook_44s_8={
{
{0},{0,0,&_44c8_s_p1_0},{0,0,&_44c8_s_p2_0},{0,0,&_44c8_s_p3_0},
{0,0,&_44c8_s_p4_0},
{&_44c8_s_p5_0,&_44c8_s_p5_1},
{&_44c8_s_p6_0,&_44c8_s_p6_1},
{&_44c8_s_p7_0,&_44c8_s_p7_1},
{&_44c8_s_p8_0,&_44c8_s_p8_1},
{&_44c8_s_p9_0,&_44c8_s_p9_1,&_44c8_s_p9_2}
}
};
static const static_bookblock _resbook_44s_9={
{
{0},{0,0,&_44c9_s_p1_0},{0,0,&_44c9_s_p2_0},{0,0,&_44c9_s_p3_0},
{0,0,&_44c9_s_p4_0},
{&_44c9_s_p5_0,&_44c9_s_p5_1},
{&_44c9_s_p6_0,&_44c9_s_p6_1},
{&_44c9_s_p7_0,&_44c9_s_p7_1},
{&_44c9_s_p8_0,&_44c9_s_p8_1},
{&_44c9_s_p9_0,&_44c9_s_p9_1,&_44c9_s_p9_2}
}
};
static const vorbis_residue_template _res_44s_n1[]={
{2,0,32, &_residue_44_low,
&_huff_book__44cn1_s_short,&_huff_book__44cn1_sm_short,
&_resbook_44s_n1,&_resbook_44sm_n1},
{2,0,32, &_residue_44_low,
&_huff_book__44cn1_s_long,&_huff_book__44cn1_sm_long,
&_resbook_44s_n1,&_resbook_44sm_n1}
};
static const vorbis_residue_template _res_44s_0[]={
{2,0,16, &_residue_44_low,
&_huff_book__44c0_s_short,&_huff_book__44c0_sm_short,
&_resbook_44s_0,&_resbook_44sm_0},
{2,0,32, &_residue_44_low,
&_huff_book__44c0_s_long,&_huff_book__44c0_sm_long,
&_resbook_44s_0,&_resbook_44sm_0}
};
static const vorbis_residue_template _res_44s_1[]={
{2,0,16, &_residue_44_low,
&_huff_book__44c1_s_short,&_huff_book__44c1_sm_short,
&_resbook_44s_1,&_resbook_44sm_1},
{2,0,32, &_residue_44_low,
&_huff_book__44c1_s_long,&_huff_book__44c1_sm_long,
&_resbook_44s_1,&_resbook_44sm_1}
};
static const vorbis_residue_template _res_44s_2[]={
{2,0,16, &_residue_44_mid,
&_huff_book__44c2_s_short,&_huff_book__44c2_s_short,
&_resbook_44s_2,&_resbook_44s_2},
{2,0,32, &_residue_44_mid,
&_huff_book__44c2_s_long,&_huff_book__44c2_s_long,
&_resbook_44s_2,&_resbook_44s_2}
};
static const vorbis_residue_template _res_44s_3[]={
{2,0,16, &_residue_44_mid,
&_huff_book__44c3_s_short,&_huff_book__44c3_s_short,
&_resbook_44s_3,&_resbook_44s_3},
{2,0,32, &_residue_44_mid,
&_huff_book__44c3_s_long,&_huff_book__44c3_s_long,
&_resbook_44s_3,&_resbook_44s_3}
};
static const vorbis_residue_template _res_44s_4[]={
{2,0,16, &_residue_44_mid,
&_huff_book__44c4_s_short,&_huff_book__44c4_s_short,
&_resbook_44s_4,&_resbook_44s_4},
{2,0,32, &_residue_44_mid,
&_huff_book__44c4_s_long,&_huff_book__44c4_s_long,
&_resbook_44s_4,&_resbook_44s_4}
};
static const vorbis_residue_template _res_44s_5[]={
{2,0,16, &_residue_44_mid,
&_huff_book__44c5_s_short,&_huff_book__44c5_s_short,
&_resbook_44s_5,&_resbook_44s_5},
{2,0,32, &_residue_44_mid,
&_huff_book__44c5_s_long,&_huff_book__44c5_s_long,
&_resbook_44s_5,&_resbook_44s_5}
};
static const vorbis_residue_template _res_44s_6[]={
{2,0,16, &_residue_44_high,
&_huff_book__44c6_s_short,&_huff_book__44c6_s_short,
&_resbook_44s_6,&_resbook_44s_6},
{2,0,32, &_residue_44_high,
&_huff_book__44c6_s_long,&_huff_book__44c6_s_long,
&_resbook_44s_6,&_resbook_44s_6}
};
static const vorbis_residue_template _res_44s_7[]={
{2,0,16, &_residue_44_high,
&_huff_book__44c7_s_short,&_huff_book__44c7_s_short,
&_resbook_44s_7,&_resbook_44s_7},
{2,0,32, &_residue_44_high,
&_huff_book__44c7_s_long,&_huff_book__44c7_s_long,
&_resbook_44s_7,&_resbook_44s_7}
};
static const vorbis_residue_template _res_44s_8[]={
{2,0,16, &_residue_44_high,
&_huff_book__44c8_s_short,&_huff_book__44c8_s_short,
&_resbook_44s_8,&_resbook_44s_8},
{2,0,32, &_residue_44_high,
&_huff_book__44c8_s_long,&_huff_book__44c8_s_long,
&_resbook_44s_8,&_resbook_44s_8}
};
static const vorbis_residue_template _res_44s_9[]={
{2,0,16, &_residue_44_high,
&_huff_book__44c9_s_short,&_huff_book__44c9_s_short,
&_resbook_44s_9,&_resbook_44s_9},
{2,0,32, &_residue_44_high,
&_huff_book__44c9_s_long,&_huff_book__44c9_s_long,
&_resbook_44s_9,&_resbook_44s_9}
};
static const vorbis_mapping_template _mapres_template_44_stereo[]={
{ _map_nominal, _res_44s_n1 }, /* -1 */
{ _map_nominal, _res_44s_0 }, /* 0 */
{ _map_nominal, _res_44s_1 }, /* 1 */
{ _map_nominal, _res_44s_2 }, /* 2 */
{ _map_nominal, _res_44s_3 }, /* 3 */
{ _map_nominal, _res_44s_4 }, /* 4 */
{ _map_nominal, _res_44s_5 }, /* 5 */
{ _map_nominal, _res_44s_6 }, /* 6 */
{ _map_nominal, _res_44s_7 }, /* 7 */
{ _map_nominal, _res_44s_8 }, /* 8 */
{ _map_nominal, _res_44s_9 }, /* 9 */
};

View File

@ -0,0 +1,451 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: toplevel residue templates for 32/44.1/48kHz uncoupled
last mod: $Id$
********************************************************************/
#include "vorbis/codec.h"
#include "backends.h"
#include "books/coupled/res_books_51.h"
/***** residue backends *********************************************/
static const vorbis_info_residue0 _residue_44p_lo={
0,-1, -1, 7,-1,-1,
/* 0 1 2 3 4 5 6 7 8 */
{0},
{-1},
{ 0, 1, 2, 7, 17, 31},
{ 0, 0, 99, 7, 17, 31},
};
static const vorbis_info_residue0 _residue_44p={
0,-1, -1, 8,-1,-1,
/* 0 1 2 3 4 5 6 7 8 */
{0},
{-1},
{ 0, 1, 1, 2, 7, 17, 31},
{ 0, 0, 99, 99, 7, 17, 31},
};
static const vorbis_info_residue0 _residue_44p_hi={
0,-1, -1, 8,-1,-1,
/* 0 1 2 3 4 5 6 7 8 */
{0},
{-1},
{ 0, 1, 2, 4, 7, 17, 31},
{ 0, 1, 2, 4, 7, 17, 31},
};
static const vorbis_info_residue0 _residue_44p_lfe={
0,-1, -1, 2,-1,-1,
/* 0 1 2 3 4 5 6 7 8 */
{0},
{-1},
{ 32},
{ -1}
};
static const static_bookblock _resbook_44p_n1={
{
{0},
{0,&_44pn1_p1_0},
{&_44pn1_p2_0,&_44pn1_p2_1,0},
{&_44pn1_p3_0,&_44pn1_p3_1,0},
{&_44pn1_p4_0,&_44pn1_p4_1,0},
{&_44pn1_p5_0,&_44pn1_p5_1,&_44pn1_p4_1},
{&_44pn1_p6_0,&_44pn1_p6_1,&_44pn1_p6_2},
}
};
static const static_bookblock _resbook_44p_0={
{
{0},
{0,&_44p0_p1_0},
{&_44p0_p2_0,&_44p0_p2_1,0},
{&_44p0_p3_0,&_44p0_p3_1,0},
{&_44p0_p4_0,&_44p0_p4_1,0},
{&_44p0_p5_0,&_44p0_p5_1,&_44p0_p4_1},
{&_44p0_p6_0,&_44p0_p6_1,&_44p0_p6_2},
}
};
static const static_bookblock _resbook_44p_1={
{
{0},
{0,&_44p1_p1_0},
{&_44p1_p2_0,&_44p1_p2_1,0},
{&_44p1_p3_0,&_44p1_p3_1,0},
{&_44p1_p4_0,&_44p1_p4_1,0},
{&_44p1_p5_0,&_44p1_p5_1,&_44p1_p4_1},
{&_44p1_p6_0,&_44p1_p6_1,&_44p1_p6_2},
}
};
static const static_bookblock _resbook_44p_2={
{
{0},
{0,0,&_44p2_p1_0},
{0,&_44p2_p2_0,0},
{&_44p2_p3_0,&_44p2_p3_1,0},
{&_44p2_p4_0,&_44p2_p4_1,0},
{&_44p2_p5_0,&_44p2_p5_1,0},
{&_44p2_p6_0,&_44p2_p6_1,&_44p2_p5_1},
{&_44p2_p7_0,&_44p2_p7_1,&_44p2_p7_2,&_44p2_p7_3}
}
};
static const static_bookblock _resbook_44p_3={
{
{0},
{0,0,&_44p3_p1_0},
{0,&_44p3_p2_0,0},
{&_44p3_p3_0,&_44p3_p3_1,0},
{&_44p3_p4_0,&_44p3_p4_1,0},
{&_44p3_p5_0,&_44p3_p5_1,0},
{&_44p3_p6_0,&_44p3_p6_1,&_44p3_p5_1},
{&_44p3_p7_0,&_44p3_p7_1,&_44p3_p7_2,&_44p3_p7_3}
}
};
static const static_bookblock _resbook_44p_4={
{
{0},
{0,0,&_44p4_p1_0},
{0,&_44p4_p2_0,0},
{&_44p4_p3_0,&_44p4_p3_1,0},
{&_44p4_p4_0,&_44p4_p4_1,0},
{&_44p4_p5_0,&_44p4_p5_1,0},
{&_44p4_p6_0,&_44p4_p6_1,&_44p4_p5_1},
{&_44p4_p7_0,&_44p4_p7_1,&_44p4_p7_2,&_44p4_p7_3}
}
};
static const static_bookblock _resbook_44p_5={
{
{0},
{0,0,&_44p5_p1_0},
{0,&_44p5_p2_0,0},
{&_44p5_p3_0,&_44p5_p3_1,0},
{&_44p5_p4_0,&_44p5_p4_1,0},
{&_44p5_p5_0,&_44p5_p5_1,0},
{&_44p5_p6_0,&_44p5_p6_1,&_44p5_p5_1},
{&_44p5_p7_0,&_44p5_p7_1,&_44p5_p7_2,&_44p5_p7_3}
}
};
static const static_bookblock _resbook_44p_6={
{
{0},
{0,0,&_44p6_p1_0},
{0,&_44p6_p2_0,0},
{&_44p6_p3_0,&_44p6_p3_1,0},
{&_44p6_p4_0,&_44p6_p4_1,0},
{&_44p6_p5_0,&_44p6_p5_1,0},
{&_44p6_p6_0,&_44p6_p6_1,&_44p6_p5_1},
{&_44p6_p7_0,&_44p6_p7_1,&_44p6_p7_2,&_44p6_p7_3}
}
};
static const static_bookblock _resbook_44p_7={
{
{0},
{0,0,&_44p7_p1_0},
{0,&_44p7_p2_0,0},
{&_44p7_p3_0,&_44p7_p3_1,0},
{&_44p7_p4_0,&_44p7_p4_1,0},
{&_44p7_p5_0,&_44p7_p5_1,0},
{&_44p7_p6_0,&_44p7_p6_1,&_44p7_p5_1},
{&_44p7_p7_0,&_44p7_p7_1,&_44p7_p7_2,&_44p7_p7_3}
}
};
static const static_bookblock _resbook_44p_8={
{
{0},
{0,0,&_44p8_p1_0},
{0,&_44p8_p2_0,0},
{&_44p8_p3_0,&_44p8_p3_1,0},
{&_44p8_p4_0,&_44p8_p4_1,0},
{&_44p8_p5_0,&_44p8_p5_1,0},
{&_44p8_p6_0,&_44p8_p6_1,&_44p8_p5_1},
{&_44p8_p7_0,&_44p8_p7_1,&_44p8_p7_2,&_44p8_p7_3}
}
};
static const static_bookblock _resbook_44p_9={
{
{0},
{0,0,&_44p9_p1_0},
{0,&_44p9_p2_0,0},
{&_44p9_p3_0,&_44p9_p3_1,0},
{&_44p9_p4_0,&_44p9_p4_1,0},
{&_44p9_p5_0,&_44p9_p5_1,0},
{&_44p9_p6_0,&_44p9_p6_1,&_44p9_p5_1},
{&_44p9_p7_0,&_44p9_p7_1,&_44p9_p7_2,&_44p9_p7_3}
}
};
static const static_bookblock _resbook_44p_ln1={
{
{&_44pn1_l0_0,&_44pn1_l0_1,0},
{&_44pn1_l1_0,&_44pn1_p6_1,&_44pn1_p6_2},
}
};
static const static_bookblock _resbook_44p_l0={
{
{&_44p0_l0_0,&_44p0_l0_1,0},
{&_44p0_l1_0,&_44p0_p6_1,&_44p0_p6_2},
}
};
static const static_bookblock _resbook_44p_l1={
{
{&_44p1_l0_0,&_44p1_l0_1,0},
{&_44p1_l1_0,&_44p1_p6_1,&_44p1_p6_2},
}
};
static const static_bookblock _resbook_44p_l2={
{
{&_44p2_l0_0,&_44p2_l0_1,0},
{&_44p2_l1_0,&_44p2_p7_2,&_44p2_p7_3},
}
};
static const static_bookblock _resbook_44p_l3={
{
{&_44p3_l0_0,&_44p3_l0_1,0},
{&_44p3_l1_0,&_44p3_p7_2,&_44p3_p7_3},
}
};
static const static_bookblock _resbook_44p_l4={
{
{&_44p4_l0_0,&_44p4_l0_1,0},
{&_44p4_l1_0,&_44p4_p7_2,&_44p4_p7_3},
}
};
static const static_bookblock _resbook_44p_l5={
{
{&_44p5_l0_0,&_44p5_l0_1,0},
{&_44p5_l1_0,&_44p5_p7_2,&_44p5_p7_3},
}
};
static const static_bookblock _resbook_44p_l6={
{
{&_44p6_l0_0,&_44p6_l0_1,0},
{&_44p6_l1_0,&_44p6_p7_2,&_44p6_p7_3},
}
};
static const static_bookblock _resbook_44p_l7={
{
{&_44p7_l0_0,&_44p7_l0_1,0},
{&_44p7_l1_0,&_44p7_p7_2,&_44p7_p7_3},
}
};
static const static_bookblock _resbook_44p_l8={
{
{&_44p8_l0_0,&_44p8_l0_1,0},
{&_44p8_l1_0,&_44p8_p7_2,&_44p8_p7_3},
}
};
static const static_bookblock _resbook_44p_l9={
{
{&_44p9_l0_0,&_44p9_l0_1,0},
{&_44p9_l1_0,&_44p9_p7_2,&_44p9_p7_3},
}
};
static const vorbis_info_mapping0 _map_nominal_51[2]={
{2, {0,0,0,0,0,1}, {0,2}, {0,2}, 4,{0,3,0,0},{2,4,1,3}},
{2, {0,0,0,0,0,1}, {1,2}, {1,2}, 4,{0,3,0,0},{2,4,1,3}}
};
static const vorbis_info_mapping0 _map_nominal_51u[2]={
{2, {0,0,0,0,0,1}, {0,2}, {0,2}, 0,{0},{0}},
{2, {0,0,0,0,0,1}, {1,2}, {1,2}, 0,{0},{0}}
};
static const vorbis_residue_template _res_44p51_n1[]={
{2,0,30, &_residue_44p_lo,
&_huff_book__44pn1_short,&_huff_book__44pn1_short,
&_resbook_44p_n1,&_resbook_44p_n1},
{2,0,30, &_residue_44p_lo,
&_huff_book__44pn1_long,&_huff_book__44pn1_long,
&_resbook_44p_n1,&_resbook_44p_n1},
{1,2,6, &_residue_44p_lfe,
&_huff_book__44pn1_lfe,&_huff_book__44pn1_lfe,
&_resbook_44p_ln1,&_resbook_44p_ln1}
};
static const vorbis_residue_template _res_44p51_0[]={
{2,0,15, &_residue_44p_lo,
&_huff_book__44p0_short,&_huff_book__44p0_short,
&_resbook_44p_0,&_resbook_44p_0},
{2,0,30, &_residue_44p_lo,
&_huff_book__44p0_long,&_huff_book__44p0_long,
&_resbook_44p_0,&_resbook_44p_0},
{1,2,6, &_residue_44p_lfe,
&_huff_book__44p0_lfe,&_huff_book__44p0_lfe,
&_resbook_44p_l0,&_resbook_44p_l0}
};
static const vorbis_residue_template _res_44p51_1[]={
{2,0,15, &_residue_44p_lo,
&_huff_book__44p1_short,&_huff_book__44p1_short,
&_resbook_44p_1,&_resbook_44p_1},
{2,0,30, &_residue_44p_lo,
&_huff_book__44p1_long,&_huff_book__44p1_long,
&_resbook_44p_1,&_resbook_44p_1},
{1,2,6, &_residue_44p_lfe,
&_huff_book__44p1_lfe,&_huff_book__44p1_lfe,
&_resbook_44p_l1,&_resbook_44p_l1}
};
static const vorbis_residue_template _res_44p51_2[]={
{2,0,15, &_residue_44p,
&_huff_book__44p2_short,&_huff_book__44p2_short,
&_resbook_44p_2,&_resbook_44p_2},
{2,0,30, &_residue_44p,
&_huff_book__44p2_long,&_huff_book__44p2_long,
&_resbook_44p_2,&_resbook_44p_2},
{1,2,6, &_residue_44p_lfe,
&_huff_book__44p2_lfe,&_huff_book__44p2_lfe,
&_resbook_44p_l2,&_resbook_44p_l2}
};
static const vorbis_residue_template _res_44p51_3[]={
{2,0,15, &_residue_44p,
&_huff_book__44p3_short,&_huff_book__44p3_short,
&_resbook_44p_3,&_resbook_44p_3},
{2,0,30, &_residue_44p,
&_huff_book__44p3_long,&_huff_book__44p3_long,
&_resbook_44p_3,&_resbook_44p_3},
{1,2,6, &_residue_44p_lfe,
&_huff_book__44p3_lfe,&_huff_book__44p3_lfe,
&_resbook_44p_l3,&_resbook_44p_l3}
};
static const vorbis_residue_template _res_44p51_4[]={
{2,0,15, &_residue_44p,
&_huff_book__44p4_short,&_huff_book__44p4_short,
&_resbook_44p_4,&_resbook_44p_4},
{2,0,30, &_residue_44p,
&_huff_book__44p4_long,&_huff_book__44p4_long,
&_resbook_44p_4,&_resbook_44p_4},
{1,2,6, &_residue_44p_lfe,
&_huff_book__44p4_lfe,&_huff_book__44p4_lfe,
&_resbook_44p_l4,&_resbook_44p_l4}
};
static const vorbis_residue_template _res_44p51_5[]={
{2,0,15, &_residue_44p_hi,
&_huff_book__44p5_short,&_huff_book__44p5_short,
&_resbook_44p_5,&_resbook_44p_5},
{2,0,30, &_residue_44p_hi,
&_huff_book__44p5_long,&_huff_book__44p5_long,
&_resbook_44p_5,&_resbook_44p_5},
{1,2,6, &_residue_44p_lfe,
&_huff_book__44p5_lfe,&_huff_book__44p5_lfe,
&_resbook_44p_l5,&_resbook_44p_l5}
};
static const vorbis_residue_template _res_44p51_6[]={
{2,0,15, &_residue_44p_hi,
&_huff_book__44p6_short,&_huff_book__44p6_short,
&_resbook_44p_6,&_resbook_44p_6},
{2,0,30, &_residue_44p_hi,
&_huff_book__44p6_long,&_huff_book__44p6_long,
&_resbook_44p_6,&_resbook_44p_6},
{1,2,6, &_residue_44p_lfe,
&_huff_book__44p6_lfe,&_huff_book__44p6_lfe,
&_resbook_44p_l6,&_resbook_44p_l6}
};
static const vorbis_residue_template _res_44p51_7[]={
{2,0,15, &_residue_44p_hi,
&_huff_book__44p7_short,&_huff_book__44p7_short,
&_resbook_44p_7,&_resbook_44p_7},
{2,0,30, &_residue_44p_hi,
&_huff_book__44p7_long,&_huff_book__44p7_long,
&_resbook_44p_7,&_resbook_44p_7},
{1,2,6, &_residue_44p_lfe,
&_huff_book__44p6_lfe,&_huff_book__44p6_lfe,
&_resbook_44p_l6,&_resbook_44p_l6}
};
static const vorbis_residue_template _res_44p51_8[]={
{2,0,15, &_residue_44p_hi,
&_huff_book__44p8_short,&_huff_book__44p8_short,
&_resbook_44p_8,&_resbook_44p_8},
{2,0,30, &_residue_44p_hi,
&_huff_book__44p8_long,&_huff_book__44p8_long,
&_resbook_44p_8,&_resbook_44p_8},
{1,2,6, &_residue_44p_lfe,
&_huff_book__44p6_lfe,&_huff_book__44p6_lfe,
&_resbook_44p_l6,&_resbook_44p_l6}
};
static const vorbis_residue_template _res_44p51_9[]={
{2,0,15, &_residue_44p_hi,
&_huff_book__44p9_short,&_huff_book__44p9_short,
&_resbook_44p_9,&_resbook_44p_9},
{2,0,30, &_residue_44p_hi,
&_huff_book__44p9_long,&_huff_book__44p9_long,
&_resbook_44p_9,&_resbook_44p_9},
{1,2,6, &_residue_44p_lfe,
&_huff_book__44p6_lfe,&_huff_book__44p6_lfe,
&_resbook_44p_l6,&_resbook_44p_l6}
};
static const vorbis_mapping_template _mapres_template_44_51[]={
{ _map_nominal_51, _res_44p51_n1 }, /* -1 */
{ _map_nominal_51, _res_44p51_0 }, /* 0 */
{ _map_nominal_51, _res_44p51_1 }, /* 1 */
{ _map_nominal_51, _res_44p51_2 }, /* 2 */
{ _map_nominal_51, _res_44p51_3 }, /* 3 */
{ _map_nominal_51, _res_44p51_4 }, /* 4 */
{ _map_nominal_51u, _res_44p51_5 }, /* 5 */
{ _map_nominal_51u, _res_44p51_6 }, /* 6 */
{ _map_nominal_51u, _res_44p51_7 }, /* 7 */
{ _map_nominal_51u, _res_44p51_8 }, /* 8 */
{ _map_nominal_51u, _res_44p51_9 }, /* 9 */
};

View File

@ -0,0 +1,318 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: toplevel residue templates for 32/44.1/48kHz uncoupled
last mod: $Id: residue_44u.h 16962 2010-03-11 07:30:34Z xiphmont $
********************************************************************/
#include "vorbis/codec.h"
#include "backends.h"
#include "books/uncoupled/res_books_uncoupled.h"
/***** residue backends *********************************************/
static const vorbis_info_residue0 _residue_44_low_un={
0,-1, -1, 8,-1,-1,
{0},
{-1},
{ 0, 1, 1, 2, 2, 4, 28},
{ -1, 25, -1, 45, -1, -1, -1}
};
static const vorbis_info_residue0 _residue_44_mid_un={
0,-1, -1, 10,-1,-1,
/* 0 1 2 3 4 5 6 7 8 9 */
{0},
{-1},
{ 0, 1, 1, 2, 2, 4, 4, 16, 60},
{ -1, 30, -1, 50, -1, 80, -1, -1, -1}
};
static const vorbis_info_residue0 _residue_44_hi_un={
0,-1, -1, 10,-1,-1,
/* 0 1 2 3 4 5 6 7 8 9 */
{0},
{-1},
{ 0, 1, 2, 4, 8, 16, 32, 71,157},
{ -1, -1, -1, -1, -1, -1, -1, -1, -1}
};
/* mapping conventions:
only one submap (this would change for efficient 5.1 support for example)*/
/* Four psychoacoustic profiles are used, one for each blocktype */
static const vorbis_info_mapping0 _map_nominal_u[2]={
{1, {0,0,0,0,0,0}, {0}, {0}, 0,{0},{0}},
{1, {0,0,0,0,0,0}, {1}, {1}, 0,{0},{0}}
};
static const static_bookblock _resbook_44u_n1={
{
{0},
{0,0,&_44un1__p1_0},
{0,0,&_44un1__p2_0},
{0,0,&_44un1__p3_0},
{0,0,&_44un1__p4_0},
{0,0,&_44un1__p5_0},
{&_44un1__p6_0,&_44un1__p6_1},
{&_44un1__p7_0,&_44un1__p7_1,&_44un1__p7_2}
}
};
static const static_bookblock _resbook_44u_0={
{
{0},
{0,0,&_44u0__p1_0},
{0,0,&_44u0__p2_0},
{0,0,&_44u0__p3_0},
{0,0,&_44u0__p4_0},
{0,0,&_44u0__p5_0},
{&_44u0__p6_0,&_44u0__p6_1},
{&_44u0__p7_0,&_44u0__p7_1,&_44u0__p7_2}
}
};
static const static_bookblock _resbook_44u_1={
{
{0},
{0,0,&_44u1__p1_0},
{0,0,&_44u1__p2_0},
{0,0,&_44u1__p3_0},
{0,0,&_44u1__p4_0},
{0,0,&_44u1__p5_0},
{&_44u1__p6_0,&_44u1__p6_1},
{&_44u1__p7_0,&_44u1__p7_1,&_44u1__p7_2}
}
};
static const static_bookblock _resbook_44u_2={
{
{0},
{0,0,&_44u2__p1_0},
{0,0,&_44u2__p2_0},
{0,0,&_44u2__p3_0},
{0,0,&_44u2__p4_0},
{0,0,&_44u2__p5_0},
{&_44u2__p6_0,&_44u2__p6_1},
{&_44u2__p7_0,&_44u2__p7_1,&_44u2__p7_2}
}
};
static const static_bookblock _resbook_44u_3={
{
{0},
{0,0,&_44u3__p1_0},
{0,0,&_44u3__p2_0},
{0,0,&_44u3__p3_0},
{0,0,&_44u3__p4_0},
{0,0,&_44u3__p5_0},
{&_44u3__p6_0,&_44u3__p6_1},
{&_44u3__p7_0,&_44u3__p7_1,&_44u3__p7_2}
}
};
static const static_bookblock _resbook_44u_4={
{
{0},
{0,0,&_44u4__p1_0},
{0,0,&_44u4__p2_0},
{0,0,&_44u4__p3_0},
{0,0,&_44u4__p4_0},
{0,0,&_44u4__p5_0},
{&_44u4__p6_0,&_44u4__p6_1},
{&_44u4__p7_0,&_44u4__p7_1,&_44u4__p7_2}
}
};
static const static_bookblock _resbook_44u_5={
{
{0},
{0,0,&_44u5__p1_0},
{0,0,&_44u5__p2_0},
{0,0,&_44u5__p3_0},
{0,0,&_44u5__p4_0},
{0,0,&_44u5__p5_0},
{0,0,&_44u5__p6_0},
{&_44u5__p7_0,&_44u5__p7_1},
{&_44u5__p8_0,&_44u5__p8_1},
{&_44u5__p9_0,&_44u5__p9_1,&_44u5__p9_2}
}
};
static const static_bookblock _resbook_44u_6={
{
{0},
{0,0,&_44u6__p1_0},
{0,0,&_44u6__p2_0},
{0,0,&_44u6__p3_0},
{0,0,&_44u6__p4_0},
{0,0,&_44u6__p5_0},
{0,0,&_44u6__p6_0},
{&_44u6__p7_0,&_44u6__p7_1},
{&_44u6__p8_0,&_44u6__p8_1},
{&_44u6__p9_0,&_44u6__p9_1,&_44u6__p9_2}
}
};
static const static_bookblock _resbook_44u_7={
{
{0},
{0,0,&_44u7__p1_0},
{0,0,&_44u7__p2_0},
{0,0,&_44u7__p3_0},
{0,0,&_44u7__p4_0},
{0,0,&_44u7__p5_0},
{0,0,&_44u7__p6_0},
{&_44u7__p7_0,&_44u7__p7_1},
{&_44u7__p8_0,&_44u7__p8_1},
{&_44u7__p9_0,&_44u7__p9_1,&_44u7__p9_2}
}
};
static const static_bookblock _resbook_44u_8={
{
{0},
{0,0,&_44u8_p1_0},
{0,0,&_44u8_p2_0},
{0,0,&_44u8_p3_0},
{0,0,&_44u8_p4_0},
{&_44u8_p5_0,&_44u8_p5_1},
{&_44u8_p6_0,&_44u8_p6_1},
{&_44u8_p7_0,&_44u8_p7_1},
{&_44u8_p8_0,&_44u8_p8_1},
{&_44u8_p9_0,&_44u8_p9_1,&_44u8_p9_2}
}
};
static const static_bookblock _resbook_44u_9={
{
{0},
{0,0,&_44u9_p1_0},
{0,0,&_44u9_p2_0},
{0,0,&_44u9_p3_0},
{0,0,&_44u9_p4_0},
{&_44u9_p5_0,&_44u9_p5_1},
{&_44u9_p6_0,&_44u9_p6_1},
{&_44u9_p7_0,&_44u9_p7_1},
{&_44u9_p8_0,&_44u9_p8_1},
{&_44u9_p9_0,&_44u9_p9_1,&_44u9_p9_2}
}
};
static const vorbis_residue_template _res_44u_n1[]={
{1,0,32, &_residue_44_low_un,
&_huff_book__44un1__short,&_huff_book__44un1__short,
&_resbook_44u_n1,&_resbook_44u_n1},
{1,0,32, &_residue_44_low_un,
&_huff_book__44un1__long,&_huff_book__44un1__long,
&_resbook_44u_n1,&_resbook_44u_n1}
};
static const vorbis_residue_template _res_44u_0[]={
{1,0,16, &_residue_44_low_un,
&_huff_book__44u0__short,&_huff_book__44u0__short,
&_resbook_44u_0,&_resbook_44u_0},
{1,0,32, &_residue_44_low_un,
&_huff_book__44u0__long,&_huff_book__44u0__long,
&_resbook_44u_0,&_resbook_44u_0}
};
static const vorbis_residue_template _res_44u_1[]={
{1,0,16, &_residue_44_low_un,
&_huff_book__44u1__short,&_huff_book__44u1__short,
&_resbook_44u_1,&_resbook_44u_1},
{1,0,32, &_residue_44_low_un,
&_huff_book__44u1__long,&_huff_book__44u1__long,
&_resbook_44u_1,&_resbook_44u_1}
};
static const vorbis_residue_template _res_44u_2[]={
{1,0,16, &_residue_44_low_un,
&_huff_book__44u2__short,&_huff_book__44u2__short,
&_resbook_44u_2,&_resbook_44u_2},
{1,0,32, &_residue_44_low_un,
&_huff_book__44u2__long,&_huff_book__44u2__long,
&_resbook_44u_2,&_resbook_44u_2}
};
static const vorbis_residue_template _res_44u_3[]={
{1,0,16, &_residue_44_low_un,
&_huff_book__44u3__short,&_huff_book__44u3__short,
&_resbook_44u_3,&_resbook_44u_3},
{1,0,32, &_residue_44_low_un,
&_huff_book__44u3__long,&_huff_book__44u3__long,
&_resbook_44u_3,&_resbook_44u_3}
};
static const vorbis_residue_template _res_44u_4[]={
{1,0,16, &_residue_44_low_un,
&_huff_book__44u4__short,&_huff_book__44u4__short,
&_resbook_44u_4,&_resbook_44u_4},
{1,0,32, &_residue_44_low_un,
&_huff_book__44u4__long,&_huff_book__44u4__long,
&_resbook_44u_4,&_resbook_44u_4}
};
static const vorbis_residue_template _res_44u_5[]={
{1,0,16, &_residue_44_mid_un,
&_huff_book__44u5__short,&_huff_book__44u5__short,
&_resbook_44u_5,&_resbook_44u_5},
{1,0,32, &_residue_44_mid_un,
&_huff_book__44u5__long,&_huff_book__44u5__long,
&_resbook_44u_5,&_resbook_44u_5}
};
static const vorbis_residue_template _res_44u_6[]={
{1,0,16, &_residue_44_mid_un,
&_huff_book__44u6__short,&_huff_book__44u6__short,
&_resbook_44u_6,&_resbook_44u_6},
{1,0,32, &_residue_44_mid_un,
&_huff_book__44u6__long,&_huff_book__44u6__long,
&_resbook_44u_6,&_resbook_44u_6}
};
static const vorbis_residue_template _res_44u_7[]={
{1,0,16, &_residue_44_mid_un,
&_huff_book__44u7__short,&_huff_book__44u7__short,
&_resbook_44u_7,&_resbook_44u_7},
{1,0,32, &_residue_44_mid_un,
&_huff_book__44u7__long,&_huff_book__44u7__long,
&_resbook_44u_7,&_resbook_44u_7}
};
static const vorbis_residue_template _res_44u_8[]={
{1,0,16, &_residue_44_hi_un,
&_huff_book__44u8__short,&_huff_book__44u8__short,
&_resbook_44u_8,&_resbook_44u_8},
{1,0,32, &_residue_44_hi_un,
&_huff_book__44u8__long,&_huff_book__44u8__long,
&_resbook_44u_8,&_resbook_44u_8}
};
static const vorbis_residue_template _res_44u_9[]={
{1,0,16, &_residue_44_hi_un,
&_huff_book__44u9__short,&_huff_book__44u9__short,
&_resbook_44u_9,&_resbook_44u_9},
{1,0,32, &_residue_44_hi_un,
&_huff_book__44u9__long,&_huff_book__44u9__long,
&_resbook_44u_9,&_resbook_44u_9}
};
static const vorbis_mapping_template _mapres_template_44_uncoupled[]={
{ _map_nominal_u, _res_44u_n1 }, /* -1 */
{ _map_nominal_u, _res_44u_0 }, /* 0 */
{ _map_nominal_u, _res_44u_1 }, /* 1 */
{ _map_nominal_u, _res_44u_2 }, /* 2 */
{ _map_nominal_u, _res_44u_3 }, /* 3 */
{ _map_nominal_u, _res_44u_4 }, /* 4 */
{ _map_nominal_u, _res_44u_5 }, /* 5 */
{ _map_nominal_u, _res_44u_6 }, /* 6 */
{ _map_nominal_u, _res_44u_7 }, /* 7 */
{ _map_nominal_u, _res_44u_8 }, /* 8 */
{ _map_nominal_u, _res_44u_9 }, /* 9 */
};

View File

@ -0,0 +1,109 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: toplevel residue templates 8/11kHz
last mod: $Id: residue_8.h 16962 2010-03-11 07:30:34Z xiphmont $
********************************************************************/
#include "vorbis/codec.h"
#include "backends.h"
/***** residue backends *********************************************/
static const static_bookblock _resbook_8s_0={
{
{0},
{0,0,&_8c0_s_p1_0},
{0},
{0,0,&_8c0_s_p3_0},
{0,0,&_8c0_s_p4_0},
{0,0,&_8c0_s_p5_0},
{0,0,&_8c0_s_p6_0},
{&_8c0_s_p7_0,&_8c0_s_p7_1},
{&_8c0_s_p8_0,&_8c0_s_p8_1},
{&_8c0_s_p9_0,&_8c0_s_p9_1,&_8c0_s_p9_2}
}
};
static const static_bookblock _resbook_8s_1={
{
{0},
{0,0,&_8c1_s_p1_0},
{0},
{0,0,&_8c1_s_p3_0},
{0,0,&_8c1_s_p4_0},
{0,0,&_8c1_s_p5_0},
{0,0,&_8c1_s_p6_0},
{&_8c1_s_p7_0,&_8c1_s_p7_1},
{&_8c1_s_p8_0,&_8c1_s_p8_1},
{&_8c1_s_p9_0,&_8c1_s_p9_1,&_8c1_s_p9_2}
}
};
static const vorbis_residue_template _res_8s_0[]={
{2,0,32, &_residue_44_mid,
&_huff_book__8c0_s_single,&_huff_book__8c0_s_single,
&_resbook_8s_0,&_resbook_8s_0},
};
static const vorbis_residue_template _res_8s_1[]={
{2,0,32, &_residue_44_mid,
&_huff_book__8c1_s_single,&_huff_book__8c1_s_single,
&_resbook_8s_1,&_resbook_8s_1},
};
static const vorbis_mapping_template _mapres_template_8_stereo[2]={
{ _map_nominal, _res_8s_0 }, /* 0 */
{ _map_nominal, _res_8s_1 }, /* 1 */
};
static const static_bookblock _resbook_8u_0={
{
{0},
{0,0,&_8u0__p1_0},
{0,0,&_8u0__p2_0},
{0,0,&_8u0__p3_0},
{0,0,&_8u0__p4_0},
{0,0,&_8u0__p5_0},
{&_8u0__p6_0,&_8u0__p6_1},
{&_8u0__p7_0,&_8u0__p7_1,&_8u0__p7_2}
}
};
static const static_bookblock _resbook_8u_1={
{
{0},
{0,0,&_8u1__p1_0},
{0,0,&_8u1__p2_0},
{0,0,&_8u1__p3_0},
{0,0,&_8u1__p4_0},
{0,0,&_8u1__p5_0},
{0,0,&_8u1__p6_0},
{&_8u1__p7_0,&_8u1__p7_1},
{&_8u1__p8_0,&_8u1__p8_1},
{&_8u1__p9_0,&_8u1__p9_1,&_8u1__p9_2}
}
};
static const vorbis_residue_template _res_8u_0[]={
{1,0,32, &_residue_44_low_un,
&_huff_book__8u0__single,&_huff_book__8u0__single,
&_resbook_8u_0,&_resbook_8u_0},
};
static const vorbis_residue_template _res_8u_1[]={
{1,0,32, &_residue_44_mid_un,
&_huff_book__8u1__single,&_huff_book__8u1__single,
&_resbook_8u_1,&_resbook_8u_1},
};
static const vorbis_mapping_template _mapres_template_8_uncoupled[2]={
{ _map_nominal_u, _res_8u_0 }, /* 0 */
{ _map_nominal_u, _res_8u_1 }, /* 1 */
};

View File

@ -0,0 +1,143 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: 11kHz settings
last mod: $Id: setup_11.h 16894 2010-02-12 20:32:12Z xiphmont $
********************************************************************/
#include "psych_11.h"
static const int blocksize_11[2]={
512,512
};
static const int _floor_mapping_11a[]={
6,6
};
static const int *_floor_mapping_11[]={
_floor_mapping_11a
};
static const double rate_mapping_11[3]={
8000.,13000.,44000.,
};
static const double rate_mapping_11_uncoupled[3]={
12000.,20000.,50000.,
};
static const double quality_mapping_11[3]={
-.1,.0,1.
};
static const ve_setup_data_template ve_setup_11_stereo={
2,
rate_mapping_11,
quality_mapping_11,
2,
9000,
15000,
blocksize_11,
blocksize_11,
_psy_tone_masteratt_11,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_11,
NULL,
_vp_tonemask_adj_11,
_psy_noiseguards_8,
_psy_noisebias_11,
_psy_noisebias_11,
NULL,
NULL,
_psy_noise_suppress,
_psy_compand_8,
_psy_compand_8_mapping,
NULL,
{_noise_start_8,_noise_start_8},
{_noise_part_8,_noise_part_8},
_noise_thresh_11,
_psy_ath_floater_8,
_psy_ath_abs_8,
_psy_lowpass_11,
_psy_global_44,
_global_mapping_8,
_psy_stereo_modes_8,
_floor_books,
_floor,
1,
_floor_mapping_11,
_mapres_template_8_stereo
};
static const ve_setup_data_template ve_setup_11_uncoupled={
2,
rate_mapping_11_uncoupled,
quality_mapping_11,
-1,
9000,
15000,
blocksize_11,
blocksize_11,
_psy_tone_masteratt_11,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_11,
NULL,
_vp_tonemask_adj_11,
_psy_noiseguards_8,
_psy_noisebias_11,
_psy_noisebias_11,
NULL,
NULL,
_psy_noise_suppress,
_psy_compand_8,
_psy_compand_8_mapping,
NULL,
{_noise_start_8,_noise_start_8},
{_noise_part_8,_noise_part_8},
_noise_thresh_11,
_psy_ath_floater_8,
_psy_ath_abs_8,
_psy_lowpass_11,
_psy_global_44,
_global_mapping_8,
_psy_stereo_modes_8,
_floor_books,
_floor,
1,
_floor_mapping_11,
_mapres_template_8_uncoupled
};

View File

@ -0,0 +1,153 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: 16kHz settings
last mod: $Id: setup_16.h 16894 2010-02-12 20:32:12Z xiphmont $
********************************************************************/
#include "psych_16.h"
#include "residue_16.h"
static const int blocksize_16_short[3]={
1024,512,512
};
static const int blocksize_16_long[3]={
1024,1024,1024
};
static const int _floor_mapping_16a[]={
9,3,3
};
static const int _floor_mapping_16b[]={
9,9,9
};
static const int *_floor_mapping_16[]={
_floor_mapping_16a,
_floor_mapping_16b
};
static const double rate_mapping_16[4]={
12000.,20000.,44000.,86000.
};
static const double rate_mapping_16_uncoupled[4]={
16000.,28000.,64000.,100000.
};
static const double _global_mapping_16[4]={ 1., 2., 3., 4. };
static const double quality_mapping_16[4]={ -.1,.05,.5,1. };
static const double _psy_compand_16_mapping[4]={ 0., .8, 1., 1.};
static const ve_setup_data_template ve_setup_16_stereo={
3,
rate_mapping_16,
quality_mapping_16,
2,
15000,
19000,
blocksize_16_short,
blocksize_16_long,
_psy_tone_masteratt_16,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_16,
_vp_tonemask_adj_16,
_vp_tonemask_adj_16,
_psy_noiseguards_16,
_psy_noisebias_16_impulse,
_psy_noisebias_16_short,
_psy_noisebias_16_short,
_psy_noisebias_16,
_psy_noise_suppress,
_psy_compand_8,
_psy_compand_16_mapping,
_psy_compand_16_mapping,
{_noise_start_16,_noise_start_16},
{ _noise_part_16, _noise_part_16},
_noise_thresh_16,
_psy_ath_floater_16,
_psy_ath_abs_16,
_psy_lowpass_16,
_psy_global_44,
_global_mapping_16,
_psy_stereo_modes_16,
_floor_books,
_floor,
2,
_floor_mapping_16,
_mapres_template_16_stereo
};
static const ve_setup_data_template ve_setup_16_uncoupled={
3,
rate_mapping_16_uncoupled,
quality_mapping_16,
-1,
15000,
19000,
blocksize_16_short,
blocksize_16_long,
_psy_tone_masteratt_16,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_16,
_vp_tonemask_adj_16,
_vp_tonemask_adj_16,
_psy_noiseguards_16,
_psy_noisebias_16_impulse,
_psy_noisebias_16_short,
_psy_noisebias_16_short,
_psy_noisebias_16,
_psy_noise_suppress,
_psy_compand_8,
_psy_compand_16_mapping,
_psy_compand_16_mapping,
{_noise_start_16,_noise_start_16},
{ _noise_part_16, _noise_part_16},
_noise_thresh_16,
_psy_ath_floater_16,
_psy_ath_abs_16,
_psy_lowpass_16,
_psy_global_44,
_global_mapping_16,
_psy_stereo_modes_16,
_floor_books,
_floor,
2,
_floor_mapping_16,
_mapres_template_16_uncoupled
};

View File

@ -0,0 +1,128 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: 22kHz settings
last mod: $Id: setup_22.h 17026 2010-03-25 05:00:27Z xiphmont $
********************************************************************/
static const double rate_mapping_22[4]={
15000.,20000.,44000.,86000.
};
static const double rate_mapping_22_uncoupled[4]={
16000.,28000.,50000.,90000.
};
static const double _psy_lowpass_22[4]={9.5,11.,30.,99.};
static const ve_setup_data_template ve_setup_22_stereo={
3,
rate_mapping_22,
quality_mapping_16,
2,
19000,
26000,
blocksize_16_short,
blocksize_16_long,
_psy_tone_masteratt_16,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_16,
_vp_tonemask_adj_16,
_vp_tonemask_adj_16,
_psy_noiseguards_16,
_psy_noisebias_16_impulse,
_psy_noisebias_16_short,
_psy_noisebias_16_short,
_psy_noisebias_16,
_psy_noise_suppress,
_psy_compand_8,
_psy_compand_16_mapping,
_psy_compand_16_mapping,
{_noise_start_16,_noise_start_16},
{ _noise_part_16, _noise_part_16},
_noise_thresh_16,
_psy_ath_floater_16,
_psy_ath_abs_16,
_psy_lowpass_22,
_psy_global_44,
_global_mapping_16,
_psy_stereo_modes_16,
_floor_books,
_floor,
2,
_floor_mapping_16,
_mapres_template_16_stereo
};
static const ve_setup_data_template ve_setup_22_uncoupled={
3,
rate_mapping_22_uncoupled,
quality_mapping_16,
-1,
19000,
26000,
blocksize_16_short,
blocksize_16_long,
_psy_tone_masteratt_16,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_16,
_vp_tonemask_adj_16,
_vp_tonemask_adj_16,
_psy_noiseguards_16,
_psy_noisebias_16_impulse,
_psy_noisebias_16_short,
_psy_noisebias_16_short,
_psy_noisebias_16,
_psy_noise_suppress,
_psy_compand_8,
_psy_compand_16_mapping,
_psy_compand_16_mapping,
{_noise_start_16,_noise_start_16},
{ _noise_part_16, _noise_part_16},
_noise_thresh_16,
_psy_ath_floater_16,
_psy_ath_abs_16,
_psy_lowpass_22,
_psy_global_44,
_global_mapping_16,
_psy_stereo_modes_16,
_floor_books,
_floor,
2,
_floor_mapping_16,
_mapres_template_16_uncoupled
};

View File

@ -0,0 +1,132 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: toplevel settings for 32kHz
last mod: $Id: setup_32.h 16894 2010-02-12 20:32:12Z xiphmont $
********************************************************************/
static const double rate_mapping_32[12]={
18000.,28000.,35000.,45000.,56000.,60000.,
75000.,90000.,100000.,115000.,150000.,190000.,
};
static const double rate_mapping_32_un[12]={
30000.,42000.,52000.,64000.,72000.,78000.,
86000.,92000.,110000.,120000.,140000.,190000.,
};
static const double _psy_lowpass_32[12]={
12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99.
};
static const ve_setup_data_template ve_setup_32_stereo={
11,
rate_mapping_32,
quality_mapping_44,
2,
26000,
40000,
blocksize_short_44,
blocksize_long_44,
_psy_tone_masteratt_44,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_otherblock,
_vp_tonemask_adj_longblock,
_vp_tonemask_adj_otherblock,
_psy_noiseguards_44,
_psy_noisebias_impulse,
_psy_noisebias_padding,
_psy_noisebias_trans,
_psy_noisebias_long,
_psy_noise_suppress,
_psy_compand_44,
_psy_compand_short_mapping,
_psy_compand_long_mapping,
{_noise_start_short_44,_noise_start_long_44},
{_noise_part_short_44,_noise_part_long_44},
_noise_thresh_44,
_psy_ath_floater,
_psy_ath_abs,
_psy_lowpass_32,
_psy_global_44,
_global_mapping_44,
_psy_stereo_modes_44,
_floor_books,
_floor,
2,
_floor_mapping_44,
_mapres_template_44_stereo
};
static const ve_setup_data_template ve_setup_32_uncoupled={
11,
rate_mapping_32_un,
quality_mapping_44,
-1,
26000,
40000,
blocksize_short_44,
blocksize_long_44,
_psy_tone_masteratt_44,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_otherblock,
_vp_tonemask_adj_longblock,
_vp_tonemask_adj_otherblock,
_psy_noiseguards_44,
_psy_noisebias_impulse,
_psy_noisebias_padding,
_psy_noisebias_trans,
_psy_noisebias_long,
_psy_noise_suppress,
_psy_compand_44,
_psy_compand_short_mapping,
_psy_compand_long_mapping,
{_noise_start_short_44,_noise_start_long_44},
{_noise_part_short_44,_noise_part_long_44},
_noise_thresh_44,
_psy_ath_floater,
_psy_ath_abs,
_psy_lowpass_32,
_psy_global_44,
_global_mapping_44,
NULL,
_floor_books,
_floor,
2,
_floor_mapping_44,
_mapres_template_44_uncoupled
};

View File

@ -0,0 +1,117 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: toplevel settings for 44.1/48kHz
last mod: $Id: setup_44.h 16962 2010-03-11 07:30:34Z xiphmont $
********************************************************************/
#include "modes/floor_all.h"
#include "modes/residue_44.h"
#include "modes/psych_44.h"
static const double rate_mapping_44_stereo[12]={
22500.,32000.,40000.,48000.,56000.,64000.,
80000.,96000.,112000.,128000.,160000.,250001.
};
static const double quality_mapping_44[12]={
-.1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0
};
static const int blocksize_short_44[11]={
512,256,256,256,256,256,256,256,256,256,256
};
static const int blocksize_long_44[11]={
4096,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048
};
static const double _psy_compand_short_mapping[12]={
0.5, 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.
};
static const double _psy_compand_long_mapping[12]={
3.5, 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5.
};
static const double _global_mapping_44[12]={
/* 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.5, 4., 4. */
0., 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4.
};
static const int _floor_mapping_44a[11]={
1,0,0,2,2,4,5,5,5,5,5
};
static const int _floor_mapping_44b[11]={
8,7,7,7,7,7,7,7,7,7,7
};
static const int _floor_mapping_44c[11]={
10,10,10,10,10,10,10,10,10,10,10
};
static const int *_floor_mapping_44[]={
_floor_mapping_44a,
_floor_mapping_44b,
_floor_mapping_44c,
};
static const ve_setup_data_template ve_setup_44_stereo={
11,
rate_mapping_44_stereo,
quality_mapping_44,
2,
40000,
50000,
blocksize_short_44,
blocksize_long_44,
_psy_tone_masteratt_44,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_otherblock,
_vp_tonemask_adj_longblock,
_vp_tonemask_adj_otherblock,
_psy_noiseguards_44,
_psy_noisebias_impulse,
_psy_noisebias_padding,
_psy_noisebias_trans,
_psy_noisebias_long,
_psy_noise_suppress,
_psy_compand_44,
_psy_compand_short_mapping,
_psy_compand_long_mapping,
{_noise_start_short_44,_noise_start_long_44},
{_noise_part_short_44,_noise_part_long_44},
_noise_thresh_44,
_psy_ath_floater,
_psy_ath_abs,
_psy_lowpass_44,
_psy_global_44,
_global_mapping_44,
_psy_stereo_modes_44,
_floor_books,
_floor,
2,
_floor_mapping_44,
_mapres_template_44_stereo
};

View File

@ -0,0 +1,74 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: toplevel settings for 44.1/48kHz 5.1 surround modes
last mod: $Id$
********************************************************************/
#include "modes/residue_44p51.h"
static const double rate_mapping_44p51[12]={
14000.,20000.,28000.,38000.,46000.,54000.,
75000.,96000.,120000.,140000.,180000.,240001.
};
static const ve_setup_data_template ve_setup_44_51={
11,
rate_mapping_44p51,
quality_mapping_44,
6,
40000,
70000,
blocksize_short_44,
blocksize_long_44,
_psy_tone_masteratt_44,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_otherblock,
_vp_tonemask_adj_longblock,
_vp_tonemask_adj_otherblock,
_psy_noiseguards_44,
_psy_noisebias_impulse,
_psy_noisebias_padding,
_psy_noisebias_trans,
_psy_noisebias_long,
_psy_noise_suppress,
_psy_compand_44,
_psy_compand_short_mapping,
_psy_compand_long_mapping,
{_noise_start_short_44,_noise_start_long_44},
{_noise_part_short_44,_noise_part_long_44},
_noise_thresh_44,
_psy_ath_floater,
_psy_ath_abs,
_psy_lowpass_44,
_psy_global_44,
_global_mapping_44,
_psy_stereo_modes_44,
_floor_books,
_floor,
3,
_floor_mapping_44,
_mapres_template_44_51
};

View File

@ -0,0 +1,74 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: toplevel settings for 44.1/48kHz uncoupled modes
last mod: $Id: setup_44u.h 16962 2010-03-11 07:30:34Z xiphmont $
********************************************************************/
#include "modes/residue_44u.h"
static const double rate_mapping_44_un[12]={
32000.,48000.,60000.,70000.,80000.,86000.,
96000.,110000.,120000.,140000.,160000.,240001.
};
static const ve_setup_data_template ve_setup_44_uncoupled={
11,
rate_mapping_44_un,
quality_mapping_44,
-1,
40000,
50000,
blocksize_short_44,
blocksize_long_44,
_psy_tone_masteratt_44,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_otherblock,
_vp_tonemask_adj_longblock,
_vp_tonemask_adj_otherblock,
_psy_noiseguards_44,
_psy_noisebias_impulse,
_psy_noisebias_padding,
_psy_noisebias_trans,
_psy_noisebias_long,
_psy_noise_suppress,
_psy_compand_44,
_psy_compand_short_mapping,
_psy_compand_long_mapping,
{_noise_start_short_44,_noise_start_long_44},
{_noise_part_short_44,_noise_part_long_44},
_noise_thresh_44,
_psy_ath_floater,
_psy_ath_abs,
_psy_lowpass_44,
_psy_global_44,
_global_mapping_44,
_psy_stereo_modes_44,
_floor_books,
_floor,
2,
_floor_mapping_44,
_mapres_template_44_uncoupled
};

View File

@ -0,0 +1,149 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: 8kHz settings
last mod: $Id: setup_8.h 16894 2010-02-12 20:32:12Z xiphmont $
********************************************************************/
#include "psych_8.h"
#include "residue_8.h"
static const int blocksize_8[2]={
512,512
};
static const int _floor_mapping_8a[]={
6,6
};
static const int *_floor_mapping_8[]={
_floor_mapping_8a
};
static const double rate_mapping_8[3]={
6000.,9000.,32000.,
};
static const double rate_mapping_8_uncoupled[3]={
8000.,14000.,42000.,
};
static const double quality_mapping_8[3]={
-.1,.0,1.
};
static const double _psy_compand_8_mapping[3]={ 0., 1., 1.};
static const double _global_mapping_8[3]={ 1., 2., 3. };
static const ve_setup_data_template ve_setup_8_stereo={
2,
rate_mapping_8,
quality_mapping_8,
2,
8000,
9000,
blocksize_8,
blocksize_8,
_psy_tone_masteratt_8,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_8,
NULL,
_vp_tonemask_adj_8,
_psy_noiseguards_8,
_psy_noisebias_8,
_psy_noisebias_8,
NULL,
NULL,
_psy_noise_suppress,
_psy_compand_8,
_psy_compand_8_mapping,
NULL,
{_noise_start_8,_noise_start_8},
{_noise_part_8,_noise_part_8},
_noise_thresh_5only,
_psy_ath_floater_8,
_psy_ath_abs_8,
_psy_lowpass_8,
_psy_global_44,
_global_mapping_8,
_psy_stereo_modes_8,
_floor_books,
_floor,
1,
_floor_mapping_8,
_mapres_template_8_stereo
};
static const ve_setup_data_template ve_setup_8_uncoupled={
2,
rate_mapping_8_uncoupled,
quality_mapping_8,
-1,
8000,
9000,
blocksize_8,
blocksize_8,
_psy_tone_masteratt_8,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_8,
NULL,
_vp_tonemask_adj_8,
_psy_noiseguards_8,
_psy_noisebias_8,
_psy_noisebias_8,
NULL,
NULL,
_psy_noise_suppress,
_psy_compand_8,
_psy_compand_8_mapping,
NULL,
{_noise_start_8,_noise_start_8},
{_noise_part_8,_noise_part_8},
_noise_thresh_5only,
_psy_ath_floater_8,
_psy_ath_abs_8,
_psy_lowpass_8,
_psy_global_44,
_global_mapping_8,
_psy_stereo_modes_8,
_floor_books,
_floor,
1,
_floor_mapping_8,
_mapres_template_8_uncoupled
};

View File

@ -0,0 +1,225 @@
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: catch-all toplevel settings for q modes only
last mod: $Id: setup_X.h 16894 2010-02-12 20:32:12Z xiphmont $
********************************************************************/
static const double rate_mapping_X[12]={
-1.,-1.,-1.,-1.,-1.,-1.,
-1.,-1.,-1.,-1.,-1.,-1.
};
static const ve_setup_data_template ve_setup_X_stereo={
11,
rate_mapping_X,
quality_mapping_44,
2,
50000,
200000,
blocksize_short_44,
blocksize_long_44,
_psy_tone_masteratt_44,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_otherblock,
_vp_tonemask_adj_longblock,
_vp_tonemask_adj_otherblock,
_psy_noiseguards_44,
_psy_noisebias_impulse,
_psy_noisebias_padding,
_psy_noisebias_trans,
_psy_noisebias_long,
_psy_noise_suppress,
_psy_compand_44,
_psy_compand_short_mapping,
_psy_compand_long_mapping,
{_noise_start_short_44,_noise_start_long_44},
{_noise_part_short_44,_noise_part_long_44},
_noise_thresh_44,
_psy_ath_floater,
_psy_ath_abs,
_psy_lowpass_44,
_psy_global_44,
_global_mapping_44,
_psy_stereo_modes_44,
_floor_books,
_floor,
2,
_floor_mapping_44,
_mapres_template_44_stereo
};
static const ve_setup_data_template ve_setup_X_uncoupled={
11,
rate_mapping_X,
quality_mapping_44,
-1,
50000,
200000,
blocksize_short_44,
blocksize_long_44,
_psy_tone_masteratt_44,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_otherblock,
_vp_tonemask_adj_longblock,
_vp_tonemask_adj_otherblock,
_psy_noiseguards_44,
_psy_noisebias_impulse,
_psy_noisebias_padding,
_psy_noisebias_trans,
_psy_noisebias_long,
_psy_noise_suppress,
_psy_compand_44,
_psy_compand_short_mapping,
_psy_compand_long_mapping,
{_noise_start_short_44,_noise_start_long_44},
{_noise_part_short_44,_noise_part_long_44},
_noise_thresh_44,
_psy_ath_floater,
_psy_ath_abs,
_psy_lowpass_44,
_psy_global_44,
_global_mapping_44,
NULL,
_floor_books,
_floor,
2,
_floor_mapping_44,
_mapres_template_44_uncoupled
};
static const ve_setup_data_template ve_setup_XX_stereo={
2,
rate_mapping_X,
quality_mapping_8,
2,
0,
8000,
blocksize_8,
blocksize_8,
_psy_tone_masteratt_8,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_8,
NULL,
_vp_tonemask_adj_8,
_psy_noiseguards_8,
_psy_noisebias_8,
_psy_noisebias_8,
NULL,
NULL,
_psy_noise_suppress,
_psy_compand_8,
_psy_compand_8_mapping,
NULL,
{_noise_start_8,_noise_start_8},
{_noise_part_8,_noise_part_8},
_noise_thresh_5only,
_psy_ath_floater_8,
_psy_ath_abs_8,
_psy_lowpass_8,
_psy_global_44,
_global_mapping_8,
_psy_stereo_modes_8,
_floor_books,
_floor,
1,
_floor_mapping_8,
_mapres_template_8_stereo
};
static const ve_setup_data_template ve_setup_XX_uncoupled={
2,
rate_mapping_X,
quality_mapping_8,
-1,
0,
8000,
blocksize_8,
blocksize_8,
_psy_tone_masteratt_8,
_psy_tone_0dB,
_psy_tone_suppress,
_vp_tonemask_adj_8,
NULL,
_vp_tonemask_adj_8,
_psy_noiseguards_8,
_psy_noisebias_8,
_psy_noisebias_8,
NULL,
NULL,
_psy_noise_suppress,
_psy_compand_8,
_psy_compand_8_mapping,
NULL,
{_noise_start_8,_noise_start_8},
{_noise_part_8,_noise_part_8},
_noise_thresh_5only,
_psy_ath_floater_8,
_psy_ath_abs_8,
_psy_lowpass_8,
_psy_global_44,
_global_mapping_8,
_psy_stereo_modes_8,
_floor_books,
_floor,
1,
_floor_mapping_8,
_mapres_template_8_uncoupled
};

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,7 @@ MODULE = 'vorbis'
EXPORTS.vorbis += [
'include/vorbis/codec.h',
'include/vorbis/vorbisenc.h',
]
LIBRARY_NAME = 'vorbis'
@ -33,8 +34,11 @@ SOURCES += [
'lib/vorbis_smallft.c',
'lib/vorbis_synthesis.c',
'lib/vorbis_window.c',
'lib/vorbisenc.c',
]
LOCAL_INCLUDES += ['lib']
if CONFIG['OS_ARCH'] == 'AIX':
DEFINES['alloca'] = '__alloca'

View File

@ -2,6 +2,8 @@
#
# Copies the needed files from a directory containing the original
# libvorbis source that we need for the Mozilla HTML5 media support.
mkdir -p ./lib
mkdir -p ./include/vorbis
cp $1/lib/envelope.h ./lib/envelope.h
cp $1/lib/lpc.h ./lib/lpc.h
cp $1/lib/highlevel.h ./lib/highlevel.h
@ -47,4 +49,35 @@ cp $1/COPYING ./COPYING
cp $1/README ./README
cp $1/AUTHORS ./AUTHORS
# Encoder support
cp $1/lib/vorbisenc.c ./lib/vorbisenc.c
cp $1/include/vorbis/vorbisenc.h ./include/vorbis/vorbisenc.h
mkdir -p ./lib/modes
cp $1/lib/modes/setup_44.h ./lib/modes/setup_44.h
cp $1/lib/modes/setup_44u.h ./lib/modes/setup_44u.h
cp $1/lib/modes/setup_44p51.h ./lib/modes/setup_44p51.h
cp $1/lib/modes/setup_32.h ./lib/modes/setup_32.h
cp $1/lib/modes/setup_8.h ./lib/modes/setup_8.h
cp $1/lib/modes/setup_11.h ./lib/modes/setup_11.h
cp $1/lib/modes/setup_16.h ./lib/modes/setup_16.h
cp $1/lib/modes/setup_22.h ./lib/modes/setup_22.h
cp $1/lib/modes/setup_X.h ./lib/modes/setup_X.h
cp $1/lib/modes/floor_all.h ./lib/modes/floor_all.h
cp $1/lib/modes/residue_44.h ./lib/modes/residue_44.h
cp $1/lib/modes/residue_44u.h ./lib/modes/residue_44u.h
cp $1/lib/modes/residue_44p51.h ./lib/modes/residue_44p51.h
cp $1/lib/modes/residue_8.h ./lib/modes/residue_8.h
cp $1/lib/modes/residue_16.h ./lib/modes/residue_16.h
cp $1/lib/modes/psych_44.h ./lib/modes/psych_44.h
cp $1/lib/modes/psych_8.h ./lib/modes/psych_8.h
cp $1/lib/modes/psych_11.h ./lib/modes/psych_11.h
cp $1/lib/modes/psych_16.h ./lib/modes/psych_16.h
mkdir -p ./lib/books/coupled
mkdir -p ./lib/books/floor
mkdir -p ./lib/books/uncoupled
cp $1/lib/books/coupled/res_books_stereo.h ./lib/books/coupled/
cp $1/lib/books/coupled/res_books_51.h ./lib/books/coupled/
cp $1/lib/books/floor/floor_books.h ./lib/books/floor/
cp $1/lib/books/uncoupled/res_books_uncoupled.h ./lib/books/uncoupled/
# Add any patches against upstream here.