summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-30 18:02:17 +0200
committerCarl Hetherington <cth@carlh.net>2026-04-01 23:43:00 +0200
commit5b3346c8243af6e42b535b34f24c0a6db616493c (patch)
tree17d7323e9a0624e311536a6931d962dd957a2761 /src
parentb4d9b7fedc37002a97ada284fd3a241a357bd8e2 (diff)
INVALID_JPEG2000_RSIZ_FOR_{2,4}K: note to capabilities.
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc6
-rw-r--r--src/verify.h8
-rw-r--r--src/verify_j2k.cc4
3 files changed, 11 insertions, 7 deletions
diff --git a/src/verify.cc b/src/verify.cc
index deb55362..88bebbc6 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -2143,12 +2143,12 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str
case VerificationNote::Code::INVALID_JPEG2000_POC_MARKER_LOCATION:
return process_string("POC marker found outside main header.");
case VerificationNote::Code::INVALID_JPEG2000_TILE_PARTS_FOR_2K:
- return compose("The JPEG2000 codestream has %1 tile parts in a 2K image instead of 3.", note.note().get());
+ return compose("The JPEG2000 codestream has %1 tile parts in a 2K image instead of 3.", *note.tile_parts());
case VerificationNote::Code::INVALID_JPEG2000_TILE_PARTS_FOR_4K:
- return compose("The JPEG2000 codestream has %1 tile parts in a 4K image instead of 6.", note.note().get());
+ return compose("The JPEG2000 codestream has %1 tile parts in a 4K image instead of 6.", *note.tile_parts());
case VerificationNote::Code::INVALID_JPEG2000_RSIZ_FOR_2K:
case VerificationNote::Code::INVALID_JPEG2000_RSIZ_FOR_4K:
- return compose("The JPEG2000 codestream has an invalid Rsiz (capabilities) value of %1.", note.note().get());
+ return compose("The JPEG2000 codestream has an invalid Rsiz (capabilities) value of %1.", *note.capabilities());
case VerificationNote::Code::MISSING_JPEG2000_TLM_MARKER:
return process_string("No TLM marker was found in a JPEG2000 codestream.");
case VerificationNote::Code::MISMATCHED_TIMED_TEXT_RESOURCE_ID:
diff --git a/src/verify.h b/src/verify.h
index 9783b31b..0b16c8ae 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -448,9 +448,13 @@ public:
* note contains the number of tile parts
*/
INVALID_JPEG2000_TILE_PARTS_FOR_4K,
- /** Invalid _Rsiz_ (capabilities) value in 2K JPEG2000 stream */
+ /** Invalid _Rsiz_ (capabilities) value in 2K JPEG2000 stream.
+ * The invalid value is in capabilities.
+ */
INVALID_JPEG2000_RSIZ_FOR_2K,
- /** Invalid _Rsiz_ (capabilities) value in 4K JPEG2000 stream */
+ /** Invalid _Rsiz_ (capabilities) value in 4K JPEG2000 stream
+ * The invalid value is in capabilities.
+ */
INVALID_JPEG2000_RSIZ_FOR_4K,
/** No TLM marker was found [Bv2.1_10.2.1] */
MISSING_JPEG2000_TLM_MARKER,
diff --git a/src/verify_j2k.cc b/src/verify_j2k.cc
index a2b14854..b2bc876f 100644
--- a/src/verify_j2k.cc
+++ b/src/verify_j2k.cc
@@ -172,9 +172,9 @@ dcp::verify_j2k(shared_ptr<const Data> j2k, int start_index, int frame_index, in
auto const image_height = get_32();
auto const fourk = image_width > 2048;
if (!fourk && rsiz != OPJ_PROFILE_CINEMA_2K) {
- notes.push_back({ VerificationNote::Code::INVALID_JPEG2000_RSIZ_FOR_2K, fmt::to_string(rsiz) });
+ notes.push_back(VerificationNote(VerificationNote::Code::INVALID_JPEG2000_RSIZ_FOR_2K).set_capabilities(rsiz));
} else if (fourk && rsiz != OPJ_PROFILE_CINEMA_4K) {
- notes.push_back({ VerificationNote::Code::INVALID_JPEG2000_RSIZ_FOR_4K, fmt::to_string(rsiz) });
+ notes.push_back(VerificationNote(VerificationNote::Code::INVALID_JPEG2000_RSIZ_FOR_4K).set_capabilities(rsiz));
}
require_32 (0, "invalid top-left image x coordinate %1");
require_32 (0, "invalid top-left image y coordinate %1");