summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-30 00:03:45 +0200
committerCarl Hetherington <cth@carlh.net>2026-04-01 23:43:00 +0200
commitfca073e6dfb0a11f49f40232cf2fae2da6209c54 (patch)
treeb8edab8696f956ee79dbe3c81e33b00481f3159d /src
parent0c3fc9e8b33494a920c89da935a100fa7307939c (diff)
INVALID_JPEG2000_GUARD_BITS_FOR_{2,4}K: note -> guard_bits.
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc4
-rw-r--r--src/verify.h4
-rw-r--r--src/verify_j2k.cc4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/verify.cc b/src/verify.cc
index abc447de..08407920 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -2125,9 +2125,9 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str
*note.error()
);
case VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_2K:
- return compose("The JPEG2000 codestream uses %1 guard bits in a 2K image instead of 1.", note.note().get());
+ return compose("The JPEG2000 codestream uses %1 guard bits in a 2K image instead of 1.", *note.guard_bits());
case VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_4K:
- return compose("The JPEG2000 codestream uses %1 guard bits in a 4K image instead of 2.", note.note().get());
+ return compose("The JPEG2000 codestream uses %1 guard bits in a 4K image instead of 2.", *note.guard_bits());
case VerificationNote::Code::INVALID_JPEG2000_TILE_SIZE:
return process_string("The JPEG2000 tile size is not the same as the image size.");
case VerificationNote::Code::INVALID_JPEG2000_CODE_BLOCK_WIDTH:
diff --git a/src/verify.h b/src/verify.h
index 16151bd1..27316610 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -406,12 +406,12 @@ public:
*/
INVALID_JPEG2000_CODESTREAM,
/** Invalid number of guard bits in a 2K JPEG2000 stream (should be 1) [Bv2.1_10.2.1]
- * note contains the number of guard bits
+ * guard_bits contains the number of guard bits
* reel_index contains the reel index (starting from 0)
*/
INVALID_JPEG2000_GUARD_BITS_FOR_2K,
/** Invalid number of guard bits in a 4K JPEG2000 stream (should be 2) [Bv2.1_10.2.1]
- * note contains the number of guard bits
+ * guard_bits contains the number of guard bits
* reel_index contains the reel index (starting from 0)
*/
INVALID_JPEG2000_GUARD_BITS_FOR_4K,
diff --git a/src/verify_j2k.cc b/src/verify_j2k.cc
index 7ba349a5..06316025 100644
--- a/src/verify_j2k.cc
+++ b/src/verify_j2k.cc
@@ -270,10 +270,10 @@ dcp::verify_j2k(shared_ptr<const Data> j2k, int start_index, int frame_index, in
auto quantization_style = get_8();
int guard_bits = (quantization_style >> 5) & 7;
if (fourk && guard_bits != 2) {
- notes.push_back({ VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_4K, fmt::to_string(guard_bits) });
+ notes.push_back(VerificationNote(VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_4K).set_guard_bits(guard_bits));
}
if (!fourk && guard_bits != 1) {
- notes.push_back({ VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_2K, fmt::to_string(guard_bits) });
+ notes.push_back(VerificationNote(VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_2K).set_guard_bits(guard_bits));
}
ptr += L_qcd - 3;
} else if (*marker_name == "COC") {