16#define NTOM_MUL (32768)
18#define aligned_pointer(p, type, alignment) align_the_pointer(p, alignment)
29 debug3(
"align_the_pointer: pointer %p is off by %u from %u",
30 base, (
unsigned int)aoff, alignment);
32 if(aoff)
return (
char*)
base+alignment-aoff;
90 fr->dithernoise =
NULL;
148 if(fr->dithernoise ==
NULL)
151 if(fr->dithernoise ==
NULL)
return 0;
242 if(fr->
p.index_size >= 0)
244 fr->
index.grow_size = 0;
255 debug2(
"set up frame index of size %lu (ret=%i)", (
unsigned long)fr->
index.size,
ret);
257 error(
"frame index setup (initial resize) failed");
271 debug1(
"frame %p buffer", (
void*)fr);
289 else if(fr->
cpu_opts.type ==
ivier) buffssize = 2*2*17*FIR_BUFFER_SIZE*
sizeof(
int);
292 buffssize = 2*2*0x110*4;
294 if(2*2*0x110*
sizeof(
real) > buffssize)
295 buffssize = 2*2*0x110*
sizeof(
real);
318 fr->int_buffs[0][0] = (
int*) fr->
rawbuffs;
319 fr->int_buffs[0][1] = fr->int_buffs[0][0] + 17*FIR_BUFFER_SIZE;
320 fr->int_buffs[1][0] = fr->int_buffs[0][1] + 17*FIR_BUFFER_SIZE;
321 fr->int_buffs[1][1] = fr->int_buffs[1][0] + 17*FIR_BUFFER_SIZE;
329 for(
i=0;
i<4; ++
i)
for(
j=0;
j<4; ++
j)
330 fr->areal_buffs[
i][
j] = fr->areal_buffs[0][0] + (
i*4+
j)*0x110;
336 int decwin_size = (512+32)*
sizeof(
real);
343 if(decwin_size < (512+32)*4) decwin_size = (512+32)*4;
347 decwin_size += (512+32)*4 + 63;
353#if defined(OPT_ALTIVEC) || defined(OPT_ARM)
356 decwin_size += 512*
sizeof(
real);
381 fr->decwin_mmx = (
float*)fr->
decwin;
382 fr->decwins = fr->decwin_mmx+512+32;
385 else debug(
"no decwins/decwin_mmx for that class");
394 size_t scratchsize = 0;
437 debug1(
"frame %p buffer done", (
void*)fr);
462 fr->
icy.interval = 0;
480 debug(
"Got a TOC! Showing the values...");
534 fr->
rva.level[0] = -1;
535 fr->
rva.level[1] = -1;
553 fr->i486bo[0] = fr->i486bo[1] = FIR_SIZE-1;
563 fr->
icy.interval = 0;
597 debug1(
"freeing buffer at %p", (
void*)fr->
buffer.rdata);
607 if(fr->dithernoise !=
NULL)
609 free(fr->dithernoise);
610 fr->dithernoise =
NULL;
632 if(bodydata !=
NULL) *bodydata = mh->
bsbuf;
673 if(toc_entry < 0) toc_entry = 0;
674 if(toc_entry > 99) toc_entry = 99;
689 *get_frame = want_frame;
692 debug5(
"fuzzy: want %li of %li, get %li at %li B of %li B",
718 fi = want_frame/fr->
index.step;
719 if(fi >= fr->
index.fill)
729 fi = fr->
index.fill - 1;
732 *get_frame = fi*fr->
index.step;
733 gopos = fr->
index.data[fi];
747 debug2(
"index: 0x%lx for frame %li", (
unsigned long)gopos, (
long) *get_frame);
757# ifndef NO_DOWNSAMPLE
767 merror(
"Bad down_sample (%i) ... should not be possible!!"
779# ifndef NO_DOWNSAMPLE
789 merror(
"Bad down_sample (%i) ... should not be possible!!"
803# ifndef NO_DOWNSAMPLE
813 merror(
"Bad down_sample (%i) ... should not be possible!!"
825# ifndef NO_DOWNSAMPLE
835 error(
"Bad down_sample ... should not be possible!!");
876 debug2(
"gapless update with new sample count %"OFF_P" as opposed to known %"OFF_P, total_samples, gapless_samples);
877 if(
NOQUIET && total_samples != gapless_samples)
878 fprintf(
stderr,
"\nWarning: Real sample count %"OFF_P" differs from given gapless sample count %"OFF_P". Frankenstein stream?\n"
879 , total_samples, gapless_samples);
881 if(gapless_samples > total_samples)
884 merror(
"End sample count smaller than gapless end! (%"OFF_P
885 " < %"OFF_P"). Disabling gapless mode from now on."
900 off_t preshift = fr->
p.preframes;
902 if(fr->
lay==3 && preshift < 1) preshift = 1;
904 if(fr->
lay!=3 && preshift > 2) preshift = 2;
937 debug5(
"frame_set_frameseek: begin at %li frames and %li samples, end at %li and %li; ignore from %li",
941 debug3(
"frame_set_frameseek: begin at %li frames, end at %li; ignore from %li",
965 debug5(
"frame_set_seek: begin at %li frames and %li samples, end at %li and %li; ignore from %li",
969 debug3(
"frame_set_seek: begin at %li frames, end at %li; ignore from %li",
984 if(vol >= 0) mh->
p.outscale = vol;
985 else mh->
p.outscale = 0.;
1000 if(fr->
p.rva == 2 && fr->
rva.level[1] != -1) rt = 1;
1001 if(fr->
rva.level[rt] != -1)
1003 p = fr->
rva.peak[rt];
1004 g = fr->
rva.gain[rt];
1008 if(peak !=
NULL) *peak =
p;
1009 if(gain !=
NULL) *gain =
g;
1023 rvafact =
pow(10,gain/20);
1026 newscale = fr->
p.outscale*rvafact;
1029 if((peak*newscale) > 1.0)
1031 newscale = 1.0/peak;
1032 warning2(
"limiting scale value to %f to prevent clipping with indicated peak factor of %f", newscale, peak);
1037 debug3(
"changing scale value from %f to %f (peak estimated to %f)", fr->
lastscale != -1 ? fr->
lastscale : fr->
p.outscale, newscale, (
double) (newscale*peak));
#define attribute_align_arg
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
double pow(double x, double y)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
mpg123_pars attribute_align_arg * mpg123_new_pars(int *error)
void attribute_align_arg mpg123_delete_pars(mpg123_pars *mp)
MPG123_EXPORT int mpg123_fmt_all(mpg123_pars *mp)
int attribute_align_arg mpg123_replace_buffer(mpg123_handle *mh, void *data, size_t size)
int attribute_align_arg mpg123_set_moreinfo(mpg123_handle *mh, struct mpg123_moreinfo *mi)
int attribute_align_arg mpg123_getvolume(mpg123_handle *mh, double *base, double *really, double *rva_db)
int attribute_align_arg mpg123_reset_eq(mpg123_handle *mh)
int attribute_align_arg mpg123_volume_change(mpg123_handle *mh, double change)
int attribute_align_arg mpg123_volume(mpg123_handle *mh, double vol)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define invalidate_format
#define frame_set_frameseek
#define frame_gapless_realinit
#define ntom_frame_outsamples
#define frame_index_setup
#define frame_gapless_init
#define frame_gapless_update
#define dither_table_init
#define frame_dither_init
#define frame_buffers_reset
#define frame_expect_outsamples
#define memcpy(s1, s2, n)
#define DOUBLE_TO_REAL(x)
#define warning2(s, a, b)
#define debug5(s, a, b, c, d, e)
#define debug4(s, a, b, c, d)
#define debug3(s, a, b, c)
static off_t ignoreframe(mpg123_handle *fr)
static void frame_icy_reset(mpg123_handle *fr)
static void frame_free_toc(mpg123_handle *fr)
static void frame_default_pars(mpg123_pars *mp)
#define aligned_pointer(p, type, alignment)
static int get_rva(mpg123_handle *fr, double *peak, double *gain)
static void frame_decode_buffers_reset(mpg123_handle *fr)
static void frame_free_buffers(mpg123_handle *fr)
static off_t frame_fuzzy_find(mpg123_handle *fr, off_t want_frame, off_t *get_frame)
static void * align_the_pointer(void *base, unsigned int alignment)
static void frame_fixed_reset(mpg123_handle *fr)
func_synth_mono synth_mono
struct mpg123_handle_struct::@3463 layer2
struct mpg123_pars_struct p
unsigned long ntom_val[2]
short * short_buffs[2][2]
unsigned char * id3v2_raw
struct mpg123_handle_struct::@3460 cpu_opts
unsigned char * rawdecwin
unsigned char * conv16to8_buf
struct mpg123_moreinfo * pinfo
struct mpg123_handle_struct::@3461 rva
unsigned int bitreservoir
real hybrid_block[2][2][SBLIMIT *SSLIMIT]
struct mpg123_handle_struct::@3462 layer1
struct mpg123_handle_struct::@3464 layer3
unsigned char id3buf[128]
long freeformat_framesize
unsigned char bsspace[2][MAXFRAMESIZE+512+4]
void(* wrapperclean)(void *)
void(* make_decode_tables)(mpg123_handle *fr)
long freeformat_framesize