~ft/aacdec

f71b5e81f563d94fa284977a326520d269d8353e — Fabian Greffrath 1 year, 24 days ago 1b71a6b + 0a84fa3
Merge pull request #61 from argilo/clean-formatting

Remove non-ASCII characters and trailing whitespace from source files
131 files changed, 854 insertions(+), 854 deletions(-)

M aacDECdrop/audio.h
M aacDECdrop/decthread.c
M aacDECdrop/main.c
M aacDECdrop/misc.c
M aacDECdrop/resource.h
M frontend/audio.c
M frontend/audio.h
M frontend/getopt.c
M frontend/main.c
M frontend/unicode_support.c
M include/faad.h
M include/neaacdec.h
M libfaad/analysis.h
M libfaad/bits.c
M libfaad/bits.h
M libfaad/cfft.c
M libfaad/cfft.h
M libfaad/cfft_tab.h
M libfaad/codebook/hcb.h
M libfaad/codebook/hcb_1.h
M libfaad/codebook/hcb_10.h
M libfaad/codebook/hcb_11.h
M libfaad/codebook/hcb_2.h
M libfaad/codebook/hcb_3.h
M libfaad/codebook/hcb_4.h
M libfaad/codebook/hcb_5.h
M libfaad/codebook/hcb_6.h
M libfaad/codebook/hcb_7.h
M libfaad/codebook/hcb_8.h
M libfaad/codebook/hcb_9.h
M libfaad/codebook/hcb_sf.h
M libfaad/common.c
M libfaad/common.h
M libfaad/decoder.c
M libfaad/drc.c
M libfaad/drc.h
M libfaad/drm_dec.c
M libfaad/drm_dec.h
M libfaad/error.c
M libfaad/error.h
M libfaad/filtbank.c
M libfaad/filtbank.h
M libfaad/fixed.h
M libfaad/hcr.c
M libfaad/huffman.c
M libfaad/huffman.h
M libfaad/ic_predict.c
M libfaad/ic_predict.h
M libfaad/iq_table.h
M libfaad/is.c
M libfaad/is.h
M libfaad/kbd_win.h
M libfaad/lt_predict.c
M libfaad/lt_predict.h
M libfaad/mdct.c
M libfaad/mdct.h
M libfaad/mdct_tab.h
M libfaad/mp4.c
M libfaad/mp4.h
M libfaad/ms.c
M libfaad/ms.h
M libfaad/output.c
M libfaad/output.h
M libfaad/pns.c
M libfaad/pns.h
M libfaad/ps_dec.c
M libfaad/ps_dec.h
M libfaad/ps_tables.h
M libfaad/pulse.c
M libfaad/pulse.h
M libfaad/rvlc.c
M libfaad/rvlc.h
M libfaad/sbr_dct.c
M libfaad/sbr_dct.h
M libfaad/sbr_dec.c
M libfaad/sbr_dec.h
M libfaad/sbr_e_nf.c
M libfaad/sbr_e_nf.h
M libfaad/sbr_fbt.c
M libfaad/sbr_fbt.h
M libfaad/sbr_hfadj.c
M libfaad/sbr_hfadj.h
M libfaad/sbr_hfgen.c
M libfaad/sbr_hfgen.h
M libfaad/sbr_huff.c
M libfaad/sbr_huff.h
M libfaad/sbr_noise.h
M libfaad/sbr_qmf.c
M libfaad/sbr_qmf.h
M libfaad/sbr_qmf_c.h
M libfaad/sbr_syntax.c
M libfaad/sbr_syntax.h
M libfaad/sbr_tf_grid.c
M libfaad/sbr_tf_grid.h
M libfaad/sine_win.h
M libfaad/specrec.c
M libfaad/specrec.h
M libfaad/ssr.c
M libfaad/ssr.h
M libfaad/ssr_fb.c
M libfaad/ssr_fb.h
M libfaad/ssr_ipqf.c
M libfaad/ssr_ipqf.h
M libfaad/ssr_win.h
M libfaad/structs.h
M libfaad/syntax.c
M libfaad/syntax.h
M libfaad/tns.c
M libfaad/tns.h
M plugins/QCD/QCDFAAD.c
M plugins/QCD/QCDInputDLL.h
M plugins/QCD/QCDModDefs.h
M plugins/QCD/QCDModInput.h
M plugins/QCD/resource.h
M plugins/QCDMp4/QCDInputDLL.h
M plugins/QCDMp4/QCDModDefs.h
M plugins/QCDMp4/QCDModInput.h
M plugins/QCDMp4/QCDModTagEditor.h
M plugins/QCDMp4/QCDMp4.c
M plugins/QCDMp4/QCDMp4Tag.cpp
M plugins/QCDMp4/aac2mp4.cpp
M plugins/QCDMp4/aac2mp4.h
M plugins/QCDMp4/aacinfo.c
M plugins/QCDMp4/aacinfo.h
M plugins/QCDMp4/config.c
M plugins/QCDMp4/config.h
M plugins/QCDMp4/mbs.h
M plugins/QCDMp4/resource.h
M plugins/QCDMp4/utils.c
M plugins/QCDMp4/utils.h
M utils/win32/ac2ver.c
M aacDECdrop/audio.h => aacDECdrop/audio.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M aacDECdrop/decthread.c => aacDECdrop/decthread.c +1 -1
@@ 183,7 183,7 @@ DWORD WINAPI decode_thread(LPVOID arg)
		numfiles = 0;

		Sleep(500);
	} 
	}

	DeleteCriticalSection(&mutex);


M aacDECdrop/main.c => aacDECdrop/main.c +19 -19
@@ 28,7 28,7 @@
#define CREATEFONT(sz) \
	CreateFont((sz), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
		VARIABLE_PITCH | FF_SWISS, "")
   

HANDLE event = NULL;
int width = 130, height = 130;
RECT bar1, bar2, vbrBR;


@@ 232,7 232,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine,
	set_outputFormat(iniSettings.outputFormat);
	set_fileType(iniSettings.fileType);
	set_object_type(iniSettings.object_type);
	

	for (frame = 0; frame < 8; frame++)
		hbm[frame] = LoadImage(hinst, MAKEINTRESOURCE(IDB_TF01 + frame), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
	frame = 0;


@@ 243,7 243,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine,
		DispatchMessage(&msg);
	}

	for (frame = 0; frame < 8; frame++) 
	for (frame = 0; frame < 8; frame++)
		DeleteObject(hbm[frame]);

	return msg.wParam;


@@ 373,7 373,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
			if (animate || frame)
			{
				frame++;
				if (frame > 7) 
				if (frame > 7)
					frame -= 8;
			}
			else


