Settle the tie packet length, and correct the retraction that hid it
Range measured: every tie LOD block on the disc -- 2,177 blocks, 13,042
consecutive record pairs.
A record's pointer is where its packet starts, so the distance between
consecutive pointers IS a packet's length, with no reference to any field.
Comparing that against the record's own fields:
packet_quadwords = vert_ofs + vert_size + scissor_size
12,927 of 12,927 record pairs whose strip_count is zero
0 of 115 record pairs whose it is not
The partition is exact: every record with a non-zero strip_count is an
exception and no record with a zero one is. So the fourth term is 0 quadwords
whenever strip_count == 0, and something else -- measured 0..19 quadwords, and
NOT equal to strip_count -- whenever it is not. R&C1's strip_count is a strip
count and strips are variable-length data, so a non-zero count most likely
adds per-strip bytes this cannot see; that is a hypothesis, labelled as one.
TieRecord gains packet_quadwords and packet_quadwords_are_known. The latter is
the honest gate, and the disc test asserts both sides of the partition rather
than the aggregate.
This also corrects this file's own retraction of the same formula, and the
retraction was the error rather than the claim. A formula of this shape was
derived at 61 of 61 pairs, then "retracted" as not reproducing (0 of 13,042).
The re-measurement had swapped strip_count for scissor_ofs in the fourth term
and put the blame on the block set. Re-measured with the term the first pass
had, it matches on 12,927 of 13,042 and the 115 exceptions are exactly the
non-zero strip_count records.
Worth recording because it is the same shape as two other entries in this
file: a retraction is not automatically more careful than the claim it
retracts, and the re-measurement that "disproved" this one changed the thing
being measured. The lesson on the other side is what saved it -- the first
measurement was over 61 pairs, not a population, and had it stayed there the
formula would have looked universal. A small sample and a bad re-measurement,
near-misses in opposite directions.
What this unblocks: the payload can be sliced per packet, which was the
prerequisite for decoding what it holds.
This commit is contained in:
@@ -327,14 +327,26 @@ impl TieRecord {
|
||||
&& self.control_size <= self.control_count
|
||||
}
|
||||
|
||||
// A packet-length formula was here -- `(vert_ofs + vert_size +
|
||||
// scissor_ofs + scissor_size) * 16` -- and it was retracted. It was
|
||||
// measured on a block set found by reading `packets[2]` where `packets[1]`
|
||||
// was meant, over 61 pairs, and re-measured on the correct blocks it holds
|
||||
// on 0 of 13,042. The block set was the error, not the arithmetic: the
|
||||
// arithmetic agreed perfectly with a population that was not the tie
|
||||
// blocks at all. This is the same failure `AGENTS.md` rule 3 is about,
|
||||
// arriving through a wrong subscript instead of a wrong span.
|
||||
/// Quadwords of packet data: `vert_ofs + vert_size + scissor_size`.
|
||||
///
|
||||
/// Holds on **12,927 of 12,927** record pairs whose `strip_count` is zero,
|
||||
/// and on **0 of 115** whose it is not -- the partition is exact, so the
|
||||
/// formula is safe to use when `strip_count == 0` and knows nothing
|
||||
/// otherwise. R&C1's `strip_count` is the strip count, and strips are
|
||||
/// variable-length data, so a non-zero count most likely adds a record
|
||||
/// count's worth of per-strip bytes this cannot see.
|
||||
pub fn packet_quadwords(&self) -> usize {
|
||||
self.vert_ofs as usize + self.vert_size as usize + self.scissor_size as usize
|
||||
}
|
||||
|
||||
/// Whether [`Self::packet_quadwords`] is known to describe this record.
|
||||
///
|
||||
/// `strip_count == 0` on every record the formula has been verified on;
|
||||
/// the 115 records where it is not decode to a fourth term of 0..19
|
||||
/// quadwords that is not `strip_count` and is not established.
|
||||
pub fn packet_quadwords_are_known(&self) -> bool {
|
||||
self.strip_count == 0
|
||||
}
|
||||
}
|
||||
|
||||
/// Byte that terminates a tie LOD block's payload.
|
||||
|
||||
Reference in New Issue
Block a user