Repository navigation
Conversation
This was referenced Sep 19, 2026
lusoris
force-pushed
the
fix/adm-dwt2-index-small-inputs
branch
from
October 1, 2026 15:22
d0cdd64 to
b928ed7
Compare
This was referenced Oct 1, 2026
lusoris
force-pushed
the
fix/adm-dwt2-index-small-inputs
branch
from
October 1, 2026 18:10
b928ed7 to
91baebf
Compare
This was referenced Oct 1, 2026
lusoris
force-pushed
the
fix/adm-dwt2-index-small-inputs
branch
from
October 2, 2026 05:22
91baebf to
5241b3b
Compare
…7 to 32
dwt2_src_indices_filt() builds its index table in three ranges: output 0,
the interior, and a mirrored tail that starts at n_half - 2. For an input
of 3 or 4 samples n_half is 2, so the tail restarts at output 0 and
replaces its { 1, 0, 1, 2 } with { -1, 0, 1, 2 }. adm_dwt2_s123_combined()
then reads row -1 and column -1. Scale 3 sees such an input for any frame
width or height from 17 to 32.
Start the tail at 1 when n_half is 2. Larger inputs are unaffected.
Add test_adm_dwt2_indices, which checks every index for inputs of 3 to 66
samples against the symmetric extension.
lusoris
force-pushed
the
fix/adm-dwt2-index-small-inputs
branch
from
October 2, 2026 18:38
5241b3b to
d60bc79
Compare
9 of 12 tasks
lusoris
added a commit
to VMAFx/vmafx
that referenced
this pull request
Oct 2, 2026
…each with its size and the upstream change that ends it (ADR-1479 to ADR-1486) The reference for code inherited from Netflix/vmaf is Netflix's source; a difference needs an ADR. The upstream parity audit of 2026-10-02 found deliberate differences that had none of their own, or whose ADR (ADR-1033) names neither upstream's behaviour nor the size: - ADR-1479 ciede on 4:2:2: chroma flags (fork PR #1050); 0.153 on 48 of 48 frames; Netflix/vmaf#1611. - ADR-1480 speed_temporal buffers at speed_prescale above 1 (#1643); up to 195, upstream segfaults on two fixtures; Netflix/vmaf#1627. - ADR-1481 a failing extractor fails the run (#871); status only, 78 probe runs where upstream is silent and 88 where it crashes. - ADR-1482 integer adm on frames of 17 to 32 pixels (#1473, #1507); scale 3 up to 0.23; Netflix/vmaf#1599, #1600. - ADR-1483 odd-sized chroma planes round up (4f08d32); psnr_cb / cr up to 0.684 / 0.826 dB, ciede 0.198. - ADR-1484 float_ms_ssim magnitude before pow() (#641, ADR-1033 item 2); NaN upstream on the 10 px checkerboard; Netflix/vmaf#1665. - ADR-1485 apsnr of a plane without error (#641, item 1); 114 against 60 dB; Netflix/vmaf#1666. - ADR-1486 float_motion scale-1 stride (#641, item 9); up to 25.1; Netflix/vmaf#1667. Each ADR gives upstream's file and line at Netflix 9e48141b, the fork's lines, the reason found in the fork's pull request, commit or code, and the measured size from the audit. Documentation only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dwt2_src_indices_filt()fills the DWT source-index table in three ranges: output 0, the interior, and a mirrored tail that starts atn_half - 2. For an input of 3 or 4 samplesn_halfis 2, so the tail restarts at output 0 and replaces its{ 1, 0, 1, 2 }with{ -1, 0, 1, 2 }.adm_dwt2_s123_combined()and its AVX2 and AVX-512 versions then read row -1 and column -1 of their input. Scale 3 sees a 3- or 4-sample input for any frame width or height from 17 to 32. Column -1 is theint32_tin front of thetmp_refallocation, which AddressSanitizer reports as a heap-buffer-overflow; row -1 lies insidedata_buf, so it only shows as a wrong score.Start the tail at 1 when
n_halfis 2. The table is unchanged for every larger input. The float implementation (dwt2_src_indices_filt_s()) mirrors index -1 to 1 and is not affected.The regression test
test_adm_dwt2_indicescompares every table entry for inputs of 3 to 66 samples with the symmetric extension. On the unpatched tree it fails withn=3 output=0 tap=0: index -1, expected 1.Reproducer, using the first 2592 bytes of the
src01test clips as three 24x24 frames:Over single-frame synthetic 8-bit clips with widths 17 to 34 and heights 17, 18, 24, 31, 32, 33 and 40, each under the default dispatch,
--cpumask 16and--cpumask -1, 336 of 378 runs end in that report on the unpatched tree (every run with a width of 17 to 32) and none with the patch.Effect on
integer_adm_scale3for the clip above, withfloat_admas the reference:float_admadm_scale3Scales 0 to 2 are identical before and after;
integer_adm2follows scale 3.Rebased on master 9e48141 (2026-10-02).
Validation against upstream
9e48141bd1eb8d2329e09d3744e7c24af53017ca, x86-64 Linux (AVX-512 host), GCC 16.2.1, Meson 1.12.1:No golden value changes. The three reference pairs (
src01_hrc00/src01_hrc01at 576x324, andcheckerboard_1920_1080_10_3_0_0against_1_0and_10_0) give identical per-frame and pooled JSON output from the unpatched and the patched release build, under the default dispatch and with--cpumask -1; pooledvmaf_v0.6.1means are 76.667831, 35.068667 and 7.985899 in all cases.This does not make frames below 17 pixels work. A 16x16 frame still fails after this patch: UBSan reports
shift exponent 4294967295inadm_cm()and the release build crashes. The remaining UBSan reports in the size sweep (shift exponent -1 is negativeinget_best15_from32(),adm_avx2.c:1350) are present before and after and are not touched here.