|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Caller-workspace two-spool JOF round-trip verification. More...
#include <stddef.h>#include <stdint.h>#include <string.h>#include "jof_produce.h"#include "ra8_attributes.h"#include "ra8_fmt_stream.h"Go to the source code of this file.
Data Structures | |
| struct | verify_pull_t |
| Sequential cursor over one positioned source context. More... | |
| struct | verify_compare_t |
| Comparison state shared by bounded tile/row helpers. More... | |
| struct | verify_atlases_t |
| Parsed and fully preflighted reference and subject atlases. More... | |
Enumerations | |
| enum | verify_const_t : uint32_t { k_verify_band_height = 256U , k_verify_diffs_max = 8U , k_verify_decimal_max = 20U , k_verify_decimal = 10U , k_verify_hex_radix = 16U , k_verify_ppm_max_text = 5U } |
| Verification geometry, report, and probe constants. More... | |
Functions | |
| static ra8_err_t | internal_stable (const ra8_fmt_source_t *source) |
| Validate a source through its optional stability callback. | |
| static ra8_err_t | internal_pull (void *ctx, uint8_t *bytes, size_t cap, size_t *got) |
| Pull the next bounded source prefix for streamed JOF production. | |
| static ra8_err_t | internal_spool_append (void *ctx, const uint8_t *bytes, size_t len) |
| Append one produced JOF span to the injected verifier spool. | |
| static ra8_err_t | internal_produce (const ra8_fmt_source_t *source, const ra8_fmt_jof_verify_requirements_t *need, uint16_t tile_h, ra8_fmt_jof_verify_workspace_t *work, ra8_fmt_spool_t *spool, jof_info_t *info) |
| Produce and seal one deflate JOF into an injected spool. | |
| static ra8_err_t | internal_text (const ra8_fmt_sink_t *sink, const char *text) |
| Append one NUL-terminated report fragment. | |
| static ra8_err_t | internal_u64 (const ra8_fmt_sink_t *sink, uint64_t value) |
| Append one uint64_t as canonical decimal. | |
| static ra8_err_t | internal_hex (const ra8_fmt_sink_t *sink, uint8_t value) |
| Append one byte as two uppercase hexadecimal digits. | |
| static void | internal_field (const ra8_fmt_sink_t *sink, uint64_t value, const char *suffix, ra8_err_t *status) |
| Append one numeric field and suffix while status succeeds. | |
| static void | internal_geometry (const ra8_fmt_sink_t *report, const jof_info_t *info, const jof_info_t *subject) |
| Emit the exact legacy verifier geometry line. | |
| static void | internal_difference (verify_compare_t *state, uint64_t x, uint64_t y, uint8_t reference, uint8_t banded) |
| Record and optionally report one differing byte. | |
| static void | internal_abort_dump (verify_compare_t *state) |
| Abort an incomplete optional PPM stage once. | |
| static void | internal_dump_bytes (verify_compare_t *state, const uint8_t *bytes, size_t len) |
| Append optional PPM bytes or mark the dump failed. | |
| static void | internal_dump_u64 (verify_compare_t *state, uint64_t value) |
| Append one decimal PPM header field. | |
| static void | internal_dump_header (verify_compare_t *state) |
| Stage the exact P5 or P6 header for subject geometry. | |
| static void | internal_dump_row (verify_compare_t *state, const uint8_t *row) |
| Stage one subject row in PPM channel order. | |
| static ra8_err_t | internal_preflight (const ra8_fmt_spool_t *spool, const jof_info_t *info, ra8_fmt_jof_verify_workspace_t *work, bool reference) |
| Decode every sealed atlas tile before reporting or output staging. | |
| static void | internal_compare_row (verify_compare_t *state, const uint8_t *band_row, uint16_t y) |
| Compare one decoded subject row with its reference row. | |
| static ra8_err_t | internal_compare (verify_compare_t *state) |
| Compare all subject bands against streamed reference rows. | |
| static bool | internal_info (const jof_info_t *info, const ra8_fmt_jof_verify_requirements_t *need, uint16_t tile_h) |
| Check parsed atlas geometry against exact planned policy. | |
| static void | internal_phase_error (const ra8_fmt_sink_t *report, const char *prefix, ra8_err_t status) |
| Report one exact legacy phase-failure line. | |
| static void | internal_finish_dump (verify_compare_t *state, const char *dump_name) |
| Commit or abort the optional PPM and emit its legacy status line. | |
| static void | internal_verdict (const ra8_fmt_sink_t *report, uint64_t diffs) |
| Emit the exact legacy final verdict line. | |
| static ra8_err_t | internal_check (const ra8_fmt_source_t *reference_source, const ra8_fmt_source_t *banded_source, const ra8_fmt_jof_verify_requirements_t *need, const ra8_fmt_jof_verify_workspace_t *work, const ra8_fmt_spool_t *ref_spool, const ra8_fmt_spool_t *got_spool, const ra8_fmt_sink_t *report) |
| Reject incomplete callbacks, aliased contexts, or undersized arenas. | |
| static void | internal_abort_transaction (ra8_fmt_transaction_t *dump) |
| Abort an optional complete transaction binding. | |
| static ra8_err_t | internal_accept (const ra8_fmt_spool_t *spool, const ra8_fmt_jof_verify_requirements_t *need, ra8_fmt_jof_verify_workspace_t *work, bool reference, jof_info_t *info) |
| Parse, check geometry, and decode every tile of one sealed spool. | |
| static ra8_err_t | internal_prepare (const ra8_fmt_source_t *reference_source, const ra8_fmt_source_t *banded_source, const ra8_fmt_jof_verify_requirements_t *need, ra8_fmt_jof_verify_workspace_t *work, ra8_fmt_spool_t *reference_spool, ra8_fmt_spool_t *banded_spool, const ra8_fmt_sink_t *report, verify_atlases_t *atlases) |
| Produce, seal, parse, and preflight both independent atlases. | |
| ra8_err_t | ra8_fmt_jof_verify_stream (const ra8_fmt_source_t *reference_source, const ra8_fmt_source_t *banded_source, const ra8_fmt_jof_verify_requirements_t *requirements, ra8_fmt_jof_verify_workspace_t *workspace, ra8_fmt_spool_t *reference_spool, ra8_fmt_spool_t *banded_spool, ra8_fmt_transaction_t *dump, const char *dump_name, const ra8_fmt_sink_t *report) |
| Verify banded JOF pixels against an independently decoded row reference. | |
Caller-workspace two-spool JOF round-trip verification.
Produces an independently decoded one-row reference atlas and the normal banded subject atlas, validates both, then compares one row at a time. Host paths and descriptors remain behind injected source, spool, transaction, and report callbacks.
Definition in file ra8_fmt_stream_verify.c.
| enum verify_const_t : uint32_t |
Verification geometry, report, and probe constants.
Definition at line 22 of file ra8_fmt_stream_verify.c.
|
static |
Abort an incomplete optional PPM stage once.
Delegates abort only while the comparison still owns a live stage.
| [in,out] | state | Comparison state. |
state is valid. state records that the dump is unavailable. Definition at line 391 of file ra8_fmt_stream_verify.c.
References ra8_fmt_transaction_ops_t::abort, ra8_fmt_transaction_t::ctx, verify_compare_t::dump, verify_compare_t::dump_ok, and ra8_fmt_transaction_t::ops.
Referenced by internal_dump_bytes(), internal_finish_dump(), and ra8_fmt_jof_verify_stream().
|
static |
Abort an optional complete transaction binding.
Calls abort only when the transaction and callback are present.
| [in,out] | dump | Optional transaction. |
dump is null or owns a complete transaction vtable. Definition at line 818 of file ra8_fmt_stream_verify.c.
References ra8_fmt_transaction_ops_t::abort, ra8_fmt_transaction_t::ctx, and ra8_fmt_transaction_t::ops.
Referenced by ra8_fmt_jof_verify_stream().
|
static |
Parse, check geometry, and decode every tile of one sealed spool.
Replaces producer geometry with independently parsed trusted geometry.
| [in] | spool | Sealed reference or subject spool. |
| [in] | need | Exact verifier requirements. |
| [in,out] | work | Caller decode buffers. |
| [in] | reference | Select one-row reference geometry. |
| [in,out] | info | Producer geometry replaced by parsed geometry. |
| k_ra8_ok | The complete atlas passed every check. |
| k_ra8_err_validation_failed | Parsed policy differed. |
| other | Parser or decoder status. |
spool was sealed at info total size. Definition at line 845 of file ra8_fmt_stream_verify.c.
References ra8_fmt_jof_verify_requirements_t::band_height, ra8_fmt_spool_t::ctx, internal_info(), internal_preflight(), jof_parse(), k_ra8_err_validation_failed, k_ra8_ok, ra8_fmt_spool_t::read_at, and jof_info_t::total_size.
Referenced by internal_prepare().
|
static |
Reject incomplete callbacks, aliased contexts, or undersized arenas.
Validates every independent binding before producer or transaction mutation.
| [in] | reference_source | Reference source binding. |
| [in] | banded_source | Subject source binding. |
| [in] | need | Exact verifier requirements. |
| [in] | work | Caller workspace views. |
| [in] | ref_spool | Reference spool binding. |
| [in] | got_spool | Subject spool binding. |
| [in] | report | Report sink. |
| k_ra8_ok | Every contract is complete and sufficiently sized. |
| k_ra8_err_null_ptr | A binding is incomplete or contexts alias. |
| k_ra8_err_invalid_size | One caller arena is insufficient. |
Definition at line 767 of file ra8_fmt_stream_verify.c.
References ra8_fmt_spool_t::append, ra8_fmt_jof_verify_requirements_t::band_tile_bytes, ra8_fmt_jof_verify_requirements_t::banded_work_bytes, ra8_fmt_source_t::ctx, ra8_fmt_spool_t::ctx, k_ra8_err_invalid_size, k_ra8_err_null_ptr, k_ra8_ok, ra8_fmt_source_t::read_at, ra8_fmt_spool_t::read_at, ra8_fmt_jof_verify_requirements_t::reference_work_bytes, ra8_fmt_jof_verify_requirements_t::row_bytes, ra8_fmt_jof_verify_requirements_t::scratch_bytes, ra8_fmt_spool_t::seal, and ra8_fmt_jof_verify_requirements_t::webp_work_bytes.
Referenced by ra8_fmt_jof_verify_stream().
|
static |
Compare all subject bands against streamed reference rows.
Decodes one band, compares each row, and stages optional PPM rows.
| [in,out] | state | Fully prepared comparison state. |
| k_ra8_ok | The complete raster was compared. |
| k_ra8_err_validation_failed | Decoded geometry was inconsistent. |
| other | Tile decoder or scratch status. |
Definition at line 592 of file ra8_fmt_stream_verify.c.
References ra8_fmt_spool_t::ctx, verify_compare_t::dump, verify_compare_t::dump_ok, verify_compare_t::ginfo, verify_compare_t::got, ra8_fmt_jof_verify_requirements_t::height, internal_compare_row(), internal_dump_header(), jof_read_tile(), k_ra8_err_validation_failed, k_ra8_ok, verify_compare_t::need, ra8_fmt_spool_t::read_at, verify_compare_t::ref, verify_compare_t::rinfo, ra8_fmt_jof_verify_requirements_t::row_bytes, jof_info_t::tile_rows, and ra8_fmt_jof_verify_requirements_t::width.
Referenced by ra8_fmt_jof_verify_stream().
|
static |
Compare one decoded subject row with its reference row.
Loads the matching reference tile and records differing channel bytes.
| [in,out] | state | Comparison state. |
| [in] | band_row | Decoded subject row. |
| [in] | y | Global raster row. |
band_row spans the planned row byte count. y is below planned image height. Definition at line 561 of file ra8_fmt_stream_verify.c.
References ra8_fmt_jof_verify_requirements_t::bpp, verify_compare_t::diffs, internal_difference(), internal_dump_row(), verify_compare_t::need, and ra8_fmt_jof_verify_requirements_t::row_bytes.
Referenced by internal_compare().
|
static |
Record and optionally report one differing byte.
Counts every difference but emits detail only up to the legacy ceiling.
| [in,out] | state | Comparison state. |
| [in] | x | Pixel x coordinate. |
| [in] | y | Pixel y coordinate. |
| [in] | reference | Reference byte. |
| [in] | banded | Subject byte. |
state and its report binding are valid. Definition at line 352 of file ra8_fmt_stream_verify.c.
References internal_field(), internal_hex(), internal_text(), k_ra8_ok, k_verify_diffs_max, verify_compare_t::report, and verify_compare_t::shown.
Referenced by internal_compare_row().
|
static |
Append optional PPM bytes or mark the dump failed.
Preserves verification progress when a diagnostic output fails.
| [in,out] | state | Comparison state. |
| [in] | bytes | PPM bytes. |
| [in] | len | Exact byte count. |
state is valid and bytes spans len. Definition at line 414 of file ra8_fmt_stream_verify.c.
References ra8_fmt_transaction_ops_t::append, ra8_fmt_transaction_t::ctx, verify_compare_t::dump, verify_compare_t::dump_ok, internal_abort_dump(), k_ra8_ok, and ra8_fmt_transaction_t::ops.
Referenced by internal_dump_header(), internal_dump_row(), and internal_dump_u64().
|
static |
Stage the exact P5 or P6 header for subject geometry.
Selects gray or colour magic and emits dimensions plus sample maximum.
| [in,out] | state | Comparison state. |
Definition at line 462 of file ra8_fmt_stream_verify.c.
References ra8_fmt_jof_verify_requirements_t::bpp, ra8_fmt_jof_verify_requirements_t::height, internal_dump_bytes(), internal_dump_u64(), k_verify_ppm_max_text, verify_compare_t::need, and ra8_fmt_jof_verify_requirements_t::width.
Referenced by internal_compare().
|
static |
Stage one subject row in PPM channel order.
Appends gray/RGB rows directly and strips RGBA alpha per pixel.
| [in,out] | state | Comparison state. |
| [in] | row | Decoded subject row. |
row spans the planned full-width subject bytes. Definition at line 485 of file ra8_fmt_stream_verify.c.
References ra8_fmt_jof_verify_requirements_t::bpp, verify_compare_t::dump, verify_compare_t::dump_ok, internal_dump_bytes(), memcpy(), verify_compare_t::need, ra8_fmt_jof_verify_requirements_t::row_bytes, and ra8_fmt_jof_verify_requirements_t::width.
Referenced by internal_compare_row().
|
static |
Append one decimal PPM header field.
Uses fixed reverse-digit storage through the optional dump helper.
| [in,out] | state | Comparison state. |
| [in] | value | Header value. |
state is valid. value is a planned image dimension or maximum sample. Definition at line 435 of file ra8_fmt_stream_verify.c.
References internal_dump_bytes(), k_verify_decimal, and k_verify_decimal_max.
Referenced by internal_dump_header().
|
static |
Append one numeric field and suffix while status succeeds.
Preserves the first report-sink error across chained appends.
| [in] | sink | Bound report sink. |
| [in] | value | Numeric field. |
| [in] | suffix | NUL-terminated suffix. |
| [in,out] | status | Current and resulting report status. |
status contains the prior append result. Definition at line 301 of file ra8_fmt_stream_verify.c.
References internal_text(), internal_u64(), and k_ra8_ok.
Referenced by internal_difference(), internal_geometry(), internal_phase_error(), and internal_verdict().
|
static |
Commit or abort the optional PPM and emit its legacy status line.
Publishes only a complete stage after comparison and stability checks.
| [in,out] | state | Comparison state. |
| [in] | dump_name | Output spelling. |
state is valid. dump_name. Definition at line 701 of file ra8_fmt_stream_verify.c.
References ra8_fmt_transaction_ops_t::commit, ra8_fmt_transaction_t::ctx, verify_compare_t::dump, verify_compare_t::dump_ok, internal_abort_dump(), internal_text(), k_ra8_ok, ra8_fmt_transaction_t::ops, and verify_compare_t::report.
Referenced by ra8_fmt_jof_verify_stream().
|
static |
Emit the exact legacy verifier geometry line.
Reports trusted reference and subject dimensions and tiling.
| [in] | report | Bound report sink. |
| [in] | info | Trusted reference geometry. |
| [in] | subject | Trusted banded geometry. |
Definition at line 326 of file ra8_fmt_stream_verify.c.
References jof_info_t::bpp, jof_info_t::height, internal_field(), internal_text(), jof_info_t::tile_count, jof_info_t::tile_h, and jof_info_t::width.
Referenced by ra8_fmt_jof_verify_stream().
|
static |
Append one byte as two uppercase hexadecimal digits.
Emits the high then low nibble through one exact sink call.
| [in] | sink | Bound report sink. |
| [in] | value | Byte value. |
| k_ra8_ok | Both digits were appended. |
| other | Injected sink failure. |
sink and callback are valid. value is one complete byte. Definition at line 275 of file ra8_fmt_stream_verify.c.
References ra8_fmt_sink_t::ctx, k_verify_hex_radix, and ra8_fmt_sink_t::write.
Referenced by internal_difference().
|
static |
Check parsed atlas geometry against exact planned policy.
Requires one full-width column and the requested row/band tiling.
| [in] | info | Parsed atlas geometry. |
| [in] | need | Exact verifier requirements. |
| [in] | tile_h | Expected tile height. |
| true | The atlas matches the complete policy. |
| false | One geometry, tile-count, bpp, or codec field differs. |
info and need are non-null. Definition at line 657 of file ra8_fmt_stream_verify.c.
References jof_info_t::bpp, ra8_fmt_jof_verify_requirements_t::bpp, jof_info_t::codec, jof_info_t::height, ra8_fmt_jof_verify_requirements_t::height, k_jof_codec_deflate, jof_info_t::tile_cols, jof_info_t::tile_count, jof_info_t::tile_h, jof_info_t::tile_rows, jof_info_t::tile_w, jof_info_t::width, and ra8_fmt_jof_verify_requirements_t::width.
Referenced by internal_accept().
|
static |
Report one exact legacy phase-failure line.
Appends a fixed prefix, decimal status, and closing line syntax.
| [in] | report | Bound report sink. |
| [in] | prefix | NUL-terminated phase prefix. |
| [in] | status | Phase failure status. |
report and prefix are valid. Definition at line 682 of file ra8_fmt_stream_verify.c.
References internal_field(), and internal_text().
Referenced by internal_prepare().
|
static |
Decode every sealed atlas tile before reporting or output staging.
Validates dimensions for each reference row or subject band.
| [in] | spool | Sealed atlas binding. |
| [in] | info | Trusted parsed geometry. |
| [in,out] | work | Caller decode buffers. |
| [in] | reference | Select reference-row buffer use. |
| k_ra8_ok | Every tile decoded with exact dimensions. |
| k_ra8_err_validation_failed | A decoded tile shape differed. |
| other | Parser, decompressor, or scratch status. |
info total size matches the sealed spool. Definition at line 519 of file ra8_fmt_stream_verify.c.
References ra8_fmt_spool_t::ctx, jof_read_tile(), k_ra8_err_validation_failed, k_ra8_ok, ra8_fmt_spool_t::read_at, jof_info_t::tile_rows, and jof_info_t::width.
Referenced by internal_accept().
|
static |
Produce, seal, parse, and preflight both independent atlases.
Completes the row-reference phase before starting the banded subject.
| [in] | reference_source | First encoded-source context. |
| [in] | banded_source | Second encoded-source context. |
| [in] | need | Exact verifier requirements. |
| [in,out] | work | Phase-reused caller workspace. |
| [in,out] | reference_spool | Empty reference spool. |
| [in,out] | banded_spool | Empty subject spool. |
| [in] | report | Legacy report sink. |
| [out] | atlases | Receives trusted parsed geometry. |
| k_ra8_ok | Both atlases are sealed and trusted. |
| other | First reference or subject phase failure. |
Definition at line 884 of file ra8_fmt_stream_verify.c.
References ra8_fmt_jof_verify_requirements_t::band_height, verify_atlases_t::banded, internal_accept(), internal_phase_error(), internal_produce(), k_ra8_ok, and verify_atlases_t::reference.
Referenced by ra8_fmt_jof_verify_stream().
|
static |
Produce and seal one deflate JOF into an injected spool.
Binds a sequential pull cursor and exact caller arenas to the producer.
| [in] | source | Encoded immutable source. |
| [in] | need | Exact verifier requirements. |
| [in] | tile_h | Requested reference-row or subject-band height. |
| [in,out] | work | Caller-owned producer arenas. |
| [in,out] | spool | Empty append/seal scratch binding. |
| [out] | info | Receives produced geometry and extent. |
| k_ra8_ok | The complete atlas is stable and sealed. |
| other | Source, producer, mutation, or spool status. |
need. spool sealed at info total size. Definition at line 171 of file ra8_fmt_stream_verify.c.
References ra8_fmt_spool_t::ctx, ra8_fmt_jof_verify_requirements_t::height, internal_pull(), internal_spool_append(), internal_stable(), jof_produce(), k_jof_codec_deflate, k_ra8_ok, ra8_fmt_spool_t::seal, jof_info_t::total_size, and ra8_fmt_jof_verify_requirements_t::width.
Referenced by internal_prepare().
|
static |
Pull the next bounded source prefix for streamed JOF production.
Reads at the cursor's current offset, validates the backend's reported count, and advances only after a successful bounded read.
| [in,out] | ctx | Mutable verify_pull_t cursor context. |
| [out] | bytes | Destination for the next source prefix. |
| [in] | cap | Writable capacity of bytes. |
| [out] | got | Number of bytes returned by the source. |
| k_ra8_ok | A valid prefix or clean end-of-source was returned. |
| k_ra8_err_null_ptr | A required callback argument was null. |
| k_ra8_err_protocol_error | The source reported more than cap. |
| other | Propagated source read error. |
cap requires writable bytes storage. got remain valid for the call. *got bytes. bytes. Definition at line 104 of file ra8_fmt_stream_verify.c.
References ra8_fmt_source_t::ctx, k_ra8_err_null_ptr, k_ra8_err_protocol_error, k_ra8_ok, verify_pull_t::offset, ra8_fmt_source_t::read_at, ra8_fmt_source_t::size, and verify_pull_t::source.
|
static |
Append one produced JOF span to the injected verifier spool.
Adapts the producer sink signature directly to the caller-owned spool without retaining the supplied byte span.
| [in,out] | ctx | Caller-owned ra8_fmt_spool_t descriptor. |
| [in] | bytes | Produced JOF bytes to append. |
| [in] | len | Number of bytes in bytes. |
| k_ra8_ok | The complete span was accepted. |
| other | Propagated spool append failure. |
ctx points to a bound spool with a valid append callback. len requires a readable bytes span. Definition at line 145 of file ra8_fmt_stream_verify.c.
References ra8_fmt_spool_t::append, and ra8_fmt_spool_t::ctx.
Referenced by internal_produce().
|
static |
Validate a source through its optional stability callback.
Delegates immutable-view revalidation while preserving optional bindings.
| [in] | source | Source to validate. |
| k_ra8_ok | The source is unchanged or has no validator. |
| other | The backend observed mutation or validation failure. |
source is non-null. Definition at line 78 of file ra8_fmt_stream_verify.c.
References ra8_fmt_source_t::ctx, k_ra8_ok, ra8_fmt_source_t::size, and ra8_fmt_source_t::validate.
Referenced by internal_produce(), and ra8_fmt_jof_verify_stream().
|
static |
Append one NUL-terminated report fragment.
Measures the fixed spelling and delegates one exact sink write.
| [in] | sink | Bound report sink. |
| [in] | text | NUL-terminated spelling. |
| k_ra8_ok | The complete spelling was appended. |
| other | Injected sink failure. |
sink and callback are valid. text is NUL-terminated. text) bytes. Definition at line 223 of file ra8_fmt_stream_verify.c.
References ra8_fmt_sink_t::ctx, strlen(), and ra8_fmt_sink_t::write.
Referenced by internal_difference(), internal_field(), internal_finish_dump(), internal_geometry(), internal_phase_error(), and internal_verdict().
|
static |
Append one uint64_t as canonical decimal.
Uses fixed reverse-digit storage and emits no terminator.
| [in] | sink | Bound report sink. |
| [in] | value | Value to spell. |
| k_ra8_ok | The complete decimal was appended. |
| other | Injected sink failure. |
sink and callback are valid. Definition at line 244 of file ra8_fmt_stream_verify.c.
References ra8_fmt_sink_t::ctx, k_verify_decimal, k_verify_decimal_max, and ra8_fmt_sink_t::write.
Referenced by internal_field().
|
static |
Emit the exact legacy final verdict line.
Selects exact or mismatch wording from the complete difference count.
| [in] | report | Bound report sink. |
| [in] | diffs | Complete differing-byte count. |
report and its callback are valid. Definition at line 731 of file ra8_fmt_stream_verify.c.
References internal_field(), internal_text(), and k_ra8_ok.
Referenced by ra8_fmt_jof_verify_stream().
|
nodiscard |
Verify banded JOF pixels against an independently decoded row reference.
Encodes two independent source contexts into sealed scratch atlases: one-row reference tiles remove inter-row band accumulation, while 256-row subject tiles exercise the production band path. Tiles are decoded and compared one row at a time; an optional PPM is transactionally published.
| [in] | reference_source | First immutable encoded-source context. |
| [in] | banded_source | Independent context for the same encoded object. |
| [in] | requirements | Exact requirements derived for the source. |
| [in,out] | workspace | Caller-owned phase-reused arenas. |
| [in,out] | reference_spool | Empty scratch artifact for reference JOF bytes. |
| [in,out] | banded_spool | Empty scratch artifact for subject JOF bytes. |
| [in,out] | dump | Optional durable PPM transaction; null disables the dump. |
| [in] | dump_name | Destination spelling used in the legacy report line. |
| [in,out] | report | Human-readable raw byte sink. |
| k_ra8_ok | Every compared byte matched. |
| k_ra8_err_validation_failed | At least one raster byte differed. |
requirements; phase-overlap is permitted. Definition at line 913 of file ra8_fmt_stream_verify.c.
References ra8_fmt_transaction_ops_t::abort, ra8_fmt_transaction_ops_t::append, verify_atlases_t::banded, ra8_fmt_transaction_ops_t::commit, internal_abort_dump(), internal_abort_transaction(), internal_check(), internal_compare(), internal_finish_dump(), internal_geometry(), internal_prepare(), internal_stable(), internal_verdict(), k_ra8_err_null_ptr, k_ra8_err_validation_failed, k_ra8_ok, ra8_fmt_transaction_t::ops, and verify_atlases_t::reference.
Referenced by internal_run().