diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-03-30 00:11:22 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-04-01 23:43:00 +0200 |
| commit | 8ab777193f5a3d4d201affa8665aa03f94e0bcd8 (patch) | |
| tree | ae84a29d4b1d852eaa420894e84af25e81fad9f0 /src | |
| parent | fca073e6dfb0a11f49f40232cf2fae2da6209c54 (diff) | |
INVALID_JPEG2000_CODE_BLOCK_{WIDTH_HEIGHT}: note -> code_block_{width,height}.
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 4 | ||||
| -rw-r--r-- | src/verify.h | 4 | ||||
| -rw-r--r-- | src/verify_j2k.cc | 8 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/verify.cc b/src/verify.cc index 08407920..cf4d91f8 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -2131,9 +2131,9 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str 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: - return compose("The JPEG2000 codestream uses a code block width of %1 instead of 32.", note.note().get()); + return compose("The JPEG2000 codestream uses a code block width of %1 instead of 32.", *note.code_block_width()); case VerificationNote::Code::INVALID_JPEG2000_CODE_BLOCK_HEIGHT: - return compose("The JPEG2000 codestream uses a code block height of %1 instead of 32.", note.note().get()); + return compose("The JPEG2000 codestream uses a code block height of %1 instead of 32.", *note.code_block_height()); case VerificationNote::Code::INCORRECT_JPEG2000_POC_MARKER_COUNT_FOR_2K: return compose("%1 POC markers found in 2K JPEG2000 codestream instead of 0.", note.note().get()); case VerificationNote::Code::INCORRECT_JPEG2000_POC_MARKER_COUNT_FOR_4K: diff --git a/src/verify.h b/src/verify.h index 27316610..aa0780c9 100644 --- a/src/verify.h +++ b/src/verify.h @@ -418,11 +418,11 @@ public: /** JPEG2000 tile size is not the same as the image size [Bv2.1_10.2.1] */ INVALID_JPEG2000_TILE_SIZE, /** JPEG2000 code block width is not 32 [Bv2.1_10.2.1] - * note contains the code block width + * code_block_width contains the code block width */ INVALID_JPEG2000_CODE_BLOCK_WIDTH, /** JPEG2000 code block height is not 32 [Bv2.1_10.2.1] - * note contains the code block height + * code_block_height contains the code block height */ INVALID_JPEG2000_CODE_BLOCK_HEIGHT, /** There must be no POC markers in a 2K codestream [Bv2.1_10.2.1] diff --git a/src/verify_j2k.cc b/src/verify_j2k.cc index 06316025..4458cfa3 100644 --- a/src/verify_j2k.cc +++ b/src/verify_j2k.cc @@ -247,11 +247,15 @@ dcp::verify_j2k(shared_ptr<const Data> j2k, int start_index, int frame_index, in require_8(fourk ? 6 : 5, "invalid number of transform levels %1"); auto log_code_block_width = get_8(); if (log_code_block_width != 3) { - notes.push_back({ VerificationNote::Code::INVALID_JPEG2000_CODE_BLOCK_WIDTH, fmt::to_string(4 * (2 << log_code_block_width)) }); + notes.push_back( + VerificationNote(VerificationNote::Code::INVALID_JPEG2000_CODE_BLOCK_WIDTH).set_code_block_width(4 * (2 << log_code_block_width)) + ); } auto log_code_block_height = get_8(); if (log_code_block_height != 3) { - notes.push_back({ VerificationNote::Code::INVALID_JPEG2000_CODE_BLOCK_HEIGHT, fmt::to_string(4 * (2 << log_code_block_height)) }); + notes.push_back( + VerificationNote(VerificationNote::Code::INVALID_JPEG2000_CODE_BLOCK_HEIGHT).set_code_block_height(4 * (2 << log_code_block_height)) + ); } require_8(0, "invalid mode variations"); require_8(0, "invalid wavelet transform type %1"); // 9/7 irreversible |
