Skip to content

fix(#2001): allow cicpTag as a common optional tag in iccPawgReport C5 - #2004

Merged
xsscx merged 1 commit into
masterfrom
fix/2001-pawg-c5-cicp
Aug 7, 2026
Merged

fix(#2001): allow cicpTag as a common optional tag in iccPawgReport C5#2004
xsscx merged 1 commit into
masterfrom
fix/2001-pawg-c5-cicp

Conversation

@colourbill-ctrl

Copy link
Copy Markdown
Contributor

Fixes #2001.

What was wrong

Check C5 ("Is the profile free of additional tags not required for profile class, other
than allowed optional tags") warned on any profile carrying a cicpTag:

[WARN] C5 ... standard tags outside the local class rule table: 'cicp'

icSigCicpTag was missing from kCommonOptional in PawgReport.cpp.

Why it reached the warning rather than the private-tag bucket

The non-obvious part, and what the added comment records. IsSpecTag() asks
CIccInfo::GetTagSigName, which resolves 'cicp' to "cicpTag" through CIccTagCreator
(IccTagFactory.cpp:138). The name does not begin with "Unknown", so the tag is never
classified as private
and falls straight through IsAllowedForClass() to the C5 warning. A
conforming profile was reported as non-conforming.

Not HDR-specific

cicpTag is a v4.4 tag and C5 does not look at the transfer characteristic, so this hits any
profile author who adds one to an ordinary display profile. The regression test is built on a
plain SDR profile for exactly that reason.

Test

Adds .github/ci/regression/pawg-c5-cicp-optional.cpp and the iccdev.pawg-c5-cicp-optional
CTest. It compiles PawgReport.cpp into the test the same way the #1775 compression test does,
then drives DumpPawgReport and reads the C5 line back — C5's verdict is not exposed through
PawgReport.h, and the emitted text is what the issue was reported against.

A/B against one base profile:

case profile expected
control Testing/sRGB_v4_ICC_preference.icc as tracked C5 OK
subject the same profile plus a BT.709 cicpTag (1/1/1/0) C5 OK

Pre-fix only the subject fails, naming 'cicp'; the control passes both ways, which is
what makes a green subject mean something.

The corpus offered nothing to reuse as the subject: of the nine tracked XML carrying a
cicpTag, eight are under Testing/HDR/ and the ninth
(.github/ci/test-data/ub-cicp-colorprimaries-1346.xml) is a deliberately malformed UB fixture
that iccFromXml refuses outright, so it cannot be turned into a profile to assess. Hence the
synthesised subject.

The test writes its own diagnostics to stderr: capturing the report means redirecting
stdout, and there is no portable way to restore it on a CI runner with no /dev/tty or
CONOUT$.

Scoped out on purpose — a related gap this did not fix

The first base profile I tried,
Testing/ApplyDataFiles/test-profiles/sRGB_D65_MAT.icc, was rejected as a control because it
already warns on C5 — for 'c2sp', 's2cp', 'svcn', 'gbd1'. So cicp is not the only
tag missing from these tables.

Those four are deliberately not addressed here: whether they belong in kCommonOptional or
in a per-class rule table is a separate judgement from the one #2001 reports, and folding an
unreviewed table edit into a one-line fix seemed like the wrong trade. Happy to file that
separately if it's wanted.

Pre-flight

lane result
clang 21.1.3 Release, -Wall -Wextra -Wpedantic -Werror ("strict warnings ENABLED") grep -cE 'warning:' = 0, errors 0
GCC 15.2.0 in CI's own regression container, strict + -DENABLE_LTO=ON ("strict warnings ENABLED") grep -cE 'warning:' = 0, errors 0; new CTest passes there too
ASan+UBSan Debug, full ctest 155/157; the 2 failures are pre-existing local noise (tool-coverage CMM profile-chain errors, spectral-tiff-preview missing imagecodecs)
new test under ASAN_OPTIONS=detect_leaks=1 clean — it news a tag and reads a profile, so this was checked rather than assumed

No shell or workflow files changed, so the shellcheck/actionlint pre-flight gates are not
engaged by this diff.

@github-actions github-actions Bot added Tools Command-line tool or GUI tool changes Testing CTest, regression, or test coverage Source C or C++ source code changes Configuration Repository, CMake, YAML, JSON, or tool configuration Build Build system, CMake, compiler, or packaging pending CI checks still running passed All CI checks passed and removed pending CI checks still running labels Aug 7, 2026

@xsscx xsscx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2026-08-07 10:17:01 UTC

@xsscx
xsscx enabled auto-merge (squash) August 7, 2026 10:17
@github-actions github-actions Bot added pending CI checks still running and removed passed All CI checks passed labels Aug 7, 2026
Check C5 asks whether a profile is free of additional tags not required
for its class other than allowed optional tags. icSigCicpTag was missing
from kCommonOptional, so every profile carrying one drew:

  [WARN] C5 ... standard tags outside the local class rule table: 'cicp'

The reason it reached the warning rather than the private-tag bucket is
the non-obvious part, and it is what the added comment records:
IsSpecTag() asks CIccInfo::GetTagSigName, which resolves 'cicp' to
"cicpTag" through CIccTagCreator (IccTagFactory.cpp:138). The name does
not begin with "Unknown", so the tag is never classified as private and
falls straight through IsAllowedForClass() to the C5 warning. A
conforming profile was reported as non-conforming.

This is not HDR-specific. cicpTag is a v4.4 tag and the check does not
look at the transfer characteristic, so any profile author who adds one
to an ordinary display profile gets the spurious warning. The regression
test below is built on a plain SDR profile for exactly that reason.

Adds .github/ci/regression/pawg-c5-cicp-optional.cpp and the
iccdev.pawg-c5-cicp-optional CTest. It compiles PawgReport.cpp into the
test the same way the #1775 compression test does, then drives
DumpPawgReport and reads the C5 line back -- C5's verdict is not exposed
through PawgReport.h, and the emitted text is what the issue was reported
against. Structured A/B against one base profile:

  control  Testing/sRGB_v4_ICC_preference.icc as tracked   -> C5 OK
  subject  the same profile plus a BT.709 cicpTag          -> C5 OK

Pre-fix only the subject fails, naming 'cicp'; the control passes both
ways, which is what makes a green subject mean something. The first base
profile tried, Testing/ApplyDataFiles/test-profiles/sRGB_D65_MAT.icc, was
rejected precisely because its control failed -- it already warns on
'c2sp', 's2cp', 'svcn', 'gbd1'.

Those four tags are NOT addressed here. Whether they belong in
kCommonOptional or in a class rule table is a separate judgement from the
one #2001 reports, and widening this change to cover them would put an
unreviewed table edit alongside a one-line fix.

The test writes its own diagnostics to stderr: capturing the report means
redirecting stdout, and there is no portable way to restore it on a CI
runner with no /dev/tty or CONOUT$.

Fixes #2001
@xsscx
xsscx force-pushed the fix/2001-pawg-c5-cicp branch from 200a3f2 to bd7c0f9 Compare August 7, 2026 10:55
@xsscx

xsscx commented Aug 7, 2026

Copy link
Copy Markdown
Member

PR Status

2026-08-07 10:58:29 UTC

  1. Rebased on master:HEAD
  2. Took BOTH
  3. Cross Checks
  4. Push
  5. Auto-Merge

Success!

Reminder - Please use Stacked PRs https://docs.github.com/en/pull-requests/how-tos/stacked-pull-requests

@xsscx
xsscx merged commit 5a3eedd into master Aug 7, 2026
36 checks passed
@xsscx
xsscx deleted the fix/2001-pawg-c5-cicp branch August 7, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build Build system, CMake, compiler, or packaging Configuration Repository, CMake, YAML, JSON, or tool configuration pending CI checks still running Source C or C++ source code changes Testing CTest, regression, or test coverage Tools Command-line tool or GUI tool changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iccPawgReport C5 false-positives on any profile carrying a cicpTag (missing from kCommonOptional)

2 participants