public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/4590: GCC 3.0.1 can't do -O3
@ 2001-10-17 7:36 Gabor NemethI
0 siblings, 0 replies; only message in thread
From: Gabor NemethI @ 2001-10-17 7:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 4590
>Category: optimization
>Synopsis: GCC 3.0.1 can't do -O3
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Wed Oct 17 07:36:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Gab
>Release: 3.0.1
>Organization:
>Environment:
System: SunOS lucretius 5.6 Generic_105181-21 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4
host: sparc-sun-solaris2.6
build: sparc-sun-solaris2.6
target: sparc-sun-solaris2.6
configured with: /mnt/adm/gnuowner/w1/gcc-3.0.1/configure --prefix=/usr/local/gnu/gcc3.0.1 --with-local-prefix=/usr/local/gnu/gcc3.0.1 --enable-shared --with-as=/usr/local/gnu/bin/as --with-ld=/usr/local/gnu/bin/ld --enable-threads --disable-target-optspace
>Description:
Using no optimization the code compiles with no errors. Turning -O3
on however makes:
% gcc -O3 -c main.i
/home/tmpgnh/src/lame-3.89/frontend/main.c: In function `lame_decoder':
/home/tmpgnh/src/lame-3.89/frontend/main.c:297: Internal compiler error in
change_address, at emit-rtl.c:1635
>How-To-Repeat:
# 26 "/home/tmpgnh/src/lame-3.89/frontend/main.c"
# 1 "../config.h" 1
# 27 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 1 "/usr/include/assert.h" 1 3
# 11 "/usr/include/assert.h" 3
#pragma ident "@(#)assert.h 1.9 92/07/14 SMI"
extern void __assert(const char *, const char *, int);
# 30 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 1 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 1 3
# 14 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 3
# 1 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdarg.h" 1 3
# 43 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdarg.h" 3
typedef __builtin_va_list __gnuc_va_list;
# 15 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 2 3
# 29 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 3
#pragma ident "@(#)stdio.h 1.49 97/05/09 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 11 "/usr/include/sys/feature_tests.h" 3
#pragma ident "@(#)feature_tests.h 1.13 97/06/26 SMI"
# 32 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 2 3
# 1 "/usr/include/sys/va_list.h" 1 3
# 9 "/usr/include/sys/va_list.h" 3
#pragma ident "@(#)va_list.h 1.6 96/01/26 SMI"
# 44 "/usr/include/sys/va_list.h" 3
typedef void *__va_list;
# 33 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 2 3
# 48 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 3
typedef unsigned int size_t;
# 58 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 3
typedef long long __longlong_t;
# 72 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 3
typedef long off_t;
typedef __longlong_t off64_t;
typedef long fpos_t;
typedef __longlong_t fpos64_t;
# 188 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 3
typedef struct
{
int _cnt;
unsigned char *_ptr;
unsigned char *_base;
unsigned char _flag;
unsigned char _file;
} FILE;
extern FILE __iob[20];
extern FILE *_lastbuf;
extern unsigned char *_bufendtab[];
extern unsigned char _sibuf[], _sobuf[];
# 240 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 3
extern int remove(const char *);
extern int rename(const char *, const char *);
extern FILE *tmpfile(void);
extern char *tmpnam(char *);
extern int fclose(FILE *);
extern int fflush(FILE *);
extern FILE *fopen(const char *, const char *);
extern FILE *freopen(const char *, const char *, FILE *);
extern void setbuf(FILE *, char *);
extern void setbuffer(FILE *, char *, size_t);
extern int setlinebuf(FILE *);
extern int setvbuf(FILE *, char *, int, size_t);
extern int fprintf(FILE *, const char *, ...);
extern int fscanf(FILE *, const char *, ...);
extern int printf(const char *, ...);
extern int scanf(const char *, ...);
extern int snprintf(char *, size_t, const char *, ...);
extern int sprintf(char *, const char *, ...);
extern int sscanf(const char *, const char *, ...);
extern int vfprintf(FILE *, const char *, __gnuc_va_list);
extern int vprintf(const char *, __gnuc_va_list);
extern int vsnprintf(char *, size_t, const char *, __gnuc_va_list);
extern int vsprintf(char *, const char *, __gnuc_va_list);
extern int fgetc(FILE *);
extern char *fgets(char *, int, FILE *);
extern int fputc(int, FILE *);
extern int fputs(const char *, FILE *);
extern int getc(FILE *);
extern int getchar(void);
extern char *gets(char *);
extern int putc(int, FILE *);
extern int putchar(int);
extern int puts(const char *);
extern int ungetc(int, FILE *);
extern size_t fread(void *, size_t, size_t, FILE *);
extern size_t fwrite(const void *, size_t, size_t, FILE *);
extern int fgetpos(FILE *, fpos_t *);
extern int fseek(FILE *, long, int);
extern int fsetpos(FILE *, const fpos_t *);
extern long ftell(FILE *);
extern void rewind(FILE *);
extern void clearerr(FILE *);
extern int feof(FILE *);
extern int ferror(FILE *);
extern void perror(const char *);
extern int __filbuf(FILE *);
extern int __flsbuf(int, FILE *);
extern FILE *fdopen(int, const char *);
extern char *ctermid(char *);
extern int fileno(FILE *);
# 340 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 3
extern FILE *popen(const char *, const char *);
extern char *cuserid(char *);
extern char *tempnam(const char *, const char *);
extern int getopt(int, char *const *, const char *);
extern int getsubopt(char **, char *const *, char **);
extern char *optarg;
extern int optind, opterr, optopt;
extern int getw(FILE *);
extern int putw(int, FILE *);
extern int pclose(FILE *);
extern int fseeko(FILE *, off_t, int);
extern off_t ftello(FILE *);
# 369 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 3
extern FILE *fopen64(const char *, const char *);
extern FILE *freopen64(const char *, const char *, FILE *);
extern FILE *tmpfile64(void);
extern int fgetpos64(FILE *, fpos64_t *);
extern int fsetpos64(FILE *, const fpos64_t *);
extern int fseeko64(FILE *, off64_t, int);
extern off64_t ftello64(FILE *);
# 31 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 1 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdlib.h" 1 3
# 25 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdlib.h" 3
#pragma ident "@(#)stdlib.h 1.40 97/06/30 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 28 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdlib.h" 2 3
# 38 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdlib.h" 3
typedef struct {
int quot;
int rem;
} div_t;
typedef struct {
long quot;
long rem;
} ldiv_t;
typedef struct {
long long quot;
long long rem;
} lldiv_t;
# 66 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdlib.h" 3
typedef long uid_t;
# 82 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdlib.h" 3
typedef long int wchar_t;
# 107 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdlib.h" 3
extern unsigned char __ctype[];
extern double atof(const char *);
extern int atoi(const char *);
extern long int atol(const char *);
extern double strtod(const char *, char **);
extern long int strtol(const char *, char **, int);
extern unsigned long int strtoul(const char *, char **, int);
extern int rand(void);
extern void srand(unsigned int);
extern void *calloc(size_t, size_t);
extern void free(void *);
extern void *malloc(size_t);
extern void *realloc(void *, size_t);
extern void abort(void);
extern int atexit(void (*)(void));
extern void exit(int);
extern void _exithandle(void);
extern char *getenv(const char *);
extern int system(const char *);
extern void *bsearch(const void *, const void *, size_t, size_t,
int (*)(const void *, const void *));
extern void qsort(void *, size_t, size_t,
int (*)(const void *, const void *));
extern int abs(int);
extern div_t div(int, int);
extern long int labs(long);
extern ldiv_t ldiv(long, long);
extern int mbtowc(wchar_t *, const char *, size_t);
extern int mblen(const char *, size_t);
extern int wctomb(char *, wchar_t);
extern size_t mbstowcs(wchar_t *, const char *, size_t);
extern size_t wcstombs(char *, const wchar_t *, size_t);
extern double drand48(void);
extern double erand48(unsigned short *);
extern long jrand48(unsigned short *);
extern void lcong48(unsigned short *);
extern long lrand48(void);
extern long mrand48(void);
extern long nrand48(unsigned short *);
extern unsigned short *seed48(unsigned short *);
extern void srand48(long);
extern int putenv(const char *);
extern void setkey(const char *);
extern void swab(const char *, char *, int);
extern int mkstemp(char *);
extern int mkstemp64(char *);
extern long a64l(const char *);
extern char *ecvt(double, int, int *, int *);
extern char *fcvt(double, int, int *, int *);
extern char *gcvt(double, int, char *);
extern int getsubopt(char **, char *const *, char **);
extern int grantpt(int);
extern char *initstate(unsigned, char *, size_t);
extern char *l64a(long);
extern char *mktemp(char *);
extern char *ptsname(int);
extern long random(void);
extern char *realpath(const char *, char *);
extern char *setstate(const char *);
extern void srandom(unsigned);
extern int ttyslot(void);
extern int unlockpt(int);
extern void *valloc(size_t);
extern int dup2(int, int);
extern char *qecvt(long double, int, int *, int *);
extern char *qfcvt(long double, int, int *, int *);
extern char *qgcvt(long double, int, char *);
extern char *getcwd(char *, size_t);
extern const char *getexecname(void);
extern char *getlogin(void);
extern int getopt(int, char *const *, const char *);
extern char *optarg;
extern int optind, opterr, optopt;
extern char *getpass(const char *);
extern char *getpassphrase(const char *);
extern int getpw(uid_t, char *);
extern int isatty(int);
extern void *memalign(size_t, size_t);
extern char *ttyname(int);
extern long long atoll(const char *);
extern long long llabs(long long);
extern lldiv_t lldiv(long long, long long);
extern char *lltostr(long long, char *);
extern long long strtoll(const char *, char **, int);
extern unsigned long long strtoull(const char *, char **, int);
extern char *ulltostr(unsigned long long, char *);
# 34 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 1 "/usr/include/string.h" 1 3
# 17 "/usr/include/string.h" 3
#pragma ident "@(#)string.h 1.19 96/03/12 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 20 "/usr/include/string.h" 2 3
# 36 "/usr/include/string.h" 3
extern void *memcpy(void *, const void *, size_t);
extern void *memmove(void *, const void *, size_t);
extern char *strcpy(char *, const char *);
extern char *strncpy(char *, const char *, size_t);
extern char *strcat(char *, const char *);
extern char *strncat(char *, const char *, size_t);
extern int memcmp(const void *, const void *, size_t);
extern int strcmp(const char *, const char *);
extern int strcoll(const char *, const char *);
extern int strncmp(const char *, const char *, size_t);
extern size_t strxfrm(char *, const char *, size_t);
extern void *memchr(const void *, int, size_t);
extern char *strchr(const char *, int);
extern size_t strcspn(const char *, const char *);
extern char *strpbrk(const char *, const char *);
extern char *strrchr(const char *, int);
extern size_t strspn(const char *, const char *);
extern char *strstr(const char *, const char *);
extern char *strtok(char *, const char *);
extern void *memset(void *, int, size_t);
extern char *strerror(int);
extern size_t strlen(const char *);
extern void *memccpy(void *, const void *, int, size_t);
extern char *strsignal(int);
extern int ffs(int);
extern int strcasecmp(const char *, const char *);
extern int strncasecmp(const char *, const char *, size_t);
extern char *strdup(const char *);
# 35 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 48 "/home/tmpgnh/src/lame-3.89/frontend/main.c"
# 1 "/usr/include/fcntl.h" 1 3
# 11 "/usr/include/fcntl.h" 3
#pragma ident "@(#)fcntl.h 1.12 96/06/17 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 14 "/usr/include/fcntl.h" 2 3
# 1 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 1 3
# 25 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
#pragma ident "@(#)types.h 1.51 97/05/06 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 28 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 2 3
# 1 "/usr/include/sys/isa_defs.h" 1 3
# 9 "/usr/include/sys/isa_defs.h" 3
#pragma ident "@(#)isa_defs.h 1.11 97/03/21 SMI"
# 29 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 2 3
# 1 "/usr/include/sys/machtypes.h" 1 3
# 16 "/usr/include/sys/machtypes.h" 3
#pragma ident "@(#)machtypes.h 1.11 96/04/29 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/sys/machtypes.h" 2 3
# 33 "/usr/include/sys/machtypes.h" 3
typedef struct _physadr_t { int r[1]; } *physadr_t;
typedef struct _label_t { int val[2]; } label_t;
typedef unsigned char lock_t;
# 34 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 2 3
# 42 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
# 1 "/usr/include/sys/int_types.h" 1 3
# 9 "/usr/include/sys/int_types.h" 3
#pragma ident "@(#)int_types.h 1.4 96/09/25 SMI"
# 42 "/usr/include/sys/int_types.h" 3
# 1 "/usr/include/sys/isa_defs.h" 1 3
# 43 "/usr/include/sys/int_types.h" 2 3
# 62 "/usr/include/sys/int_types.h" 3
typedef char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
# 94 "/usr/include/sys/int_types.h" 3
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
# 110 "/usr/include/sys/int_types.h" 3
typedef int intptr_t;
typedef unsigned int uintptr_t;
typedef char int_least8_t;
typedef short int_least16_t;
typedef int int_least32_t;
typedef long long int_least64_t;
typedef unsigned char uint_least8_t;
typedef unsigned short uint_least16_t;
typedef unsigned int uint_least32_t;
typedef unsigned long long uint_least64_t;
# 43 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 2 3
# 54 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef long long longlong_t;
typedef unsigned long long u_longlong_t;
# 71 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef unsigned char uchar_t;
typedef unsigned short ushort_t;
typedef unsigned int uint_t;
typedef unsigned long ulong_t;
typedef char * caddr_t;
typedef long daddr_t;
typedef short cnt_t;
typedef ulong_t paddr_t;
typedef uchar_t use_t;
typedef short sysid_t;
typedef short index_t;
# 106 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef ulong_t ino_t;
typedef long blkcnt_t;
typedef ulong_t fsblkcnt_t;
typedef ulong_t fsfilcnt_t;
typedef u_longlong_t ino64_t;
typedef longlong_t blkcnt64_t;
typedef u_longlong_t fsblkcnt64_t;
typedef u_longlong_t fsfilcnt64_t;
typedef enum { B_FALSE, B_TRUE } boolean_t;
# 137 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef int64_t pad64_t;
typedef uint64_t upad64_t;
# 150 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef longlong_t offset_t;
typedef u_longlong_t u_offset_t;
typedef u_longlong_t len_t;
typedef longlong_t diskaddr_t;
# 171 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef union {
offset_t _f;
struct {
long _u;
off_t _l;
} _p;
} lloff_t;
# 191 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef union {
diskaddr_t _f;
struct {
long _u;
daddr_t _l;
} _p;
} lldaddr_t;
typedef ulong_t k_fltset_t;
# 209 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef long id_t;
# 218 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef uint_t useconds_t;
typedef ulong_t major_t;
typedef ulong_t minor_t;
typedef short pri_t;
# 242 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef ushort_t o_mode_t;
typedef short o_dev_t;
typedef ushort_t o_uid_t;
typedef o_uid_t o_gid_t;
typedef short o_nlink_t;
typedef short o_pid_t;
typedef ushort_t o_ino_t;
typedef int key_t;
typedef ulong_t mode_t;
typedef uid_t gid_t;
typedef ulong_t nlink_t;
typedef ulong_t dev_t;
typedef long pid_t;
typedef unsigned int pthread_t;
typedef unsigned int pthread_key_t;
typedef struct _pthread_mutex {
struct {
uint8_t __pthread_mutex_flag[4];
uint32_t __pthread_mutex_type;
} __pthread_mutex_flags;
union {
struct {
uint8_t __pthread_mutex_pad[8];
} __pthread_mutex_lock64;
upad64_t __pthread_mutex_owner64;
} __pthread_mutex_lock;
upad64_t __pthread_mutex_data;
} pthread_mutex_t;
typedef struct _pthread_cond {
struct {
uint8_t __pthread_cond_flag[4];
uint32_t __pthread_cond_type;
} __pthread_cond_flags;
upad64_t __pthread_cond_data;
} pthread_cond_t;
typedef struct _pthread_attr {
void *__pthread_attrp;
} pthread_attr_t;
typedef struct _pthread_mutexattr {
void *__pthread_mutexattrp;
} pthread_mutexattr_t;
typedef struct _pthread_condattr {
void *__pthread_condattrp;
} pthread_condattr_t;
typedef struct _once {
upad64_t __pthread_once_pad[4];
} pthread_once_t;
# 338 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef int ssize_t;
typedef long time_t;
typedef long clock_t;
typedef int clockid_t;
typedef int timer_t;
typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
# 412 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef long hostid_t;
# 421 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 3
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef struct _quad { long val[2]; } quad;
# 1 "/usr/include/sys/select.h" 1 3
# 11 "/usr/include/sys/select.h" 3
#pragma ident "@(#)select.h 1.11 96/06/20 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 14 "/usr/include/sys/select.h" 2 3
# 1 "/usr/include/sys/time.h" 1 3
# 22 "/usr/include/sys/time.h" 3
#pragma ident "@(#)time.h 2.52 96/11/15 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 25 "/usr/include/sys/time.h" 2 3
# 44 "/usr/include/sys/time.h" 3
struct timeval {
time_t tv_sec;
long tv_usec;
};
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
# 71 "/usr/include/sys/time.h" 3
# 1 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 1 3
# 72 "/usr/include/sys/time.h" 2 3
# 126 "/usr/include/sys/time.h" 3
struct itimerval {
struct timeval it_interval;
struct timeval it_value;
};
# 179 "/usr/include/sys/time.h" 3
typedef struct timespec {
time_t tv_sec;
long tv_nsec;
} timespec_t;
typedef struct timespec timestruc_t;
# 221 "/usr/include/sys/time.h" 3
typedef struct itimerspec {
struct timespec it_interval;
struct timespec it_value;
} itimerspec_t;
typedef longlong_t hrtime_t;
# 323 "/usr/include/sys/time.h" 3
int adjtime(struct timeval *, struct timeval *);
# 332 "/usr/include/sys/time.h" 3
int getitimer(int, struct itimerval *);
int setitimer(int, struct itimerval *, struct itimerval *);
# 369 "/usr/include/sys/time.h" 3
int settimeofday(struct timeval *, void *);
hrtime_t gethrtime(void);
hrtime_t gethrvtime(void);
# 389 "/usr/include/sys/time.h" 3
int gettimeofday(struct timeval *, void *);
# 399 "/usr/include/sys/time.h" 3
# 1 "/usr/include/time.h" 1 3
# 18 "/usr/include/time.h" 3
#pragma ident "@(#)time.h 1.25 96/03/12 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 21 "/usr/include/time.h" 2 3
# 53 "/usr/include/time.h" 3
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
extern clock_t clock(void);
extern double difftime(time_t, time_t);
extern time_t mktime(struct tm *);
extern time_t time(time_t *);
extern char *asctime(const struct tm *);
extern char *ctime(const time_t *);
extern struct tm *gmtime(const time_t *);
extern struct tm *localtime(const time_t *);
extern size_t strftime(char *, size_t, const char *, const struct tm *);
# 86 "/usr/include/time.h" 3
extern char *strptime(const char *, const char *, struct tm *);
# 1 "/usr/include/sys/time.h" 1 3
# 94 "/usr/include/time.h" 2 3
# 1 "/usr/include/sys/siginfo.h" 1 3
# 15 "/usr/include/sys/siginfo.h" 3
#pragma ident "@(#)siginfo.h 1.39 96/06/28 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 18 "/usr/include/sys/siginfo.h" 2 3
# 26 "/usr/include/sys/siginfo.h" 3
union sigval {
int sival_int;
void *sival_ptr;
};
# 43 "/usr/include/sys/siginfo.h" 3
struct sigevent {
int sigev_notify;
union {
int _sigev_signo;
void (*_sigev_notify_function)(union sigval);
} _sigev_un;
union sigval sigev_value;
int _sigev_pad1;
void *_sigev_notify_attributes;
int _sigev_pad2;
};
# 88 "/usr/include/sys/siginfo.h" 3
# 1 "/usr/include/sys/machsig.h" 1 3
# 16 "/usr/include/sys/machsig.h" 3
#pragma ident "@(#)machsig.h 1.12 96/04/29 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 20 "/usr/include/sys/machsig.h" 2 3
# 89 "/usr/include/sys/siginfo.h" 2 3
# 160 "/usr/include/sys/siginfo.h" 3
# 1 "/usr/include/sys/time.h" 1 3
# 161 "/usr/include/sys/siginfo.h" 2 3
# 184 "/usr/include/sys/siginfo.h" 3
typedef struct siginfo {
int si_signo;
int si_code;
int si_errno;
union {
int __pad[((128 / sizeof (int)) - 3)];
struct {
pid_t __pid;
union {
struct {
uid_t __uid;
union sigval __value;
} __kill;
struct {
clock_t __utime;
int __status;
clock_t __stime;
} __cld;
} __pdata;
} __proc;
struct {
void *__addr;
int __trapno;
caddr_t __pc;
} __fault;
struct {
int __fd;
long __band;
} __file;
struct {
caddr_t __faddr;
timestruc_t __tstamp;
short __syscall;
char __nsysarg;
char __fault;
long __sysarg[8];
long __mstate[17];
} __prof;
} __data;
} siginfo_t;
# 248 "/usr/include/sys/siginfo.h" 3
typedef struct k_siginfo {
int si_signo;
int si_code;
int si_errno;
union {
struct {
pid_t __pid;
union {
struct {
uid_t __uid;
union sigval __value;
} __kill;
struct {
clock_t __utime;
int __status;
clock_t __stime;
} __cld;
} __pdata;
} __proc;
struct {
void *__addr;
int __trapno;
caddr_t __pc;
} __fault;
struct {
int __fd;
long __band;
} __file;
struct {
caddr_t __faddr;
timestruc_t __tstamp;
short __syscall;
char __nsysarg;
char __fault;
} __prof;
} __data;
} k_siginfo_t;
typedef struct sigqueue {
struct sigqueue *sq_next;
k_siginfo_t sq_info;
void (*sq_func)(struct sigqueue *);
void *sq_backptr;
} sigqueue_t;
# 95 "/usr/include/time.h" 2 3
extern int clock_getres(clockid_t, struct timespec *);
extern int clock_gettime(clockid_t, struct timespec *);
extern int clock_settime(clockid_t, const struct timespec *);
extern int timer_create(clockid_t, struct sigevent *, timer_t *);
extern int timer_delete(timer_t);
extern int timer_getoverrun(timer_t);
extern int timer_gettime(timer_t, struct itimerspec *);
extern int timer_settime(timer_t, int, const struct itimerspec *,
struct itimerspec *);
extern int nanosleep(const struct timespec *, struct timespec *);
extern void tzset(void);
extern char *tzname[2];
extern long _sysconf(int);
extern long timezone;
extern int daylight;
extern int cftime(char *, char *, const time_t *);
extern int ascftime(char *, const char *, const struct tm *);
extern long altzone;
extern struct tm *getdate(const char *);
extern int getdate_err;
# 400 "/usr/include/sys/time.h" 2 3
# 1 "/usr/include/sys/select.h" 1 3
# 406 "/usr/include/sys/time.h" 2 3
# 17 "/usr/include/sys/select.h" 2 3
# 34 "/usr/include/sys/select.h" 3
typedef long fd_mask;
typedef long fds_mask;
# 62 "/usr/include/sys/select.h" 3
typedef struct fd_set {
long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
} fd_set;
# 86 "/usr/include/sys/select.h" 3
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
# 432 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 2 3
# 19 "/usr/include/fcntl.h" 2 3
# 1 "/usr/include/sys/fcntl.h" 1 3
# 15 "/usr/include/sys/fcntl.h" 3
#pragma ident "@(#)fcntl.h 1.37 96/07/07 SMI"
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 18 "/usr/include/sys/fcntl.h" 2 3
# 1 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/sys/types.h" 1 3
# 20 "/usr/include/sys/fcntl.h" 2 3
# 141 "/usr/include/sys/fcntl.h" 3
typedef struct flock {
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
long l_sysid;
pid_t l_pid;
long l_pad[4];
} flock_t;
typedef struct flock64 {
short l_type;
short l_whence;
off64_t l_start;
off64_t l_len;
long l_sysid;
pid_t l_pid;
long l_pad[4];
} flock64_t;
# 202 "/usr/include/sys/fcntl.h" 3
typedef struct fshare {
short f_access;
short f_deny;
long f_id;
} fshare_t;
# 20 "/usr/include/fcntl.h" 2 3
# 57 "/usr/include/fcntl.h" 3
extern int fcntl(int, int, ...);
extern int open(const char *, int, ...);
extern int creat(const char *, mode_t);
extern int directio(int, int);
extern int open64(const char *, int, ...);
extern int creat64(const char *, mode_t);
# 49 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 57 "/home/tmpgnh/src/lame-3.89/frontend/main.c"
# 1 "/home/tmpgnh/src/lame-3.89/include/lame.h" 1
# 26 "/home/tmpgnh/src/lame-3.89/include/lame.h"
# 1 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 1 3
# 27 "/home/tmpgnh/src/lame-3.89/include/lame.h" 2
# 1 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdarg.h" 1 3
# 90 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdarg.h" 3
typedef __gnuc_va_list va_list;
# 28 "/home/tmpgnh/src/lame-3.89/include/lame.h" 2
# 41 "/home/tmpgnh/src/lame-3.89/include/lame.h"
typedef enum vbr_mode_e {
vbr_off=0,
vbr_mt,
vbr_rh,
vbr_abr,
vbr_mtrh,
vbr_max_indicator,
vbr_default=vbr_rh
} vbr_mode;
typedef enum MPEG_mode_e {
STEREO = 0,
JOINT_STEREO,
DUAL_CHANNEL,
MONO,
NOT_SET,
MAX_INDICATOR
} MPEG_mode;
typedef enum Padding_type_e {
PAD_NO = 0,
PAD_ALL,
PAD_ADJUST,
PAD_MAX_INDICATOR
} Padding_type;
struct lame_global_struct;
typedef struct lame_global_struct lame_global_flags;
typedef lame_global_flags *lame_t;
# 94 "/home/tmpgnh/src/lame-3.89/include/lame.h"
lame_global_flags * lame_init(void);
int lame_init_old(lame_global_flags *);
# 108 "/home/tmpgnh/src/lame-3.89/include/lame.h"
int lame_set_num_samples(lame_global_flags *, unsigned long);
unsigned long lame_get_num_samples(const lame_global_flags *);
int lame_set_in_samplerate(lame_global_flags *, int);
int lame_get_in_samplerate(const lame_global_flags *);
int lame_set_num_channels(lame_global_flags *, int);
int lame_get_num_channels(const lame_global_flags *);
int lame_set_scale(lame_global_flags *, float);
float lame_get_scale(const lame_global_flags *);
int lame_set_out_samplerate(lame_global_flags *, int);
int lame_get_out_samplerate(const lame_global_flags *);
int lame_set_analysis(lame_global_flags *, int);
int lame_get_analysis(const lame_global_flags *);
int lame_set_bWriteVbrTag(lame_global_flags *, int);
int lame_get_bWriteVbrTag(const lame_global_flags *);
int lame_set_decode_only(lame_global_flags *, int);
int lame_get_decode_only(const lame_global_flags *);
int lame_set_ogg(lame_global_flags *, int);
int lame_get_ogg(const lame_global_flags *);
int lame_set_quality(lame_global_flags *, int);
int lame_get_quality(const lame_global_flags *);
int lame_set_mode(lame_global_flags *, MPEG_mode);
MPEG_mode lame_get_mode(const lame_global_flags *);
int lame_set_mode_automs(lame_global_flags *, int);
int lame_get_mode_automs(const lame_global_flags *);
int lame_set_force_ms(lame_global_flags *, int);
int lame_get_force_ms(const lame_global_flags *);
int lame_set_free_format(lame_global_flags *, int);
int lame_get_free_format(const lame_global_flags *);
# 197 "/home/tmpgnh/src/lame-3.89/include/lame.h"
int lame_set_errorf(lame_global_flags *,
void (*func)(const char *, va_list));
int lame_set_debugf(lame_global_flags *,
void (*func)(const char *, va_list));
int lame_set_msgf (lame_global_flags *,
void (*func)(const char *, va_list));
int lame_set_brate(lame_global_flags *, int);
int lame_get_brate(const lame_global_flags *);
int lame_set_compression_ratio(lame_global_flags *, float);
float lame_get_compression_ratio(const lame_global_flags *);
int lame_set_copyright(lame_global_flags *, int);
int lame_get_copyright(const lame_global_flags *);
int lame_set_original(lame_global_flags *, int);
int lame_get_original(const lame_global_flags *);
int lame_set_error_protection(lame_global_flags *, int);
int lame_get_error_protection(const lame_global_flags *);
int lame_set_padding_type(lame_global_flags *, Padding_type);
Padding_type lame_get_padding_type(const lame_global_flags *);
int lame_set_extension(lame_global_flags *, int);
int lame_get_extension(const lame_global_flags *);
int lame_set_strict_ISO(lame_global_flags *, int);
int lame_get_strict_ISO(const lame_global_flags *);
int lame_set_disable_reservoir(lame_global_flags *, int);
int lame_get_disable_reservoir(const lame_global_flags *);
int lame_set_experimentalX(lame_global_flags *, int);
int lame_get_experimentalX(const lame_global_flags *);
int lame_set_experimentalY(lame_global_flags *, int);
int lame_get_experimentalY(const lame_global_flags *);
int lame_set_experimentalZ(lame_global_flags *, int);
int lame_get_experimentalZ(const lame_global_flags *);
int lame_set_exp_nspsytune(lame_global_flags *, int);
int lame_get_exp_nspsytune(const lame_global_flags *);
int lame_set_VBR(lame_global_flags *, vbr_mode);
vbr_mode lame_get_VBR(const lame_global_flags *);
int lame_set_VBR_q(lame_global_flags *, int);
int lame_get_VBR_q(const lame_global_flags *);
int lame_set_VBR_mean_bitrate_kbps(lame_global_flags *, int);
int lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *);
int lame_set_VBR_min_bitrate_kbps(lame_global_flags *, int);
int lame_get_VBR_min_bitrate_kbps(const lame_global_flags *);
int lame_set_VBR_max_bitrate_kbps(lame_global_flags *, int);
int lame_get_VBR_max_bitrate_kbps(const lame_global_flags *);
int lame_set_VBR_hard_min(lame_global_flags *, int);
int lame_get_VBR_hard_min(const lame_global_flags *);
int lame_set_lowpassfreq(lame_global_flags *, int);
int lame_get_lowpassfreq(const lame_global_flags *);
int lame_set_lowpasswidth(lame_global_flags *, int);
int lame_get_lowpasswidth(const lame_global_flags *);
int lame_set_highpassfreq(lame_global_flags *, int);
int lame_get_highpassfreq(const lame_global_flags *);
int lame_set_highpasswidth(lame_global_flags *, int);
int lame_get_highpasswidth(const lame_global_flags *);
int lame_set_ATHonly(lame_global_flags *, int);
int lame_get_ATHonly(const lame_global_flags *);
int lame_set_ATHshort(lame_global_flags *, int);
int lame_get_ATHshort(const lame_global_flags *);
int lame_set_noATH(lame_global_flags *, int);
int lame_get_noATH(const lame_global_flags *);
int lame_set_ATHtype(lame_global_flags *, int);
int lame_get_ATHtype(const lame_global_flags *);
int lame_set_ATHlower(lame_global_flags *, float);
float lame_get_ATHlower(const lame_global_flags *);
int lame_set_adjust_type( lame_global_flags *, int);
int lame_get_adjust_type( const lame_global_flags *);
int lame_set_adapt_thres_type( lame_global_flags *, int);
int lame_get_adapt_thres_type( const lame_global_flags *);
int lame_set_adapt_thres_level( lame_global_flags *, float);
float lame_get_adapt_thres_level( const lame_global_flags* );
int lame_set_cwlimit(lame_global_flags *, int);
int lame_get_cwlimit(const lame_global_flags *);
int lame_set_allow_diff_short(lame_global_flags *, int);
int lame_get_allow_diff_short(const lame_global_flags *);
int lame_set_useTemporal(lame_global_flags *, int);
int lame_get_useTemporal(const lame_global_flags *);
int lame_set_no_short_blocks(lame_global_flags *, int);
int lame_get_no_short_blocks(const lame_global_flags *);
int lame_set_emphasis(lame_global_flags *, int);
int lame_get_emphasis(const lame_global_flags *);
# 378 "/home/tmpgnh/src/lame-3.89/include/lame.h"
int lame_get_version(const lame_global_flags *);
int lame_get_encoder_delay(const lame_global_flags *);
int lame_get_framesize(const lame_global_flags *);
int lame_get_mf_samples_to_encode( const lame_global_flags* gfp );
int lame_get_size_mp3buffer( const lame_global_flags* gfp );
int lame_get_frameNum(const lame_global_flags *);
int lame_get_totalframes(const lame_global_flags *);
# 415 "/home/tmpgnh/src/lame-3.89/include/lame.h"
int lame_init_params(lame_global_flags *);
const char* get_lame_version ( void );
const char* get_lame_short_version ( void );
const char* get_psy_version ( void );
const char* get_mp3x_version ( void );
const char* get_lame_url ( void );
typedef struct {
int major;
int minor;
int alpha;
int beta;
int psy_major;
int psy_minor;
int psy_alpha;
int psy_beta;
const char *features;
} lame_version_t;
void get_lame_version_numerical ( lame_version_t *const );
void lame_print_config(const lame_global_flags* gfp);
void lame_print_internals( const lame_global_flags *gfp);
# 495 "/home/tmpgnh/src/lame-3.89/include/lame.h"
int lame_encode_buffer (
lame_global_flags* gfp,
const short int buffer_l [],
const short int buffer_r [],
const int nsamples,
unsigned char* mp3buf,
const int mp3buf_size );
# 510 "/home/tmpgnh/src/lame-3.89/include/lame.h"
int lame_encode_buffer_interleaved(
lame_global_flags* gfp,
short int pcm[],
int num_samples,
unsigned char* mp3buf,
int mp3buf_size );
int lame_encode_buffer_float(
lame_global_flags* gfp,
const float buffer_l [],
const float buffer_r [],
const int nsamples,
unsigned char* mp3buf,
const int mp3buf_size );
int lame_encode_buffer_int(
lame_global_flags* gfp,
const int buffer_l [],
const int buffer_r [],
const int nsamples,
unsigned char* mp3buf,
const int mp3buf_size );
int lame_encode_buffer_long(
lame_global_flags* gfp,
const long buffer_l [],
const long buffer_r [],
const int nsamples,
unsigned char* mp3buf,
const int mp3buf_size );
# 569 "/home/tmpgnh/src/lame-3.89/include/lame.h"
int lame_encode_flush(
lame_global_flags * gfp,
unsigned char* mp3buf,
int size);
# 591 "/home/tmpgnh/src/lame-3.89/include/lame.h"
int lame_encode_flush_nogap(
lame_global_flags * gfp,
unsigned char* mp3buf,
int size);
# 603 "/home/tmpgnh/src/lame-3.89/include/lame.h"
int lame_init_bitstream(
lame_global_flags * gfp);
# 622 "/home/tmpgnh/src/lame-3.89/include/lame.h"
void lame_bitrate_hist(
const lame_global_flags *const gfp,
int bitrate_count[14] );
void lame_bitrate_kbps(
const lame_global_flags *const gfp,
int bitrate_kbps [14] );
void lame_stereo_mode_hist(
const lame_global_flags *const gfp,
int stereo_mode_count[4] );
void lame_bitrate_stereo_mode_hist (
const lame_global_flags* gfp,
int bitrate_stmode_count [14] [4] );
# 648 "/home/tmpgnh/src/lame-3.89/include/lame.h"
void lame_mp3_tags_fid(lame_global_flags *,FILE* fid);
int lame_close (lame_global_flags *);
int lame_encode_finish(
lame_global_flags* gfp,
unsigned char* mp3buf,
int size );
# 682 "/home/tmpgnh/src/lame-3.89/include/lame.h"
typedef struct {
int header_parsed;
int stereo;
int samplerate;
int bitrate;
int mode;
int mode_ext;
int framesize;
unsigned long nsamp;
int totalframes;
int framenum;
} mp3data_struct;
int lame_decode_init(void);
# 711 "/home/tmpgnh/src/lame-3.89/include/lame.h"
int lame_decode(
unsigned char * mp3buf,
int len,
short pcm_l[],
short pcm_r[] );
int lame_decode_headers(
unsigned char* mp3buf,
int len,
short pcm_l[],
short pcm_r[],
mp3data_struct* mp3data );
int lame_decode1(
unsigned char* mp3buf,
int len,
short pcm_l[],
short pcm_r[] );
int lame_decode1_headers(
unsigned char* mp3buf,
int len,
short pcm_l[],
short pcm_r[],
mp3data_struct* mp3data );
# 771 "/home/tmpgnh/src/lame-3.89/include/lame.h"
extern void id3tag_genre_list(
void (*handler)(int, const char *, void *),
void* cookie);
extern void id3tag_init (lame_global_flags *gfp);
extern void id3tag_add_v2 (lame_global_flags *gfp);
extern void id3tag_v1_only (lame_global_flags *gfp);
extern void id3tag_v2_only (lame_global_flags *gfp);
extern void id3tag_space_v1 (lame_global_flags *gfp);
extern void id3tag_pad_v2 (lame_global_flags *gfp);
extern void id3tag_set_title(
lame_global_flags* gfp,
const char* title );
extern void id3tag_set_artist(
lame_global_flags* gfp,
const char* artist );
extern void id3tag_set_album(
lame_global_flags* gfp,
const char* album );
extern void id3tag_set_year(
lame_global_flags* gfp,
const char* year );
extern void id3tag_set_comment(
lame_global_flags* gfp,
const char* comment );
extern void id3tag_set_track(
lame_global_flags* gfp,
const char* track );
extern int id3tag_set_genre(
lame_global_flags* gfp,
const char* genre );
# 823 "/home/tmpgnh/src/lame-3.89/include/lame.h"
extern const int bitrate_table [3] [16];
extern const int samplerate_table [3] [ 4];
# 58 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 1 "/home/tmpgnh/src/lame-3.89/frontend/brhist.h" 1
# 28 "/home/tmpgnh/src/lame-3.89/frontend/brhist.h"
# 1 "/home/tmpgnh/src/lame-3.89/include/lame.h" 1
# 29 "/home/tmpgnh/src/lame-3.89/frontend/brhist.h" 2
int brhist_init ( const lame_global_flags *gf, const int bitrate_kbps_min, const int bitrate_kbps_max );
void brhist_disp ( const lame_global_flags *gf );
void brhist_disp_total ( const lame_global_flags *gf );
void brhist_jump_back ( void );
typedef struct {
FILE* Console_fp;
FILE* Error_fp;
FILE* Report_fp;
int disp_width;
int disp_height;
char str_up [10];
char str_clreoln [10];
char str_emph [10];
char str_norm [10];
char Console_buff [1024];
} Console_IO_t;
extern Console_IO_t Console_IO;
# 60 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 1 "/home/tmpgnh/src/lame-3.89/frontend/parse.h" 1
int print_license ( const lame_global_flags* gfp, FILE* const fp, const char* ProgramName );
int usage ( const lame_global_flags* gfp, FILE* const fp, const char* ProgramName );
int short_help ( const lame_global_flags* gfp, FILE* const fp, const char* ProgramName );
int long_help ( const lame_global_flags* gfp, FILE* const fp, const char* ProgramName, int lessmode );
int display_bitrates ( FILE* const fp );
int parse_args(lame_global_flags* gfp, int argc, char** argv, char *inPath, char *outPath, char * nogap_inPath[], int *max_nogap);
void print_config(lame_global_flags* gfp);
# 61 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 1 "/home/tmpgnh/src/lame-3.89/frontend/main.h" 1
# 24 "/home/tmpgnh/src/lame-3.89/frontend/main.h"
# 1 "/home/tmpgnh/src/lame-3.89/frontend/get_audio.h" 1
# 25 "/home/tmpgnh/src/lame-3.89/frontend/get_audio.h"
# 1 "/home/tmpgnh/src/lame-3.89/include/lame.h" 1
# 26 "/home/tmpgnh/src/lame-3.89/frontend/get_audio.h" 2
# 1 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 1 3
# 27 "/home/tmpgnh/src/lame-3.89/frontend/get_audio.h" 2
typedef enum sound_file_format_e {
sf_unknown,
sf_raw,
sf_wave,
sf_aiff,
sf_mp1,
sf_mp2,
sf_mp3,
sf_ogg
} sound_file_format;
FILE *init_outfile ( char *outPath, int decode );
void init_infile(lame_global_flags *, char *inPath);
void close_infile(void);
int get_audio(lame_global_flags *gfp, int buffer[2][1152]);
int get_audio16(lame_global_flags *gfp, short buffer[2][1152]);
int WriteWaveHeader(FILE * const fp, const int pcmbytes,
const int freq, const int channels, const int bits);
# 62 "/home/tmpgnh/src/lame-3.89/frontend/get_audio.h"
int lame_decoder(lame_global_flags *gfp,FILE *outf,int skip, char *inPath, char *outPath);
void SwapBytesInWords( short *loc, int words );
# 79 "/home/tmpgnh/src/lame-3.89/frontend/get_audio.h"
# 1 "/home/tmpgnh/src/lame-3.89/frontend/portableio.h" 1
# 79 "/home/tmpgnh/src/lame-3.89/frontend/portableio.h"
# 1 "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include/stdio.h" 1 3
# 80 "/home/tmpgnh/src/lame-3.89/frontend/portableio.h" 2
extern int ReadByte(FILE *fp);
extern int Read16BitsLowHigh(FILE *fp);
extern int Read16BitsHighLow(FILE *fp);
extern void Write8Bits(FILE *fp, int i);
extern void Write16BitsLowHigh(FILE *fp, int i);
extern void Write16BitsHighLow(FILE *fp, int i);
extern int Read24BitsHighLow(FILE *fp);
extern int Read32Bits(FILE *fp);
extern int Read32BitsHighLow(FILE *fp);
extern void Write32Bits(FILE *fp, int i);
extern void Write32BitsLowHigh(FILE *fp, int i);
extern void Write32BitsHighLow(FILE *fp, int i);
extern void ReadBytes(FILE *fp, char *p, int n);
extern void ReadBytesSwapped(FILE *fp, char *p, int n);
extern void WriteBytes(FILE *fp, char *p, int n);
extern void WriteBytesSwapped(FILE *fp, char *p, int n);
extern double ReadIeeeFloatHighLow(FILE *fp);
extern double ReadIeeeFloatLowHigh(FILE *fp);
extern double ReadIeeeDoubleHighLow(FILE *fp);
extern double ReadIeeeDoubleLowHigh(FILE *fp);
extern double ReadIeeeExtendedHighLow(FILE *fp);
extern double ReadIeeeExtendedLowHigh(FILE *fp);
extern void WriteIeeeFloatLowHigh(FILE *fp, double num);
extern void WriteIeeeFloatHighLow(FILE *fp, double num);
extern void WriteIeeeDoubleLowHigh(FILE *fp, double num);
extern void WriteIeeeDoubleHighLow(FILE *fp, double num);
extern void WriteIeeeExtendedLowHigh(FILE *fp, double num);
extern void WriteIeeeExtendedHighLow(FILE *fp, double num);
# 80 "/home/tmpgnh/src/lame-3.89/frontend/get_audio.h" 2
typedef struct blockAlign_struct {
unsigned long offset;
unsigned long blockSize;
} blockAlign;
typedef struct IFF_AIFF_struct {
short numChannels;
unsigned long numSampleFrames;
short sampleSize;
double sampleRate;
unsigned long sampleType;
blockAlign blkAlgn;
} IFF_AIFF;
extern int aiff_read_headers(FILE*, IFF_AIFF*);
extern int aiff_seek_to_sound_data(FILE*);
extern int aiff_write_headers(FILE*, IFF_AIFF*);
extern int parse_wavheader(void);
extern int parse_aiff(const char fn[]);
extern void aiff_check(const char*, IFF_AIFF*, int*);
# 25 "/home/tmpgnh/src/lame-3.89/frontend/main.h" 2
extern sound_file_format input_format;
extern int swapbytes;
extern int silent;
extern int brhist;
extern int mp3_delay;
extern int mp3_delay_set;
extern float update_interval;
extern int disable_wav_header;
extern mp3data_struct mp3input_data;
extern int in_signed;
extern int in_unsigned;
extern int in_endian;
extern int in_bitwidth;
# 62 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 1 "/home/tmpgnh/src/lame-3.89/frontend/get_audio.h" 1
# 63 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 1 "/home/tmpgnh/src/lame-3.89/frontend/portableio.h" 1
# 64 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 1 "/home/tmpgnh/src/lame-3.89/frontend/timestatus.h" 1
# 24 "/home/tmpgnh/src/lame-3.89/frontend/timestatus.h"
void timestatus_klemm(const lame_global_flags *gfp);
void timestatus ( int samp_rate,
int frameNum,
int totalframes,
int framesize);
void timestatus_finish(void);
void decoder_progress(const lame_global_flags *gfp,const mp3data_struct *);
void decoder_progress_finish(const lame_global_flags *gfp);
# 65 "/home/tmpgnh/src/lame-3.89/frontend/main.c" 2
# 87 "/home/tmpgnh/src/lame-3.89/frontend/main.c"
int
parse_args_from_string(lame_global_flags * const gfp, const char *p,
char *inPath, char *outPath)
{
char *q;
char *f;
char *r[128];
int c = 0;
int ret;
if (p == 0 || *p == '\0')
return 0;
f = q = malloc(strlen(p) + 1);
strcpy(q, p);
r[c++] = "lhama";
while (1) {
r[c++] = q;
while (*q != ' ' && *q != '\0')
q++;
if (*q == '\0')
break;
*q++ = '\0';
}
r[c] = 0;
ret = parse_args(gfp, c, r, inPath, outPath, 0, 0);
free(f);
return ret;
}
FILE *
init_files(lame_global_flags * gf, char *inPath, char *outPath)
{
FILE *outf;
if (0 != strcmp("-", outPath) && 0 == strcmp(inPath, outPath)) {
fprintf((&__iob[2]), "Input file and Output file are the same. Abort.\n");
return 0;
}
init_infile(gf, inPath);
if ((outf = init_outfile(outPath, lame_get_decode_only(gf))) == 0) {
fprintf((&__iob[2]), "Can't init outfile '%s'\n", outPath);
return 0;
}
return outf;
}
# 164 "/home/tmpgnh/src/lame-3.89/frontend/main.c"
int
lame_decoder(lame_global_flags * gfp, FILE * outf, int skip, char *inPath,
char *outPath)
{
short int Buffer[2][1152];
int iread;
double wavsize;
int i;
void (*WriteFunction) (FILE * fp, char *p, int n);
int tmp_num_channels = lame_get_num_channels( gfp );
fprintf((&__iob[2]), "\rinput: %s%s(%g kHz, %i channel%s, ",
strcmp(inPath, "-") ? inPath : "<stdin>",
strlen(inPath) > 26 ? "\n\t" : " ",
lame_get_in_samplerate( gfp ) / 1.e3,
tmp_num_channels, tmp_num_channels != 1 ? "s" : "");
switch (input_format) {
case sf_mp3:
skip += 528 + 1;
fprintf((&__iob[2]), "MPEG-%u%s Layer %s", 2 - lame_get_version(gfp),
lame_get_out_samplerate( gfp ) < 16000 ? ".5" : "", "III");
break;
case sf_mp2:
skip += 240 + 1;
fprintf((&__iob[2]), "MPEG-%u%s Layer %s", 2 - lame_get_version(gfp),
lame_get_out_samplerate( gfp ) < 16000 ? ".5" : "", "II");
break;
case sf_mp1:
skip += 240 + 1;
fprintf((&__iob[2]), "MPEG-%u%s Layer %s", 2 - lame_get_version(gfp),
lame_get_out_samplerate( gfp ) < 16000 ? ".5" : "", "I");
break;
case sf_ogg:
fprintf((&__iob[2]), "Ogg Vorbis");
skip = 0;
break;
case sf_raw:
fprintf((&__iob[2]), "raw PCM data");
mp3input_data.nsamp = lame_get_num_samples( gfp );
mp3input_data.framesize = 1152;
skip = 0;
break;
case sf_wave:
fprintf((&__iob[2]), "Microsoft WAVE");
mp3input_data.nsamp = lame_get_num_samples( gfp );
mp3input_data.framesize = 1152;
skip = 0;
break;
case sf_aiff:
fprintf((&__iob[2]), "SGI/Apple AIFF");
mp3input_data.nsamp = lame_get_num_samples( gfp );
mp3input_data.framesize = 1152;
skip = 0;
break;
default:
fprintf((&__iob[2]), "unknown");
mp3input_data.nsamp = lame_get_num_samples( gfp );
mp3input_data.framesize = 1152;
skip = 0;
((void)0);
break;
}
fprintf((&__iob[2]), ")\noutput: %s%s(16 bit, Microsoft WAVE)\n",
strcmp(outPath, "-") ? outPath : "<stdout>",
strlen(outPath) > 45 ? "\n\t" : " ");
if (skip > 0)
fprintf((&__iob[2]), "skipping initial %i samples (encoder+decoder delay)\n",
skip);
if ( 0 == disable_wav_header )
WriteWaveHeader(outf, 0x7FFFFFFF, lame_get_in_samplerate( gfp ),
tmp_num_channels,
16);
wavsize = -skip;
WriteFunction = swapbytes ? WriteBytesSwapped : WriteBytes;
mp3input_data.totalframes = mp3input_data.nsamp / mp3input_data.framesize;
((void)0);
do {
iread = get_audio16(gfp, Buffer);
mp3input_data.framenum += iread / mp3input_data.framesize;
wavsize += iread;
if (silent <= 0)
decoder_progress(gfp, &mp3input_data);
skip -= (i = skip < iread ? skip : iread);
for (; i < iread; i++) {
if ( disable_wav_header ) {
WriteFunction(outf, (char *) &Buffer[0][i], sizeof(short));
if (tmp_num_channels == 2)
WriteFunction(outf, (char *) &Buffer[1][i], sizeof(short));
}
else {
Write16BitsLowHigh(outf, Buffer[0][i]);
if (tmp_num_channels == 2)
Write16BitsLowHigh(outf, Buffer[1][i]);
}
}
} while (iread);
i = (16 / 8) * tmp_num_channels;
((void)0);
if (wavsize <= 0) {
fprintf((&__iob[2]), "WAVE file contains 0 PCM samples\n");
wavsize = 0;
}
else if (wavsize > 0xFFFFFFD0 / i) {
fprintf((&__iob[2]),
"Very huge WAVE file, can't set filesize accordingly\n");
wavsize = 0xFFFFFFD0;
}
else {
wavsize *= i;
}
if ( 0 == disable_wav_header )
if (!fseek(outf, 0l, 0))
WriteWaveHeader(outf, wavsize, lame_get_in_samplerate( gfp ),
tmp_num_channels, 16);
fclose(outf);
decoder_progress_finish(gfp);
return 0;
}
# 314 "/home/tmpgnh/src/lame-3.89/frontend/main.c"
int
lame_encoder(lame_global_flags * gf, FILE * outf, int nogap, char *inPath,
char *outPath)
{
unsigned char mp3buffer[16384];
int Buffer[2][1152];
int iread, imp3;
static const char *mode_names[2][4] = {
{"stereo", "j-stereo", "dual-ch", "single-ch"},
{"stereo", "force-ms", "dual-ch", "single-ch"}
};
int frames;
if (silent < 10) {
lame_print_config(gf);
fprintf((&__iob[2]), "Encoding %s%s to %s\n",
strcmp(inPath, "-") ? inPath : "<stdin>",
strlen(inPath) + strlen(outPath) < 66 ? "" : "\n ",
strcmp(outPath, "-") ? outPath : "<stdout>");
fprintf((&__iob[2]),
"Encoding as %g kHz ", 1.e-3 * lame_get_out_samplerate(gf));
if (lame_get_ogg(gf)) {
fprintf((&__iob[2]), "VBR Ogg Vorbis\n");
}
else {
const char *appendix = "";
switch (lame_get_VBR(gf)) {
case vbr_mt:
case vbr_rh:
case vbr_mtrh:
appendix = "ca. ";
fprintf((&__iob[2]), "VBR(q=%i)", lame_get_VBR_q(gf));
break;
case vbr_abr:
fprintf((&__iob[2]), "average %d kbps",
lame_get_VBR_mean_bitrate_kbps(gf));
break;
default:
fprintf((&__iob[2]), "%3d kbps", lame_get_brate(gf));
break;
}
fprintf((&__iob[2]), " %s MPEG-%u%s Layer III (%s%gx) qval=%i\n",
mode_names[lame_get_force_ms(gf)][lame_get_mode(gf)],
2 - lame_get_version(gf),
lame_get_out_samplerate(gf) < 16000 ? ".5" : "",
appendix,
0.1 * (int) (10. * lame_get_compression_ratio(gf) + 0.5),
lame_get_quality(gf));
}
if (silent <= -10)
lame_print_internals(gf);
fflush((&__iob[2]));
}
do {
iread = get_audio(gf, Buffer);
frames = lame_get_frameNum(gf);
if (silent <= 0) {
if (update_interval > 0) {
timestatus_klemm(gf);
}
else {
if (0 == frames % 50) {
brhist_jump_back();
timestatus(lame_get_out_samplerate(gf),
frames,
lame_get_totalframes(gf),
lame_get_framesize(gf));
if (brhist)
brhist_disp(gf);
}
}
}
imp3 = lame_encode_buffer_int(gf, Buffer[0], Buffer[1], iread,
mp3buffer, sizeof(mp3buffer));
if (imp3 < 0) {
if (imp3 == -1)
fprintf((&__iob[2]), "mp3 buffer is not big enough... \n");
else
fprintf((&__iob[2]), "mp3 internal error: error code=%i\n", imp3);
return 1;
}
if (fwrite(mp3buffer, 1, imp3, outf) != imp3) {
fprintf((&__iob[2]), "Error writing mp3 output \n");
return 1;
}
} while (iread);
if (nogap) {
imp3 = lame_encode_flush_nogap(gf, mp3buffer, sizeof(mp3buffer));
lame_init_bitstream(gf);
} else {
imp3 = lame_encode_flush(gf, mp3buffer, sizeof(mp3buffer));
}
if (imp3 < 0) {
if (imp3 == -1)
fprintf((&__iob[2]), "mp3 buffer is not big enough... \n");
else
fprintf((&__iob[2]), "mp3 internal error: error code=%i\n", imp3);
return 1;
}
if (silent <= 0) {
brhist_jump_back();
timestatus(lame_get_out_samplerate(gf),
frames, lame_get_totalframes(gf), lame_get_framesize(gf));
if (brhist) {
brhist_disp(gf);
}
brhist_disp_total(gf);
timestatus_finish();
}
fwrite(mp3buffer, 1, imp3, outf);
return 0;
}
void
brhist_init_package(lame_global_flags * gf)
{
if (brhist) {
if (brhist_init
(gf, lame_get_VBR_min_bitrate_kbps(gf),
lame_get_VBR_max_bitrate_kbps(gf))) {
brhist = 0;
}
}
else {
brhist_init(gf, 128, 128);
}
}
int
main(int argc, char **argv)
{
int ret;
lame_global_flags *gf;
char outPath[1000];
char inPath[1000];
int max_nogap = 20;
char *nogap_inPath[20];
int i;
FILE *outf;
for (i = 0; i < max_nogap; ++i) {
nogap_inPath[i] = malloc(1000);
}
input_format = sf_unknown;
if (0 == (gf = lame_init())) {
fprintf((&__iob[2]), "fatal error during initialization\n");
return 1;
}
if (argc <= 1) {
usage(gf, (&__iob[2]), argv[0]);
return 1;
}
parse_args_from_string(gf, getenv("LAMEOPT"), inPath, outPath);
ret = parse_args(gf, argc, argv, inPath, outPath, nogap_inPath, &max_nogap);
if (ret < 0)
return ret == -2 ? 0 : 1;
if (update_interval < 0.)
update_interval = 2.;
if (max_nogap > 0) {
strncpy(outPath, nogap_inPath[0], 1000 - 4);
strncat(outPath, ".mp3", 4);
outf = init_files(gf, nogap_inPath[0], outPath);
}
else {
outf = init_files(gf, inPath, outPath);
}
if (outf == 0) {
return -1;
}
i = lame_init_params(gf);
if (i < 0) {
if (i == -1) {
display_bitrates((&__iob[2]));
}
fprintf((&__iob[2]), "fatal error during initialization\n");
return i;
}
if (silent > 0 || lame_get_VBR(gf) == vbr_off) {
brhist = 0;
}
# 575 "/home/tmpgnh/src/lame-3.89/frontend/main.c"
if (lame_get_decode_only(gf)) {
if (mp3_delay_set)
lame_decoder(gf, outf, mp3_delay, inPath, outPath);
else
lame_decoder(gf, outf, lame_get_encoder_delay(gf), inPath, outPath);
}
else {
if (max_nogap > 0) {
for (i = 0; i < max_nogap; ++i) {
int use_flush_nogap = (i != (max_nogap - 1));
if (i > 0) {
strncpy(outPath, nogap_inPath[i], 1000 - 4);
strncat(outPath, ".mp3", 4);
outf = init_files(gf, nogap_inPath[i], outPath);
}
brhist_init_package(gf);
ret =
lame_encoder(gf, outf, use_flush_nogap, nogap_inPath[i],
outPath);
lame_mp3_tags_fid(gf, outf);
fclose(outf);
close_infile();
}
lame_close(gf);
}
else {
brhist_init_package(gf);
ret = lame_encoder(gf, outf, 0, inPath, outPath);
lame_mp3_tags_fid(gf, outf);
fclose(outf);
close_infile();
lame_close(gf);
}
}
return ret;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-10-17 7:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-17 7:36 optimization/4590: GCC 3.0.1 can't do -O3 Gabor NemethI
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).