ref: b00a2415ffe2895620baf6bae968d547cc723f21
parent: c44c0332357abb38513127baeb4303c2c4663e44
author: menno <menno>
date: Sun Feb 16 13:17:11 EST 2003
Better bitstream error handling, it's not possible to read more bits than in the input buffer Some small speedups
--- a/aacDECdrop/audio.c
+++ b/aacDECdrop/audio.c
@@ -16,7 +16,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: audio.c,v 1.7 2002/08/26 19:08:39 menno Exp $
+** $Id: audio.c,v 1.8 2003/02/16 18:17:09 menno Exp $
**/
#ifdef _WIN32
@@ -132,7 +132,7 @@
*p++ = 'R'; *p++ = 'I'; *p++ = 'F'; *p++ = 'F';
- word32 = data_size + (44 - 8) < (float)MAXWAVESIZE ?
+ word32 = (data_size + (44 - 8) < (float)MAXWAVESIZE) ?
(unsigned long)data_size + (44 - 8) : (unsigned long)MAXWAVESIZE;
*p++ = (unsigned char)(word32 >> 0);
*p++ = (unsigned char)(word32 >> 8);
@@ -160,7 +160,7 @@
*p++ = (unsigned char)(aufile->samplerate >> 16);
*p++ = (unsigned char)(aufile->samplerate >> 24);
- word32 *= bytes * aufile->channels;
+ word32 = aufile->samplerate * bytes * aufile->channels;
*p++ = (unsigned char)(word32 >> 0);
*p++ = (unsigned char)(word32 >> 8);
*p++ = (unsigned char)(word32 >> 16);
--- a/aacDECdrop/audio.h
+++ b/aacDECdrop/audio.h
@@ -16,7 +16,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: audio.h,v 1.6 2002/08/26 19:08:39 menno Exp $
+** $Id: audio.h,v 1.7 2003/02/16 18:17:09 menno Exp $
**/
#ifndef AUDIO_H_INCLUDED
@@ -28,10 +28,8 @@
#define MAXWAVESIZE 4294967040LU
-enum {
- OUTPUT_WAV = 1,
- OUTPUT_RAW
-} output_format;
+#define OUTPUT_WAV 1
+#define OUTPUT_RAW 2
typedef struct
{
--- a/common/mp4v2/libmp4v2_st60.vcproj
+++ b/common/mp4v2/libmp4v2_st60.vcproj
@@ -71,7 +71,7 @@
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<IntelOptions
- CompilerName="0"/>
+ CompilerName="1"/>
</Configuration>
<Configuration
Name="Debug|Win32"
--- a/frontend/faad.vcproj
+++ b/frontend/faad.vcproj
@@ -33,15 +33,13 @@
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
- CompileAs="0"
- AdditionalOptions="">
+ CompileAs="0">
<IntelOptions
Optimization="0"
MinimalRebuild="1"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
- AllOptions="/c /I "../include" /I "../common/mp4v2" /I "../common/faad" /ZI /nologo /W3 /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /YX"StdAfx.h" /Fp".\Debug/faad.pch" /Fo".\Debug/" /Fd".\Debug/" /Gd"
- MSOriginalAdditionalOptions=""/>
+ AllOptions="/c /I "../include" /I "../common/mp4v2" /I "../common/faad" /ZI /nologo /W3 /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /YX"StdAfx.h" /Fp".\Debug/faad.pch" /Fo".\Debug/" /Fd".\Debug/" /Gd"/>
</Tool>
<Tool
Name="VCCustomBuildTool"/>
@@ -56,8 +54,7 @@
ProgramDatabaseFile=".\Debug/faad.pdb"
SubSystem="1">
<IntelOptions
- AllOptions="/NOLOGO /OUT:".\Debug/faad.exe" /INCREMENTAL ws2_32.lib odbc32.lib odbccp32.lib /DEBUG /PDB:".\Debug/faad.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /MACHINE:I386 "e:\aac\cvsroot\faad2\libfaad\Debug\libfaad.lib" "e:\aac\cvsroot\faad2\common\mp4v2\ST_Debug\libmp4v2_st60.lib" "e:\aac\cvsroot\faad2\libfaad\Debug\libfaad.lib" "e:\aac\cvsroot\faad2\common\mp4v2\ST_Debug\libmp4v2_st60.lib" "e:\aac\cvsroot\faad2\libfaad\Debug\libfaad.lib" "e:\aac\cvsroot\faad2\common\mp4v2\ST_Debug\libmp4v2_st60.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
- MSOriginalAdditionalOptions="/MACHINE:I386 "e:\aac\cvsroot\faad2\libfaad\Debug\libfaad.lib" "e:\aac\cvsroot\faad2\common\mp4v2\ST_Debug\libmp4v2_st60.lib" "e:\aac\cvsroot\faad2\libfaad\Debug\libfaad.lib" "e:\aac\cvsroot\faad2\common\mp4v2\ST_Debug\libmp4v2_st60.lib" "e:\aac\cvsroot\faad2\libfaad\Debug\libfaad.lib" "e:\aac\cvsroot\faad2\common\mp4v2\ST_Debug\libmp4v2_st60.lib""/>
+ AllOptions="/NOLOGO /OUT:".\Debug/faad.exe" /INCREMENTAL ws2_32.lib odbc32.lib odbccp32.lib /DEBUG /PDB:".\Debug/faad.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /MACHINE:I386 "e:\aac\cvsroot\faad2\libfaad\Debug\libfaad.lib" "e:\aac\cvsroot\faad2\common\mp4v2\ST_Debug\libmp4v2_st60.lib" "e:\aac\cvsroot\faad2\libfaad\Debug\libfaad.lib" "e:\aac\cvsroot\faad2\common\mp4v2\ST_Debug\libmp4v2_st60.lib" "e:\aac\cvsroot\faad2\libfaad\Debug\libfaad.lib" "e:\aac\cvsroot\faad2\common\mp4v2\ST_Debug\libmp4v2_st60.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
</Tool>
<Tool
Name="VCMIDLTool"
@@ -106,8 +103,7 @@
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
- CompileAs="0"
- AdditionalOptions="">
+ CompileAs="0">
<IntelOptions
Optimization="2"
GlobalOptimizations="1"
@@ -117,14 +113,13 @@
RuntimeLibrary="0"
BufferSecurityCheck="1"
FunctionLevelLinking="1"
- AllOptions="/c /I "../include" /I "../common/mp4v2" /I "../common/faad" /nologo /W3 /O2 /Og /Ob1 /Oy /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /GF /FD /EHsc /MT /GS /Gy /YX"StdAfx.h" /Fp".\Release/faad.pch" /Fo".\Release/" /Fd".\Release/" /Gd"
- MSOriginalAdditionalOptions=""/>
+ AllOptions="/c /I "../include" /I "../common/mp4v2" /I "../common/faad" /nologo /W3 /O2 /Og /Ob1 /Oy /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /GF /FD /EHsc /MT /GS /Gy /YX"StdAfx.h" /Fp".\Release/faad.pch" /Fo".\Release/" /Fd".\Release/" /Gd"/>
</Tool>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalOptions="/MACHINE:I386 "..\libfaad\Release\libfaad.lib" "..\common\mp4v2\ST_Release\libmp4v2_st60.lib""
+ AdditionalOptions="/MACHINE:I386 "..\libfaad\Release\libfaad.lib" "..\common\mp4v2\ST_Release\libmp4v2_st60.lib" "e:\cvs\audiocoding\faad2\libfaad\Release\libfaad.lib" "e:\cvs\audiocoding\faad2\common\mp4v2\ST_Release\libmp4v2_st60.lib""
AdditionalDependencies="ws2_32.lib"
OutputFile=".\Release/faad.exe"
LinkIncremental="1"
@@ -131,8 +126,7 @@
SuppressStartupBanner="TRUE"
SubSystem="1">
<IntelOptions
- AllOptions="/NOLOGO /OUT:".\Release/faad.exe" /INCREMENTAL:NO ws2_32.lib /SUBSYSTEM:CONSOLE /TLBID:1 /MACHINE:I386 "..\libfaad\Release\libfaad.lib" "..\common\mp4v2\ST_Release\libmp4v2_st60.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
- MSOriginalAdditionalOptions="/MACHINE:I386 "..\libfaad\Release\libfaad.lib" "..\common\mp4v2\ST_Release\libmp4v2_st60.lib""/>
+ AllOptions="/NOLOGO /OUT:".\Release/faad.exe" /INCREMENTAL:NO ws2_32.lib /SUBSYSTEM:CONSOLE /TLBID:1 /MACHINE:I386 "..\libfaad\Release\libfaad.lib" "..\common\mp4v2\ST_Release\libmp4v2_st60.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
</Tool>
<Tool
Name="VCMIDLTool"
--- a/libfaad/bits.c
+++ b/libfaad/bits.c
@@ -16,7 +16,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: bits.c,v 1.18 2002/12/10 19:45:35 menno Exp $
+** $Id: bits.c,v 1.19 2003/02/16 18:17:10 menno Exp $
**/
#include "common.h"
@@ -53,17 +53,22 @@
ld->tail = ((uint32_t*)ld->buffer + 2);
ld->bits_left = 32;
+
+ ld->bytes_used = 0;
+ ld->no_more_reading = 0;
+ ld->error = 0;
}
void faad_endbits(bitfile *ld)
{
- if (ld->buffer) free(ld->buffer);
+ if (ld)
+ if (ld->buffer) free(ld->buffer);
}
uint32_t faad_get_processed_bits(bitfile *ld)
{
- return 8 * (4*(ld->tail - ld->start) - 4) - (ld->bits_left);
+ return 8*(ld->bytes_used + (32 - ld->bits_left));
}
uint8_t faad_byte_align(bitfile *ld)
@@ -153,4 +158,8 @@
ld->bits_left = bits_in_buffer % 32;
if (ld->bits_left == 0)
ld->bits_left = 32;
+
+ ld->bytes_used = 0;
+ ld->no_more_reading = 0;
+ ld->error = 0;
}
--- a/libfaad/bits.h
+++ b/libfaad/bits.h
@@ -16,7 +16,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: bits.h,v 1.15 2002/12/10 19:45:35 menno Exp $
+** $Id: bits.h,v 1.16 2003/02/16 18:17:10 menno Exp $
**/
#ifndef __BITS_H__
@@ -41,6 +41,9 @@
uint32_t bufb;
uint32_t bits_left;
uint32_t buffer_size; /* size of the buffer in bytes */
+ uint32_t bytes_used;
+ uint8_t no_more_reading;
+ uint8_t error;
uint32_t *tail;
uint32_t *start;
void *buffer;
@@ -117,6 +120,11 @@
#endif
ld->bufb = tmp;
ld->bits_left += (32 - bits);
+ ld->bytes_used += 4;
+ if (ld->bytes_used == ld->buffer_size)
+ ld->no_more_reading = 1;
+ if (ld->bytes_used > ld->buffer_size)
+ ld->error = 1;
}
}
@@ -125,6 +133,9 @@
{
uint32_t ret;
+ if (ld->no_more_reading)
+ return 0;
+
if (n == 0)
return 0;
@@ -141,7 +152,15 @@
static INLINE uint8_t faad_get1bit(bitfile *ld DEBUGDEC)
{
- return (uint8_t)faad_getbits(ld, 1 DEBUGVAR(print,var,dbg));
+ uint8_t r;
+
+ if (ld->bits_left == 0)
+ return (uint8_t)faad_getbits(ld, 1 DEBUGVAR(print,var,dbg));
+
+ ld->bits_left--;
+ r = (ld->bufa >> ld->bits_left) & 1;
+
+ return r;
}
/* reversed bitreading routines */
@@ -189,6 +208,12 @@
ld->bufb = tmp;
ld->start--;
ld->bits_left += (32 - bits);
+
+ ld->bytes_used += 4;
+ if (ld->bytes_used == ld->buffer_size)
+ ld->no_more_reading = 1;
+ if (ld->bytes_used > ld->buffer_size)
+ ld->error = 1;
}
}
@@ -196,6 +221,9 @@
DEBUGDEC)
{
uint32_t ret;
+
+ if (ld->no_more_reading)
+ return 0;
if (n == 0)
return 0;
--- a/libfaad/decoder.c
+++ b/libfaad/decoder.c
@@ -16,7 +16,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: decoder.c,v 1.50 2003/02/09 20:42:49 menno Exp $
+** $Id: decoder.c,v 1.51 2003/02/16 18:17:11 menno Exp $
**/
#include "common.h"
@@ -173,6 +173,8 @@
2 : adts.channel_configuration;
}
+ if (ld.error)
+ return -1;
faad_endbits(&ld);
}
hDecoder->channelConfiguration = *channels;
@@ -426,6 +428,11 @@
/* no more bit reading after this */
hInfo->bytesconsumed = bit2byte(faad_get_processed_bits(ld));
+ if (ld->error)
+ {
+ hInfo->error = 14;
+ goto error;
+ }
faad_endbits(ld);
if (ld) free(ld);
ld = NULL;
--- a/libfaad/error.c
+++ b/libfaad/error.c
@@ -16,7 +16,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: error.c,v 1.7 2002/12/05 18:01:55 menno Exp $
+** $Id: error.c,v 1.8 2003/02/16 18:17:11 menno Exp $
**/
#include "common.h"
@@ -36,5 +36,6 @@
"Error decoding huffman codeword (bitstream error)",
"Non existent huffman codebook number found",
"Maximum number of channels exceeded",
- "Maximum number of bitstream elements exceeded"
+ "Maximum number of bitstream elements exceeded",
+ "Input data buffer too small"
};
\ No newline at end of file
--- a/libfaad/libfaad.dsp
+++ b/libfaad/libfaad.dsp
@@ -42,7 +42,7 @@
# PROP Target_Dir ""
MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /I "fftw" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FFTW_ENABLE_FLOAT" /YX /FD /c
+# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /Ob1 /I "fftw" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FFTW_ENABLE_FLOAT" /YX /FD /c
# ADD BASE RSC /l 0x413 /d "NDEBUG"
# ADD RSC /l 0x413 /d "NDEBUG"
BSC32=bscmake.exe
--- a/libfaad/libfaad.vcproj
+++ b/libfaad/libfaad.vcproj
@@ -21,8 +21,8 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="fftw"
- PreprocessorDefinitions="_DEBUG,WIN32,_LIB,FFTW_ENABLE_FLOAT"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_DEBUG,WIN32,_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
@@ -33,13 +33,15 @@
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
- CompileAs="0">
+ CompileAs="0"
+ AdditionalOptions="">
<IntelOptions
Optimization="0"
MinimalRebuild="1"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
- AllOptions="/c /I "fftw" /ZI /nologo /W3 /Od /D "_DEBUG" /D "WIN32" /D "_LIB" /D "FFTW_ENABLE_FLOAT" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /YX"StdAfx.h" /Fp".\Debug/libfaad.pch" /Fo".\Debug/" /Fd".\Debug/" /Gd"/>
+ AllOptions="/c /ZI /nologo /W3 /Od /D "_DEBUG" /D "WIN32" /D "_LIB" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /YX"StdAfx.h" /Fp".\Debug/libfaad.pch" /Fo".\Debug/" /Fd".\Debug/" /Gd"
+ MSOriginalAdditionalOptions=""/>
</Tool>
<Tool
Name="VCCustomBuildTool"/>
@@ -46,9 +48,11 @@
<Tool
Name="VCLibrarianTool"
OutputFile=".\Debug\libfaad.lib"
- SuppressStartupBanner="TRUE">
+ SuppressStartupBanner="TRUE"
+ AdditionalOptions="">
<IntelOptions
- AllOptions="/OUT:".\Debug\libfaad.lib" /NOLOGO"/>
+ AllOptions="/OUT:".\Debug\libfaad.lib" /NOLOGO"
+ MSOriginalAdditionalOptions=""/>
</Tool>
<Tool
Name="VCMIDLTool"/>
@@ -75,24 +79,34 @@
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
+ GlobalOptimizations="FALSE"
InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="FALSE"
+ FavorSizeOrSpeed="0"
OptimizeForProcessor="0"
- AdditionalIncludeDirectories="fftw"
- PreprocessorDefinitions="NDEBUG,WIN32,_LIB,FFTW_ENABLE_FLOAT"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/libfaad.pch"
+ AssemblerOutput="0"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
- CompileAs="0">
+ CompileAs="0"
+ AdditionalOptions="">
<IntelOptions
+ AssemblyOutput="0"
+ PGOPhase="0"
Optimization="2"
+ GlobalOptimizations="0"
InlineFuncExpansion="1"
+ IntrinsicFuncs="0"
+ FavorSizeSpeed="0"
OmitFramePtrs="1"
OptimProc="0"
UseProcExt="0"
@@ -101,7 +115,8 @@
RuntimeLibrary="0"
BufferSecurityCheck="1"
FunctionLevelLinking="1"
- AllOptions="/c /I "fftw" /nologo /W3 /O2 /Ob1 /Oy /D "NDEBUG" /D "WIN32" /D "_LIB" /D "FFTW_ENABLE_FLOAT" /D "_MBCS" /GF /FD /EHsc /MT /GS /Gy /YX"StdAfx.h" /Fp".\Release/libfaad.pch" /Fo".\Release/" /Fd".\Release/" /Gd"/>
+ AllOptions="/c /nologo /W3 /O2 /Ob1 /Oy /D "NDEBUG" /D "WIN32" /D "_LIB" /D "_MBCS" /GF /FD /EHsc /MT /GS /Gy /YX"StdAfx.h" /Fp".\Release/libfaad.pch" /Fo".\Release/" /Fd".\Release/" /Gd"
+ MSOriginalAdditionalOptions=""/>
</Tool>
<Tool
Name="VCCustomBuildTool"/>
@@ -108,9 +123,11 @@
<Tool
Name="VCLibrarianTool"
OutputFile=".\Release\libfaad.lib"
- SuppressStartupBanner="TRUE">
+ SuppressStartupBanner="TRUE"
+ AdditionalOptions="">
<IntelOptions
- AllOptions="/OUT:".\Release\libfaad.lib" /NOLOGO"/>
+ AllOptions="/OUT:".\Release\libfaad.lib" /NOLOGO"
+ MSOriginalAdditionalOptions=""/>
</Tool>
<Tool
Name="VCMIDLTool"/>
@@ -126,6 +143,9 @@
Culture="1043"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
+ <IntelOptions
+ AssemblyOutput="0"
+ PGOPhase="0"/>
</Configuration>
</Configurations>
<Files>
--- a/libfaad/specrec.c
+++ b/libfaad/specrec.c
@@ -16,7 +16,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: specrec.c,v 1.18 2002/12/22 19:58:31 menno Exp $
+** $Id: specrec.c,v 1.19 2003/02/16 18:17:11 menno Exp $
**/
/*
@@ -256,39 +256,36 @@
static INLINE real_t iquant(int16_t q)
{
- if (q > 0)
+ int16_t sgn = 1;
+
+ if (q == 0) return 0;
+
+ if (q < 0)
{
- if (q < IQ_TABLE_SIZE)
- return iq_table[q];
- else
- return iq_table[q>>3] * 16;
- } else if (q < 0) {
q = -q;
- if (q < IQ_TABLE_SIZE)
- return -iq_table[q];
- else
- return -iq_table[q>>3] * 16;
- } else {
- return 0;
+ sgn = -1;
}
+
+ if (q >= IQ_TABLE_SIZE)
+ return sgn * iq_table[q>>3] * 16;
+
+ return sgn * iq_table[q];
}
void inverse_quantization(real_t *x_invquant, int16_t *x_quant, uint16_t frame_len)
{
- int8_t i;
+ int16_t i;
int16_t *in_ptr = x_quant;
real_t *out_ptr = x_invquant;
- for(i = frame_len/8-1; i >= 0; --i)
+ for(i = frame_len/4-1; i >= 0; --i)
{
- *out_ptr++ = iquant(*in_ptr++);
- *out_ptr++ = iquant(*in_ptr++);
- *out_ptr++ = iquant(*in_ptr++);
- *out_ptr++ = iquant(*in_ptr++);
- *out_ptr++ = iquant(*in_ptr++);
- *out_ptr++ = iquant(*in_ptr++);
- *out_ptr++ = iquant(*in_ptr++);
- *out_ptr++ = iquant(*in_ptr++);
+ out_ptr[0] = iquant(in_ptr[0]);
+ out_ptr[1] = iquant(in_ptr[1]);
+ out_ptr[2] = iquant(in_ptr[2]);
+ out_ptr[3] = iquant(in_ptr[3]);
+ out_ptr += 4;
+ in_ptr += 4;
}
}