********************************************************************
function: maintain the info structure, info <-> header packets
- last mod: $Id: info.c,v 1.35 2001/01/22 01:38:24 xiphmont Exp $
+ last mod: $Id: info.c,v 1.36 2001/02/01 01:03:29 xiphmont Exp $
********************************************************************/
}
static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){
- char temp[]="Xiphophorus libVorbis I 20010119";
+ char temp[]="Xiphophorus libVorbis I 20010201";
/* preamble */
oggpack_write(opb,0x03,8);
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_A.h,v 1.8 2001/01/22 01:38:50 xiphmont Exp $
+ last mod: $Id: mode_A.h,v 1.9 2001/02/01 01:03:30 xiphmont Exp $
********************************************************************/
/* psy */
{&_psy_set_A0,&_psy_set_A},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 30.f, -30.f, -96.f,
+ 256, 20.f, -20.f, -96.f,
-10.,
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_AA.h,v 1.4 2001/01/22 01:38:50 xiphmont Exp $
+ last mod: $Id: mode_AA.h,v 1.5 2001/02/01 01:03:30 xiphmont Exp $
********************************************************************/
/* psy */
{&_psy_set_AA0,&_psy_set_AA},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 30.f, -30.f, -96.f,
+ 256, 22.f, -22.f, -96.f,
-10.,
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_B.h,v 1.7 2001/01/22 01:38:50 xiphmont Exp $
+ last mod: $Id: mode_B.h,v 1.8 2001/02/01 01:03:30 xiphmont Exp $
********************************************************************/
/* psy */
{&_psy_set_B0,&_psy_set_B},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 30.f, -30.f, -96.f,
+ 256, 20.f, -20.f, -96.f,
-10.,
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_C.h,v 1.7 2001/01/22 01:38:50 xiphmont Exp $
+ last mod: $Id: mode_C.h,v 1.8 2001/02/01 01:03:30 xiphmont Exp $
********************************************************************/
/* psy */
{&_psy_set_C0,&_psy_set_C},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 26.f, -26.f, -96.f,
+ 256, 20.f, -20.f, -96.f,
-15.,
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_D.h,v 1.8 2001/01/22 01:38:50 xiphmont Exp $
+ last mod: $Id: mode_D.h,v 1.9 2001/02/01 01:03:30 xiphmont Exp $
********************************************************************/
/* psy */
{&_psy_set_D0,&_psy_set_D},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 20.f, -20.f, -96.f,
+ 256, 18.f, -18.f, -96.f,
-15.,
********************************************************************
function: predefined encoding modes
- last mod: $Id: mode_E.h,v 1.5 2001/01/22 01:38:50 xiphmont Exp $
+ last mod: $Id: mode_E.h,v 1.6 2001/02/01 01:03:30 xiphmont Exp $
********************************************************************/
/* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
- 1,/* tonemaskp */
+ 0,/* tonemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
{
{-999.,-999.,-999.,-999.,-999.,-999.,-999.,-999.,-999.,-999.,-999.}, /*63*/
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
/* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
/* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
- 1,/* tonemaskp */
+ 0,/* tonemaskp */
/* 0 10 20 30 40 50 60 70 80 90 100 */
{
{-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f}, /*63*/
/* psy */
{&_psy_set_E0,&_psy_set_E},
/* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
- 256, 20.f, -20.f, -96.f,
+ 256, 18.f, -18.f, -96.f,
-15.,
********************************************************************
function: predefined encoding modes
- last mod: $Id: modes.h,v 1.3 2000/11/08 06:08:17 xiphmont Exp $
+ last mod: $Id: modes.h,v 1.4 2001/02/01 01:03:30 xiphmont Exp $
********************************************************************/
#ifndef _V_MODES_H_
#define _V_MODES_H_
-#include "modes/mode_AA.h"
#include "modes/mode_A.h"
#include "modes/mode_B.h"
#include "modes/mode_C.h"
********************************************************************
function: #ifdef jail to whip a few platforms into the UNIX ideal.
- last mod: $Id: os.h,v 1.20 2001/01/30 09:40:11 msmith Exp $
+ last mod: $Id: os.h,v 1.21 2001/02/01 01:03:29 xiphmont Exp $
********************************************************************/
#include <ogg/os_types.h>
#ifndef _V_IFDEFJAIL_H_
-#define _V_IFDEFJAIL_H_
+# define _V_IFDEFJAIL_H_
+
+# ifdef __GNUC__
+# define STIN static inline
+# elif _WIN32
+# define STIN static __inline
+#else
+# define STIN static
+#endif
#ifndef M_PI
-#define M_PI (3.1415926536f)
+# define M_PI (3.1415926536f)
#endif
-#ifndef __GNUC__
#ifdef _WIN32
# include <malloc.h>
# define rint(x) (floor((x)+0.5f))
+# define NO_FLOAT_MATH_LIB
+# define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
#endif
-#define STIN static
-#else
-#define STIN static inline
-#define sqrt sqrtf
-#define log logf
-#define exp expf
-#define pow powf
-#define acos acosf
-#define atan atanf
-#define frexp frexpf
-#define rint rintf
+#ifdef DARWIN
+# define NO_FLOAT_MATH_LIB
#endif
+#ifndef NO_FLOAT_MATH_LIB
+# define sqrt sqrtf
+# define log logf
+# define exp expf
+# define pow powf
+# define acos acosf
+# define atan atanf
+# define frexp frexpf
+# define rint rintf
+#endif
-#ifdef _WIN32
-# define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
-#else /* if not _WIN32 */
+
+#ifndef FAST_HYPOT
# define FAST_HYPOT hypot
#endif
#endif
#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
+# include <alloca.h>
#endif
#ifdef USE_MEMORY_H
-#include <memory.h>
+# include <memory.h>
#endif
#ifndef min
# define max(x,y) ((x)<(y)?(y):(x))
#endif
-
-#if defined(__i386__) && defined(__GNUC__)
-
-#ifndef __BEOS__
-
+#if defined(__i386__) && defined(__GNUC__) && !defined(__BEOS__)
+# define VORBIS_FPU_CONTROL
/* both GCC and MSVC are kinda stupid about rounding/casting to int.
Because of encapsulation constraints (GCC can't see inside the asm
block and so we end up doing stupid things like a store/load that
__asm__("fistl %0": "=m"(i) : "t"(f));
return(i);
}
-
-#else
-/* this is for beos */
-
-typedef int vorbis_fpu_control;
-static int vorbis_ftoi(double f){
- return (int)(f+.5);
-}
-
-/* We don't have special code for this compiler/arch, so do it the slow way */
-#define vorbis_fpu_setround(vorbis_fpu_control) {}
-#define vorbis_fpu_restore(vorbis_fpu_control) {}
-
#endif
-#else
+#if defined(_WIN32) && !defined(__GNUC__)
+# define VORBIS_FPU_CONTROL
-typedef int vorbis_fpu_control;
+typedef ogg_int16_t vorbis_fpu_control;
-#ifdef _MSC_VER
-/* MSVC++ */
static __inline int vorbis_ftoi(double f){
int i;
__asm{
static __inline void vorbis_fpu_restore(vorbis_fpu_control fpu){
}
-#else
+
+#endif
+
+
+#ifndef VORBIS_FPU_CONTROL
+
+typedef int vorbis_fpu_control;
static int vorbis_ftoi(double f){
return (int)(f+.5);
}
/* We don't have special code for this compiler/arch, so do it the slow way */
-#define vorbis_fpu_setround(vorbis_fpu_control) {}
-#define vorbis_fpu_restore(vorbis_fpu_control) {}
-
-#endif
+# define vorbis_fpu_setround(vorbis_fpu_control) {}
+# define vorbis_fpu_restore(vorbis_fpu_control) {}
#endif