Merge commit '87ec849fe9acba075c843e67bcd01f256f481a18'

* commit '87ec849fe9acba075c843e67bcd01f256f481a18':
  dcadec: remove scaling in lfe_interpolation_fir

Conflicts:
	libavcodec/dcadec.c
	libavcodec/dcadsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-02-28 18:14:12 +01:00
commit 90f674d55b
7 changed files with 211 additions and 228 deletions

View File

@ -24,15 +24,11 @@
#include "libavutil/attributes.h" #include "libavutil/attributes.h"
#include "libavcodec/dcadsp.h" #include "libavcodec/dcadsp.h"
void ff_dca_lfe_fir0_neon(float *out, const float *in, const float *coefs, void ff_dca_lfe_fir0_neon(float *out, const float *in, const float *coefs);
float scale); void ff_dca_lfe_fir1_neon(float *out, const float *in, const float *coefs);
void ff_dca_lfe_fir1_neon(float *out, const float *in, const float *coefs,
float scale);
void ff_dca_lfe_fir32_vfp(float *out, const float *in, const float *coefs, void ff_dca_lfe_fir32_vfp(float *out, const float *in, const float *coefs);
float scale); void ff_dca_lfe_fir64_vfp(float *out, const float *in, const float *coefs);
void ff_dca_lfe_fir64_vfp(float *out, const float *in, const float *coefs,
float scale);
void ff_dca_qmf_32_subbands_vfp(float samples_in[32][8], int sb_act, void ff_dca_qmf_32_subbands_vfp(float samples_in[32][8], int sb_act,
SynthFilterContext *synth, FFTContext *imdct, SynthFilterContext *synth, FFTContext *imdct,

View File

@ -22,7 +22,6 @@
function ff_dca_lfe_fir0_neon, export=1 function ff_dca_lfe_fir0_neon, export=1
push {r4-r6,lr} push {r4-r6,lr}
NOVFP vmov s0, r3 @ scale
mov r3, #32 @ decifactor mov r3, #32 @ decifactor
mov r6, #256/32 mov r6, #256/32
b dca_lfe_fir b dca_lfe_fir
@ -30,7 +29,6 @@ endfunc
function ff_dca_lfe_fir1_neon, export=1 function ff_dca_lfe_fir1_neon, export=1
push {r4-r6,lr} push {r4-r6,lr}
NOVFP vmov s0, r3 @ scale
mov r3, #64 @ decifactor mov r3, #64 @ decifactor
mov r6, #256/64 mov r6, #256/64
dca_lfe_fir: dca_lfe_fir:
@ -57,8 +55,7 @@ dca_lfe_fir:
subs r3, r3, #1 subs r3, r3, #1
vadd.f32 d4, d4, d5 vadd.f32 d4, d4, d5
vadd.f32 d6, d6, d7 vadd.f32 d6, d6, d7
vpadd.f32 d4, d4, d6 vpadd.f32 d5, d4, d6
vmul.f32 d5, d4, d0[0]
vst1.32 {d5[0]}, [r0,:32]! vst1.32 {d5[0]}, [r0,:32]!
vst1.32 {d5[1]}, [r4,:32]! vst1.32 {d5[1]}, [r4,:32]!
bne 1b bne 1b

View File

@ -27,8 +27,6 @@ PCOEF .req a3
OLDFPSCR .req a4 OLDFPSCR .req a4
COUNTER .req ip COUNTER .req ip
SCALE32 .req s28 @ use vector of 4 in place of 9th scalar when decifactor=32 / JMAX=8
SCALE64 .req s0 @ spare register in scalar bank when decifactor=64 / JMAX=4
IN0 .req s4 IN0 .req s4
IN1 .req s5 IN1 .req s5
IN2 .req s6 IN2 .req s6
@ -76,9 +74,6 @@ POST3 .req s27
vldr COEF5, [PCOEF, #X + (1*JMAX + 1) * Y] vldr COEF5, [PCOEF, #X + (1*JMAX + 1) * Y]
vldr COEF6, [PCOEF, #X + (2*JMAX + 1) * Y] vldr COEF6, [PCOEF, #X + (2*JMAX + 1) * Y]
.endif .endif
.ifnc "\tail",""
vmul.f POST0, POST0, SCALE\decifactor @ vector operation (SCALE may be scalar)
.endif
.ifnc "\head","" .ifnc "\head",""
vldr COEF7, [PCOEF, #X + (3*JMAX + 1) * Y] vldr COEF7, [PCOEF, #X + (3*JMAX + 1) * Y]
.ifc "\tail","" .ifc "\tail",""
@ -129,7 +124,6 @@ POST3 .req s27
.macro dca_lfe_fir decifactor .macro dca_lfe_fir decifactor
function ff_dca_lfe_fir\decifactor\()_vfp, export=1 function ff_dca_lfe_fir\decifactor\()_vfp, export=1
NOVFP vmov s0, r3
fmrx OLDFPSCR, FPSCR fmrx OLDFPSCR, FPSCR
ldr ip, =0x03030000 @ RunFast mode, short vectors of length 4, stride 1 ldr ip, =0x03030000 @ RunFast mode, short vectors of length 4, stride 1
fmxr FPSCR, ip fmxr FPSCR, ip
@ -140,7 +134,6 @@ NOVFP vmov s0, r3
.if \decifactor == 32 .if \decifactor == 32
.set JMAX, 8 .set JMAX, 8
vpush {s16-s31} vpush {s16-s31}
vmov SCALE32, s0 @ duplicate scalar across vector
vldr IN4, [PIN, #-4*4] vldr IN4, [PIN, #-4*4]
vldr IN5, [PIN, #-5*4] vldr IN5, [PIN, #-5*4]
vldr IN6, [PIN, #-6*4] vldr IN6, [PIN, #-6*4]
@ -186,8 +179,6 @@ endfunc
.unreq OLDFPSCR .unreq OLDFPSCR
.unreq COUNTER .unreq COUNTER
.unreq SCALE32
.unreq SCALE64
.unreq IN0 .unreq IN0
.unreq IN1 .unreq IN1
.unreq IN2 .unreq IN2

View File

@ -7305,205 +7305,208 @@ DECLARE_ALIGNED(16, static const float, fir_32bands_nonperfect)[] =
+1.390191784E-007 +1.390191784E-007
}; };
/* pre-scale lfe fir coefficients */
#define SCALE(c) ((c) / (256.0f * 32768.0f))
DECLARE_ALIGNED(16, static const float, lfe_fir_64)[] = DECLARE_ALIGNED(16, static const float, lfe_fir_64)[] =
{ {
2.658434386830777e-4, 9.029330685734748e-3, SCALE(2.658434386830777e-4), SCALE(9.029330685734748e-3),
7.939263433218002e-2, 2.425158768892288e-1, SCALE(7.939263433218002e-2), SCALE(2.425158768892288e-1),
3.430179357528686e-1, 2.398228943347931e-1, SCALE(3.430179357528686e-1), SCALE(2.398228943347931e-1),
7.746443897485733e-2, 8.622321300208569e-3, SCALE(7.746443897485733e-2), SCALE(8.622321300208569e-3),
8.179365249816328e-5, 9.450953453779220e-3, SCALE(8.179365249816328e-5), SCALE(9.450953453779220e-3),
8.134882897138596e-2, 2.451938837766648e-1, SCALE(8.134882897138596e-2), SCALE(2.451938837766648e-1),
3.429597318172455e-1, 2.371159791946411e-1, SCALE(3.429597318172455e-1), SCALE(2.371159791946411e-1),
7.556436210870743e-2, 8.229630999267101e-3, SCALE(7.556436210870743e-2), SCALE(8.229630999267101e-3),
9.439323912374676e-5, 9.887560270726680e-3, SCALE(9.439323912374676e-5), SCALE(9.887560270726680e-3),
8.333285897970200e-2, 2.478559017181396e-1, SCALE(8.333285897970200e-2), SCALE(2.478559017181396e-1),
3.428434133529663e-1, 2.343961596488952e-1, SCALE(3.428434133529663e-1), SCALE(2.343961596488952e-1),
7.369252294301987e-2, 7.850865833461285e-3, SCALE(7.369252294301987e-2), SCALE(7.850865833461285e-3),
1.082170274457894e-4, 1.033949479460716e-2, SCALE(1.082170274457894e-4), SCALE(1.033949479460716e-2),
8.534456789493561e-2, 2.505008876323700e-1, SCALE(8.534456789493561e-2), SCALE(2.505008876323700e-1),
3.426689505577088e-1, 2.316644787788391e-1, SCALE(3.426689505577088e-1), SCALE(2.316644787788391e-1),
7.184901088476181e-2, 7.485736627131701e-3, SCALE(7.184901088476181e-2), SCALE(7.485736627131701e-3),
1.233371440321207e-4, 1.080708485096693e-2, SCALE(1.233371440321207e-4), SCALE(1.080708485096693e-2),
8.738376945257187e-2, 2.531278133392334e-1, SCALE(8.738376945257187e-2), SCALE(2.531278133392334e-1),
3.424364924430847e-1, 2.289219647645950e-1, SCALE(3.424364924430847e-1), SCALE(2.289219647645950e-1),
7.003392279148102e-2, 7.133882027119398e-3, SCALE(7.003392279148102e-2), SCALE(7.133882027119398e-3),
1.397485757479444e-4, 1.129068247973919e-2, SCALE(1.397485757479444e-4), SCALE(1.129068247973919e-2),
8.945026248693466e-2, 2.557355761528015e-1, SCALE(8.945026248693466e-2), SCALE(2.557355761528015e-1),
3.421461284160614e-1, 2.261696159839630e-1, SCALE(3.421461284160614e-1), SCALE(2.261696159839630e-1),
6.824731826782227e-2, 6.794991903007030e-3, SCALE(6.824731826782227e-2), SCALE(6.794991903007030e-3),
1.575958012836054e-4, 1.179065089672804e-2, SCALE(1.575958012836054e-4), SCALE(1.179065089672804e-2),
9.154383838176728e-2, 2.583232223987580e-1, SCALE(9.154383838176728e-2), SCALE(2.583232223987580e-1),
3.417979776859284e-1, 2.234084606170654e-1, SCALE(3.417979776859284e-1), SCALE(2.234084606170654e-1),
6.648923456668854e-2, 6.468691397458315e-3, SCALE(6.648923456668854e-2), SCALE(6.468691397458315e-3),
1.769922382663936e-4, 1.230732165277004e-2, SCALE(1.769922382663936e-4), SCALE(1.230732165277004e-2),
9.366425126791000e-2, 2.608896791934967e-1, SCALE(9.366425126791000e-2), SCALE(2.608896791934967e-1),
3.413922190666198e-1, 2.206395119428635e-1, SCALE(3.413922190666198e-1), SCALE(2.206395119428635e-1),
6.475970894098282e-2, 6.154712289571762e-3, SCALE(6.475970894098282e-2), SCALE(6.154712289571762e-3),
1.981738605536520e-4, 1.284105982631445e-2, SCALE(1.981738605536520e-4), SCALE(1.284105982631445e-2),
9.581124037504196e-2, 2.634339034557342e-1, SCALE(9.581124037504196e-2), SCALE(2.634339034557342e-1),
3.409290313720703e-1, 2.178637981414795e-1, SCALE(3.409290313720703e-1), SCALE(2.178637981414795e-1),
6.305878609418869e-2, 5.852684378623962e-3, SCALE(6.305878609418869e-2), SCALE(5.852684378623962e-3),
2.211847313446924e-4, 1.339218579232693e-2, SCALE(2.211847313446924e-4), SCALE(1.339218579232693e-2),
9.798453748226166e-2, 2.659549415111542e-1, SCALE(9.798453748226166e-2), SCALE(2.659549415111542e-1),
3.404086530208588e-1, 2.150822728872299e-1, SCALE(3.404086530208588e-1), SCALE(2.150822728872299e-1),
6.138643622398376e-2, 5.562345497310162e-3, SCALE(6.138643622398376e-2), SCALE(5.562345497310162e-3),
2.460231189616024e-4, 1.396108977496624e-2, SCALE(2.460231189616024e-4), SCALE(1.396108977496624e-2),
1.001838669180870e-1, 2.684516608715058e-1, SCALE(1.001838669180870e-1), SCALE(2.684516608715058e-1),
3.398312926292420e-1, 2.122959494590759e-1, SCALE(3.398312926292420e-1), SCALE(2.122959494590759e-1),
5.974265560507774e-2, 5.283284001052380e-3, SCALE(5.974265560507774e-2), SCALE(5.283284001052380e-3),
2.726115926634520e-4, 1.454808749258518e-2, SCALE(2.726115926634520e-4), SCALE(1.454808749258518e-2),
1.024089083075523e-1, 2.709231376647949e-1, SCALE(1.024089083075523e-1), SCALE(2.709231376647949e-1),
3.391972482204438e-1, 2.095058411359787e-1, SCALE(3.391972482204438e-1), SCALE(2.095058411359787e-1),
5.812742188572884e-2, 5.015311297029257e-3, SCALE(5.812742188572884e-2), SCALE(5.015311297029257e-3),
3.013863170053810e-4, 1.515355054289102e-2, SCALE(3.013863170053810e-4), SCALE(1.515355054289102e-2),
1.046593263745308e-1, 2.733682692050934e-1, SCALE(1.046593263745308e-1), SCALE(2.733682692050934e-1),
3.385068178176880e-1, 2.067128717899322e-1, SCALE(3.385068178176880e-1), SCALE(2.067128717899322e-1),
5.654069408774376e-2, 4.758012015372515e-3, SCALE(5.654069408774376e-2), SCALE(4.758012015372515e-3),
3.328395541757345e-4, 1.577781140804291e-2, SCALE(3.328395541757345e-4), SCALE(1.577781140804291e-2),
1.069347932934761e-1, 2.757860720157624e-1, SCALE(1.069347932934761e-1), SCALE(2.757860720157624e-1),
3.377602994441986e-1, 2.039180546998978e-1, SCALE(3.377602994441986e-1), SCALE(2.039180546998978e-1),
5.498242005705833e-2, 4.511159844696522e-3, SCALE(5.498242005705833e-2), SCALE(4.511159844696522e-3),
3.658991190604866e-4, 1.642123050987720e-2, SCALE(3.658991190604866e-4), SCALE(1.642123050987720e-2),
1.092349365353584e-1, 2.781755328178406e-1, SCALE(1.092349365353584e-1), SCALE(2.781755328178406e-1),
3.369580209255218e-1, 2.011223286390304e-1, SCALE(3.369580209255218e-1), SCALE(2.011223286390304e-1),
5.345252528786659e-2, 4.274417180567980e-3, SCALE(5.345252528786659e-2), SCALE(4.274417180567980e-3),
4.018281470052898e-4, 1.708412915468216e-2, SCALE(4.018281470052898e-4), SCALE(1.708412915468216e-2),
1.115593686699867e-1, 2.805356979370117e-1, SCALE(1.115593686699867e-1), SCALE(2.805356979370117e-1),
3.361004292964936e-1, 1.983266174793244e-1, SCALE(3.361004292964936e-1), SCALE(1.983266174793244e-1),
5.195093154907227e-2, 4.047499038279056e-3, SCALE(5.195093154907227e-2), SCALE(4.047499038279056e-3),
4.401875485200435e-4, 1.776690222322941e-2, SCALE(4.401875485200435e-4), SCALE(1.776690222322941e-2),
1.139076948165894e-1, 2.828655838966370e-1, SCALE(1.139076948165894e-1), SCALE(2.828655838966370e-1),
3.351879119873047e-1, 1.955319195985794e-1, SCALE(3.351879119873047e-1), SCALE(1.955319195985794e-1),
5.047753453254700e-2, 3.830091329291463e-3, SCALE(5.047753453254700e-2), SCALE(3.830091329291463e-3),
4.812776169274002e-4, 1.846982724964619e-2, SCALE(4.812776169274002e-4), SCALE(1.846982724964619e-2),
1.162794977426529e-1, 2.851640880107880e-1, SCALE(1.162794977426529e-1), SCALE(2.851640880107880e-1),
3.342207968235016e-1, 1.927391141653061e-1, SCALE(3.342207968235016e-1), SCALE(1.927391141653061e-1),
4.903224110603333e-2, 3.621967276558280e-3, SCALE(4.903224110603333e-2), SCALE(3.621967276558280e-3),
5.252459668554366e-4, 1.919330470263958e-2, SCALE(5.252459668554366e-4), SCALE(1.919330470263958e-2),
1.186743453145027e-1, 2.874303460121155e-1, SCALE(1.186743453145027e-1), SCALE(2.874303460121155e-1),
3.331996202468872e-1, 1.899491697549820e-1, SCALE(3.331996202468872e-1), SCALE(1.899491697549820e-1),
4.761491715908051e-2, 3.422776935622096e-3, SCALE(4.761491715908051e-2), SCALE(3.422776935622096e-3),
5.721592460758984e-4, 1.993762329220772e-2, SCALE(5.721592460758984e-4), SCALE(1.993762329220772e-2),
1.210917681455612e-1, 2.896633744239807e-1, SCALE(1.210917681455612e-1), SCALE(2.896633744239807e-1),
3.321248590946198e-1, 1.871629506349564e-1, SCALE(3.321248590946198e-1), SCALE(1.871629506349564e-1),
4.622544348239899e-2, 3.232272574678064e-3, SCALE(4.622544348239899e-2), SCALE(3.232272574678064e-3),
6.222130032256246e-4, 2.070316113531590e-2, SCALE(6.222130032256246e-4), SCALE(2.070316113531590e-2),
1.235313042998314e-1, 2.918621897697448e-1, SCALE(1.235313042998314e-1), SCALE(2.918621897697448e-1),
3.309969604015350e-1, 1.843813359737396e-1, SCALE(3.309969604015350e-1), SCALE(1.843813359737396e-1),
4.486365616321564e-2, 3.050152910873294e-3, SCALE(4.486365616321564e-2), SCALE(3.050152910873294e-3),
6.755515350960195e-4, 2.149021252989769e-2, SCALE(6.755515350960195e-4), SCALE(2.149021252989769e-2),
1.259924471378326e-1, 2.940258979797364e-1, SCALE(1.259924471378326e-1), SCALE(2.940258979797364e-1),
3.298164308071136e-1, 1.816052496433258e-1, SCALE(3.298164308071136e-1), SCALE(1.816052496433258e-1),
4.352942481637001e-2, 2.876190468668938e-3, SCALE(4.352942481637001e-2), SCALE(2.876190468668938e-3),
7.324148900806904e-4, 2.229913882911205e-2, SCALE(7.324148900806904e-4), SCALE(2.229913882911205e-2),
1.284746825695038e-1, 2.961534857749939e-1, SCALE(1.284746825695038e-1), SCALE(2.961534857749939e-1),
3.285838961601258e-1, 1.788355410099030e-1, SCALE(3.285838961601258e-1), SCALE(1.788355410099030e-1),
4.222255200147629e-2, 2.710093278437853e-3, SCALE(4.222255200147629e-2), SCALE(2.710093278437853e-3),
7.928516715764999e-4, 2.313023805618286e-2, SCALE(7.928516715764999e-4), SCALE(2.313023805618286e-2),
1.309774816036224e-1, 2.982441186904907e-1, SCALE(1.309774816036224e-1), SCALE(2.982441186904907e-1),
3.272998929023742e-1, 1.760730892419815e-1, SCALE(3.272998929023742e-1), SCALE(1.760730892419815e-1),
4.094288870692253e-2, 2.551567042246461e-3, SCALE(4.094288870692253e-2), SCALE(2.551567042246461e-3),
8.570110658183694e-4, 2.398385666310787e-2, SCALE(8.570110658183694e-4), SCALE(2.398385666310787e-2),
1.335003077983856e-1, 3.002967536449432e-1, SCALE(1.335003077983856e-1), SCALE(3.002967536449432e-1),
3.259649574756622e-1, 1.733186990022659e-1, SCALE(3.259649574756622e-1), SCALE(1.733186990022659e-1),
3.969023004174232e-2, 2.400433411821723e-3, SCALE(3.969023004174232e-2), SCALE(2.400433411821723e-3),
9.251192095689476e-4, 2.486028522253036e-2, SCALE(9.251192095689476e-4), SCALE(2.486028522253036e-2),
1.360425949096680e-1, 3.023106753826142e-1, SCALE(1.360425949096680e-1), SCALE(3.023106753826142e-1),
3.245797157287598e-1, 1.705732345581055e-1, SCALE(3.245797157287598e-1), SCALE(1.705732345581055e-1),
3.846437484025955e-2, 2.256359672173858e-3, SCALE(3.846437484025955e-2), SCALE(2.256359672173858e-3),
9.974770946428180e-4, 2.575986087322235e-2, SCALE(9.974770946428180e-4), SCALE(2.575986087322235e-2),
1.386037617921829e-1, 3.042849004268646e-1, SCALE(1.386037617921829e-1), SCALE(3.042849004268646e-1),
3.231448531150818e-1, 1.678375005722046e-1, SCALE(3.231448531150818e-1), SCALE(1.678375005722046e-1),
3.726511076092720e-2, 2.119151875376701e-3, SCALE(3.726511076092720e-2), SCALE(2.119151875376701e-3),
1.073930296115577e-3, 2.668286114931106e-2, SCALE(1.073930296115577e-3), SCALE(2.668286114931106e-2),
1.411831974983215e-1, 3.062185347080230e-1, SCALE(1.411831974983215e-1), SCALE(3.062185347080230e-1),
3.216609656810760e-1, 1.651122719049454e-1, SCALE(3.216609656810760e-1), SCALE(1.651122719049454e-1),
3.609224036335945e-2, 1.988604199141264e-3, SCALE(3.609224036335945e-2), SCALE(1.988604199141264e-3),
1.155023579485714e-3, 2.762960828840732e-2, SCALE(1.155023579485714e-3), SCALE(2.762960828840732e-2),
1.437802612781525e-1, 3.081108033657074e-1, SCALE(1.437802612781525e-1), SCALE(3.081108033657074e-1),
3.201287388801574e-1, 1.623983532190323e-1, SCALE(3.201287388801574e-1), SCALE(1.623983532190323e-1),
3.494550660252571e-2, 1.864377525635064e-3, SCALE(3.494550660252571e-2), SCALE(1.864377525635064e-3),
1.240676851011813e-3, 2.860039286315441e-2, SCALE(1.240676851011813e-3), SCALE(2.860039286315441e-2),
1.463943719863892e-1, 3.099608123302460e-1, SCALE(1.463943719863892e-1), SCALE(3.099608123302460e-1),
3.185488879680634e-1, 1.596965193748474e-1, SCALE(3.185488879680634e-1), SCALE(1.596965193748474e-1),
3.382468968629837e-2, 1.746327499859035e-3, SCALE(3.382468968629837e-2), SCALE(1.746327499859035e-3),
1.331258914433420e-3, 2.959549613296986e-2, SCALE(1.331258914433420e-3), SCALE(2.959549613296986e-2),
1.490248143672943e-1, 3.117676973342896e-1, SCALE(1.490248143672943e-1), SCALE(3.117676973342896e-1),
3.169221282005310e-1, 1.570075154304504e-1, SCALE(3.169221282005310e-1), SCALE(1.570075154304504e-1),
3.272953629493714e-2, 1.634211512282491e-3, SCALE(3.272953629493714e-2), SCALE(1.634211512282491e-3),
1.426893868483603e-3, 3.061520494520664e-2, SCALE(1.426893868483603e-3), SCALE(3.061520494520664e-2),
1.516709625720978e-1, 3.135308027267456e-1, SCALE(1.516709625720978e-1), SCALE(3.135308027267456e-1),
3.152491748332978e-1, 1.543320864439010e-1, SCALE(3.152491748332978e-1), SCALE(1.543320864439010e-1),
3.165979683399200e-2, 1.527829794213176e-3, SCALE(3.165979683399200e-2), SCALE(1.527829794213176e-3),
}; };
DECLARE_ALIGNED(16, static const float, lfe_fir_128)[] = DECLARE_ALIGNED(16, static const float, lfe_fir_128)[] =
{ {
0.00053168571, 0.15878495574, 0.68603444099, 0.15492856503, SCALE(0.00053168571), SCALE(0.15878495574), SCALE(0.68603444099), SCALE(0.15492856503),
0.00016358691, 0.16269733012, 0.68591803312, 0.15112841129, SCALE(0.00016358691), SCALE(0.16269733012), SCALE(0.68591803312), SCALE(0.15112841129),
0.00018878609, 0.16666537523, 0.68568539619, 0.14738474786, SCALE(0.00018878609), SCALE(0.16666537523), SCALE(0.68568539619), SCALE(0.14738474786),
0.00021643363, 0.17068879306, 0.68533653021, 0.14369773865, SCALE(0.00021643363), SCALE(0.17068879306), SCALE(0.68533653021), SCALE(0.14369773865),
0.00024667382, 0.17476719618, 0.68487155437, 0.14006754756, SCALE(0.00024667382), SCALE(0.17476719618), SCALE(0.68487155437), SCALE(0.14006754756),
0.00027949660, 0.17890018225, 0.68429082632, 0.13649433851, SCALE(0.00027949660), SCALE(0.17890018225), SCALE(0.68429082632), SCALE(0.13649433851),
0.00031519096, 0.18308731914, 0.68359452486, 0.13297818601, SCALE(0.00031519096), SCALE(0.18308731914), SCALE(0.68359452486), SCALE(0.13297818601),
0.00035398375, 0.18732811511, 0.68278300762, 0.12951917946, SCALE(0.00035398375), SCALE(0.18732811511), SCALE(0.68278300762), SCALE(0.12951917946),
0.00039634691, 0.19162209332, 0.68185669184, 0.12611730397, SCALE(0.00039634691), SCALE(0.19162209332), SCALE(0.68185669184), SCALE(0.12611730397),
0.00044236859, 0.19596865773, 0.68081587553, 0.12277261168, SCALE(0.00044236859), SCALE(0.19596865773), SCALE(0.68081587553), SCALE(0.12277261168),
0.00049204525, 0.20036731660, 0.67966115475, 0.11948505789, SCALE(0.00049204525), SCALE(0.20036731660), SCALE(0.67966115475), SCALE(0.11948505789),
0.00054522208, 0.20481738448, 0.67839306593, 0.11625462025, SCALE(0.00054522208), SCALE(0.20481738448), SCALE(0.67839306593), SCALE(0.11625462025),
0.00060277141, 0.20931822062, 0.67701220512, 0.11308115721, SCALE(0.00060277141), SCALE(0.20931822062), SCALE(0.67701220512), SCALE(0.11308115721),
0.00066567765, 0.21386915445, 0.67551922798, 0.10996460915, SCALE(0.00066567765), SCALE(0.21386915445), SCALE(0.67551922798), SCALE(0.10996460915),
0.00073179678, 0.21846942604, 0.67391467094, 0.10690483451, SCALE(0.00073179678), SCALE(0.21846942604), SCALE(0.67391467094), SCALE(0.10690483451),
0.00080365466, 0.22311829031, 0.67219948769, 0.10390164703, SCALE(0.00080365466), SCALE(0.22311829031), SCALE(0.67219948769), SCALE(0.10390164703),
0.00088037323, 0.22781492770, 0.67037439346, 0.10095486045, SCALE(0.00088037323), SCALE(0.22781492770), SCALE(0.67037439346), SCALE(0.10095486045),
0.00096255314, 0.23255851865, 0.66844022274, 0.09806428105, SCALE(0.00096255314), SCALE(0.23255851865), SCALE(0.66844022274), SCALE(0.09806428105),
0.00105048984, 0.23734821379, 0.66639786959, 0.09522963315, SCALE(0.00105048984), SCALE(0.23734821379), SCALE(0.66639786959), SCALE(0.09522963315),
0.00114431616, 0.24218304455, 0.66424828768, 0.09245070815, SCALE(0.00114431616), SCALE(0.24218304455), SCALE(0.66424828768), SCALE(0.09245070815),
0.00124442333, 0.24706205726, 0.66199249029, 0.08972713351, SCALE(0.00124442333), SCALE(0.24706205726), SCALE(0.66199249029), SCALE(0.08972713351),
0.00135110028, 0.25198432803, 0.65963155031, 0.08705867827, SCALE(0.00135110028), SCALE(0.25198432803), SCALE(0.65963155031), SCALE(0.08705867827),
0.00146482687, 0.25694879889, 0.65716648102, 0.08444493264, SCALE(0.00146482687), SCALE(0.25694879889), SCALE(0.65716648102), SCALE(0.08444493264),
0.00158570008, 0.26195442677, 0.65459835529, 0.08188561350, SCALE(0.00158570008), SCALE(0.26195442677), SCALE(0.65459835529), SCALE(0.08188561350),
0.00171401864, 0.26700007915, 0.65192854404, 0.07938029617, SCALE(0.00171401864), SCALE(0.26700007915), SCALE(0.65192854404), SCALE(0.07938029617),
0.00185023469, 0.27208462358, 0.64915806055, 0.07692859322, SCALE(0.00185023469), SCALE(0.27208462358), SCALE(0.64915806055), SCALE(0.07692859322),
0.00199495023, 0.27720692754, 0.64628833532, 0.07453006506, SCALE(0.00199495023), SCALE(0.27720692754), SCALE(0.64628833532), SCALE(0.07453006506),
0.00214785640, 0.28236576915, 0.64332056046, 0.07218432426, SCALE(0.00214785640), SCALE(0.28236576915), SCALE(0.64332056046), SCALE(0.07218432426),
0.00231004250, 0.28755992651, 0.64025616646, 0.06989086419, SCALE(0.00231004250), SCALE(0.28755992651), SCALE(0.64025616646), SCALE(0.06989086419),
0.00248134881, 0.29278811812, 0.63709646463, 0.06764923781, SCALE(0.00248134881), SCALE(0.29278811812), SCALE(0.63709646463), SCALE(0.06764923781),
0.00266251224, 0.29804900289, 0.63384294510, 0.06545893103, SCALE(0.00266251224), SCALE(0.29804900289), SCALE(0.63384294510), SCALE(0.06545893103),
0.00285378192, 0.30334126949, 0.63049703836, 0.06331945211, SCALE(0.00285378192), SCALE(0.30334126949), SCALE(0.63049703836), SCALE(0.06331945211),
0.00305565330, 0.30866351724, 0.62706029415, 0.06123027951, SCALE(0.00305565330), SCALE(0.30866351724), SCALE(0.62706029415), SCALE(0.06123027951),
0.00326841651, 0.31401440501, 0.62353414297, 0.05919086933, SCALE(0.00326841651), SCALE(0.31401440501), SCALE(0.62353414297), SCALE(0.05919086933),
0.00349264755, 0.31939238310, 0.61992025375, 0.05720067024, SCALE(0.00349264755), SCALE(0.31939238310), SCALE(0.61992025375), SCALE(0.05720067024),
0.00372874714, 0.32479602098, 0.61622029543, 0.05525910854, SCALE(0.00372874714), SCALE(0.32479602098), SCALE(0.61622029543), SCALE(0.05525910854),
0.00397720048, 0.33022382855, 0.61243581772, 0.05336561054, SCALE(0.00397720048), SCALE(0.33022382855), SCALE(0.61243581772), SCALE(0.05336561054),
0.00423829490, 0.33567428589, 0.60856848955, 0.05151961371, SCALE(0.00423829490), SCALE(0.33567428589), SCALE(0.60856848955), SCALE(0.05151961371),
0.00451271003, 0.34114575386, 0.60462015867, 0.04972046614, SCALE(0.00451271003), SCALE(0.34114575386), SCALE(0.60462015867), SCALE(0.04972046614),
0.00480085658, 0.34663668275, 0.60059231520, 0.04796761274, SCALE(0.00480085658), SCALE(0.34663668275), SCALE(0.60059231520), SCALE(0.04796761274),
0.00510312291, 0.35214546323, 0.59648692608, 0.04626038298, SCALE(0.00510312291), SCALE(0.35214546323), SCALE(0.59648692608), SCALE(0.04626038298),
0.00542017492, 0.35767036676, 0.59230577946, 0.04459818453, SCALE(0.00542017492), SCALE(0.35767036676), SCALE(0.59230577946), SCALE(0.04459818453),
0.00575236930, 0.36320972443, 0.58805054426, 0.04298033938, SCALE(0.00575236930), SCALE(0.36320972443), SCALE(0.58805054426), SCALE(0.04298033938),
0.00610029325, 0.36876192689, 0.58372318745, 0.04140623659, SCALE(0.00610029325), SCALE(0.36876192689), SCALE(0.58372318745), SCALE(0.04140623659),
0.00646453211, 0.37432509661, 0.57932555676, 0.03987516090, SCALE(0.00646453211), SCALE(0.37432509661), SCALE(0.57932555676), SCALE(0.03987516090),
0.00684553990, 0.37989753485, 0.57485944033, 0.03838652745, SCALE(0.00684553990), SCALE(0.37989753485), SCALE(0.57485944033), SCALE(0.03838652745),
0.00724391919, 0.38547745347, 0.57032698393, 0.03693958372, SCALE(0.00724391919), SCALE(0.38547745347), SCALE(0.57032698393), SCALE(0.03693958372),
0.00766016589, 0.39106300473, 0.56572991610, 0.03553372994, SCALE(0.00766016589), SCALE(0.39106300473), SCALE(0.56572991610), SCALE(0.03553372994),
0.00809498038, 0.39665243030, 0.56107026339, 0.03416819125, SCALE(0.00809498038), SCALE(0.39665243030), SCALE(0.56107026339), SCALE(0.03416819125),
0.00854881573, 0.40224379301, 0.55634999275, 0.03284239396, SCALE(0.00854881573), SCALE(0.40224379301), SCALE(0.55634999275), SCALE(0.03284239396),
0.00902230106, 0.40783521533, 0.55157101154, 0.03155555204, SCALE(0.00902230106), SCALE(0.40783521533), SCALE(0.55157101154), SCALE(0.03155555204),
0.00951600447, 0.41342487931, 0.54673534632, 0.03030703776, SCALE(0.00951600447), SCALE(0.41342487931), SCALE(0.54673534632), SCALE(0.03030703776),
0.01003060210, 0.41901078820, 0.54184508324, 0.02909611352, SCALE(0.01003060210), SCALE(0.41901078820), SCALE(0.54184508324), SCALE(0.02909611352),
0.01056654565, 0.42459106445, 0.53690224886, 0.02792212367, SCALE(0.01056654565), SCALE(0.42459106445), SCALE(0.53690224886), SCALE(0.02792212367),
0.01112466771, 0.43016362190, 0.53190881014, 0.02678431384, SCALE(0.01112466771), SCALE(0.43016362190), SCALE(0.53190881014), SCALE(0.02678431384),
0.01170534454, 0.43572667241, 0.52686679363, 0.02568206564, SCALE(0.01170534454), SCALE(0.43572667241), SCALE(0.52686679363), SCALE(0.02568206564),
0.01230939943, 0.44127810001, 0.52177828550, 0.02461459488, SCALE(0.01230939943), SCALE(0.44127810001), SCALE(0.52177828550), SCALE(0.02461459488),
0.01293735672, 0.44681602716, 0.51664537191, 0.02358125709, SCALE(0.01293735672), SCALE(0.44681602716), SCALE(0.51664537191), SCALE(0.02358125709),
0.01358995494, 0.45233830810, 0.51147013903, 0.02258131653, SCALE(0.01358995494), SCALE(0.45233830810), SCALE(0.51147013903), SCALE(0.02258131653),
0.01426773332, 0.45784294605, 0.50625455379, 0.02161412500, SCALE(0.01426773332), SCALE(0.45784294605), SCALE(0.50625455379), SCALE(0.02161412500),
0.01497144438, 0.46332800388, 0.50100076199, 0.02067894675, SCALE(0.01497144438), SCALE(0.46332800388), SCALE(0.50100076199), SCALE(0.02067894675),
0.01570170000, 0.46879136562, 0.49571081996, 0.01977507770, SCALE(0.01570170000), SCALE(0.46879136562), SCALE(0.49571081996), SCALE(0.01977507770),
0.01645922661, 0.47423094511, 0.49038675427, 0.01890186779, SCALE(0.01645922661), SCALE(0.47423094511), SCALE(0.49038675427), SCALE(0.01890186779),
0.01724460535, 0.47964480519, 0.48503074050, 0.01805862412, SCALE(0.01724460535), SCALE(0.47964480519), SCALE(0.48503074050), SCALE(0.01805862412),
}; };
#undef SCALE
/* /*
* D.11 Look-up Table for Downmix Scale Factors * D.11 Look-up Table for Downmix Scale Factors

View File

@ -1108,7 +1108,7 @@ static void qmf_32_subbands(DCAContext *s, int chans,
static void lfe_interpolation_fir(DCAContext *s, int decimation_select, static void lfe_interpolation_fir(DCAContext *s, int decimation_select,
int num_deci_sample, float *samples_in, int num_deci_sample, float *samples_in,
float *samples_out, float scale) float *samples_out)
{ {
/* samples_in: An array holding decimated samples. /* samples_in: An array holding decimated samples.
* Samples in current subframe starts from samples_in[0], * Samples in current subframe starts from samples_in[0],
@ -1132,7 +1132,7 @@ static void lfe_interpolation_fir(DCAContext *s, int decimation_select,
} }
/* Interpolation */ /* Interpolation */
for (deciindex = 0; deciindex < num_deci_sample; deciindex++) { for (deciindex = 0; deciindex < num_deci_sample; deciindex++) {
s->dcadsp.lfe_fir[idx](samples_out, samples_in, prCoeff, scale); s->dcadsp.lfe_fir[idx](samples_out, samples_in, prCoeff);
samples_in++; samples_in++;
samples_out += 2 * 32 * (1 + idx); samples_out += 2 * 32 * (1 + idx);
} }
@ -1426,8 +1426,7 @@ static int dca_filter_channels(DCAContext *s, int block_index)
if (s->lfe) { if (s->lfe) {
lfe_interpolation_fir(s, s->lfe, 2 * s->lfe, lfe_interpolation_fir(s, s->lfe, 2 * s->lfe,
s->lfe_data + 2 * s->lfe * (block_index + 4), s->lfe_data + 2 * s->lfe * (block_index + 4),
s->samples_chanptr[s->lfe_index], s->samples_chanptr[s->lfe_index]);
1.0 / (256.0 * 32768.0));
/* Outputs 20bits pcm samples */ /* Outputs 20bits pcm samples */
} }

View File

@ -34,7 +34,7 @@ static void int8x8_fmul_int32_c(float *dst, const int8_t *src, int scale)
static inline void static inline void
dca_lfe_fir(float *out, const float *in, const float *coefs, dca_lfe_fir(float *out, const float *in, const float *coefs,
int decifactor, float scale) int decifactor)
{ {
float *out2 = out + 2*decifactor-1; float *out2 = out + 2*decifactor-1;
const float *cf0 = coefs; const float *cf0 = coefs;
@ -50,8 +50,8 @@ dca_lfe_fir(float *out, const float *in, const float *coefs,
v1 += in[1+j-num_coeffs] * *cf0; v1 += in[1+j-num_coeffs] * *cf0;
} }
*out++ = v0 * scale; *out++ = v0;
*out2-- = v1 * scale; *out2-- = v1;
} }
} }
@ -83,16 +83,14 @@ static void dca_qmf_32_subbands(float samples_in[32][8], int sb_act,
} }
} }
static void dca_lfe_fir0_c(float *out, const float *in, const float *coefs, static void dca_lfe_fir0_c(float *out, const float *in, const float *coefs)
float scale)
{ {
dca_lfe_fir(out, in, coefs, 32, scale); dca_lfe_fir(out, in, coefs, 32);
} }
static void dca_lfe_fir1_c(float *out, const float *in, const float *coefs, static void dca_lfe_fir1_c(float *out, const float *in, const float *coefs)
float scale)
{ {
dca_lfe_fir(out, in, coefs, 64, scale); dca_lfe_fir(out, in, coefs, 64);
} }
av_cold void ff_dcadsp_init(DCADSPContext *s) av_cold void ff_dcadsp_init(DCADSPContext *s)

View File

@ -23,8 +23,7 @@
#include "synth_filter.h" #include "synth_filter.h"
typedef struct DCADSPContext { typedef struct DCADSPContext {
void (*lfe_fir[2])(float *out, const float *in, const float *coefs, void (*lfe_fir[2])(float *out, const float *in, const float *coefs);
float scale);
void (*qmf_32_subbands)(float samples_in[32][8], int sb_act, void (*qmf_32_subbands)(float samples_in[32][8], int sb_act,
SynthFilterContext *synth, FFTContext *imdct, SynthFilterContext *synth, FFTContext *imdct,
float synth_buf_ptr[512], float synth_buf_ptr[512],