• Nathan Caldwell's avatar
    aacenc: Correct spreading calculation for high spreading. · d56920e2
    Nathan Caldwell authored
    The 3GPP spec uses the following calculation for high spreading:
    
    thr'_spr = max(thr_scaled, s_h(n) * thr_scaled(n-1))
    
    where, n is defined as the current band, and s_h() is defined as "[...] the
    distance of adjacent bands in Bark and a constant slope that is 15 dB/Bark
    [...]". This is a little ambiguous as you would assume you want the Bark
    width of the previous band for this calculation. However, this assumption
    appears to be incorrect, and you really want the Bark width of the current
    band. Coincidentally this is exactly what the spec calls for! =P
    
    This noticeably improves Tom's Diner at low bitrates (I tested at 64kbps,
    with mid/side disabled).
    
    Patch by: Nathan Caldwell <saintdev@gmail.com>
    
    Originally committed as revision 25622 to svn://svn.ffmpeg.org/ffmpeg/trunk
    d56920e2
Name
Last commit
Last update
..
alpha Loading commit data...
arm Loading commit data...
avr32 Loading commit data...
bfin Loading commit data...
mips Loading commit data...
mlib Loading commit data...
ppc Loading commit data...
ps2 Loading commit data...
sh4 Loading commit data...
sparc Loading commit data...
x86 Loading commit data...
4xm.c Loading commit data...
8bps.c Loading commit data...
8svx.c Loading commit data...
Makefile Loading commit data...
a64colors.h Loading commit data...
a64enc.h Loading commit data...
a64multienc.c Loading commit data...
a64tables.h Loading commit data...
aac.h Loading commit data...
aac_ac3_parser.c Loading commit data...
aac_ac3_parser.h Loading commit data...
aac_adtstoasc_bsf.c Loading commit data...
aac_parser.c Loading commit data...
aac_tablegen.c Loading commit data...
aac_tablegen.h Loading commit data...
aac_tablegen_decl.h Loading commit data...
aacadtsdec.c Loading commit data...
aacadtsdec.h Loading commit data...
aaccoder.c Loading commit data...
aacdec.c Loading commit data...
aacdectab.h Loading commit data...
aacenc.c Loading commit data...
aacenc.h Loading commit data...
aacps.c Loading commit data...
aacps.h Loading commit data...
aacps_tablegen.c Loading commit data...
aacps_tablegen.h Loading commit data...
aacpsdata.c Loading commit data...
aacpsy.c Loading commit data...
aacpsy.h Loading commit data...
aacsbr.c Loading commit data...
aacsbr.h Loading commit data...
aacsbrdata.h Loading commit data...
aactab.c Loading commit data...
aactab.h Loading commit data...
aandcttab.c Loading commit data...
aandcttab.h Loading commit data...
aasc.c Loading commit data...
ac3.c Loading commit data...
ac3.h Loading commit data...
ac3_parser.c Loading commit data...
ac3_parser.h Loading commit data...
ac3dec.c Loading commit data...
ac3dec.h Loading commit data...
ac3dec_data.c Loading commit data...
ac3dec_data.h Loading commit data...
ac3enc.c Loading commit data...
ac3tab.c Loading commit data...
ac3tab.h Loading commit data...
acelp_filters.c Loading commit data...
acelp_filters.h Loading commit data...
acelp_pitch_delay.c Loading commit data...
acelp_pitch_delay.h Loading commit data...
acelp_vectors.c Loading commit data...
acelp_vectors.h Loading commit data...
adpcm.c Loading commit data...
adx.h Loading commit data...
adxdec.c Loading commit data...
adxenc.c Loading commit data...
alac.c Loading commit data...
alacenc.c Loading commit data...
allcodecs.c Loading commit data...
alsdec.c Loading commit data...
amr.h Loading commit data...
amrnbdata.h Loading commit data...
amrnbdec.c Loading commit data...
anm.c Loading commit data...
ansi.c Loading commit data...
apedec.c Loading commit data...
api-example.c Loading commit data...
asv1.c Loading commit data...
atrac.c Loading commit data...
atrac.h Loading commit data...
atrac1.c Loading commit data...
atrac1data.h Loading commit data...
atrac3.c Loading commit data...
atrac3data.h Loading commit data...
audioconvert.c Loading commit data...
audioconvert.h Loading commit data...
aura.c Loading commit data...
avcodec.h Loading commit data...
avfft.c Loading commit data...
avfft.h Loading commit data...
avpacket.c Loading commit data...
avs.c Loading commit data...
bethsoftvideo.c Loading commit data...
bethsoftvideo.h Loading commit data...
bfi.c Loading commit data...
bgmc.c Loading commit data...
bgmc.h Loading commit data...
bink.c Loading commit data...
binkaudio.c Loading commit data...
binkdata.h Loading commit data...
binkidct.c Loading commit data...
bitstream.c Loading commit data...
bitstream_filter.c Loading commit data...
bmp.c Loading commit data...
bmp.h Loading commit data...
bmpenc.c Loading commit data...
bytestream.h Loading commit data...
c93.c Loading commit data...
cabac.c Loading commit data...
cabac.h Loading commit data...
cavs.c Loading commit data...
cavs.h Loading commit data...
cavs_parser.c Loading commit data...
cavsdata.h Loading commit data...
cavsdec.c Loading commit data...
cavsdsp.c Loading commit data...
cavsdsp.h Loading commit data...
cbrt_tablegen.c Loading commit data...
cbrt_tablegen.h Loading commit data...
cdgraphics.c Loading commit data...
celp_filters.c Loading commit data...
celp_filters.h Loading commit data...
celp_math.c Loading commit data...
celp_math.h Loading commit data...
cga_data.c Loading commit data...
cga_data.h Loading commit data...
chomp_bsf.c Loading commit data...
cinepak.c Loading commit data...
cljr.c Loading commit data...
cook.c Loading commit data...
cookdata.h Loading commit data...
costablegen.c Loading commit data...
cscd.c Loading commit data...
cyuv.c Loading commit data...
dca.c Loading commit data...
dca.h Loading commit data...
dca_parser.c Loading commit data...
dcadata.h Loading commit data...
dcadsp.c Loading commit data...
dcadsp.h Loading commit data...
dcahuff.h Loading commit data...
dct-test.c Loading commit data...
dct.c Loading commit data...
dct32.c Loading commit data...
dctref.c Loading commit data...
dctref.h Loading commit data...
dirac.c Loading commit data...
dirac.h Loading commit data...
dirac_parser.c Loading commit data...
dnxhd_parser.c Loading commit data...
dnxhddata.c Loading commit data...
dnxhddata.h Loading commit data...
dnxhddec.c Loading commit data...
dnxhdenc.c Loading commit data...
dnxhdenc.h Loading commit data...
dpcm.c Loading commit data...
dpx.c Loading commit data...
dsicinav.c Loading commit data...
dsputil.c Loading commit data...
dsputil.h Loading commit data...
dump_extradata_bsf.c Loading commit data...
dv.c Loading commit data...
dv_tablegen.c Loading commit data...
dv_tablegen.h Loading commit data...
dv_vlc_data.h Loading commit data...
dvbsub.c Loading commit data...
dvbsub_parser.c Loading commit data...
dvbsubdec.c Loading commit data...
dvdata.c Loading commit data...
dvdata.h Loading commit data...
dvdsub_parser.c Loading commit data...
dvdsubdec.c Loading commit data...
dvdsubenc.c Loading commit data...
dwt.c Loading commit data...
dwt.h Loading commit data...
dxa.c Loading commit data...
dxva2.c Loading commit data...
dxva2.h Loading commit data...
dxva2_h264.c Loading commit data...
dxva2_internal.h Loading commit data...
dxva2_mpeg2.c Loading commit data...
dxva2_vc1.c Loading commit data...
eac3dec.c Loading commit data...
eac3dec_data.c Loading commit data...
eac3dec_data.h Loading commit data...
eacmv.c Loading commit data...
eaidct.c Loading commit data...
eamad.c Loading commit data...
eatgq.c Loading commit data...
eatgv.c Loading commit data...
eatqi.c Loading commit data...
elbg.c Loading commit data...
elbg.h Loading commit data...
error_resilience.c Loading commit data...
escape124.c Loading commit data...
faandct.c Loading commit data...
faandct.h Loading commit data...
faanidct.c Loading commit data...
faanidct.h Loading commit data...
faxcompr.c Loading commit data...
faxcompr.h Loading commit data...
fft-test.c Loading commit data...
fft.c Loading commit data...
fft.h Loading commit data...
ffv1.c Loading commit data...
flac.c Loading commit data...
flac.h Loading commit data...
flacdata.c Loading commit data...
flacdata.h Loading commit data...
flacdec.c Loading commit data...
flacenc.c Loading commit data...
flashsv.c Loading commit data...
flashsvenc.c Loading commit data...
flicvideo.c Loading commit data...
flv.h Loading commit data...
flvdec.c Loading commit data...
flvenc.c Loading commit data...
fraps.c Loading commit data...
frwu.c Loading commit data...
g722.c Loading commit data...
g726.c Loading commit data...
g729.h Loading commit data...
g729data.h Loading commit data...
g729dec.c Loading commit data...
get_bits.h Loading commit data...
gif.c Loading commit data...
gifdec.c Loading commit data...
golomb.c Loading commit data...
golomb.h Loading commit data...
gsmdec.c Loading commit data...
gsmdec_data.c Loading commit data...
gsmdec_data.h Loading commit data...
gsmdec_template.c Loading commit data...
h261.c Loading commit data...
h261.h Loading commit data...
h261_parser.c Loading commit data...
h261data.h Loading commit data...
h261dec.c Loading commit data...
h261enc.c Loading commit data...
h263.c Loading commit data...
h263.h Loading commit data...
h263_parser.c Loading commit data...
h263_parser.h Loading commit data...
h263data.h Loading commit data...
h263dec.c Loading commit data...
h264.c Loading commit data...
h264.h Loading commit data...
h264_cabac.c Loading commit data...
h264_cavlc.c Loading commit data...
h264_direct.c Loading commit data...
h264_loopfilter.c Loading commit data...
h264_mp4toannexb_bsf.c Loading commit data...
h264_mvpred.h Loading commit data...
h264_parser.c Loading commit data...
h264_parser.h Loading commit data...
h264_ps.c Loading commit data...
h264_refs.c Loading commit data...
h264_sei.c Loading commit data...
h264data.h Loading commit data...
h264dsp.c Loading commit data...
h264dsp.h Loading commit data...
h264dspenc.c Loading commit data...
h264enc.c Loading commit data...
h264idct.c Loading commit data...
h264pred.c Loading commit data...
h264pred.h Loading commit data...
huffman.c Loading commit data...
huffman.h Loading commit data...
huffyuv.c Loading commit data...
idcinvideo.c Loading commit data...
iff.c Loading commit data...
iff.h Loading commit data...
iirfilter.c Loading commit data...
iirfilter.h Loading commit data...
imc.c Loading commit data...
imcdata.h Loading commit data...
imgconvert.c Loading commit data...
imgconvert.h Loading commit data...
imx_dump_header_bsf.c Loading commit data...
indeo2.c Loading commit data...
indeo2data.h Loading commit data...
indeo3.c Loading commit data...
indeo3data.h Loading commit data...
indeo5.c Loading commit data...
indeo5data.h Loading commit data...
intelh263dec.c Loading commit data...
internal.h Loading commit data...
interplayvideo.c Loading commit data...
intrax8.c Loading commit data...
intrax8.h Loading commit data...
intrax8dsp.c Loading commit data...
intrax8huf.h Loading commit data...
inverse.c Loading commit data...
ituh263dec.c Loading commit data...
ituh263enc.c Loading commit data...
ivi_common.c Loading commit data...
ivi_common.h Loading commit data...
ivi_dsp.c Loading commit data...
ivi_dsp.h Loading commit data...
jfdctfst.c Loading commit data...
jfdctint.c Loading commit data...
jpegls.c Loading commit data...
jpegls.h Loading commit data...
jpeglsdec.c Loading commit data...
jpeglsdec.h Loading commit data...
jpeglsenc.c Loading commit data...
jrevdct.c Loading commit data...
kgv1dec.c Loading commit data...
kmvc.c Loading commit data...
lcl.h Loading commit data...
lcldec.c Loading commit data...
lclenc.c Loading commit data...
libavcodec.v Loading commit data...
libdirac.h Loading commit data...
libdirac_libschro.c Loading commit data...
libdirac_libschro.h Loading commit data...
libdiracdec.c Loading commit data...
libdiracenc.c Loading commit data...
libfaac.c Loading commit data...
libgsm.c Loading commit data...
libmp3lame.c Loading commit data...
libopencore-amr.c Loading commit data...
libopenjpeg.c Loading commit data...
libschroedinger.c Loading commit data...
libschroedinger.h Loading commit data...
libschroedingerdec.c Loading commit data...
libschroedingerenc.c Loading commit data...
libspeexdec.c Loading commit data...
libtheoraenc.c Loading commit data...
libvorbis.c Loading commit data...
libvpxdec.c Loading commit data...
libvpxenc.c Loading commit data...
libx264.c Loading commit data...
libxavs.c Loading commit data...
libxvid_internal.h Loading commit data...
libxvid_rc.c Loading commit data...
libxvidff.c Loading commit data...
ljpegenc.c Loading commit data...
loco.c Loading commit data...
lpc.c Loading commit data...
lpc.h Loading commit data...
lsp.c Loading commit data...
lsp.h Loading commit data...
lzw.c Loading commit data...
lzw.h Loading commit data...
lzwenc.c Loading commit data...
mace.c Loading commit data...
mathops.h Loading commit data...
mdct.c Loading commit data...
mdct_tablegen.c Loading commit data...
mdct_tablegen.h Loading commit data...
mdec.c Loading commit data...
mimic.c Loading commit data...
mjpeg.c Loading commit data...
mjpeg.h Loading commit data...
mjpeg_parser.c Loading commit data...
mjpega_dump_header_bsf.c Loading commit data...
mjpegbdec.c Loading commit data...
mjpegdec.c Loading commit data...
mjpegdec.h Loading commit data...
mjpegenc.c Loading commit data...
mjpegenc.h Loading commit data...
mlp.c Loading commit data...
mlp.h Loading commit data...
mlp_parser.c Loading commit data...
mlp_parser.h Loading commit data...
mlpdec.c Loading commit data...
mlpdsp.c Loading commit data...
mmvideo.c Loading commit data...
motion-test.c Loading commit data...
motion_est.c Loading commit data...
motion_est_template.c Loading commit data...
motionpixels.c Loading commit data...
motionpixels_tablegen.c Loading commit data...
motionpixels_tablegen.h Loading commit data...
movsub_bsf.c Loading commit data...
mp3_header_compress_bsf.c Loading commit data...
mp3_header_decompress_bsf.c Loading commit data...
mpc.c Loading commit data...
mpc.h Loading commit data...
mpc7.c Loading commit data...
mpc7data.h Loading commit data...
mpc8.c Loading commit data...
mpc8data.h Loading commit data...
mpc8huff.h Loading commit data...
mpcdata.h Loading commit data...
mpeg12.c Loading commit data...
mpeg12.h Loading commit data...
mpeg12data.c Loading commit data...
mpeg12data.h Loading commit data...
mpeg12decdata.h Loading commit data...
mpeg12enc.c Loading commit data...
mpeg4audio.c Loading commit data...
mpeg4audio.h Loading commit data...
mpeg4data.h Loading commit data...
mpeg4video.c Loading commit data...
mpeg4video.h Loading commit data...
mpeg4video_parser.c Loading commit data...
mpeg4video_parser.h Loading commit data...
mpeg4videodec.c Loading commit data...
mpeg4videoenc.c Loading commit data...
mpegaudio.c Loading commit data...
mpegaudio.h Loading commit data...
mpegaudio3.h Loading commit data...
mpegaudio_parser.c Loading commit data...
mpegaudio_tablegen.c Loading commit data...
mpegaudio_tablegen.h Loading commit data...
mpegaudiodata.c Loading commit data...
mpegaudiodata.h Loading commit data...
mpegaudiodec.c Loading commit data...
mpegaudiodec_float.c Loading commit data...
mpegaudiodecheader.c Loading commit data...
mpegaudiodecheader.h Loading commit data...
mpegaudiodectab.h Loading commit data...
mpegaudioenc.c Loading commit data...
mpegaudiotab.h Loading commit data...
mpegvideo.c Loading commit data...
mpegvideo.h Loading commit data...
mpegvideo_common.h Loading commit data...
mpegvideo_enc.c Loading commit data...
mpegvideo_parser.c Loading commit data...
mpegvideo_xvmc.c Loading commit data...
msgsmdec.c Loading commit data...
msgsmdec.h Loading commit data...
msmpeg4.c Loading commit data...
msmpeg4.h Loading commit data...
msmpeg4data.c Loading commit data...
msmpeg4data.h Loading commit data...
msrle.c Loading commit data...
msrledec.c Loading commit data...
msrledec.h Loading commit data...
msvideo1.c Loading commit data...
nellymoser.c Loading commit data...
nellymoser.h Loading commit data...
nellymoserdec.c Loading commit data...
nellymoserenc.c Loading commit data...
noise_bsf.c Loading commit data...
nuv.c Loading commit data...
opt.c Loading commit data...
opt.h Loading commit data...
options.c Loading commit data...
pamenc.c Loading commit data...
parser.c Loading commit data...
parser.h Loading commit data...
pcm-mpeg.c Loading commit data...
pcm.c Loading commit data...
pcm_tablegen.c Loading commit data...
pcm_tablegen.h Loading commit data...
pcx.c Loading commit data...
pcxenc.c Loading commit data...
pgssubdec.c Loading commit data...
pictordec.c Loading commit data...
png.c Loading commit data...
png.h Loading commit data...
pngdec.c Loading commit data...
pngenc.c Loading commit data...
pnm.c Loading commit data...
pnm.h Loading commit data...
pnm_parser.c Loading commit data...
pnmdec.c Loading commit data...
pnmenc.c Loading commit data...
psymodel.c Loading commit data...
psymodel.h Loading commit data...
pthread.c Loading commit data...
ptx.c Loading commit data...
put_bits.h Loading commit data...
qcelpdata.h Loading commit data...
qcelpdec.c Loading commit data...
qdm2.c Loading commit data...
qdm2_tablegen.c Loading commit data...
qdm2_tablegen.h Loading commit data...
qdm2data.h Loading commit data...
qdrw.c Loading commit data...
qpeg.c Loading commit data...
qtrle.c Loading commit data...
qtrleenc.c Loading commit data...
r210dec.c Loading commit data...
ra144.c Loading commit data...
ra144.h Loading commit data...
ra144dec.c Loading commit data...
ra144enc.c Loading commit data...
ra288.c Loading commit data...
ra288.h Loading commit data...
rangecoder.c Loading commit data...
rangecoder.h Loading commit data...
ratecontrol.c Loading commit data...
ratecontrol.h Loading commit data...
raw.c Loading commit data...
raw.h Loading commit data...
rawdec.c Loading commit data...
rawenc.c Loading commit data...
rdft.c Loading commit data...
rectangle.h Loading commit data...
remove_extradata_bsf.c Loading commit data...
resample.c Loading commit data...
resample2.c Loading commit data...
rl.h Loading commit data...
rl2.c Loading commit data...
rle.c Loading commit data...
rle.h Loading commit data...
roqaudioenc.c Loading commit data...
roqvideo.c Loading commit data...
roqvideo.h Loading commit data...
roqvideodec.c Loading commit data...
roqvideoenc.c Loading commit data...
rpza.c Loading commit data...
rtjpeg.c Loading commit data...
rtjpeg.h Loading commit data...
rv10.c Loading commit data...
rv10enc.c Loading commit data...
rv20enc.c Loading commit data...
rv30.c Loading commit data...
rv30data.h Loading commit data...
rv30dsp.c Loading commit data...
rv34.c Loading commit data...
rv34.h Loading commit data...
rv34data.h Loading commit data...
rv34vlc.h Loading commit data...
rv40.c Loading commit data...
rv40data.h Loading commit data...
rv40dsp.c Loading commit data...
rv40vlc2.h Loading commit data...
s3tc.c Loading commit data...
s3tc.h Loading commit data...
sbr.h Loading commit data...
sgi.h Loading commit data...
sgidec.c Loading commit data...
sgienc.c Loading commit data...
shorten.c Loading commit data...
simple_idct.c Loading commit data...
simple_idct.h Loading commit data...
sipr.c Loading commit data...
sipr.h Loading commit data...
sipr16k.c Loading commit data...
sipr16kdata.h Loading commit data...
siprdata.h Loading commit data...
smacker.c Loading commit data...
smc.c Loading commit data...
snow.c Loading commit data...
snow.h Loading commit data...
sonic.c Loading commit data...
sp5x.h Loading commit data...
sp5xdec.c Loading commit data...
sunrast.c Loading commit data...
svq1.c Loading commit data...
svq1.h Loading commit data...
svq1_cb.h Loading commit data...
svq1_vlc.h Loading commit data...
svq1dec.c Loading commit data...
svq1enc.c Loading commit data...
svq1enc_cb.h Loading commit data...
svq3.c Loading commit data...
synth_filter.c Loading commit data...
synth_filter.h Loading commit data...
tableprint.c Loading commit data...
tableprint.h Loading commit data...
targa.c Loading commit data...
targa.h Loading commit data...
targaenc.c Loading commit data...
tiertexseqv.c Loading commit data...
tiff.c Loading commit data...
tiff.h Loading commit data...
tiffenc.c Loading commit data...
tmv.c Loading commit data...
truemotion1.c Loading commit data...
truemotion1data.h Loading commit data...
truemotion2.c Loading commit data...
truespeech.c Loading commit data...
truespeech_data.h Loading commit data...
tscc.c Loading commit data...
tta.c Loading commit data...
twinvq.c Loading commit data...
twinvq_data.h Loading commit data...
txd.c Loading commit data...
ulti.c Loading commit data...
ulti_cb.h Loading commit data...
unary.h Loading commit data...
utils.c Loading commit data...
v210dec.c Loading commit data...
v210enc.c Loading commit data...
v210x.c Loading commit data...
vaapi.c Loading commit data...
vaapi.h Loading commit data...
vaapi_h264.c Loading commit data...
vaapi_internal.h Loading commit data...
vaapi_mpeg2.c Loading commit data...
vaapi_mpeg4.c Loading commit data...
vaapi_vc1.c Loading commit data...
vb.c Loading commit data...
vc1.c Loading commit data...
vc1.h Loading commit data...
vc1_parser.c Loading commit data...
vc1acdata.h Loading commit data...
vc1data.c Loading commit data...
vc1data.h Loading commit data...
vc1dec.c Loading commit data...
vc1dsp.c Loading commit data...
vcr1.c Loading commit data...
vdpau.c Loading commit data...
vdpau.h Loading commit data...
vdpau_internal.h Loading commit data...
vmdav.c Loading commit data...
vmnc.c Loading commit data...
vorbis.c Loading commit data...
vorbis.h Loading commit data...
vorbis_data.c Loading commit data...
vorbis_dec.c Loading commit data...
vorbis_enc.c Loading commit data...
vorbis_enc_data.h Loading commit data...
vp3.c Loading commit data...
vp3_parser.c Loading commit data...
vp3data.h Loading commit data...
vp3dsp.c Loading commit data...
vp5.c Loading commit data...
vp56.c Loading commit data...
vp56.h Loading commit data...
vp56data.c Loading commit data...
vp56data.h Loading commit data...
vp56dsp.c Loading commit data...
vp56dsp.h Loading commit data...
vp56rac.c Loading commit data...
vp5data.h Loading commit data...
vp6.c Loading commit data...
vp6data.h Loading commit data...
vp6dsp.c Loading commit data...
vp8.c Loading commit data...
vp8_parser.c Loading commit data...
vp8data.h Loading commit data...
vp8dsp.c Loading commit data...
vp8dsp.h Loading commit data...
vqavideo.c Loading commit data...
w32thread.c Loading commit data...
wavpack.c Loading commit data...
wma.c Loading commit data...
wma.h Loading commit data...
wmadata.h Loading commit data...
wmadec.c Loading commit data...
wmaenc.c Loading commit data...
wmaprodata.h Loading commit data...
wmaprodec.c Loading commit data...
wmavoice.c Loading commit data...
wmavoice_data.h Loading commit data...
wmv2.c Loading commit data...
wmv2.h Loading commit data...
wmv2dec.c Loading commit data...
wmv2enc.c Loading commit data...
wnv1.c Loading commit data...
ws-snd1.c Loading commit data...
xan.c Loading commit data...
xiph.c Loading commit data...
xiph.h Loading commit data...
xl.c Loading commit data...
xsubdec.c Loading commit data...
xsubenc.c Loading commit data...
xvmc.h Loading commit data...
xvmc_internal.h Loading commit data...
yop.c Loading commit data...
zmbv.c Loading commit data...
zmbvenc.c Loading commit data...