Repository navigation
perf(adm): split adm_p_norm==3.0 fast-path (ADR-0463) - #1678
Merged
Merged
Conversation
lusoris
force-pushed
the
perf/adm-p3-fast-path
branch
from
October 1, 2026 10:54
c3abb7d to
6f4cd1b
Compare
This was referenced Oct 1, 2026
lusoris
added a commit
that referenced
this pull request
Oct 6, 2026
…ion_target, conversion in read_pictures (#1671-#1675, #1677, #1678) Netflix/vmaf PRs merged on 2026-10-05: ed61076b2 (per-input colorimetry flags), 1ddf81607 (conversion_target in the model file), a6c0ba6d5 (convert pictures to the model's target in vmaf_read_pictures), 130569c45 (Windows build of its test), efe90c8b8 (Python pass-through), 5c3f4fb90 (approximate gamma in the zimg graph), 4f3f71b68 (CAMBI 144p encode minimum). Adapted, not verbatim (ADR-2093, ADR-1822): VmafPicture keeps its layout, so the source colour of each input is declared on the context with the new vmaf_set_input_colorimetry() instead of VmafPicture::color; the policy functions take it as an argument and the glue upstream keeps in libvmaf.c is core/src/conversion_context.c. The conversion runs on the host before any device upload; a device picture and the SYCL zero-copy entry point are refused with -ENOTSUP when a model declares a target. A failed conversion releases the pictures (ADR-1431). The CAMBI minimum is applied to the CUDA, HIP, SYCL and Metal option tables as well. Upstream's missing-colour message named flags that do not exist; it names the real ones. Fixtures: the two 576x324 HDR dock clips of Netflix/vmaf_resource are in scripts/test/fetch-test-yuvs.sh with md5 sums. Measured on ryzen-4090-arc (gcc, zimg 3.0.6): test_model, test_conversion_policy, test_read_pictures_convert, test_cli_parse, test_colorspace and the new CAMBI minimum contract pass; disabling the conversion makes test_read_pictures_convert fail; the Netflix golden tests (CPU, isolated gcc build) 280 passed, 3 skipped; clang-tidy cpu lane 0 findings on the 13 touched translation units. (cherry picked from commits ed61076b2, 1ddf81607, a6c0ba6d5, 130569c45, efe90c8b8, 5c3f4fb90, 4f3f71b68) Co-authored-by: Christos Bampis <christosb@netflix.com> Co-authored-by: Pavan Madhusudanarao <pmadhusudanarao@netflix.com>
lusoris
added a commit
that referenced
this pull request
Oct 6, 2026
…ion_target, conversion in read_pictures (#1671-#1675, #1677, #1678) (#2300) * port(upstream): HDR-VMAF groundwork: input colorimetry, model conversion_target, conversion in read_pictures (#1671-#1675, #1677, #1678) Netflix/vmaf PRs merged on 2026-10-05: ed61076b2 (per-input colorimetry flags), 1ddf81607 (conversion_target in the model file), a6c0ba6d5 (convert pictures to the model's target in vmaf_read_pictures), 130569c45 (Windows build of its test), efe90c8b8 (Python pass-through), 5c3f4fb90 (approximate gamma in the zimg graph), 4f3f71b68 (CAMBI 144p encode minimum). Adapted, not verbatim (ADR-2093, ADR-1822): VmafPicture keeps its layout, so the source colour of each input is declared on the context with the new vmaf_set_input_colorimetry() instead of VmafPicture::color; the policy functions take it as an argument and the glue upstream keeps in libvmaf.c is core/src/conversion_context.c. The conversion runs on the host before any device upload; a device picture and the SYCL zero-copy entry point are refused with -ENOTSUP when a model declares a target. A failed conversion releases the pictures (ADR-1431). The CAMBI minimum is applied to the CUDA, HIP, SYCL and Metal option tables as well. Upstream's missing-colour message named flags that do not exist; it names the real ones. Fixtures: the two 576x324 HDR dock clips of Netflix/vmaf_resource are in scripts/test/fetch-test-yuvs.sh with md5 sums. Measured on ryzen-4090-arc (gcc, zimg 3.0.6): test_model, test_conversion_policy, test_read_pictures_convert, test_cli_parse, test_colorspace and the new CAMBI minimum contract pass; disabling the conversion makes test_read_pictures_convert fail; the Netflix golden tests (CPU, isolated gcc build) 280 passed, 3 skipped; clang-tidy cpu lane 0 findings on the 13 touched translation units. (cherry picked from commits ed61076b2, 1ddf81607, a6c0ba6d5, 130569c45, efe90c8b8, 5c3f4fb90, 4f3f71b68) Co-authored-by: Christos Bampis <christosb@netflix.com> Co-authored-by: Pavan Madhusudanarao <pmadhusudanarao@netflix.com>
lusoris
added a commit
that referenced
this pull request
Oct 6, 2026
…es in the libvmaf filters (#2304) * port(upstream): HDR-VMAF groundwork: input colorimetry, model conversion_target, conversion in read_pictures (#1671-#1675, #1677, #1678) Netflix/vmaf PRs merged on 2026-10-05: ed61076b2 (per-input colorimetry flags), 1ddf81607 (conversion_target in the model file), a6c0ba6d5 (convert pictures to the model's target in vmaf_read_pictures), 130569c45 (Windows build of its test), efe90c8b8 (Python pass-through), 5c3f4fb90 (approximate gamma in the zimg graph), 4f3f71b68 (CAMBI 144p encode minimum). Adapted, not verbatim (ADR-2093, ADR-1822): VmafPicture keeps its layout, so the source colour of each input is declared on the context with the new vmaf_set_input_colorimetry() instead of VmafPicture::color; the policy functions take it as an argument and the glue upstream keeps in libvmaf.c is core/src/conversion_context.c. The conversion runs on the host before any device upload; a device picture and the SYCL zero-copy entry point are refused with -ENOTSUP when a model declares a target. A failed conversion releases the pictures (ADR-1431). The CAMBI minimum is applied to the CUDA, HIP, SYCL and Metal option tables as well. Upstream's missing-colour message named flags that do not exist; it names the real ones. Fixtures: the two 576x324 HDR dock clips of Netflix/vmaf_resource are in scripts/test/fetch-test-yuvs.sh with md5 sums. Measured on ryzen-4090-arc (gcc, zimg 3.0.6): test_model, test_conversion_policy, test_read_pictures_convert, test_cli_parse, test_colorspace and the new CAMBI minimum contract pass; disabling the conversion makes test_read_pictures_convert fail; the Netflix golden tests (CPU, isolated gcc build) 280 passed, 3 skipped; clang-tidy cpu lane 0 findings on the 13 touched translation units. (cherry picked from commits ed61076b2, 1ddf81607, a6c0ba6d5, 130569c45, efe90c8b8, 5c3f4fb90, 4f3f71b68) Co-authored-by: Christos Bampis <christosb@netflix.com> Co-authored-by: Pavan Madhusudanarao <pmadhusudanarao@netflix.com> * feat(ffmpeg): declare the input colorimetry from the AVFrame properties in the libvmaf filters Patch 0022 of the FFmpeg series (ADR-2093): on the first frame pair the libvmaf filter and the software path of libvmaf_sycl map the AVFrame range, primaries, transfer and matrix of each input and call vmaf_set_input_colorimetry(), so a model with a conversion_target converts HDR input. An input with an attribute libvmaf does not name stays unspecified, so SDR and untagged input score as before. Refreshed and checked against FFmpeg n9.0.2. Measured with an FFmpeg n9.0.2 build carrying patches 0001 to 0022: check-libvmaf-input-colorimetry.sh 8 of 8; test_ffmpeg_libvmaf_input_colorimetry_contract passes.
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.
Summary
Restores the ADM
adm_p_norm == 3.0fast paths (adm_*_s_p3, ADR-0463 / BUG-048 B3) lost to stale merges.powfcalls on the hot path for default VMAF evaluations.--precision maxon both 576p and 1080p checkerboard test pairs.Type
perf— performance improvementChecklist
python3 scripts/ci/run_meson_test.py -- -C buildBug-status hygiene
docs/state.mdupdated in this PR with row T-BUG048-PERF-RESTORATIONS-2026-09-26Netflix golden-data gate
assertAlmostEqual(...)score in the Netflix golden Python tests.Deep-dive deliverables (ADR-0108)
AGENTS.mdinvariant note — no rebase-sensitive invariantschangelog.d/changed/perf-adm-p3-fast-path.mddocs/rebase-notes.mdReproducer