@@ 437,7 437,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
			return 0;

		case WM_COMMAND:
			switch (LOWORD(wParam)) 
			switch (LOWORD(wParam))
			{
				case IDM_QUIT:
					WriteIniFile(INI_FILE);


@@ 446,7 446,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
					break;
				case IDM_ONTOP:
					set_always_on_top(hwnd, ~GetMenuState(menu, LOWORD(wParam), MF_BYCOMMAND) & MF_CHECKED);
					break;	
					break;
				case IDM_LOGERR:
					set_logerr(hwnd, ~GetMenuState(menu, LOWORD(wParam), MF_BYCOMMAND) & MF_CHECKED);
					break;


@@ 459,10 459,10 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
				}
				case IDM_VOLUME:
				{
					int value = 
					int value =
					DialogBox(
					hinst,  
					MAKEINTRESOURCE(IDD_VOLUME),   
					hinst,
					MAKEINTRESOURCE(IDD_VOLUME),
					hwnd, QCProc);

					if (value == -2)


@@ 484,7 484,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
			hdrop = (HANDLE)wParam;
			HandleDrag(hwnd, hdrop);
			return 0;
	

		case WM_DESTROY:
			decoding_done = 1;
			PostQuitMessage(0);


@@ 498,13 498,13 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 *  Encode parameters dialog procedures.
 */

BOOL CALLBACK QCProc(HWND hwndDlg, UINT message, 
                     WPARAM wParam, LPARAM lParam) 
BOOL CALLBACK QCProc(HWND hwndDlg, UINT message,
                     WPARAM wParam, LPARAM lParam)
{
	switch (message) 
	{ 
		case WM_INITDIALOG: 
 
	switch (message)
	{
		case WM_INITDIALOG:

			if(iniSettings.decode_mode == 0)
			{
				CheckDlgButton(hwndDlg,IDC_PLAYBACK,TRUE);


@@ 579,8 579,8 @@ BOOL CALLBACK QCProc(HWND hwndDlg, UINT message,
			EndDialog(hwndDlg, -1);
			break;

		case WM_COMMAND: 
			switch (LOWORD(wParam)) 
		case WM_COMMAND:
			switch (LOWORD(wParam))
			{
				case IDC_BUTTON1:
				{


@@ 670,7 670,7 @@ BOOL CALLBACK QCProc(HWND hwndDlg, UINT message,
					break;
       	  		}
	}
	return FALSE; 
	return FALSE;
}



M aacDECdrop/misc.c => aacDECdrop/misc.c +3 -3
@@ 39,8 39,8 @@ void error_dialog(const char *fmt, ...)
	if (strlen(fmt) > 750)
	{
		sprintf(msgbuf, "%s %s", "<buffer overflow> ", fmt);
	} 
	else 
	}
	else
	{
		if (_filename != NULL && strlen(_filename) < 255)
		{


@@ 49,7 49,7 @@ void error_dialog(const char *fmt, ...)
		}

		va_start(ap, fmt);
		

		vsprintf(bufp, fmt, ap);

		va_end(ap);

M aacDECdrop/resource.h => aacDECdrop/resource.h +1 -1
@@ 42,7 42,7 @@
#define IDM_QUIT                        40019

// Next default values for new objects
// 
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC                     1

M frontend/audio.c => frontend/audio.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M frontend/audio.h => frontend/audio.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M frontend/getopt.c => frontend/getopt.c +3 -3
@@ 204,7 204,7 @@ my_index (str, chr)
}

#endif              /* GNU C library.  */


/* Handle permutation of arguments.  */

/* Describe the part of ARGV that contains non-options that have


@@ 265,7 265,7 @@ exchange (argv)
    temp = *first; *first = *last; *last = temp; first++; last--;
  }
}


/* Scan elements of ARGV (whose length is ARGC) for option characters
   given in OPTSTRING.



@@ 680,7 680,7 @@ getopt_long (argc, argv, options, long_options, opt_index)
}

#endif  /* _LIBC or not __GNU_LIBRARY__.  */


#ifdef TEST

/* Compile with -DTEST to make an executable for use in testing

M frontend/main.c => frontend/main.c +1 -1
@@ 154,7 154,7 @@ static void advance_buffer(aac_buffer *b, int bytes)
    while ((b->bytes_into_buffer > 0) && (bytes > 0))
    {
        int chunk = min(bytes, b->bytes_into_buffer);
    

        bytes -= chunk;
        b->file_offset += chunk;
        b->bytes_consumed = chunk;

M frontend/unicode_support.c => frontend/unicode_support.c +3 -3
@@ 102,7 102,7 @@ void init_commandline_arguments_utf8(int *argc, char ***argv)
		fprintf(stderr, "\nFATAL: Malloc failed\n\n");
		exit(-1);
	}
	

	for(i = 0; i < nArgs; i++)
	{
		(*argv)[i] = utf16_to_utf8(szArglist[i]);


@@ 119,7 119,7 @@ void init_commandline_arguments_utf8(int *argc, char ***argv)
void free_commandline_arguments_utf8(int *argc, char ***argv)
{
	int i = 0;
	

	if(*argv != NULL)
	{
		for(i = 0; i < *argc; i++)


@@ 140,7 140,7 @@ FILE *fopen_utf8(const char *filename_utf8, const char *mode_utf8)
	FILE *ret = NULL;
	wchar_t *filename_utf16 = utf8_to_utf16(filename_utf8);
	wchar_t *mode_utf16 = utf8_to_utf16(mode_utf8);
	

	if(filename_utf16 && mode_utf16)
	{
		ret = _wfopen(filename_utf16, mode_utf16);

M include/faad.h => include/faad.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M include/neaacdec.h => include/neaacdec.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/analysis.h => libfaad/analysis.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/bits.c => libfaad/bits.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/bits.h => libfaad/bits.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/cfft.c => libfaad/cfft.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/cfft.h => libfaad/cfft.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/cfft_tab.h => libfaad/cfft_tab.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb.h => libfaad/codebook/hcb.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_1.h => libfaad/codebook/hcb_1.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_10.h => libfaad/codebook/hcb_10.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_11.h => libfaad/codebook/hcb_11.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_2.h => libfaad/codebook/hcb_2.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_3.h => libfaad/codebook/hcb_3.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_4.h => libfaad/codebook/hcb_4.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_5.h => libfaad/codebook/hcb_5.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_6.h => libfaad/codebook/hcb_6.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_7.h => libfaad/codebook/hcb_7.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_8.h => libfaad/codebook/hcb_8.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_9.h => libfaad/codebook/hcb_9.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/codebook/hcb_sf.h => libfaad/codebook/hcb_sf.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/common.c => libfaad/common.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/common.h => libfaad/common.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/decoder.c => libfaad/decoder.c +5 -5
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 286,7 286,7 @@ long NeAACDecInit(NeAACDecHandle hpDecoder,
#endif

        faad_initbits(&ld, buffer, buffer_size);
 

#if 0
        memset(l, 0, sizeof(latm_header));
        is_latm = latmCheck(l, &ld);

M libfaad/drc.c => libfaad/drc.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/drc.h => libfaad/drc.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/drm_dec.c => libfaad/drm_dec.c +108 -108
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 49,7 49,7 @@ typedef const int8_t (*drm_ps_huff_tab)[2];


/* binary search huffman tables */
static const int8_t f_huffman_sa[][2] = 
static const int8_t f_huffman_sa[][2] =
{
    { /*0*/ -15, 1 },             /* index 0: 1 bits:  x */
    { 2, 3 },                     /* index 1: 2 bits:  1x */


@@ 67,7 67,7 @@ static const int8_t f_huffman_sa[][2] =
    { /*-7*/ -22, /*-6*/ -21 }    /* index 13: 7 bits: 111111x */
};

static const int8_t t_huffman_sa[][2] = 
static const int8_t t_huffman_sa[][2] =
{
    { /*0*/ -15, 1 },             /* index 0: 1 bits: x */
    { 2, 3 },                     /* index 1: 2 bits: 1x */


@@ 85,7 85,7 @@ static const int8_t t_huffman_sa[][2] =
    { /*6*/ -9, /*7*/ -8 }        /* index 13: 9 bits: 11111111x */
};

static const int8_t f_huffman_pan[][2] = 
static const int8_t f_huffman_pan[][2] =
{
    { /*0*/ -15, 1 },             /* index 0: 1 bits: x */
    { /*-1*/ -16, 2 },            /* index 1: 2 bits: 1x */


@@ 117,7 117,7 @@ static const int8_t f_huffman_pan[][2] =
    { /*12*/ -3, /*14*/ -1 }      /* index 27: 16 bits: 111111111111111x */
};

static const int8_t t_huffman_pan[][2] = 
static const int8_t t_huffman_pan[][2] =
{
    { /*0*/ -15, 1 },             /* index 0: 1 bits: x */
    { /*-1*/ -16, 2 },            /* index 1: 2 bits: 1x */


@@ 150,7 150,7 @@ static const int8_t t_huffman_pan[][2] =
};

/* There are 3 classes in the standard but the last 2 are identical */
static const real_t sa_quant[8][2] = 
static const real_t sa_quant[8][2] =
{
    { FRAC_CONST(0.0000), FRAC_CONST(0.0000) },
    { FRAC_CONST(0.0501), FRAC_CONST(0.1778) },


@@ 164,7 164,7 @@ static const real_t sa_quant[8][2] =

/* We don't need the actual quantizer values */
#if 0
static const real_t pan_quant[8][5] = 
static const real_t pan_quant[8][5] =
{
    { COEF_CONST(0.0000), COEF_CONST(0.0000), COEF_CONST(0.0000), COEF_CONST(0.0000), COEF_CONST(0.0000) },
    { COEF_CONST(0.1661), COEF_CONST(0.1661), COEF_CONST(0.3322), COEF_CONST(0.3322), COEF_CONST(0.3322) },


@@ 203,35 203,35 @@ static const real_t pan_pow_2_neg[8][5] = {

/* 2^(pan_quant[x][y]/30) */
static const real_t pan_pow_2_30_pos[8][5] = {
    { COEF_CONST(1),           COEF_CONST(1),           COEF_CONST(1),           COEF_CONST(1),           COEF_CONST(1)           }, 
    { COEF_CONST(1.003845098), COEF_CONST(1.003845098), COEF_CONST(1.007704982), COEF_CONST(1.007704982), COEF_CONST(1.007704982) }, 
    { COEF_CONST(1.007704982), COEF_CONST(1.007704982), COEF_CONST(1.01546933),  COEF_CONST(1.019373909), COEF_CONST(1.019373909) }, 
    { COEF_CONST(1.011579706), COEF_CONST(1.01546933),  COEF_CONST(1.023293502), COEF_CONST(1.035142941), COEF_CONST(1.039123167) }, 
    { COEF_CONST(1),           COEF_CONST(1),           COEF_CONST(1),           COEF_CONST(1),           COEF_CONST(1)           },
    { COEF_CONST(1.003845098), COEF_CONST(1.003845098), COEF_CONST(1.007704982), COEF_CONST(1.007704982), COEF_CONST(1.007704982) },
    { COEF_CONST(1.007704982), COEF_CONST(1.007704982), COEF_CONST(1.01546933),  COEF_CONST(1.019373909), COEF_CONST(1.019373909) },
    { COEF_CONST(1.011579706), COEF_CONST(1.01546933),  COEF_CONST(1.023293502), COEF_CONST(1.035142941), COEF_CONST(1.039123167) },
    { COEF_CONST(1.01546933),  COEF_CONST(1.023293502), COEF_CONST(1.035142941), COEF_CONST(1.051155908), COEF_CONST(1.059252598) },
    { COEF_CONST(1.019373909), COEF_CONST(1.03117796),  COEF_CONST(1.051155908), COEF_CONST(1.071518432), COEF_CONST(1.0839263)   }, 
    { COEF_CONST(1.023293502), COEF_CONST(1.043118698), COEF_CONST(1.067414119), COEF_CONST(1.092277933), COEF_CONST(1.113439626) }, 
    { COEF_CONST(1.019373909), COEF_CONST(1.03117796),  COEF_CONST(1.051155908), COEF_CONST(1.071518432), COEF_CONST(1.0839263)   },
    { COEF_CONST(1.023293502), COEF_CONST(1.043118698), COEF_CONST(1.067414119), COEF_CONST(1.092277933), COEF_CONST(1.113439626) },
    { COEF_CONST(1.03117796),  COEF_CONST(1.055195268), COEF_CONST(1.0839263),   COEF_CONST(1.113439626), COEF_CONST(1.143756546) }
};

/* 2^(-pan_quant[x][y]/30) */
static const real_t pan_pow_2_30_neg[8][5] = {
    { COEF_CONST(1),           COEF_CONST(1),           COEF_CONST(1),           COEF_CONST(1),           COEF_CONST(1)           },
    { COEF_CONST(0.99616963),  COEF_CONST(0.99616963),  COEF_CONST(0.992353931), COEF_CONST(0.992353931), COEF_CONST(0.99235393)  }, 
    { COEF_CONST(0.992353931), COEF_CONST(0.992353931), COEF_CONST(0.984766325), COEF_CONST(0.980994305), COEF_CONST(0.980994305) }, 
    { COEF_CONST(0.988552848), COEF_CONST(0.984766325), COEF_CONST(0.977236734), COEF_CONST(0.966050157), COEF_CONST(0.962349827) }, 
    { COEF_CONST(0.984766325), COEF_CONST(0.977236734), COEF_CONST(0.966050157), COEF_CONST(0.951333663), COEF_CONST(0.944061881) }, 
    { COEF_CONST(0.980994305), COEF_CONST(0.969764715), COEF_CONST(0.951333663), COEF_CONST(0.933255062), COEF_CONST(0.922571949) }, 
    { COEF_CONST(0.977236734), COEF_CONST(0.958663671), COEF_CONST(0.936843519), COEF_CONST(0.915517901), COEF_CONST(0.898117847) }, 
    { COEF_CONST(0.99616963),  COEF_CONST(0.99616963),  COEF_CONST(0.992353931), COEF_CONST(0.992353931), COEF_CONST(0.99235393)  },
    { COEF_CONST(0.992353931), COEF_CONST(0.992353931), COEF_CONST(0.984766325), COEF_CONST(0.980994305), COEF_CONST(0.980994305) },
    { COEF_CONST(0.988552848), COEF_CONST(0.984766325), COEF_CONST(0.977236734), COEF_CONST(0.966050157), COEF_CONST(0.962349827) },
    { COEF_CONST(0.984766325), COEF_CONST(0.977236734), COEF_CONST(0.966050157), COEF_CONST(0.951333663), COEF_CONST(0.944061881) },
    { COEF_CONST(0.980994305), COEF_CONST(0.969764715), COEF_CONST(0.951333663), COEF_CONST(0.933255062), COEF_CONST(0.922571949) },
    { COEF_CONST(0.977236734), COEF_CONST(0.958663671), COEF_CONST(0.936843519), COEF_CONST(0.915517901), COEF_CONST(0.898117847) },
    { COEF_CONST(0.969764715), COEF_CONST(0.947691892), COEF_CONST(0.922571949), COEF_CONST(0.898117847), COEF_CONST(0.874311936) }
};

static const real_t g_decayslope[MAX_SA_BAND] = {
    FRAC_CONST(1),   FRAC_CONST(1),   FRAC_CONST(1),   FRAC_CONST(0.95),FRAC_CONST(0.9), FRAC_CONST(0.85), FRAC_CONST(0.8), 
    FRAC_CONST(0.75),FRAC_CONST(0.7), FRAC_CONST(0.65),FRAC_CONST(0.6), FRAC_CONST(0.55),FRAC_CONST(0.5),  FRAC_CONST(0.45), 
    FRAC_CONST(1),   FRAC_CONST(1),   FRAC_CONST(1),   FRAC_CONST(0.95),FRAC_CONST(0.9), FRAC_CONST(0.85), FRAC_CONST(0.8),
    FRAC_CONST(0.75),FRAC_CONST(0.7), FRAC_CONST(0.65),FRAC_CONST(0.6), FRAC_CONST(0.55),FRAC_CONST(0.5),  FRAC_CONST(0.45),
    FRAC_CONST(0.4), FRAC_CONST(0.35),FRAC_CONST(0.3), FRAC_CONST(0.25),FRAC_CONST(0.2), FRAC_CONST(0.15), FRAC_CONST(0.1),
    FRAC_CONST(0.05),FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),    FRAC_CONST(0), 
    FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),    FRAC_CONST(0),  
    FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),    FRAC_CONST(0),   
    FRAC_CONST(0.05),FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),    FRAC_CONST(0),
    FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),    FRAC_CONST(0),
    FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0),    FRAC_CONST(0),
    FRAC_CONST(0),   FRAC_CONST(0),   FRAC_CONST(0)
};



@@ 246,18 246,18 @@ static const real_t sa_sqrt_1_minus[8][2] = {
    { FRAC_CONST(0.929071574),  FRAC_CONST(0)           }
};

static const uint8_t sa_freq_scale[9] = 
static const uint8_t sa_freq_scale[9] =
{
    0, 1, 2, 3, 5, 7, 10, 13, 23
};

static const uint8_t pan_freq_scale[21] = 
static const uint8_t pan_freq_scale[21] =
{
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
    11, 12, 13, 14, 15, 18, 22, 26, 32, 64
};

static const uint8_t pan_quant_class[20] = 
static const uint8_t pan_quant_class[20] =
{
    0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    2, 2, 2, 2, 3, 3, 3, 4, 4, 4


@@ 265,32 265,32 @@ static const uint8_t pan_quant_class[20] =

/* Inverse mapping lookup */
static const uint8_t pan_inv_freq[64] = {
     0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 
    15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 
     0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
    15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18,
    19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
    19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19
};

static const uint8_t sa_inv_freq[MAX_SA_BAND] = {
    0, 1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6,
    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 
    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 
    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
    7, 7, 7, 7, 7, 7, 7
};

static const real_t filter_coeff[] = 
static const real_t filter_coeff[] =
{
    FRAC_CONST(0.65143905754106),
    FRAC_CONST(0.56471812200776),
    FRAC_CONST(0.48954165955695)
};

static const uint8_t delay_length[3] = 
static const uint8_t delay_length[3] =
{
    3, 4, 5
};

static const real_t delay_fraction[] = 
static const real_t delay_fraction[] =
{
    FRAC_CONST(0.43), FRAC_CONST(0.75), FRAC_CONST(0.347)
};


@@ 534,7 534,7 @@ static int8_t sa_delta_clip(drm_ps_info *ps, int8_t i)
}

static int8_t pan_delta_clip(drm_ps_info *ps, int8_t i)
{   
{
    if (i < -7) {
        /* printf(" PANminclip %d", i); */
        ps->pan_decode_error = 1;


@@ 547,31 547,31 @@ static int8_t pan_delta_clip(drm_ps_info *ps, int8_t i)
        return i;
}

static void drm_ps_delta_decode(drm_ps_info *ps) 
static void drm_ps_delta_decode(drm_ps_info *ps)
{
    uint8_t band;    
    uint8_t band;

    if (ps->bs_enable_sa) 
    {    
        if (ps->bs_sa_dt_flag && !ps->g_last_had_sa) 
        {        
    if (ps->bs_enable_sa)
    {
        if (ps->bs_sa_dt_flag && !ps->g_last_had_sa)
        {
            /* wait until we get a DT frame */
            ps->bs_enable_sa = 0;
        } else if (ps->bs_sa_dt_flag) {
            /* DT frame, we have a last frame, so we can decode */
            ps->g_sa_index[0] = sa_delta_clip(ps, ps->g_prev_sa_index[0]+ps->bs_sa_data[0]);            
            ps->g_sa_index[0] = sa_delta_clip(ps, ps->g_prev_sa_index[0]+ps->bs_sa_data[0]);
        } else {
            /* DF always decodable */
            ps->g_sa_index[0] = sa_delta_clip(ps,ps->bs_sa_data[0]);          
            ps->g_sa_index[0] = sa_delta_clip(ps,ps->bs_sa_data[0]);
        }
        

        for (band = 1; band < DRM_NUM_SA_BANDS; band++)
        {   
        {
            if (ps->bs_sa_dt_flag && ps->g_last_had_sa)
            {
                ps->g_sa_index[band] = sa_delta_clip(ps, ps->g_prev_sa_index[band] + ps->bs_sa_data[band]);
            } else if (!ps->bs_sa_dt_flag) {
                ps->g_sa_index[band] = sa_delta_clip(ps, ps->g_sa_index[band-1] + ps->bs_sa_data[band]);                
                ps->g_sa_index[band] = sa_delta_clip(ps, ps->g_sa_index[band-1] + ps->bs_sa_data[band]);
            }
        }
    }


@@ 583,36 583,36 @@ static void drm_ps_delta_decode(drm_ps_info *ps)
        ps->bs_enable_pan = ps->g_last_had_pan;
        ps->bs_enable_sa = ps->g_last_had_sa;
    }
    
       
    if (ps->bs_enable_sa) 
    {    


    if (ps->bs_enable_sa)
    {
        if (ps->sa_decode_error) {
            for (band = 0; band < DRM_NUM_SA_BANDS; band++)
            {   
            {
                ps->g_sa_index[band] = ps->g_last_good_sa_index[band];
            }
        } else {
            for (band = 0; band < DRM_NUM_SA_BANDS; band++)
            {   
            {
                ps->g_last_good_sa_index[band] = ps->g_sa_index[band];
            }
        }
    }
    
    if (ps->bs_enable_pan) 

    if (ps->bs_enable_pan)
    {
        if (ps->bs_pan_dt_flag && !ps->g_last_had_pan) 
        if (ps->bs_pan_dt_flag && !ps->g_last_had_pan)
        {
            ps->bs_enable_pan = 0;
        }  else if (ps->bs_pan_dt_flag) {   
        }  else if (ps->bs_pan_dt_flag) {
            ps->g_pan_index[0] = pan_delta_clip(ps,  ps->g_prev_pan_index[0]+ps->bs_pan_data[0]);
        } else {
            ps->g_pan_index[0] = pan_delta_clip(ps, ps->bs_pan_data[0]);
        }
    

        for (band = 1; band < DRM_NUM_PAN_BANDS; band++)
        {   
        {
            if (ps->bs_pan_dt_flag && ps->g_last_had_pan)
            {
                ps->g_pan_index[band] = pan_delta_clip(ps, ps->g_prev_pan_index[band] + ps->bs_pan_data[band]);


@@ 620,23 620,23 @@ static void drm_ps_delta_decode(drm_ps_info *ps)
                ps->g_pan_index[band] = pan_delta_clip(ps, ps->g_pan_index[band-1] + ps->bs_pan_data[band]);
            }
        }
 

        if (ps->pan_decode_error) {
            for (band = 0; band < DRM_NUM_PAN_BANDS; band++)
            {   
            {
                ps->g_pan_index[band] = ps->g_last_good_pan_index[band];
            }
        } else {
            for (band = 0; band < DRM_NUM_PAN_BANDS; band++)
            {   
            {
                ps->g_last_good_pan_index[band] = ps->g_pan_index[band];
            }
        }
    }
}

static void drm_calc_sa_side_signal(drm_ps_info *ps, qmf_t X[38][64]) 
{      
static void drm_calc_sa_side_signal(drm_ps_info *ps, qmf_t X[38][64])
{
    uint8_t s, b, k;
    complex_t qfrac, tmp0, tmp, in, R0;
    real_t peakdiff;


@@ 652,7 652,7 @@ static void drm_calc_sa_side_signal(drm_ps_info *ps, qmf_t X[38][64])

    for (b = 0; b < sa_freq_scale[DRM_NUM_SA_BANDS]; b++)
    {
        /* set delay indices */    
        /* set delay indices */
        for (k = 0; k < NUM_OF_LINKS; k++)
            temp_delay_ser[k] = ps->delay_buf_index_ser[k];



@@ 660,7 660,7 @@ static void drm_calc_sa_side_signal(drm_ps_info *ps, qmf_t X[38][64])
        IM(Phi_Fract) = IM(Phi_Fract_Qmf[b]);

        for (s = 0; s < NUM_OF_SUBSAMPLES; s++)
        {            
        {
            const real_t gamma = REAL_CONST(1.5);
            const real_t sigma = REAL_CONST(1.5625);



@@ 695,8 695,8 @@ static void drm_calc_sa_side_signal(drm_ps_info *ps, qmf_t X[38][64])
            } else {
                transratio = MUL_R(DIV_R(nrg, MUL_R(peakdiff, gamma)), sigma);
            }
            
            for (k = 0; k < NUM_OF_LINKS; k++) 

            for (k = 0; k < NUM_OF_LINKS; k++)
            {
                new_delay_slopes[k] = MUL_F(g_decayslope[b], filter_coeff[k]);
            }


@@ 708,14 708,14 @@ static void drm_calc_sa_side_signal(drm_ps_info *ps, qmf_t X[38][64])
            IM(ps->d_buff[0][b]) = IM(ps->d_buff[1][b]);

            RE(ps->d_buff[1][b]) = RE(in);
            IM(ps->d_buff[1][b]) = IM(in);               
            IM(ps->d_buff[1][b]) = IM(in);

            ComplexMult(&RE(tmp), &IM(tmp), RE(tmp0), IM(tmp0), RE(Phi_Fract), IM(Phi_Fract));

            RE(R0) = RE(tmp);
            IM(R0) = IM(tmp);

            for (k = 0; k < NUM_OF_LINKS; k++) 
            for (k = 0; k < NUM_OF_LINKS; k++)
            {
                RE(qfrac) = RE(Q_Fract_allpass_Qmf[b][k]);
                IM(qfrac) = IM(Q_Fract_allpass_Qmf[b][k]);


@@ 743,19 743,19 @@ static void drm_calc_sa_side_signal(drm_ps_info *ps, qmf_t X[38][64])
                if (++temp_delay_ser[k] >= delay_length[k])
                    temp_delay_ser[k] = 0;
            }
        }       
        }
    }

    for (k = 0; k < NUM_OF_LINKS; k++)
        ps->delay_buf_index_ser[k] = temp_delay_ser[k];
}

static void drm_add_ambiance(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64]) 
static void drm_add_ambiance(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64])
{
    uint8_t s, b, ifreq, qclass;    
    uint8_t s, b, ifreq, qclass;
    real_t sa_map[MAX_SA_BAND], sa_dir_map[MAX_SA_BAND], k_sa_map[MAX_SA_BAND], k_sa_dir_map[MAX_SA_BAND];
    real_t new_dir_map, new_sa_map;
    

    if (ps->bs_enable_sa)
    {
        /* Instead of dequantization and mapping, we use an inverse mapping


@@ 770,11 770,11 @@ static void drm_add_ambiance(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_righ
            sa_map[b]  = sa_quant[ps->g_prev_sa_index[ifreq]][qclass];
            new_sa_map = sa_quant[ps->g_sa_index[ifreq]][qclass];

            k_sa_map[b] = MUL_F(inv_f_num_of_subsamples, (new_sa_map - sa_map[b]));    
            
            sa_dir_map[b] = sa_sqrt_1_minus[ps->g_prev_sa_index[ifreq]][qclass];                        
            k_sa_map[b] = MUL_F(inv_f_num_of_subsamples, (new_sa_map - sa_map[b]));

            sa_dir_map[b] = sa_sqrt_1_minus[ps->g_prev_sa_index[ifreq]][qclass];
            new_dir_map   = sa_sqrt_1_minus[ps->g_sa_index[ifreq]][qclass];
                                                   

            k_sa_dir_map[b] = MUL_F(inv_f_num_of_subsamples, (new_dir_map - sa_dir_map[b]));

        }


@@ 782,35 782,35 @@ static void drm_add_ambiance(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_righ
        for (s = 0; s < NUM_OF_SUBSAMPLES; s++)
        {
            for (b = 0; b < sa_freq_scale[DRM_NUM_SA_BANDS]; b++)
            {                
            {
                QMF_RE(X_right[s][b]) = MUL_F(QMF_RE(X_left[s][b]), sa_dir_map[b]) - MUL_F(QMF_RE(ps->SA[s][b]), sa_map[b]);
                QMF_IM(X_right[s][b]) = MUL_F(QMF_IM(X_left[s][b]), sa_dir_map[b]) - MUL_F(QMF_IM(ps->SA[s][b]), sa_map[b]);
                QMF_RE(X_left[s][b]) = MUL_F(QMF_RE(X_left[s][b]), sa_dir_map[b]) + MUL_F(QMF_RE(ps->SA[s][b]), sa_map[b]);
                QMF_IM(X_left[s][b]) = MUL_F(QMF_IM(X_left[s][b]), sa_dir_map[b]) + MUL_F(QMF_IM(ps->SA[s][b]), sa_map[b]);
      

                sa_map[b]     += k_sa_map[b];
                sa_dir_map[b] += k_sa_dir_map[b];
            }
            for (b = sa_freq_scale[DRM_NUM_SA_BANDS]; b < NUM_OF_QMF_CHANNELS; b++)
            {                
            {
                QMF_RE(X_right[s][b]) = QMF_RE(X_left[s][b]);
                QMF_IM(X_right[s][b]) = QMF_IM(X_left[s][b]);
            }
        }
    } 
    }
    else {
        for (s = 0; s < NUM_OF_SUBSAMPLES; s++)
        {
            for (b = 0; b < NUM_OF_QMF_CHANNELS; b++)
            {
                QMF_RE(X_right[s][b]) = QMF_RE(X_left[s][b]);
                QMF_IM(X_right[s][b]) = QMF_IM(X_left[s][b]);                
                QMF_IM(X_right[s][b]) = QMF_IM(X_left[s][b]);
            }
        }
    }
}

static void drm_add_pan(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64]) 
static void drm_add_pan(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64])
{
    uint8_t s, b, qclass, ifreq;
    real_t tmp, coeff1, coeff2;


@@ 820,7 820,7 @@ static void drm_add_pan(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38]

    if (ps->bs_enable_pan)
    {
        for (b = 0; b < NUM_OF_QMF_CHANNELS; b++) 
        for (b = 0; b < NUM_OF_QMF_CHANNELS; b++)
        {
            /* Instead of dequantization, 20->64 mapping and 2^G(x,y) we do an
               inverse mapping 64->20 and look up the 2^G(x,y) values directly */


@@ 829,7 829,7 @@ static void drm_add_pan(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38]

            if (ps->g_prev_pan_index[ifreq] >= 0)
            {
                pan_base[b] = pan_pow_2_pos[ps->g_prev_pan_index[ifreq]][qclass]; 
                pan_base[b] = pan_pow_2_pos[ps->g_prev_pan_index[ifreq]][qclass];
            } else {
                pan_base[b] = pan_pow_2_neg[-ps->g_prev_pan_index[ifreq]][qclass];
            }


@@ 838,7 838,7 @@ static void drm_add_pan(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38]
            /* a en b can be negative so we may need to inverse parts */
            if (ps->g_pan_index[ifreq] >= 0)
            {
                if (ps->g_prev_pan_index[ifreq] >= 0) 
                if (ps->g_prev_pan_index[ifreq] >= 0)
                {
                    pan_delta[b] = MUL_C(pan_pow_2_30_pos[ps->g_pan_index[ifreq]][qclass],
                                         pan_pow_2_30_neg[ps->g_prev_pan_index[ifreq]][qclass]);


@@ 847,7 847,7 @@ static void drm_add_pan(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38]
                                         pan_pow_2_30_pos[-ps->g_prev_pan_index[ifreq]][qclass]);
                }
            } else {
                if (ps->g_prev_pan_index[ifreq] >= 0) 
                if (ps->g_prev_pan_index[ifreq] >= 0)
                {
                    pan_delta[b] = MUL_C(pan_pow_2_30_neg[-ps->g_pan_index[ifreq]][qclass],
                                         pan_pow_2_30_neg[ps->g_prev_pan_index[ifreq]][qclass]);


@@ 866,7 866,7 @@ static void drm_add_pan(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38]
                tmp = pan_base[b];

                coeff2 = DIV_R(REAL_CONST(2.0), (REAL_CONST(1.0) + tmp));
                coeff1 = MUL_R(coeff2, tmp);                
                coeff1 = MUL_R(coeff2, tmp);

                QMF_RE(temp_l) = QMF_RE(X_left[s][b]);
                QMF_IM(temp_l) = QMF_IM(X_left[s][b]);


@@ 877,20 877,20 @@ static void drm_add_pan(drm_ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38]
                QMF_IM(X_left[s][b]) = MUL_R(QMF_IM(temp_l), coeff1);
                QMF_RE(X_right[s][b]) = MUL_R(QMF_RE(temp_r), coeff2);
                QMF_IM(X_right[s][b]) = MUL_R(QMF_IM(temp_r), coeff2);
                

                /* 2^(a+k*b) = 2^a * 2^b * ... * 2^b */
                /*                   ^^^^^^^^^^^^^^^ k times */
                pan_base[b] = MUL_C(pan_base[b], pan_delta[b]);
            }           
        }       
    }     
            }
        }
    }
}

drm_ps_info *drm_ps_init(void)
{
    drm_ps_info *ps = (drm_ps_info*)faad_malloc(sizeof(drm_ps_info));

    memset(ps, 0, sizeof(drm_ps_info));     
    memset(ps, 0, sizeof(drm_ps_info));

    return ps;
}


@@ 902,14 902,14 @@ void drm_ps_free(drm_ps_info *ps)

/* main DRM PS decoding function */
uint8_t drm_ps_decode(drm_ps_info *ps, uint8_t guess, qmf_t X_left[38][64], qmf_t X_right[38][64])
{       
    if (ps == NULL) 
{
    if (ps == NULL)
    {
        memcpy(X_right, X_left, sizeof(qmf_t)*30*64);
        return 0;    
    }     
        return 0;
    }

    if (!ps->drm_ps_data_available && !guess) 
    if (!ps->drm_ps_data_available && !guess)
    {
        memcpy(X_right, X_left, sizeof(qmf_t)*30*64);
        memset(ps->g_prev_sa_index, 0, sizeof(ps->g_prev_sa_index));


@@ 924,13 924,13 @@ uint8_t drm_ps_decode(drm_ps_info *ps, uint8_t guess, qmf_t X_left[38][64], qmf_
        ps->sa_decode_error = 0;
        ps->pan_decode_error = 0;
        drm_ps_delta_decode(ps);
    } else 
    } else
    {
        ps->sa_decode_error = 1;
        ps->pan_decode_error = 1;
        /* don't even bother decoding */
    }
  

    ps->drm_ps_data_available = 0;

    drm_calc_sa_side_signal(ps, X_left);


@@ 938,19 938,19 @@ uint8_t drm_ps_decode(drm_ps_info *ps, uint8_t guess, qmf_t X_left[38][64], qmf_

    if (ps->bs_enable_sa)
    {
        ps->g_last_had_sa = 1;        
        ps->g_last_had_sa = 1;

        memcpy(ps->g_prev_sa_index, ps->g_sa_index, sizeof(int8_t) * DRM_NUM_SA_BANDS);       
        memcpy(ps->g_prev_sa_index, ps->g_sa_index, sizeof(int8_t) * DRM_NUM_SA_BANDS);

    } else {
        ps->g_last_had_sa = 0;
    }
    

    if (ps->bs_enable_pan)
    {
        drm_add_pan(ps, X_left, X_right);
    
        ps->g_last_had_pan = 1;        

        ps->g_last_had_pan = 1;

        memcpy(ps->g_prev_pan_index, ps->g_pan_index, sizeof(int8_t) * DRM_NUM_PAN_BANDS);


M libfaad/drm_dec.h => libfaad/drm_dec.h +13 -13
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 48,7 48,7 @@ extern "C" {
#define MAX_DELAY                5

typedef struct
{   
{
    uint8_t drm_ps_data_available;
    uint8_t bs_enable_sa;
    uint8_t bs_enable_pan;


@@ 61,28 61,28 @@ typedef struct

    int8_t bs_sa_data[DRM_NUM_SA_BANDS];
    int8_t bs_pan_data[DRM_NUM_PAN_BANDS];
        

    int8_t g_sa_index[DRM_NUM_SA_BANDS];
    int8_t g_pan_index[DRM_NUM_PAN_BANDS];                        
    int8_t g_pan_index[DRM_NUM_PAN_BANDS];
    int8_t g_prev_sa_index[DRM_NUM_SA_BANDS];
    int8_t g_prev_pan_index[DRM_NUM_PAN_BANDS];    
    int8_t g_prev_pan_index[DRM_NUM_PAN_BANDS];

    int8_t sa_decode_error;
    int8_t pan_decode_error;

    int8_t g_last_good_sa_index[DRM_NUM_SA_BANDS];
    int8_t g_last_good_pan_index[DRM_NUM_PAN_BANDS];
    
    qmf_t SA[NUM_OF_SUBSAMPLES][MAX_SA_BAND];               

    qmf_t SA[NUM_OF_SUBSAMPLES][MAX_SA_BAND];

    complex_t d_buff[2][MAX_SA_BAND];
    complex_t d2_buff[NUM_OF_LINKS][MAX_DELAY][MAX_SA_BAND];

    uint8_t delay_buf_index_ser[NUM_OF_LINKS];    
            
    uint8_t delay_buf_index_ser[NUM_OF_LINKS];

    real_t prev_nrg[MAX_SA_BAND];
    real_t prev_peakdiff[MAX_SA_BAND];
    real_t peakdecay_fast[MAX_SA_BAND]; 
    real_t peakdecay_fast[MAX_SA_BAND];
} drm_ps_info;



M libfaad/error.c => libfaad/error.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/error.h => libfaad/error.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/filtbank.c => libfaad/filtbank.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/filtbank.h => libfaad/filtbank.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/fixed.h => libfaad/fixed.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/hcr.c => libfaad/hcr.c +84 -84
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 37,15 37,15 @@
#include "specrec.h"
#include "huffman.h"

/* ISO/IEC 14496-3/Amd.1 
 * 8.5.3.3: Huffman Codeword Reordering for AAC spectral data (HCR) 
/* ISO/IEC 14496-3/Amd.1
 * 8.5.3.3: Huffman Codeword Reordering for AAC spectral data (HCR)
 *
 * HCR devides the spectral data in known fixed size segments, and 
 * sorts it by the importance of the data. The importance is firstly 
 * the (lower) position in the spectrum, and secondly the largest 
 * value in the used codebook. 
 * HCR devides the spectral data in known fixed size segments, and
 * sorts it by the importance of the data. The importance is firstly
 * the (lower) position in the spectrum, and secondly the largest
 * value in the used codebook.
 * The most important data is written at the start of each segment
 * (at known positions), the remaining data is interleaved inbetween, 
 * (at known positions), the remaining data is interleaved inbetween,
 * with the writing direction alternating.
 * Data length is not increased.
*/


@@ 60,10 60,10 @@
#define VCB11_FIRST 16
#define VCB11_LAST  31

static const uint8_t PreSortCB_STD[NUM_CB] = 
static const uint8_t PreSortCB_STD[NUM_CB] =
    { 11, 9, 7, 5, 3, 1};

static const uint8_t PreSortCB_ER[NUM_CB_ER] = 
static const uint8_t PreSortCB_ER[NUM_CB_ER] =
    { 11, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 9, 7, 5, 3, 1};

/* 8.5.3.3.2 Derivation of segment width */


@@ 74,7 74,7 @@ static const uint8_t maxCwLen[MAX_CB] = {0, 11, 9, 20, 16, 13, 11, 14, 12, 17, 1
#define segmentWidth(cb)    min(maxCwLen[cb], ics->length_of_longest_codeword)

/* bit-twiddling helpers */
static const uint8_t  S[] = {1, 2, 4, 8, 16};    
static const uint8_t  S[] = {1, 2, 4, 8, 16};
static const uint32_t B[] = {0x55555555, 0x33333333, 0x0F0F0F0F, 0x00FF00FF, 0x0000FFFF};

typedef struct


@@ 88,11 88,11 @@ typedef struct
/* rewind and reverse */
/* 32 bit version */
static uint32_t rewrev_word(uint32_t v, const uint8_t len)
{  
{
    /* 32 bit reverse */
    v = ((v >> S[0]) & B[0]) | ((v << S[0]) & ~B[0]); 
    v = ((v >> S[1]) & B[1]) | ((v << S[1]) & ~B[1]); 
    v = ((v >> S[2]) & B[2]) | ((v << S[2]) & ~B[2]); 
    v = ((v >> S[0]) & B[0]) | ((v << S[0]) & ~B[0]);
    v = ((v >> S[1]) & B[1]) | ((v << S[1]) & ~B[1]);
    v = ((v >> S[2]) & B[2]) | ((v << S[2]) & ~B[2]);
    v = ((v >> S[3]) & B[3]) | ((v << S[3]) & ~B[3]);
    v = ((v >> S[4]) & B[4]) | ((v << S[4]) & ~B[4]);



@@ 104,7 104,7 @@ static uint32_t rewrev_word(uint32_t v, const uint8_t len)

/* 64 bit version */
static void rewrev_lword(uint32_t *hi, uint32_t *lo, const uint8_t len)
{   
{
    if (len <= 32) {
        *hi = 0;
        *lo = rewrev_word(*lo, len);


@@ 113,22 113,22 @@ static void rewrev_lword(uint32_t *hi, uint32_t *lo, const uint8_t len)
        uint32_t t = *hi, v = *lo;

        /* double 32 bit reverse */
        v = ((v >> S[0]) & B[0]) | ((v << S[0]) & ~B[0]); 
        t = ((t >> S[0]) & B[0]) | ((t << S[0]) & ~B[0]); 
        v = ((v >> S[1]) & B[1]) | ((v << S[1]) & ~B[1]); 
        t = ((t >> S[1]) & B[1]) | ((t << S[1]) & ~B[1]); 
        v = ((v >> S[2]) & B[2]) | ((v << S[2]) & ~B[2]); 
        t = ((t >> S[2]) & B[2]) | ((t << S[2]) & ~B[2]); 
        v = ((v >> S[0]) & B[0]) | ((v << S[0]) & ~B[0]);
        t = ((t >> S[0]) & B[0]) | ((t << S[0]) & ~B[0]);
        v = ((v >> S[1]) & B[1]) | ((v << S[1]) & ~B[1]);
        t = ((t >> S[1]) & B[1]) | ((t << S[1]) & ~B[1]);
        v = ((v >> S[2]) & B[2]) | ((v << S[2]) & ~B[2]);
        t = ((t >> S[2]) & B[2]) | ((t << S[2]) & ~B[2]);
        v = ((v >> S[3]) & B[3]) | ((v << S[3]) & ~B[3]);
        t = ((t >> S[3]) & B[3]) | ((t << S[3]) & ~B[3]);
        v = ((v >> S[4]) & B[4]) | ((v << S[4]) & ~B[4]);                
        v = ((v >> S[4]) & B[4]) | ((v << S[4]) & ~B[4]);
        t = ((t >> S[4]) & B[4]) | ((t << S[4]) & ~B[4]);

        /* last 32<>32 bit swap is implicit below */
        

        /* shift off low bits (this is really only one 64 bit shift) */
        *lo = (t >> (64 - len)) | (v << (len - 32));
        *hi = v >> (64 - len);          
        *hi = v >> (64 - len);
    }
}



@@ 150,7 150,7 @@ static void concat_bits(bits_t *b, bits_t *a)

    al = a->bufa;
    ah = a->bufb;
    

    if (b->len > 32)
    {
        /* maskoff superfluous high b bits */


@@ 161,7 161,7 @@ static void concat_bits(bits_t *b, bits_t *a)
        al = 0;
    } else {
        bl = b->bufa & ((1 << (b->len)) - 1);
        bh = 0;   
        bh = 0;
        ah = (ah << (b->len)) | (al >> (32 - b->len));
        al = al << b->len;
    }


@@ 172,7 172,7 @@ static void concat_bits(bits_t *b, bits_t *a)

    b->len += a->len;
}
     

static uint8_t is_good_cb(uint8_t this_CB, uint8_t this_sec_CB)
{
    /* only want spectral data CB's */


@@ 190,20 190,20 @@ static uint8_t is_good_cb(uint8_t this_CB, uint8_t this_sec_CB)
    }
    return 0;
}
                    

static void read_segment(bits_t *segment, uint8_t segwidth, bitfile *ld)
{
    segment->len = segwidth;

     if (segwidth > 32)
     {
        segment->bufb = faad_getbits(ld, segwidth - 32);        
        segment->bufa = faad_getbits(ld, 32);        
        segment->bufb = faad_getbits(ld, segwidth - 32);
        segment->bufa = faad_getbits(ld, 32);

    } else {
        segment->bufa = faad_getbits(ld, segwidth);
        segment->bufb = 0;        
    }    
        segment->bufb = 0;
    }
}

static void fill_in_codeword(codeword_t *codeword, uint16_t index, uint16_t sp, uint8_t cb)


@@ 214,11 214,11 @@ static void fill_in_codeword(codeword_t *codeword, uint16_t index, uint16_t sp, 
    codeword[index].bits.len = 0;
}

uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics, 
uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics,
                                bitfile *ld, int16_t *spectral_data)
{   
{
    uint16_t PCWs_done;
    uint16_t numberOfSegments, numberOfSets, numberOfCodewords;  
    uint16_t numberOfSegments, numberOfSets, numberOfCodewords;

    codeword_t codeword[512];
    bits_t segment[512];


@@ 226,11 226,11 @@ uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics,
    uint16_t sp_offset[8];
    uint16_t g, i, sortloop, set, bitsread;
    /*uint16_t bitsleft, codewordsleft*/;
    uint8_t w_idx, sfb, this_CB, last_CB, this_sec_CB; 
    
    uint8_t w_idx, sfb, this_CB, last_CB, this_sec_CB;

    const uint16_t nshort = hDecoder->frameLength/8;
    const uint16_t sp_data_len = ics->length_of_reordered_spectral_data;
    

    const uint8_t *PreSortCb;

    /* no data (e.g. silence) */


@@ 242,7 242,7 @@ uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics,
        return 10;

    if (sp_data_len < ics->length_of_longest_codeword)
        return 10; 
        return 10;

    sp_offset[0] = 0;
    for (g = 1; g < ics->num_window_groups; g++)


@@ 265,13 265,13 @@ uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics,
        PreSortCb = PreSortCB_STD;
        last_CB = NUM_CB;
    }
 

    /* step 1: decode PCW's (set 0), and stuff data in easier-to-use format */
    for (sortloop = 0; sortloop < last_CB; sortloop++)
    {
        /* select codebook to process this pass */
        this_CB = PreSortCb[sortloop];
        

        /* loop over sfbs */
        for (sfb = 0; sfb < ics->max_sfb; sfb++)
        {


@@ 284,34 284,34 @@ uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics,
                    {
                        /* check whether sfb used here is the one we want to process */
                        if ((ics->sect_start[g][i] <= sfb) && (ics->sect_end[g][i] > sfb))
                        {                            
                        {
                            /* check whether codebook used here is the one we want to process */
                            this_sec_CB = ics->sect_cb[g][i];
                 
                            if (is_good_cb(this_CB, this_sec_CB))                              

                            if (is_good_cb(this_CB, this_sec_CB))
                            {
                                /* precalculate some stuff */
                                uint16_t sect_sfb_size = ics->sect_sfb_offset[g][sfb+1] - ics->sect_sfb_offset[g][sfb];
                                uint8_t inc = (this_sec_CB < FIRST_PAIR_HCB) ? QUAD_LEN : PAIR_LEN;
                                uint16_t group_cws_count = (4*ics->window_group_length[g])/inc;
                                uint8_t segwidth = segmentWidth(this_sec_CB);
                                uint16_t cws;                                
                                uint16_t cws;

                                /* read codewords until end of sfb or end of window group (shouldn't only 1 trigger?) */                                 
                                /* read codewords until end of sfb or end of window group (shouldn't only 1 trigger?) */
                                for (cws = 0; (cws < group_cws_count) && ((cws + w_idx*group_cws_count) < sect_sfb_size); cws++)
                                {
                                    uint16_t sp = sp_offset[g] + ics->sect_sfb_offset[g][sfb] + inc * (cws + w_idx*group_cws_count);                                   
                                    uint16_t sp = sp_offset[g] + ics->sect_sfb_offset[g][sfb] + inc * (cws + w_idx*group_cws_count);

                                    /* read and decode PCW */
                                    if (!PCWs_done)
                                    {         
                                    {
                                        /* read in normal segments */
                                        if (bitsread + segwidth <= sp_data_len)
                                        {                                            
                                            read_segment(&segment[numberOfSegments], segwidth, ld);                          
                                        {
                                            read_segment(&segment[numberOfSegments], segwidth, ld);
                                            bitsread += segwidth;
                                            
                                            huffman_spectral_data_2(this_sec_CB, &segment[numberOfSegments], &spectral_data[sp]);                                            

                                            huffman_spectral_data_2(this_sec_CB, &segment[numberOfSegments], &spectral_data[sp]);

                                            /* keep leftover bits */
                                            rewrev_bits(&segment[numberOfSegments]);


@@ 322,48 322,48 @@ uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics,
                                               this in earlier because it might not fit in 64 bits. since we already
                                               decoded (and removed) the PCW it is now guaranteed to fit */
                                            if (bitsread < sp_data_len)
                                            {                                                
                                                const uint8_t additional_bits = sp_data_len - bitsread;                                               
                                            {
                                                const uint8_t additional_bits = sp_data_len - bitsread;

                                                read_segment(&segment[numberOfSegments], additional_bits, ld);                                                
                                                read_segment(&segment[numberOfSegments], additional_bits, ld);
                                                segment[numberOfSegments].len += segment[numberOfSegments-1].len;
                                                rewrev_bits(&segment[numberOfSegments]);                                               
                                                rewrev_bits(&segment[numberOfSegments]);

                                                if (segment[numberOfSegments-1].len > 32)
                                                {
                                                    segment[numberOfSegments-1].bufb = segment[numberOfSegments].bufb + 
                                                    segment[numberOfSegments-1].bufb = segment[numberOfSegments].bufb +
                                                        showbits_hcr(&segment[numberOfSegments-1], segment[numberOfSegments-1].len - 32);
                                                    segment[numberOfSegments-1].bufa = segment[numberOfSegments].bufa + 
                                                    segment[numberOfSegments-1].bufa = segment[numberOfSegments].bufa +
                                                        showbits_hcr(&segment[numberOfSegments-1], 32);
                                                } else {
                                                    segment[numberOfSegments-1].bufa = segment[numberOfSegments].bufa + 
                                                    segment[numberOfSegments-1].bufa = segment[numberOfSegments].bufa +
                                                        showbits_hcr(&segment[numberOfSegments-1], segment[numberOfSegments-1].len);
                                                    segment[numberOfSegments-1].bufb = segment[numberOfSegments].bufb;
                                                }                                                
                                                }
                                                segment[numberOfSegments-1].len += additional_bits;
                                            }
                                            bitsread = sp_data_len;
                                            PCWs_done = 1;

                                            fill_in_codeword(codeword, 0, sp, this_sec_CB);                                            
                                            fill_in_codeword(codeword, 0, sp, this_sec_CB);
                                        }
                                    } else {    
                                        fill_in_codeword(codeword, numberOfCodewords - numberOfSegments, sp, this_sec_CB);                                         
                                    } else {
                                        fill_in_codeword(codeword, numberOfCodewords - numberOfSegments, sp, this_sec_CB);
                                    }
                                    numberOfCodewords++;
                                }                             
                                }
                            }
                        }
                    } 
                 } 
                    }
                 }
             }
         }
    }

    if (numberOfSegments == 0)
        return 10; 
        return 10;

    numberOfSets = numberOfCodewords / numberOfSegments;     
    numberOfSets = numberOfCodewords / numberOfSegments;

    /* step 2: decode nonPCWs */
    for (set = 1; set <= numberOfSets; set++)


@@ 386,21 386,21 @@ uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics,
                {
                    uint8_t tmplen;

                    if (codeword[codeword_idx].bits.len != 0)                   
                        concat_bits(&segment[segment_idx], &codeword[codeword_idx].bits);                            
                    
                    if (codeword[codeword_idx].bits.len != 0)
                        concat_bits(&segment[segment_idx], &codeword[codeword_idx].bits);

                    tmplen = segment[segment_idx].len;

                    if (huffman_spectral_data_2(codeword[codeword_idx].cb, &segment[segment_idx],
                                               &spectral_data[codeword[codeword_idx].sp_offset]) >= 0)
                    {
                        codeword[codeword_idx].decoded = 1;
                    } else 
                    {   
                    } else
                    {
                        codeword[codeword_idx].bits = segment[segment_idx];
                        codeword[codeword_idx].bits.len = tmplen;                        
                        codeword[codeword_idx].bits.len = tmplen;
                    }
                                            

                }
            }
        }


@@ 409,8 409,8 @@ uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics,
    }

#if 0 // Seems to give false errors
    bitsleft = 0;    
        
    bitsleft = 0;

    for (i = 0; i < numberOfSegments && !bitsleft; i++)
        bitsleft += segment[i].len;



@@ 418,9 418,9 @@ uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics,

    codewordsleft = 0;

    for (i = 0; (i < numberOfCodewords - numberOfSegments) && (!codewordsleft); i++)    
        if (!codeword[i].decoded)            
                codewordsleft++; 
    for (i = 0; (i < numberOfCodewords - numberOfSegments) && (!codewordsleft); i++)
        if (!codeword[i].decoded)
                codewordsleft++;

    if (codewordsleft) return 10;
#endif

M libfaad/huffman.c => libfaad/huffman.c +10 -10
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 357,7 357,7 @@ uint8_t huffman_spectral_data(uint8_t cb, bitfile *ld, int16_t *sp)
        return huffman_2step_pair_sign(cb, ld, sp);
    case 12: {
        uint8_t err = huffman_2step_pair(11, ld, sp);
        sp[0] = huffman_codebook(0); sp[1] = huffman_codebook(1); 
        sp[0] = huffman_codebook(0); sp[1] = huffman_codebook(1);
        return err; }
    case 11:
    {


@@ 446,7 446,7 @@ int8_t huffman_spectral_data_2(uint8_t cb, bits_t *ld, int16_t *sp)
            vcb11 = cb;
            cb = 11;
        }
            

        cw = showbits_hcr(ld, hcbN[cb]);
        offset = hcb_table[cb][cw].offset;
        extra_bits = hcb_table[cb][cw].extra_bits;


@@ 469,7 469,7 @@ int8_t huffman_spectral_data_2(uint8_t cb, bits_t *ld, int16_t *sp)
        while (!hcb3[offset].is_leaf)
        {
            uint8_t b;
            

            if ( get1bit_hcr(ld, &b) ) return -1;
            offset += hcb3[offset].data[b];
        }


@@ 488,7 488,7 @@ int8_t huffman_spectral_data_2(uint8_t cb, bits_t *ld, int16_t *sp)
        while (!hcb_bin_table[cb][offset].is_leaf)
        {
            uint8_t b;
            

            if (get1bit_hcr(ld, &b) ) return -1;
            offset += hcb_bin_table[cb][offset].data[b];
        }


@@ 527,7 527,7 @@ int8_t huffman_spectral_data_2(uint8_t cb, bits_t *ld, int16_t *sp)
                int32_t j;
                uint32_t off;

                neg = (sp[k] < 0) ? 1 : 0; 
                neg = (sp[k] < 0) ? 1 : 0;

                for (i = 4; ; i++)
                {


@@ 551,7 551,7 @@ int8_t huffman_spectral_data_2(uint8_t cb, bits_t *ld, int16_t *sp)
            /* this finds errors in the ESCAPE signal */
            vcb11_check_LAV(vcb11, sp);
        }
    }    
    }
    return ld->len;
}


M libfaad/huffman.h => libfaad/huffman.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/ic_predict.c => libfaad/ic_predict.c +5 -5
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 54,7 54,7 @@ static void flt_round(float32_t *pf)
        tmp |= (uint32_t)0x00010000;       /* insert 1 lsb */
        tmp2 = tmp;                             /* add 1 lsb and elided one */
        tmp &= (uint32_t)0xff800000;       /* extract exponent and sign */
        

        *pf = *(float32_t*)&tmp1 + *(float32_t*)&tmp2 - *(float32_t*)&tmp;
    } else {
        *pf = *(float32_t*)&tmp;

M libfaad/ic_predict.h => libfaad/ic_predict.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/iq_table.h => libfaad/iq_table.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/is.c => libfaad/is.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/is.h => libfaad/is.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/kbd_win.h => libfaad/kbd_win.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/lt_predict.c => libfaad/lt_predict.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/lt_predict.h => libfaad/lt_predict.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/mdct.c => libfaad/mdct.c +6 -6
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 32,11 32,11 @@
 * Fast (I)MDCT Implementation using (I)FFT ((Inverse) Fast Fourier Transform)
 * and consists of three steps: pre-(I)FFT complex multiplication, complex
 * (I)FFT, post-(I)FFT complex multiplication,
 * 
 *
 * As described in:
 *  P. Duhamel, Y. Mahieux, and J.P. Petit, "A Fast Algorithm for the
 *  Implementation of Filter Banks Based on 'Time Domain Aliasing
 *  Cancellation�," IEEE Proc. on ICASSP�91, 1991, pp. 2209-2212.
 *  Cancellation'," IEEE Proc. on ICASSP'91, 1991, pp. 2209-2212.
 *
 *
 * As of April 6th 2002 completely rewritten.

M libfaad/mdct.h => libfaad/mdct.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/mdct_tab.h => libfaad/mdct_tab.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/mp4.c => libfaad/mp4.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/mp4.h => libfaad/mp4.h +5 -5
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 42,7 42,7 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer,
                            uint32_t buffer_size,
                            mp4AudioSpecificConfig *mp4ASC,
                            program_config *pce, uint8_t short_form);
 

int8_t AudioSpecificConfigFromBitfile(bitfile *ld,
                                      mp4AudioSpecificConfig *mp4ASC,
                                      program_config *pce, uint32_t bsize, uint8_t short_form);

M libfaad/ms.c => libfaad/ms.c +5 -5
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 48,7 48,7 @@ void ms_decode(ic_stream *ics, ic_stream *icsr, real_t *l_spec, real_t *r_spec,

    if (ics->ms_mask_present >= 1)
    {
        for (g = 0; g < ics->num_window_groups; g++) 
        for (g = 0; g < ics->num_window_groups; g++)
        {
            for (b = 0; b < ics->window_group_length[g]; b++)
            {

M libfaad/ms.h => libfaad/ms.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/output.c => libfaad/output.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/output.h => libfaad/output.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/pns.c => libfaad/pns.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/pns.h => libfaad/pns.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/ps_dec.c => libfaad/ps_dec.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/ps_dec.h => libfaad/ps_dec.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/ps_tables.h => libfaad/ps_tables.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/pulse.c => libfaad/pulse.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/pulse.h => libfaad/pulse.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/rvlc.c => libfaad/rvlc.c +5 -5
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 454,7 454,7 @@ static int8_t rvlc_huffman_sf(bitfile *ld_sf, bitfile *ld_esc,
    int8_t index;
    uint32_t cw;
    rvlc_huff_table *h = book_rvlc;
    

    i = h->len;
    if (direction > 0)
        cw = faad_getbits(ld_sf, i DEBUGVAR(1,0,""));

M libfaad/rvlc.h => libfaad/rvlc.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_dct.c => libfaad/sbr_dct.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_dct.h => libfaad/sbr_dct.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_dec.c => libfaad/sbr_dec.c +6 -6
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 166,7 166,7 @@ void sbrDecodeEnd(sbr_info *sbr)
        }

#ifdef PS_DEC
        if (sbr->ps != NULL) 
        if (sbr->ps != NULL)
            ps_free(sbr->ps);
#endif



@@ 205,7 205,7 @@ void sbrReset(sbr_info *sbr)

    memset(sbr->Xsbr[0], 0, (sbr->numTimeSlotsRate+sbr->tHFGen)*64 * sizeof(qmf_t));
    memset(sbr->Xsbr[1], 0, (sbr->numTimeSlotsRate+sbr->tHFGen)*64 * sizeof(qmf_t));
    

    sbr->GQ_ringbuf_index[0] = 0;
    sbr->GQ_ringbuf_index[1] = 0;
    sbr->header_count = 0;

M libfaad/sbr_dec.h => libfaad/sbr_dec.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_e_nf.c => libfaad/sbr_e_nf.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_e_nf.h => libfaad/sbr_e_nf.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_fbt.c => libfaad/sbr_fbt.c +5 -5
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 80,7 80,7 @@ uint8_t qmf_start_channel(uint8_t bs_start_freq, uint8_t bs_samplerate_mode,
    {
        return startMin + offset[offsetIndex][bs_start_freq];

#if 0 /* replaced by offsetIndexTable */ 
#if 0 /* replaced by offsetIndexTable */
        switch (sample_rate)
        {
        case 16000:

M libfaad/sbr_fbt.h => libfaad/sbr_fbt.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_hfadj.c => libfaad/sbr_hfadj.c +26 -26
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 396,16 396,16 @@ static const real_t log_Qplus1_pan[31][13] = {
};

static const real_t log_Qplus1[31] = {
    REAL_CONST(6.022367813028454), REAL_CONST(5.044394119358453), REAL_CONST(4.087462841250339), 
    REAL_CONST(3.169925001442313), REAL_CONST(2.321928094887362), REAL_CONST(1.584962500721156), 
    REAL_CONST(1.000000000000000), REAL_CONST(0.584962500721156), REAL_CONST(0.321928094887362), 
    REAL_CONST(0.169925001442312), REAL_CONST(0.087462841250339), REAL_CONST(0.044394119358453), 
    REAL_CONST(0.022367813028455), REAL_CONST(0.011227255423254), REAL_CONST(0.005624549193878), 
    REAL_CONST(0.002815015607054), REAL_CONST(0.001408194392808), REAL_CONST(0.000704269011247), 
    REAL_CONST(0.000352177480301), REAL_CONST(0.000176099486443), REAL_CONST(0.000088052430122), 
    REAL_CONST(0.000044026886827), REAL_CONST(0.000022013611360), REAL_CONST(0.000011006847667), 
    REAL_CONST(0.000005503434331), REAL_CONST(0.000002751719790), REAL_CONST(0.000001375860551), 
    REAL_CONST(0.000000687930439), REAL_CONST(0.000000343965261), REAL_CONST(0.000000171982641), 
    REAL_CONST(6.022367813028454), REAL_CONST(5.044394119358453), REAL_CONST(4.087462841250339),
    REAL_CONST(3.169925001442313), REAL_CONST(2.321928094887362), REAL_CONST(1.584962500721156),
    REAL_CONST(1.000000000000000), REAL_CONST(0.584962500721156), REAL_CONST(0.321928094887362),
    REAL_CONST(0.169925001442312), REAL_CONST(0.087462841250339), REAL_CONST(0.044394119358453),
    REAL_CONST(0.022367813028455), REAL_CONST(0.011227255423254), REAL_CONST(0.005624549193878),
    REAL_CONST(0.002815015607054), REAL_CONST(0.001408194392808), REAL_CONST(0.000704269011247),
    REAL_CONST(0.000352177480301), REAL_CONST(0.000176099486443), REAL_CONST(0.000088052430122),
    REAL_CONST(0.000044026886827), REAL_CONST(0.000022013611360), REAL_CONST(0.000011006847667),
    REAL_CONST(0.000005503434331), REAL_CONST(0.000002751719790), REAL_CONST(0.000001375860551),
    REAL_CONST(0.000000687930439), REAL_CONST(0.000000343965261), REAL_CONST(0.000000171982641),
    REAL_CONST(0.000000000000000)
};



@@ 868,16 868,16 @@ static const real_t log_Qplus1_pan[31][13] = {
};

static const real_t log_Qplus1[31] = {
    REAL_CONST(6.022367813028454), REAL_CONST(5.044394119358453), REAL_CONST(4.087462841250339), 
    REAL_CONST(3.169925001442313), REAL_CONST(2.321928094887362), REAL_CONST(1.584962500721156), 
    REAL_CONST(1.000000000000000), REAL_CONST(0.584962500721156), REAL_CONST(0.321928094887362), 
    REAL_CONST(0.169925001442312), REAL_CONST(0.087462841250339), REAL_CONST(0.044394119358453), 
    REAL_CONST(0.022367813028455), REAL_CONST(0.011227255423254), REAL_CONST(0.005624549193878), 
    REAL_CONST(0.002815015607054), REAL_CONST(0.001408194392808), REAL_CONST(0.000704269011247), 
    REAL_CONST(0.000352177480301), REAL_CONST(0.000176099486443), REAL_CONST(0.000088052430122), 
    REAL_CONST(0.000044026886827), REAL_CONST(0.000022013611360), REAL_CONST(0.000011006847667), 
    REAL_CONST(0.000005503434331), REAL_CONST(0.000002751719790), REAL_CONST(0.000001375860551), 
    REAL_CONST(0.000000687930439), REAL_CONST(0.000000343965261), REAL_CONST(0.000000171982641), 
    REAL_CONST(6.022367813028454), REAL_CONST(5.044394119358453), REAL_CONST(4.087462841250339),
    REAL_CONST(3.169925001442313), REAL_CONST(2.321928094887362), REAL_CONST(1.584962500721156),
    REAL_CONST(1.000000000000000), REAL_CONST(0.584962500721156), REAL_CONST(0.321928094887362),
    REAL_CONST(0.169925001442312), REAL_CONST(0.087462841250339), REAL_CONST(0.044394119358453),
    REAL_CONST(0.022367813028455), REAL_CONST(0.011227255423254), REAL_CONST(0.005624549193878),
    REAL_CONST(0.002815015607054), REAL_CONST(0.001408194392808), REAL_CONST(0.000704269011247),
    REAL_CONST(0.000352177480301), REAL_CONST(0.000176099486443), REAL_CONST(0.000088052430122),
    REAL_CONST(0.000044026886827), REAL_CONST(0.000022013611360), REAL_CONST(0.000011006847667),
    REAL_CONST(0.000005503434331), REAL_CONST(0.000002751719790), REAL_CONST(0.000001375860551),
    REAL_CONST(0.000000687930439), REAL_CONST(0.000000343965261), REAL_CONST(0.000000171982641),
    REAL_CONST(0.000000000000000)
};



@@ 1417,7 1417,7 @@ static void calc_gain_groups(sbr_info *sbr, sbr_hfadj_info *adj, real_t *deg, ui
                    i++;
                }
            }
        }        
        }

        if (grouping)
        {


@@ 1439,7 1439,7 @@ static void aliasing_reduction(sbr_info *sbr, sbr_hfadj_info *adj, real_t *deg, 
        for (k = 0; k < sbr->N_G[l]; k++)
        {
            E_total_est = E_total = 0;
            

            for (m = sbr->f_group[l][k<<1]; m < sbr->f_group[l][(k<<1) + 1]; m++)
            {
                /* E_curr: integer */

M libfaad/sbr_hfadj.h => libfaad/sbr_hfadj.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_hfgen.c => libfaad/sbr_hfgen.c +5 -5
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 298,7 298,7 @@ static void auto_correlation(sbr_info *sbr, acorr_coef *ac, qmf_t buffer[MAX_NTS
    /* improves accuracy */
    if (exp > 0)
        exp -= 1;
   

    pow2_to_exp = 1<<(exp-1);

    temp2_r = (QMF_RE(buffer[offset-2][bd]) + pow2_to_exp) >> exp;

M libfaad/sbr_hfgen.h => libfaad/sbr_hfgen.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_huff.c => libfaad/sbr_huff.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_huff.h => libfaad/sbr_huff.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_noise.h => libfaad/sbr_noise.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_qmf.c => libfaad/sbr_qmf.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_qmf.h => libfaad/sbr_qmf.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_qmf_c.h => libfaad/sbr_qmf_c.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_syntax.c => libfaad/sbr_syntax.c +6 -6
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 217,7 217,7 @@ uint8_t sbr_extension_data(bitfile *ld, sbr_info *sbr, uint16_t cnt,
            {
                result += calc_sbr_tables(sbr, saved_start_freq, saved_stop_freq,
                    saved_samplerate_mode, saved_freq_scale,
                    saved_alter_scale, saved_xover_band);          
                    saved_alter_scale, saved_xover_band);
            }

            /* we should be able to safely set result to 0 now, */


@@ 248,7 248,7 @@ uint8_t sbr_extension_data(bitfile *ld, sbr_info *sbr, uint16_t cnt,
#ifdef DRM
    if (!sbr->Is_DRM_SBR)
#endif
    {       
    {
        /* -4 does not apply, bs_extension_type is re-read in this function */
        num_align_bits = 8*cnt /*- 4*/ - num_sbr_bits2;


M libfaad/sbr_syntax.h => libfaad/sbr_syntax.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_tf_grid.c => libfaad/sbr_tf_grid.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sbr_tf_grid.h => libfaad/sbr_tf_grid.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/sine_win.h => libfaad/sine_win.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/specrec.c => libfaad/specrec.c +7 -7
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 622,10 622,10 @@ static uint8_t quant_to_spec(NeAACDecStruct *hDecoder,
                    wb = wa + bin;

                    spec_data[wb+0] = iquant(quant_data[k+0], tab, &error) * scf;
                    spec_data[wb+1] = iquant(quant_data[k+1], tab, &error) * scf;                        
                    spec_data[wb+2] = iquant(quant_data[k+2], tab, &error) * scf;                        
                    spec_data[wb+1] = iquant(quant_data[k+1], tab, &error) * scf;
                    spec_data[wb+2] = iquant(quant_data[k+2], tab, &error) * scf;
                    spec_data[wb+3] = iquant(quant_data[k+3], tab, &error) * scf;
                        

#else
                    real_t iq0 = iquant(quant_data[k+0], tab, &error);
                    real_t iq1 = iquant(quant_data[k+1], tab, &error);

M libfaad/specrec.h => libfaad/specrec.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/ssr.c => libfaad/ssr.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/ssr.h => libfaad/ssr.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/ssr_fb.c => libfaad/ssr_fb.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/ssr_fb.h => libfaad/ssr_fb.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Ahead Software AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/ssr_ipqf.c => libfaad/ssr_ipqf.c +5 -5
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 59,7 59,7 @@ void gc_set_protopqf(real_t *p_proto)
        -2.1939551286300665E-02, -2.4533179947088161E-02, -2.2591663337768787E-02,
        -1.5122066420044672E-02, -1.7971713448186293E-03,  1.6903413428575379E-02,
        3.9672315874127042E-02,  6.4487527248102796E-02,  8.8850025474701726E-02,
        0.1101132906105560    ,  0.1258540205143761    ,  0.1342239368467012    
        0.1101132906105560    ,  0.1258540205143761    ,  0.1342239368467012
    };

    for (j = 0; j < 48; ++j)

M libfaad/ssr_ipqf.h => libfaad/ssr_ipqf.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Ahead Software AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/ssr_win.h => libfaad/ssr_win.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Ahead Software AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/structs.h => libfaad/structs.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/syntax.c => libfaad/syntax.c +9 -9
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 1279,7 1279,7 @@ void DRM_aac_scalable_main_element(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *
    }
#else
    faad_get1bit(ld);
#endif    
#endif

    hInfo->error = side_info(hDecoder, &cpe, ld, ics1, 1);
    if (hInfo->error > 0)


@@ 1611,7 1611,7 @@ static uint8_t individual_channel_stream(NeAACDecStruct *hDecoder, element *ele,
    if (result > 0)
        return result;

    if (hDecoder->object_type >= ER_OBJECT_START) 
    if (hDecoder->object_type >= ER_OBJECT_START)
    {
        if (ics->tns_data_present)
            tns_data(ics, &(ics->tns), ld);


@@ 2179,11 2179,11 @@ static uint16_t extension_payload(bitfile *ld, drc_info *drc, uint16_t count)
        return n;
    case EXT_FILL_DATA:
        /* fill_nibble = */ faad_getbits(ld, 4
            DEBUGVAR(1,136,"extension_payload(): fill_nibble")); /* must be �0000� */
            DEBUGVAR(1,136,"extension_payload(): fill_nibble")); /* must be '0000' */
        for (i = 0; i < count-1; i++)
        {
            /* fill_byte[i] = */ faad_getbits(ld, 8
                DEBUGVAR(1,88,"extension_payload(): fill_byte")); /* must be �10100101� */
                DEBUGVAR(1,88,"extension_payload(): fill_byte")); /* must be '10100101' */
        }
        return count;
    case EXT_DATA_ELEMENT:


@@ 2642,7 2642,7 @@ uint32_t faad_latm_frame(latm_header *latm, bitfile *ld)
        endpos = faad_get_processed_bits(ld);
        if(ret>0)
            return (len*8)-(endpos-initpos);
        //faad_getbits(ld, initpos-endpos); //go back to initpos, but is valid a getbits(-N) ? 
        //faad_getbits(ld, initpos-endpos); //go back to initpos, but is valid a getbits(-N) ?
    }
    return 0xFFFFFFFF;
}

M libfaad/syntax.h => libfaad/syntax.h +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/tns.c => libfaad/tns.c +4 -4
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly

M libfaad/tns.h => libfaad/tns.h +5 -5
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 38,7 38,7 @@ extern "C" {

#define TNS_MAX_ORDER 20

    

void tns_decode_frame(ic_stream *ics, tns_info *tns, uint8_t sr_index,
                      uint8_t object_type, real_t *spec, uint16_t frame_len);
void tns_encode_frame(ic_stream *ics, tns_info *tns, uint8_t sr_index,

M plugins/QCD/QCDFAAD.c => plugins/QCD/QCDFAAD.c +37 -37
@@ 1,19 1,19 @@
/*
** FAAD - Freeware Advanced Audio Decoder
** Copyright (C) 2002 M. Bakker
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** $Id: QCDFAAD.c,v 1.2 2003/04/28 19:04:35 menno Exp $


@@ 240,10 240,10 @@ BOOL CALLBACK config_dialog_proc(HWND hwndDlg, UINT message, WPARAM wParam, LPAR
	{
    case WM_INITDIALOG:
        /* Set priority slider range and previous position */
		SendMessage(GetDlgItem(hwndDlg, THREAD_PRIORITY_SLIDER), TBM_SETRANGE, TRUE, MAKELONG(1, 5)); 
		SendMessage(GetDlgItem(hwndDlg, THREAD_PRIORITY_SLIDER), TBM_SETRANGE, TRUE, MAKELONG(1, 5));
		SendMessage(GetDlgItem(hwndDlg, THREAD_PRIORITY_SLIDER), TBM_SETPOS, TRUE, m_priority);
		SetDlgItemText(hwndDlg, IDC_STATIC2, priority_text[m_priority]);
		

		/* Put a limit to the amount of characters allowed in the buffer boxes */
		SendMessage(GetDlgItem(hwndDlg, LOCAL_BUFFER_TXT), EM_LIMITTEXT, 4, 0);
		SendMessage(GetDlgItem(hwndDlg, STREAM_BUFFER_TXT), EM_LIMITTEXT, 4, 0);


@@ 289,12 289,12 @@ BOOL CALLBACK config_dialog_proc(HWND hwndDlg, UINT message, WPARAM wParam, LPAR
			if(GetDlgItem(hwndDlg, VARBITRATE_CHK) == (HWND) lParam)
			{
				/* Variable Bitrate checkbox hit */
				m_variable_bitrate_display = SendMessage(GetDlgItem(hwndDlg, VARBITRATE_CHK), BM_GETCHECK, 0, 0); 
				m_variable_bitrate_display = SendMessage(GetDlgItem(hwndDlg, VARBITRATE_CHK), BM_GETCHECK, 0, 0);
			}
			if(GetDlgItem(hwndDlg, IDC_MEMMAP) == (HWND) lParam)
			{
				/* Variable Bitrate checkbox hit */
				m_memmap_file = SendMessage(GetDlgItem(hwndDlg, IDC_MEMMAP), BM_GETCHECK, 0, 0); 
				m_memmap_file = SendMessage(GetDlgItem(hwndDlg, IDC_MEMMAP), BM_GETCHECK, 0, 0);
			}
		}



@@ 363,22 363,22 @@ INT_PTR CALLBACK about_dialog_proc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA

		SetDlgItemText(hwndDlg, IDC_PLUGINVER, szPluginVer);
		SetDlgItemText(hwndDlg, IDC_FAADVER, szFLACVer);
		

		return TRUE;
	case WM_MOUSEMOVE:
		ptMouse.x = LOWORD(lParam);
		ptMouse.y = HIWORD(lParam);
		ClientToScreen(hwndDlg, &ptMouse);
		if( (ptMouse.x >= rcLOGO.left && ptMouse.x <= rcLOGO.right && 
			ptMouse.y >= rcLOGO.top && ptMouse.y<= rcLOGO.bottom) 
		if( (ptMouse.x >= rcLOGO.left && ptMouse.x <= rcLOGO.right &&
			ptMouse.y >= rcLOGO.top && ptMouse.y<= rcLOGO.bottom)
			||
			(ptMouse.x >= rcMail1.left && ptMouse.x <= rcMail1.right && 
			ptMouse.y >= rcMail1.top && ptMouse.y<= rcMail1.bottom) 
			(ptMouse.x >= rcMail1.left && ptMouse.x <= rcMail1.right &&
			ptMouse.y >= rcMail1.top && ptMouse.y<= rcMail1.bottom)
			||
			(ptMouse.x >= rcMail2.left && ptMouse.x <= rcMail2.right && 
			ptMouse.y >= rcMail2.top && ptMouse.y<= rcMail2.bottom) 
			(ptMouse.x >= rcMail2.left && ptMouse.x <= rcMail2.right &&
			ptMouse.y >= rcMail2.top && ptMouse.y<= rcMail2.bottom)
/*			||
			(ptMouse.x >= rcMail3.left && ptMouse.x <= rcMail3.right && 
			(ptMouse.x >= rcMail3.left && ptMouse.x <= rcMail3.right &&
			ptMouse.y >= rcMail3.top && ptMouse.y<= rcMail3.bottom)*/ )
			SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(32649)));
		else


@@ 389,16 389,16 @@ INT_PTR CALLBACK about_dialog_proc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
		ptMouse.x = LOWORD(lParam);
		ptMouse.y = HIWORD(lParam);
		ClientToScreen(hwndDlg, &ptMouse);
		if(ptMouse.x >= rcLOGO.left && ptMouse.x <= rcLOGO.right && 
		if(ptMouse.x >= rcLOGO.left && ptMouse.x <= rcLOGO.right &&
			ptMouse.y >= rcLOGO.top && ptMouse.y<= rcLOGO.bottom)
			ShellExecute(0, NULL, "http://www.audiocoding.com", NULL,NULL, SW_NORMAL);
		else if(ptMouse.x >= rcMail1.left && ptMouse.x <= rcMail1.right && 
		else if(ptMouse.x >= rcMail1.left && ptMouse.x <= rcMail1.right &&
			ptMouse.y >= rcMail1.top && ptMouse.y<= rcMail1.bottom)
			ShellExecute(0, NULL, "mailto:shaohao@elong.com", NULL,NULL, SW_NORMAL);
		else if(ptMouse.x >= rcMail2.left && ptMouse.x <= rcMail2.right && 
		else if(ptMouse.x >= rcMail2.left && ptMouse.x <= rcMail2.right &&
			ptMouse.y >= rcMail2.top && ptMouse.y<= rcMail2.bottom)
			ShellExecute(0, NULL, "mailto:menno@audiocoding.com", NULL,NULL, SW_NORMAL);
/*		else if(ptMouse.x >= rcMail3.left && ptMouse.x <= rcMail3.right && 
/*		else if(ptMouse.x >= rcMail3.left && ptMouse.x <= rcMail3.right &&
			ptMouse.y >= rcMail3.top && ptMouse.y<= rcMail3.bottom)
			ShellExecute(0, NULL, "I don't know", NULL,NULL, SW_NORMAL);
*/


@@ 418,7 418,7 @@ INT_PTR CALLBACK about_dialog_proc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
void About(int flags)
{
	if(!IsWindow(hwndAbout))
		hwndAbout = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_ABOUT), hwndPlayer, about_dialog_proc); 
		hwndAbout = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_ABOUT), hwndPlayer, about_dialog_proc);
	ShowWindow(hwndAbout, SW_SHOW);
}



@@ 483,7 483,7 @@ BOOL GetMediaSupported(LPCSTR medianame, MediaInfo *mediaInfo)
    if(StringComp(ch, ".aac", 4) == 0)
    {
		in = open_filestream((char *)medianame);
		

		if(in != NULL && mediaInfo)
		{
			if(in->http)


@@ 501,7 501,7 @@ BOOL GetMediaSupported(LPCSTR medianame, MediaInfo *mediaInfo)
				else
					mediaInfo->op_canSeek = FALSE; /* ADIF or Headerless - not seekable */
			}
			

			close_filestream(in);
			return TRUE;
		}


@@ 512,7 512,7 @@ BOOL GetMediaSupported(LPCSTR medianame, MediaInfo *mediaInfo)
		}
	}
	else
		return FALSE;		
		return FALSE;
}

unsigned long samplerate, channels;


@@ 522,7 522,7 @@ int play_memmap(char *fn)
    int tagsize = 0;

    infile = open_filestream(fn);
    

	if (infile == NULL)
        return 1;



@@ 561,7 561,7 @@ int play_file(char *fn)
    ZeroMemory(buffer, 768*2);

     infile = open_filestream(fn);
    

	if (infile == NULL)
        return 1;



@@ 654,7 654,7 @@ BOOL Play(LPCSTR medianame, int playfrom, int playto, int flags)
		buffer = (unsigned char*)LocalAlloc(LPTR, 768*2);

		current_file_mode = m_memmap_file;
		

		if(current_file_mode)
		{
			if(play_memmap((char *)medianame))


@@ 665,16 665,16 @@ BOOL Play(LPCSTR medianame, int playfrom, int playto, int flags)
			if(play_file((char *)medianame))
				return FALSE;
		}
		

		if(seek_table)
		{
			free(seek_table);
			seek_table = NULL;
			seek_table_length = 0;
		}
		

		get_AAC_format((char *)medianame, &file_info, &seek_table, &seek_table_length, 0);
		

		seek_needed = playfrom > 0 ? playfrom : -1;
		killPlayThread = 0;
		strcpy(lastfn,medianame);


@@ 689,11 689,11 @@ BOOL Play(LPCSTR medianame, int playfrom, int playto, int flags)
		play_thread_handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) PlayThread, (void *) &killPlayThread, 0, &thread_id);
		if(!play_thread_handle)
			return FALSE;
		

		// Note: This line seriously slows down start up time
		if(m_priority != 3) // if the priority in config window is set to normal, there is nothing to reset!
			SetThreadPriority(play_thread_handle, priority_table[m_priority]);
		

    }

	return TRUE;


@@ 720,7 720,7 @@ BOOL Stop(LPCSTR medianame, int flags)
	if(medianame && *medianame && stricmp(lastfn, medianame) == 0)
	{
		sQCDCallbacks.toPlayer.OutputStop(flags);
		

		killPlayThread = 1;
		if(play_thread_handle != INVALID_HANDLE_VALUE)
		{


@@ 735,7 735,7 @@ BOOL Stop(LPCSTR medianame, int flags)

		if (oldAPIs)
			QCDCallbacks->toPlayer.PlayStopped(lastfn);
		

		lastfn[0] = 0;
	}



@@ 906,14 906,14 @@ DWORD WINAPI PlayThread(void *b)
						QCDCallbacks->toPlayer.PositionUpdate(decode_pos_ms);
						updatePos = 0;
					}
					

					{
						WriteDataStruct wd;

						l = frameInfo.samples * sizeof(short);

						decode_pos_ms += (1024*1000)/file_info.sampling_rate;
						

						wd.bytelen = l;
						wd.data = sample_buffer;
						wd.markerend = 0;


@@ 922,7 922,7 @@ DWORD WINAPI PlayThread(void *b)
						wd.nch = frameInfo.channels;
						wd.numsamples =l/file_info.channels/(16/8);
						wd.srate = file_info.sampling_rate;
						

						if (!QCDCallbacks->toPlayer.OutputWrite(&wd))
							done = TRUE;
					}

M plugins/QCD/QCDInputDLL.h => plugins/QCD/QCDInputDLL.h +2 -2
@@ 1,5 1,5 @@
//-----------------------------------------------------------------------------
// 
//
// File:	QCDInputDLL.h
//
// About:	QCD Player Input module DLL interface.  For more documentation, see


@@ 11,7 11,7 @@
//
//	Copyright (C) 1997-2002 Quinnware
//
//	This code is free.  If you redistribute it in any form, leave this notice 
//	This code is free.  If you redistribute it in any form, leave this notice
//	here.
//
//	This program is distributed in the hope that it will be useful,

M plugins/QCD/QCDModDefs.h => plugins/QCD/QCDModDefs.h +20 -20
@@ 13,7 13,7 @@
//
//	Copyright (C) 1997-2002 Quinnware
//
//	This code is free.  If you redistribute it in any form, leave this notice 
//	This code is free.  If you redistribute it in any form, leave this notice
//	here.
//
//	This program is distributed in the hope that it will be useful,


@@ 47,7 47,7 @@ typedef struct {
//-----------------------------------------------------------------------------
// Services (ops) provided by the Player
//-----------------------------------------------------------------------------
typedef enum 
typedef enum
{									//*** below returns numeric info (*buffer not used)

	opGetPlayerVersion = 0,			// high-order word = major version (eg 3.01 is 3), low-order word = minor (eg 3.01 = 1)


@@ 65,7 65,7 @@ typedef enum
	opGetTrackLength = 14,			// get track length, param1 = index of track in playlist, -1 for current
									//                   param2 = 0 for seconds, 1 for milliseconds
	opGetTime = 15,					// get time on player, param1 = 0 for time displayed, 1 for track time, 2 for playlist time
									//					   param2 = 0 for elapsed, 1 for remaining														   
									//					   param2 = 0 for elapsed, 1 for remaining
	opGetTrackState = 16,			// get whether track is marked, param1 = index of track, -1 for current
	opGetPlaylistNum = 17,			// get playlist number of index, param1 = index of track in playlist, -1 for current
	opGetMediaType = 18,			// get media type of track, param1 = index if track in playlist, -1 for current


@@ 88,18 88,18 @@ typedef enum

	opGetIndexFromPLNum = 28,		// get index from playlist number, param1 = playlist number

	opGetChildWnd = 30,				// handle to the draggable window extension (only available on some skins) 
	opGetChildWnd = 30,				// handle to the draggable window extension (only available on some skins)
	opGetExtVisWnd = 31,			// handle to the external visual window
	opGetMusicBrowserWnd = 32,		// handle to the music browser window 
	opGetSkinPreviewWnd = 33,		// handle to the skin preview window 
	opGetPropertiesWnd = 34,		// handle to the player properties window 
	opGetExtInfoWnd = 35,			// handle to the extended information window 
	opGetAboutWnd = 36,				// handle to the about window 
	opGetSegmentsWnd = 37,			// handle to the segments window 
	opGetEQPresetsWnd = 38,			// handle to the EQ presets window 
	opGetMusicBrowserWnd = 32,		// handle to the music browser window
	opGetSkinPreviewWnd = 33,		// handle to the skin preview window
	opGetPropertiesWnd = 34,		// handle to the player properties window
	opGetExtInfoWnd = 35,			// handle to the extended information window
	opGetAboutWnd = 36,				// handle to the about window
	opGetSegmentsWnd = 37,			// handle to the segments window
	opGetEQPresetsWnd = 38,			// handle to the EQ presets window

	opGetVisDimensions = 50,		// gets the width and height of visual window (param1 = -1 current vis window, 0 internal vis, 1 external vis, 2 full screen)
									//		returns: HEIGHT in high word, WIDTH in low word 
									//		returns: HEIGHT in high word, WIDTH in low word

	opGetQueriesComplete = 60,		// get status on whether all tracks in playlist have been queryied for their info



@@ 133,10 133,10 @@ typedef enum
	opGetSkinFolder = 112,			// get current skin folder
	opGetCDDBCacheFolder = 113,		// get current folder for CDDB cached info

	opGetCurrentPlaylist = 114,		// get full pathname of playlist currently loaded 
	opGetCurrentPlaylist = 114,		// get full pathname of playlist currently loaded

	opGetMediaID = 115,				// get media identifier, param2 = index of track in playlist, -1 for current
									//		- for CD's it's the TOC - for anything else, right now it's 0      
									//		- for CD's it's the TOC - for anything else, right now it's 0

	opGetSupportedExtensions = 116,	// get file extensions supported by the player, param2 = 0 - get all extensions, 1 - get registered extensions
									//		- returned extensions will be colon delimited


@@ 221,7 221,7 @@ typedef struct				// for Output Plugin Write callback
	UINT	nch;			// number of channels
	UINT	srate;			// sample rate

	UINT	markerstart;	// Marker position at start of data (marker is time value of data) 
	UINT	markerstart;	// Marker position at start of data (marker is time value of data)
							// (set to WAVE_VIS_DATA_ONLY to not have data sent to output plugins)
	UINT	markerend;		// Marker position at end of data (not currently used, set to 0)
} WriteDataStruct;


@@ 230,18 230,18 @@ typedef struct				// for Output Plugin Write callback
typedef struct			// for GetTrackExtents Input Plugin callback
{
	UINT track;			// for CD's, set the track number. Otherwise set to 1.
	UINT start;			// for CD's or media that doesn't start at the beginning 
	UINT start;			// for CD's or media that doesn't start at the beginning
						// of the file, set to start position. Otherwise set to 0.
	UINT end;			// set to end position of media.
	UINT unitpersec;	// whatever units are being used for this media, how many
						// of them per second. 
						// of them per second.
						// (Note: ((end - start) / unitpersecond) = file length
	UINT bytesize;		// size of file in bytes (if applicable, otherwise 0).
} TrackExtents;

//-----------------------------------------------------------------------------
typedef struct			// for opSetAudioInfo service
{		
{
    long struct_size;	// sizeof(AudioInfo)
    long level;			// MPEG level (1 for MPEG1, 2 for MPEG2, 3 for MPEG2.5, 7 for MPEGpro)
    long layer;			// and layer (1, 2 or 3)


@@ 256,7 256,7 @@ typedef struct			// for opSetAudioInfo service
typedef struct			// for coming QCD version
{
	long struct_size;	// sizeof(EQInfo)
	char enabled;		
	char enabled;
	char preamp;		// -128 to 127, 0 is even
	char bands[10];		// -128 to 127, 0 is even
} EQInfo;


@@ 273,7 273,7 @@ typedef struct

//-----------------------------------------------------------------------------
typedef enum			// for MediaInfo.mediaType
{ 
{
	UNKNOWN_MEDIA = 0,
	CD_AUDIO_MEDIA = 1,
	DIGITAL_FILE_MEDIA = 2,

M plugins/QCD/QCDModInput.h => plugins/QCD/QCDModInput.h +7 -7
@@ 2,7 2,7 @@
//
// File:	QCDModInput.h
//
// About:	Input plugin module interface.  This file is published with the 
// About:	Input plugin module interface.  This file is published with the
//			Input plugin SDK.
//
// Authors:	Written by Paul Quinn and Richard Carlson.


@@ 13,7 13,7 @@
//
//	Copyright (C) 1997-2002 Quinnware
//
//	This code is free.  If you redistribute it in any form, leave this notice 
//	This code is free.  If you redistribute it in any form, leave this notice
//	here.
//
//	This program is distributed in the hope that it will be useful,


@@ 46,7 46,7 @@
#define PLAYFLAG_SEEKING			0x2

// Wave Marker flags
#define WAVE_VIS_DATA_ONLY			-1	// set to WaveDataStruct.markerstart in OutputWrite() call have data only go to vis 
#define WAVE_VIS_DATA_ONLY			-1	// set to WaveDataStruct.markerstart in OutputWrite() call have data only go to vis
										// and not to output plugin
// pause flags
#define PAUSE_DISABLED				0	// Pause() call is to unpause playback


@@ 55,7 55,7 @@
//-----------------------------------------------------------------------------
// Input Module
//-----------------------------------------------------------------------------
typedef struct 
typedef struct
{
	unsigned int		size;			// size of init structure
	unsigned int		version;		// plugin structure version (set to PLUGIN_API_VERSION)


@@ 74,8 74,8 @@ typedef struct

																	// output plugin calls
		int  (*OutputOpen)(const char* medianame, WAVEFORMATEX*);	// open output for wave data
		int  (*OutputWrite)(WriteDataStruct*);						// send PCM audio data to output 
																		// (blocks until write completes, thus if output is paused can 
		int  (*OutputWrite)(WriteDataStruct*);						// send PCM audio data to output
																		// (blocks until write completes, thus if output is paused can
																		// block until unpaused)
		int  (*OutputDrain)(int flags);								// wait for all output to complete (blocking)
		int  (*OutputDrainCancel)(int flags);						// break a drain in progress


@@ 89,7 89,7 @@ typedef struct
		void *Reserved[10];
	} toPlayer;

	struct 
	struct
	{
		int  (*Initialize)(QCDModInfo *modInfo, int flags);			// initialize plugin
		void (*ShutDown)(int flags);								// shutdown plugin

M plugins/QCD/resource.h => plugins/QCD/resource.h +1 -1
@@ 22,7 22,7 @@
#define IDC_MAIL3                       1054

// Next default values for new objects
// 
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        109

M plugins/QCDMp4/QCDInputDLL.h => plugins/QCDMp4/QCDInputDLL.h +2 -2
@@ 1,5 1,5 @@
//-----------------------------------------------------------------------------
// 
//
// File:	QCDInputDLL.h
//
// About:	QCD Player Input module DLL interface.  For more documentation, see


@@ 11,7 11,7 @@
//
//	Copyright (C) 1997-2002 Quinnware
//
//	This code is free.  If you redistribute it in any form, leave this notice 
//	This code is free.  If you redistribute it in any form, leave this notice
//	here.
//
//	This program is distributed in the hope that it will be useful,

M plugins/QCDMp4/QCDModDefs.h => plugins/QCDMp4/QCDModDefs.h +26 -26
@@ 13,7 13,7 @@
//
//	Copyright (C) 1997-2002 Quinnware
//
//	This code is free.  If you redistribute it in any form, leave this notice 
//	This code is free.  If you redistribute it in any form, leave this notice
//	here.
//
//	This program is distributed in the hope that it will be useful,


@@ 37,7 37,7 @@
// Current plugin version

// use this version for old style API calls (all returned text in native encoding)
#define PLUGIN_API_VERSION				250		
#define PLUGIN_API_VERSION				250

// use this version for new style API calls (all returned text in UTF8 encoding on WinNT/2K/XP (native encoding on Win9x))
#define PLUGIN_API_VERSION_WANTUTF8		((PLUGIN_API_WANTUTF8<<16)|PLUGIN_API_VERSION)


@@ 45,7 45,7 @@

//-----------------------------------------------------------------------------

typedef struct 
typedef struct
{
	char				*moduleString;
	char				*moduleExtensions;


@@ 54,7 54,7 @@ typedef struct
//-----------------------------------------------------------------------------
// Services (ops) provided by the Player
//-----------------------------------------------------------------------------
typedef enum 
typedef enum
{									//*** below returns numeric info (*buffer not used)

	opGetPlayerVersion = 0,			// high-order word = major version (eg 3.01 is 3), low-order word = minor (eg 3.01 = 1)


@@ 72,7 72,7 @@ typedef enum
	opGetTrackLength = 14,			// get track length, param1 = index of track in playlist, -1 for current
									//                   param2 = 0 for seconds, 1 for milliseconds
	opGetTime = 15,					// get time on player, param1 = 0 for time displayed, 1 for track time, 2 for playlist time
									//					   param2 = 0 for elapsed, 1 for remaining														   
									//					   param2 = 0 for elapsed, 1 for remaining
	opGetTrackState = 16,			// get whether track is marked, param1 = index of track, -1 for current
	opGetPlaylistNum = 17,			// get playlist number of index, param1 = index of track in playlist, -1 for current
	opGetMediaType = 18,			// get media type of track, param1 = index if track in playlist, -1 for current


@@ 97,17 97,17 @@ typedef enum

	opGetExtensionWnd = 30,			// handle to the draggable window extension (only available on some skins), param1 = extension number (0 - 9)
	opGetExtVisWnd = 31,			// handle to the external visual window
	opGetMusicBrowserWnd = 32,		// handle to the music browser window 
	opGetSkinPreviewWnd = 33,		// handle to the skin preview window 
	opGetPropertiesWnd = 34,		// handle to the player properties window 
	opGetExtInfoWnd = 35,			// handle to the extended information window 
	opGetAboutWnd = 36,				// handle to the about window 
	opGetSegmentsWnd = 37,			// handle to the segments window 
	opGetEQPresetsWnd = 38,			// handle to the EQ presets window 
	opGetVideoWnd = 39,				// handle to the video window 
	opGetMusicBrowserWnd = 32,		// handle to the music browser window
	opGetSkinPreviewWnd = 33,		// handle to the skin preview window
	opGetPropertiesWnd = 34,		// handle to the player properties window
	opGetExtInfoWnd = 35,			// handle to the extended information window
	opGetAboutWnd = 36,				// handle to the about window
	opGetSegmentsWnd = 37,			// handle to the segments window
	opGetEQPresetsWnd = 38,			// handle to the EQ presets window
	opGetVideoWnd = 39,				// handle to the video window

	opGetVisDimensions = 50,		// gets the width and height of visual window (param1 = -1 current vis window, 0 internal vis, 1 external vis, 2 full screen)
									//		returns: HEIGHT in high word, WIDTH in low word 
									//		returns: HEIGHT in high word, WIDTH in low word

	opShowVideoWindow = 55,			// Show or Close video window (param1 = 1 for create, 2 for create and show, 0 for close)



@@ 143,10 143,10 @@ typedef enum
	opGetSkinFolder = 112,			// get current skin folder
	opGetCDDBCacheFolder = 113,		// get current folder for CDDB cached info

	opGetCurrentPlaylist = 114,		// get full pathname of playlist currently loaded 
	opGetCurrentPlaylist = 114,		// get full pathname of playlist currently loaded

	opGetMediaID = 115,				// get media identifier, param2 = index of track in playlist, -1 for current
									//		- for CD's it's the TOC - for anything else, right now it's 0      
									//		- for CD's it's the TOC - for anything else, right now it's 0

	opGetSupportedExtensions = 116,	// get file extensions supported by the player, param2 = 0 - get all extensions, 1 - get registered extensions
									//		- returned extensions will be colon delimited


@@ 196,14 196,14 @@ typedef enum
	opSetPlayNext = 1009,			// set the next index to be played (buffer = NULL, param1 = index, index = -1 unsets playnext)
	opSetIndexFilename = 1010,		// updates the filename (or stream) that an index in the current playlist refers to, buffer = new filename, param1 = index

	opSetPlaylist = 1006,			// clear playlist, add files to playlist or reset playlist with new files 
	opSetPlaylist = 1006,			// clear playlist, add files to playlist or reset playlist with new files
									//		buffer = file list (each file in quotes, string null terminated) Eg; buffer="\"file1.mp3\" \"file2.mp3\"\0" - NULL to clear playlist
									//		param1 = (string ptr)originating path (can be NULL if paths included with files) 
									//		param1 = (string ptr)originating path (can be NULL if paths included with files)
									//		param2 = 1 - clear playlist flag, 2 - enqueue to top

	opInsertPlaylist = 1011,		// insert tracks into playlist 
	opInsertPlaylist = 1011,		// insert tracks into playlist
									//		buffer = file list (each file in quotes, string null terminated) Eg; buffer="\"file1.mp3\" \"file2.mp3\"\0"
									//		param1 = (string ptr)originating path (can be NULL if paths included with files) 
									//		param1 = (string ptr)originating path (can be NULL if paths included with files)
									//		param2 = index location to insert tracks (-1 to insert at end)

	opMovePlaylistTrack = 1012,		// param1 = index of track to move, param2 = destination index (move shifts tracks between param1 and param2)


@@ 267,7 267,7 @@ typedef struct				// for Output Plugin Write callback
	UINT	nch;			// number of channels
	UINT	srate;			// sample rate

	UINT	markerstart;	// Marker position at start of data (marker is time value of data) 
	UINT	markerstart;	// Marker position at start of data (marker is time value of data)
							// (set to WAVE_VIS_DATA_ONLY to not have data sent to output plugins)
	UINT	markerend;		// Marker position at end of data (not currently used, set to 0)
} WriteDataStruct;


@@ 276,18 276,18 @@ typedef struct				// for Output Plugin Write callback
typedef struct			// for GetTrackExtents Input Plugin callback
{
	UINT track;			// for CD's, set the track number. Otherwise set to 1.
	UINT start;			// for CD's or media that doesn't start at the beginning 
	UINT start;			// for CD's or media that doesn't start at the beginning
						// of the file, set to start position. Otherwise set to 0.
	UINT end;			// set to end position of media.
	UINT unitpersec;	// whatever units are being used for this media, how many
						// of them per second. 
						// of them per second.
						// (Note: ((end - start) / unitpersecond) = file length
	UINT bytesize;		// size of file in bytes (if applicable, otherwise 0).
} TrackExtents;

//-----------------------------------------------------------------------------
typedef struct			// for opSetAudioInfo service
{		
{
    long struct_size;	// sizeof(AudioInfo)
    long level;			// MPEG level (1 for MPEG1, 2 for MPEG2, 3 for MPEG2.5, 7 for MPEGpro)
    long layer;			// and layer (1, 2 or 3)


@@ 303,7 303,7 @@ typedef struct			// for opSetAudioInfo service
typedef struct			// for coming QCD version
{
	long struct_size;	// sizeof(EQInfo)
	char enabled;		
	char enabled;
	char preamp;		// -128 to 127, 0 is even
	char bands[10];		// -128 to 127, 0 is even
} EQInfo;


@@ 320,7 320,7 @@ typedef struct

//-----------------------------------------------------------------------------
typedef enum			// for MediaInfo.mediaType
{ 
{
	UNKNOWN_MEDIA = 0,
	CD_AUDIO_MEDIA = 1,
	DIGITAL_FILE_MEDIA = 2,

M plugins/QCDMp4/QCDModInput.h => plugins/QCDMp4/QCDModInput.h +7 -7
@@ 2,7 2,7 @@
//
// File:	QCDModInput.h
//
// About:	Input plugin module interface.  This file is published with the 
// About:	Input plugin module interface.  This file is published with the
//			Input plugin SDK.
//
// Authors:	Written by Paul Quinn and Richard Carlson.


@@ 13,7 13,7 @@
//
//	Copyright (C) 1997-2002 Quinnware
//
//	This code is free.  If you redistribute it in any form, leave this notice 
//	This code is free.  If you redistribute it in any form, leave this notice
//	here.
//
//	This program is distributed in the hope that it will be useful,


@@ 46,7 46,7 @@
#define PLAYFLAG_SEEKING			0x2

// Wave Marker flags
#define WAVE_VIS_DATA_ONLY			-1	// set to WaveDataStruct.markerstart in OutputWrite() call have data only go to vis 
#define WAVE_VIS_DATA_ONLY			-1	// set to WaveDataStruct.markerstart in OutputWrite() call have data only go to vis
										// and not to output plugin
// pause flags
#define PAUSE_DISABLED				0	// Pause() call is to unpause playback


@@ 55,7 55,7 @@
//-----------------------------------------------------------------------------
// Input Module
//-----------------------------------------------------------------------------
typedef struct 
typedef struct
{
	unsigned int		size;			// size of init structure
	unsigned int		version;		// plugin structure version (set to PLUGIN_API_VERSION)


@@ 74,8 74,8 @@ typedef struct

																	// output plugin calls
		int  (*OutputOpen)(const char* medianame, WAVEFORMATEX*);	// open output for wave data
		int  (*OutputWrite)(WriteDataStruct*);						// send PCM audio data to output 
																		// (blocks until write completes, thus if output is paused can 
		int  (*OutputWrite)(WriteDataStruct*);						// send PCM audio data to output
																		// (blocks until write completes, thus if output is paused can
																		// block until unpaused)
		int  (*OutputDrain)(int flags);								// wait for all output to complete (blocking)
		int  (*OutputDrainCancel)(int flags);						// break a drain in progress


@@ 89,7 89,7 @@ typedef struct
		void *Reserved[10];
	} toPlayer;

	struct 
	struct
	{
		int  (*Initialize)(QCDModInfo *modInfo, int flags);			// initialize plugin
		void (*ShutDown)(int flags);								// shutdown plugin

M plugins/QCDMp4/QCDModTagEditor.h => plugins/QCDMp4/QCDModTagEditor.h +7 -7
@@ 2,7 2,7 @@
//
// File:	QCDModTagEditor
//
// About:	Tag Editing plugin module interface.  This file is published with the 
// About:	Tag Editing plugin module interface.  This file is published with the
//			QCD plugin SDK.
//
// Authors:	Written by Paul Quinn


@@ 13,7 13,7 @@
//
//	Copyright (C) 2002 Quinnware
//
//	This code is free.  If you redistribute it in any form, leave this notice 
//	This code is free.  If you redistribute it in any form, leave this notice
//	here.
//
//	This program is distributed in the hope that it will be useful,


@@ 37,10 37,10 @@ typedef enum

	TAGFIELD_TITLE = 0,
	TAGFIELD_ARTIST,
	TAGFIELD_ALBUM, 
	TAGFIELD_ALBUM,
	TAGFIELD_GENRE,
	TAGFIELD_YEAR,  
	TAGFIELD_TRACK, 
	TAGFIELD_YEAR,
	TAGFIELD_TRACK,
	TAGFIELD_COMMENT,

	TAGFIELD_COMPOSER,


@@ 49,7 49,7 @@ typedef enum
	TAGFIELD_YEARCOMPOSED,

	TAGFIELD_ORIGARTIST,
	TAGFIELD_LABEL, 
	TAGFIELD_LABEL,
	TAGFIELD_COPYRIGHT,
	TAGFIELD_ENCODER,
	TAGFIELD_CDDBTAGID,


@@ 59,7 59,7 @@ typedef enum

//-----------------------------------------------------------------------------

typedef struct 
typedef struct
{
	UINT	size;			// size of init structure
	UINT	version;		// plugin structure version (set to PLUGIN_API_VERSION)

M plugins/QCDMp4/QCDMp4.c => plugins/QCDMp4/QCDMp4.c +10 -10
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
** 
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software 
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** Any non-GPL usage of this software or parts of this software is strictly


@@ 544,7 544,7 @@ int Initialize(QCDModInfo *ModInfo, int flags)

//----------------------------------------------------------------------------

void ShutDown(int flags) 
void ShutDown(int flags)
{
	Stop(mp4state.filename, STOPFLAG_FORCESTOP);
}


@@ 1443,7 1443,7 @@ int skip_id3v2_tag()
    return tagsize;
}

int GetMediaSupported(const char* medianame, MediaInfo *mediaInfo) 
int GetMediaSupported(const char* medianame, MediaInfo *mediaInfo)
{
    int tagsize = 0, init;



@@ 2451,7 2451,7 @@ DWORD WINAPI MP4PlayThread(void *b)
                }
            }
        }
		

		Sleep(10);

		// catch pause


@@ 2710,7 2710,7 @@ DWORD WINAPI AACPlayThread(void *b)
            if (frameInfo.channels > 0 && mp4state.samplerate > 0)
                mp4state.cur_pos_sec += ((double)(frameInfo.samples/frameInfo.channels))/(double)mp4state.samplerate;
        }
		

		Sleep(10);

		// catch pause


@@ 2748,7 2748,7 @@ PLUGIN_API QCDModInitIn* INPUTDLL_ENTRY_POINT(QCDModInitIn *ModInit, QCDModInfo 
	module.QCDCallbacks.toModule.Pause				= Pause;
	module.QCDCallbacks.toModule.Stop				= Stop;
	module.QCDCallbacks.toModule.About				= About;
	module.QCDCallbacks.toModule.Configure			= Configure;	
	module.QCDCallbacks.toModule.Configure			= Configure;
	module.QCDCallbacks.toModule.SetEQ				= NULL;
	module.QCDCallbacks.toModule.SetVolume			= SetVolume;



@@ 2964,7 2964,7 @@ PLUGIN_API QCDModInitIn* INPUTDLL_ENTRY_POINT(QCDModInitIn *ModInit, QCDModInfo 
//    free(temp);
//
//    return ret;
//}    
//}
//
//__declspec(dllexport) int winampWriteExtendedFileInfo()
//{

M plugins/QCDMp4/QCDMp4Tag.cpp => plugins/QCDMp4/QCDMp4Tag.cpp +2 -2
@@ 304,7 304,7 @@ UINT uGetDlgItemText(void *tagHandle, int fieldId, char *str, int max);
//------------------------------------------------------------------------------

PLUGIN_API QCDModInitTag* TAGEDITORDLL_ENTRY_POINT()
{	
{
	ModInitTag.size			= sizeof(QCDModInitTag);
	ModInitTag.version		= PLUGIN_API_VERSION;
	ModInitTag.ShutDown		= ShutDown_Tag;


@@ 607,7 607,7 @@ bool Strip_Tag(LPCSTR filename)
	file = MP4Modify(filename, 0, 0);
	if (file == MP4_INVALID_FILE_HANDLE)
		return false;
	

	MP4MetadataDelete(file);

	MP4Close(file);

M plugins/QCDMp4/aac2mp4.cpp => plugins/QCDMp4/aac2mp4.cpp +13 -13
@@ 1,19 1,19 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
**  
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
**