Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further improve calculation of when to use wide residual computation #702

Merged
merged 3 commits into from
May 16, 2024

Conversation

ktmf01
Copy link
Collaborator

@ktmf01 ktmf01 commented May 16, 2024

This takes #700 one step further

In the following dataset, ./current is a binary without this PR and #700, ./mulbits is without this PR but with #700 and ./betterbps is including this PR. Testdata is the same as for #700: an upsampled set of short samples. Results are most pronounced for -5p on 24-bit material, see emphasis.

Command Mean [s] Min [s] Max [s] Relative
./betterbps -5 -j2 -c ../Rarewares-16bit.flac 1.214 ± 0.014 1.197 1.238 1.00
./mulbits -5 -j2 -c ../Rarewares-16bit.flac 1.223 ± 0.010 1.207 1.237 1.01 ± 0.01
./current -5 -j2 -c ../Rarewares-16bit.flac 1.217 ± 0.024 1.177 1.256 1.00 ± 0.02
./betterbps -5p -j2 -c ../Rarewares-16bit.flac 1.504 ± 0.035 1.463 1.552 1.24 ± 0.03
./mulbits -5p -j2 -c ../Rarewares-16bit.flac 1.495 ± 0.030 1.457 1.538 1.23 ± 0.03
./current -5p -j2 -c ../Rarewares-16bit.flac 1.497 ± 0.033 1.457 1.557 1.23 ± 0.03
./betterbps -8 -j2 -c ../Rarewares-16bit.flac 2.025 ± 0.014 2.005 2.050 1.67 ± 0.02
./mulbits -8 -j2 -c ../Rarewares-16bit.flac 2.002 ± 0.015 1.979 2.023 1.65 ± 0.02
./current -8 -j2 -c ../Rarewares-16bit.flac 2.011 ± 0.033 1.961 2.056 1.66 ± 0.03
./betterbps -8p -j2 -c ../Rarewares-16bit.flac 6.172 ± 0.050 6.107 6.285 5.08 ± 0.07
./mulbits -8p -j2 -c ../Rarewares-16bit.flac 6.176 ± 0.098 6.087 6.356 5.09 ± 0.10
./current -8p -j2 -c ../Rarewares-16bit.flac 6.297 ± 0.076 6.194 6.401 5.19 ± 0.09
./betterbps -5 -j2 -c ../Rarewares-24bit.flac 2.414 ± 0.042 2.356 2.476 1.99 ± 0.04
./mulbits -5 -j2 -c ../Rarewares-24bit.flac 2.637 ± 0.036 2.574 2.685 2.17 ± 0.04
./current -5 -j2 -c ../Rarewares-24bit.flac 2.851 ± 0.055 2.766 2.921 2.35 ± 0.05
./betterbps -5p -j2 -c ../Rarewares-24bit.flac 4.289 ± 0.059 4.188 4.388 3.53 ± 0.06
./mulbits -5p -j2 -c ../Rarewares-24bit.flac 6.038 ± 0.114 5.936 6.308 4.97 ± 0.11
./current -5p -j2 -c ../Rarewares-24bit.flac 8.807 ± 0.098 8.678 8.992 7.25 ± 0.12
./betterbps -8 -j2 -c ../Rarewares-24bit.flac 10.126 ± 0.043 10.051 10.170 8.34 ± 0.10
./mulbits -8 -j2 -c ../Rarewares-24bit.flac 10.556 ± 0.076 10.481 10.718 8.69 ± 0.12
./current -8 -j2 -c ../Rarewares-24bit.flac 10.654 ± 0.044 10.623 10.762 8.77 ± 0.11
./betterbps -8p -j2 -c ../Rarewares-24bit.flac 66.274 ± 0.240 65.983 66.583 54.58 ± 0.66
./mulbits -8p -j2 -c ../Rarewares-24bit.flac 74.999 ± 0.077 74.884 75.150 61.76 ± 0.72
./current -8p -j2 -c ../Rarewares-24bit.flac 81.717 ± 0.122 81.525 81.929 67.30 ± 0.79

@ktmf01 ktmf01 merged commit cfe3afc into xiph:master May 16, 2024
14 checks passed
@Quake4
Copy link

Quake4 commented May 28, 2024

Pls, fix max value by bits count to:
FLAC__uint64 max_abs_sample_value = (((FLAC__uint64)1) << subframe_bps) - 1;
Without types: (1 << subframe_bps) - 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants