Easier to read, modify, and avoids relying on an outdated table.
Unified · Split
| @@ -7522,17 +7522,17 @@ static const float dca_downmix_coeffs[65] = { · 7521 unmodified lines | ||
| 7522 | 7522 | 0.001412537544623, 0.001000000000000, 0.000501187233627, 0.000251188643151, 0.000000000000000, |
| 7523 | 7523 | }; |
| 7524 | 7524 | |
| 7525 | −static const uint8_t dca_default_coeffs[10][5][2] = { | |
| 7526 | − { { 13, 13 }, }, | |
| 7527 | − { { 0, 64 }, { 64, 0 }, }, | |
| 7528 | − { { 0, 64 }, { 64, 0 }, }, | |
| 7529 | − { { 0, 64 }, { 64, 0 }, }, | |
| 7530 | − { { 0, 64 }, { 64, 0 }, }, | |
| 7531 | − { { 6, 6 }, { 0, 25 }, { 25, 0 }, }, | |
| 7532 | − { { 0, 25 }, { 25, 0 }, { 13, 13 }, }, | |
| 7533 | − { { 6, 6 }, { 0, 25 }, { 25, 0 }, { 13, 13 }, }, | |
| 7534 | − { { 0, 25 }, { 25, 0 }, { 0, 13 }, { 13, 0 }, }, | |
| 7535 | − { { 6, 6 }, { 0, 25 }, { 25, 0 }, { 0, 13 }, { 13, 0 }, }, | |
| 7525 | +static const float dca_default_coeffs[10][5][2] = { | |
| 7526 | + { { 0.707946, 0.707946 }, }, // A | |
| 7527 | + { { 1.000000, 0.000000 }, { 0.000000, 1.000000 }, }, // A + B (dual mono) | |
| 7528 | + { { 1.000000, 0.000000 }, { 0.000000, 1.000000 }, }, // L + R (stereo) | |
| 7529 | + { { 1.000000, 0.000000 }, { 0.000000, 1.000000 }, }, // (L+R) + (L-R) (sum-difference) | |
| 7530 | + { { 1.000000, 0.000000 }, { 0.000000, 1.000000 }, }, // LT + RT (left and right total) | |
| 7531 | + { { 0.865964, 0.865964 }, { 1.000000, 0.501187 }, { 0.501187, 1.000000 }, }, // C + L + R | |
| 7532 | + { { 1.000000, 0.501187 }, { 0.501187, 1.000000 }, { 0.707946, 0.707946 }, }, // L + R + S | |
| 7533 | + { { 0.865964, 0.865964 }, { 1.000000, 0.501187 }, { 0.501187, 1.000000 }, { 0.707946, 0.707946 }, }, // C + L + R + S | |
| 7534 | + { { 1.000000, 0.501187 }, { 0.501187, 1.000000 }, { 1.000000, 0.707946 }, { 0.707946, 1.000000 }, }, // L + R + SL + SR | |
| 7535 | + { { 0.865964, 0.865964 }, { 1.000000, 0.501187 }, { 0.501187, 1.000000 }, { 1.000000, 0.707946 }, { 0.707946, 1.000000 }, }, // C + L + R + SL + SR | |
| 7536 | 7536 | }; |
| 7537 | 7537 | |
| 7538 | 7538 | /* downmix coeffs |
| @@ -819,8 +819,8 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index) · 818 unmodified lines | ||
| 819 | 819 | } |
| 820 | 820 | |
| 821 | 821 | for (j = base_channel; j < s->prim_channels; j++) { |
| 822 | − s->downmix_coef[j][0] = dca_downmix_coeffs[dca_default_coeffs[am][j][0]]; | |
| 823 | − s->downmix_coef[j][1] = dca_downmix_coeffs[dca_default_coeffs[am][j][1]]; | |
| 822 | + s->downmix_coef[j][0] = dca_default_coeffs[am][j][0]; | |
| 823 | + s->downmix_coef[j][1] = dca_default_coeffs[am][j][1]; | |
| 824 | 824 | } |
| 825 | 825 | } |
| 826 | 826 | } |