The tool put each H.264 field picture in a sample of its own, and made its
format descriptions of the latest SPS and PPS alone, so a stream of field
pictures, or one whose slices name more than one PPS (JM's three), came back
as dropped frames on every decoder. A field pair now shares its first field's
sample, as a QuickTime or MP4 file holds it, and a description holds every SPS
and PPS by its id, as an avcC record does.
-i t|b makes each description name two fields, as a file's 'fiel' atom does,
and -a lets VideoToolbox pick any decoder and says which one decoded, so a run
shows what a player gets where the hardware refuses a stream at its create. A
session the decoder refuses at its create is said apart from a failed decode.
decode_md5 took a stream's first SPS and PPS alone and dropped every later
parameter set from the samples, so the 1080p half of switch-720p-1080p was
decoded under the 720p SPS: Apple's decoder dropped those frames and ours
showed wrong ones, a difference the tool made. Now a unit after a VPS, SPS or
PPS unlike the one before it of its kind is decoded under a new description of
the sets then current. The session takes it where
VTDecompressionSessionCanAcceptFormatDescription says it can; otherwise its
frames are waited for and a new session is made. A stream of more than one
description says how many, and the sessions made, on its line.
-f keeps the old way, every unit under the first sets' description, which is
what a client that misses a change hands VideoToolbox.
Car 5's gate decoded hevc-main10-720p-closed with 54 of 90 frames matching,
once, and nine decodes of the stream since matched every frame. The count
alone cannot tell the next one apart: a picture whose write was lost leaves
single frames wrong here and there, and a reference gone wrong leaves a run
of them up to the next random access point.
A FAIL of the hashed pass now names its frames by the access unit each came
from, which the tool stamps as the frame's presentation time: on the line,
wrong= (an MD5 the reference has not, or holds fewer of), missing= (a unit
no frame came back for) and failed= (a unit the decoder answered an error
for), then a line a frame with the unit's first VCL NAL unit type, the
frame's place in the output and its MD5. The OK line is as it was. The
gate's report reads only the lines whose third word is OK, FAIL or SKIP, so
the frame lines ride in the guest log, and its key=value reader skips the
lists, as their values are not numbers.
Checked on the 5300M Mac (macOS 26.7.1): the stream passes as before, and a
reference with three of its MD5s zeroed fails with wrong=4,47,86 and their
three frame lines.
decode_md5 decodes Annex B streams with VideoToolbox's hardware decoder,
hashes every frame as the CPU reads it, and compares the sorted hashes with
ffmpeg's per-frame MD5s beside each stream; with -l it also times decode
passes that read nothing back. It asks for the reference's pixel format
(10-bit 4:2:0 for HEVC Main 10, else 8-bit 4:2:0), the guest decoder's own,
so the same check runs on a Mac whose decoder answers another. The lane
gate runs it in the guest over the H.264 and HEVC sets.