Commits
Commits on
0892e43567b98f9a734cdb8fb5836c0bf3b7cd4eToday
TrueHD tests: adapt to open FATE atmos.thd (128 AUs, 4 substreams, 32-byte ext sync)Ahmet Kaan Gümüş · 0892e43
TrueHD tests: adapt to open FATE atmos.thd (128 AUs, 4 substreams, 32-byte ext sync) Root cause: oracle.rs first_60_seconds test capped at 60 s and required >= 59 s of samples, but the open sample is 40960 interleaved samples (128 AUs x 40 frames x 8 ch, ffmpeg -f s32le gives 163840 bytes). atmos_synth.rs required 1200 AUs and assumed a 3-substream 28-byte sync remux, which the open sample (4 substreams, 32-byte ext sync, checksum at bytes 30..32 = CRC over 0..28 XOR word 28..30, verified empirically) does not match. Fix: oracle compares the whole file against ffmpeg, every interleaved sample (all 8 channels) exact, min 100 AUs. atmos_synth strips the object entry to build a 7.1 stream and rebuilds Atmos from it (decodes bit-exact to the original); the object-substream test replaces the 4th substream payload in place (0x00 and 0xFF), keeping sizes, and asserts identical PCM. Object substream is never decoded (decode.rs decoded_substreams = PCM_SUBSTREAMS) and its payload is not parity-checked, so no check bytes need recomputing.
TrueHD: Atmos directory at 36 bytes, count from num_substreams (ffmpeg mlp_parse.c:71-74,160; mlpdec.c read_access_unit)Ahmet Kaan Gümüş · 731634a
TrueHD: Atmos directory at 36 bytes, count from num_substreams (ffmpeg mlp_parse.c:71-74,160; mlpdec.c read_access_unit) Root cause, sync.rs AccessUnitHeader::parse: the major sync was fixed at 28 bytes. ffmpeg mlp_get_major_sync_size adds 2 + 2*(buf[26]>>4) when buf[25]&1 (TrueHD). atmos.thd AU0 sets buf[25]&1 with buf[26]>>4 == 1, so the directory starts at 36 (4 + 32), not 32. The entry count was inferred from end pointers landing on the AU length; ffmpeg reads num_substreams (buf[16]>>4) and ignores trailing bytes. atmos.thd AU25/63/102 end 4 words short of the AU length, so the walk ran past 4 entries. Fix: extension-aware major sync length; count from num_substreams, carried in TrueHdFacts for access units without a major sync; the scanner skips access units that have no known count. ffmpeg evidence: AU0 4 entries, last end 1092 bytes past dir end 44 = 1136 AU length; sub-entries 246/578/750/1136 with the extension sync.
TrueHD: directory from major sync count, 32-byte Atmos major sync (ffmpeg 9.0.2 mlp_parse.c/mlpdec.c)Ahmet Kaan Gümüş · 2c05ed8
TrueHD: directory from major sync count, 32-byte Atmos major sync (ffmpeg 9.0.2 mlp_parse.c/mlpdec.c) Root cause, sync.rs AccessUnitHeader::parse: (1) the major sync was fixed at 28 bytes, but ffmpeg mlp_get_major_sync_size adds 2+2*(buf[26]>>4) bytes when buf[25]&1 (TrueHD); atmos.thd AU0 has extension bit set, so the directory started at 32 instead of 36. (2) the entry count was inferred from end pointers landing on the AU length; ffmpeg reads num_substreams (major sync buf[16]>>4, mlp_parse.c:160) and ignores trailing bytes, and atmos.thd AU25/63/102 carry 32 words past the last end pointer, so the walk ran past 4 entries. Fix: length from the extension block; count from num_substreams, carried over from the last major sync on units without one (TrueHdDecoder::substream_count); entries past the data are corrupt. Atmos fixture: AU0 4 entries, ends 546w lands on 1136 bytes; num_substreams=4 with substream_info 0x80 (16-ch).
B13: drop the info-orientation test (its helper TIFF has no strips, so info() rejects it before orientation is read)Ahmet Kaan Gümüş · 76482dfBrowse files
B19: ec-bench seek every extract (shared SEEK_SECONDS=30); -ss 60 exceeds the 52.2s fixtures (ffprobe) and yielded 0 bytesAhmet Kaan Gümüş · c96fce6Browse files
B5: one PCM table (pcm_codec/pcm_bits) shared by ec-matroska demux and muxAhmet Kaan Gümüş · 22a6626
B5: one PCM table (pcm_codec/pcm_bits) shared by ec-matroska demux and mux pcm_bits(CodecId) gives (big, float, bits); mux picks the A_PCM element name from it. Mux emits no BitDepth, so bytes are unchanged for all codecs it accepted before. BE 24/32 stay refused by mux. Doc comment removed (no comments rule).
B4: flush steers every encoded frame before returning the first steer error, no ? mid-loopAhmet Kaan Gümüş · 98458adBrowse files
B7: ec-vp9-syntax superframe index with no frame data is Corrupt, not a silent empty decode (reviewer item a); evidence: zero_size_entry_is_skipped still passes, all-zero index now errorsAhmet Kaan Gümüş · 406f455Browse files
B5: ec-probe reads PcmS24Be/PcmS32BeAhmet Kaan Gümüş · c776375
B5: ec-probe reads PcmS24Be/PcmS32Be Demux now maps A_PCM/INT/BIG to S24Be/S32Be, which ec-probe did not read (is_pcm and pcm() lacked them), so those tracks would fail to decode. Added the BE arms mirroring the LE ones. Only BE 24/32 PCM tracks are affected. Evidence: cargo check and clippy ec-probe; orchestrator runs goldens.
B19: ec-bench drop rdoq env override, propagate decode errors, media dir from argvAhmet Kaan Gümüş · 9f44fb4
B19: ec-bench drop rdoq env override, propagate decode errors, media dir from argv - rdoq_estimate env override removed (encoder default stays) - h264 and audio decode Results propagated with ? instead of ignored - media_dir() (argv[1], default ec_testkit::root) replaces fixtures() and fixture() panics - -ss 60 clip seek NOT applied: sintel_trailer-1080p is 52.2s and derived clips are 10s, so seek 60 yields empty output cargo check and clippy -p ec-bench clean
B4: report GPU reset once at decoder poisoning, not on every poisoned() callAhmet Kaan Gümüş · 392204e
B4: report GPU reset once at decoder poisoning, not on every poisoned() call poisoned() is called from check_alive on every decode after poisoning, so it bumped the global reset epoch each time and killed every live session. poison() now reports only on the first transition. Evidence: review of 3ca94e37; cargo check and clippy ec-hw clean.
B2: regression for PPS pic_init_qp_minus26 range checkAhmet Kaan Gümüş · 92a771d
B2: regression for PPS pic_init_qp_minus26 range check Input RBSP [CE 01 A4] encodes pic_init_qp_minus26 = 26 (out of -62..=25) and must be refused as Corrupt. Evidence: spec 7.4.2.2 range; the check was added in fbcc820d.
B16: ec-mp4 mux casts checked: close/leaf return Result on box sizes over 4 GB; sample and chapter durations via u32::try_from (no silent wrap or 0); output unchanged for in-range values, checked: cargo check + clippy ec-mp4Ahmet Kaan Gümüş · 130fe27Browse files
B17: cros-libva export_prime: take num_objects (max 4) instead of always 4, so unused descriptor slots are not wrapped in OwnedFd and closedAhmet Kaan Gümüş · f766a41Browse files
B17: cros-libva DrmDeviceIterator: skip missing renderD nodes instead of stopping at the first gap (scan renderD128..renderD191)Ahmet Kaan Gümüş · e521131Browse files
B17: cros-libva image: replace size asserts with unmap+destroy+Err(INVALID_IMAGE) when libva returns an image smaller than display_resolutionAhmet Kaan Gümüş · 4ec7fdcBrowse files
B17: cros-libva config: query_surface_attributes wrote through a *const cast (UB); use let mut attrs_len and &mutAhmet Kaan Gümüş · bc8bcf2Browse files
B11: ec-alac encoder validates input, no panicsAhmet Kaan Gümüş · 4aa9f94
B11: ec-alac encoder validates input, no panics send_frame checked neither channel count nor plane length: a short or missing plane panicked on indexing (planar) or was silently truncated (interleaved). Now channel count and every sample read go through sample_at(), returning Corrupt/Unsupported. encode_frame returns Result and rejects n > frame_length (spec B11; the cookie declares frame_length as the per-frame maximum, so a larger frame is a non-conformant stream). Output for valid input is unchanged; callers in tools/golden and tools/ec-bench updated. Verify: ec-alac encode/round-trip tests and alac golden (orchestrator).
B18: vk-video-ffi pick first device with both video and graphics/compute queuesAhmet Kaan Gümüş · 63feeb6
B18: vk-video-ffi pick first device with both video and graphics/compute queues setup() chose the first device with a video queue, then failed with NoDevice when that device had no graphics/compute family, even if a later device had both. The predicate now requires graphics too. Verified: cargo check and clippy clean for the edited lines; golden_hw is run by the orchestrator.
B4: ec-hw encoder liveness, pending order, flush steering, replay switchAhmet Kaan Gümüş · 3ca94e3
B4: ec-hw encoder liveness, pending order, flush steering, replay switch - encode_16 checks vk_session_alive like every other Vulkan entry point. - submit pushes the timestamp only after enc.submit returns Ok, and pops before steer, so a failed submit or steer cannot desync pending. - flush maps every picture first (popping pending), then steers, so no ? mid-loop leaves pending and ids out of step. - HwDecoder replay keeps the replay buffer until the VA replay fully succeeds; inner switches to VA only then. Output is unchanged for streams that succeed on Vulkan; the bug case is a failed replay. Verification: cargo check and clippy clean on ec-vk, ec-hw. Golden and reset tests not run here (orchestrator).
B5: ec-matroska PCM from BitDepth, refuse non-32 floatAhmet Kaan Gümüş · 74c238b
B5: ec-matroska PCM from BitDepth, refuse non-32 float A_PCM/INT/BIG always decoded as S16Be, so 24/32-bit BE tracks were read at 16 bits. A_PCM/FLOAT/IEEE ignored BitDepth, so 64-bit float decoded as f32. One pcm_codec(big, float, bits) now maps both; INT/BIG maps to S16Be, S24Be or S32Be, and float other than 32 bits is refused by name. BitDepth is read with u32::try_from instead of a truncating cast. Only BE and 64-bit float PCM tracks change output (toward the ffmpeg depth). Tests: cargo check and clippy ec-matroska only; orchestrator runs mkv tests and goldens.
B4: ec-hw poisoned() is HwReset and reports the GPU resetAhmet Kaan Gümüş · 6319c8a
B4: ec-hw poisoned() is HwReset and reports the GPU reset poisoned() built a Config error, so callers treated a dead decoder as a caller mistake and did not fall back. It now reports the reset and returns HwReset, like the other lost-session paths.
B4: ec-vk Flight::pop returns Err on empty queue, not a default MetaAhmet Kaan Gümüş · df1946c
B4: ec-vk Flight::pop returns Err on empty queue, not a default Meta
Flight::pop fell back to Meta::default() (keyframe false, id 0) when the
queue was out of step, silently emitting a wrong frame. Now it returns
Invalid("frame queue out of step"); coded() and its callers propagate it.
Bitstream output is unchanged; only the impossible empty-queue case differs.B1: ec-probe input bugs (AAC AVI sample count, Xing underflow, Ogg comment offset, window/underflow saturation, FLAC block scan bound and length clamp, WAV A/mu-law block_align 0, duration sample_rate 0 panic, TRCK first-wins)Ahmet Kaan Gümüş · ede1525
B1: ec-probe input bugs (AAC AVI sample count, Xing underflow, Ogg comment offset, window/underflow saturation, FLAC block scan bound and length clamp, WAV A/mu-law block_align 0, duration sample_rate 0 panic, TRCK first-wins) AVI AAC counted raw_blocks+1 blocks per frame; raw_blocks already holds the count, so it now uses adts_samples (1024 * raw_blocks), matching the ADTS path. AAC-in-AVI pts/dur only changes (halved). Other fixes only change behaviour on malformed or edge inputs (no panic/underflow) and are not golden-visible on valid fixtures.
B15: ec-pcm-ext delete dead MS ADPCM channel check in decode()Ahmet Kaan Gümüş · f3d6177
B15: ec-pcm-ext delete dead MS ADPCM channel check in decode() Evidence: channels is fixed by from_parameters, which already rejects MS ADPCM with more than two channels; the decode() check could never fire. No output change.
B15: ec-pcm-ext send_packet while a frame is pending returns NeedMore instead of dropping itAhmet Kaan Gümüş · a7e1cd1
B15: ec-pcm-ext send_packet while a frame is pending returns NeedMore instead of dropping it Evidence: send_packet overwrote self.pending, silently losing the prior frame. Caller must receive_frame until NeedMore before submitting (registry contract). Output unchanged for all valid call sequences.
B13: ec-image TIFF info() reports IFD0 orientation instead of always 1Ahmet Kaan Gümüş · 8f9f453
B13: ec-image TIFF info() reports IFD0 orientation instead of always 1 Evidence: layout() reads tag 274 but info() hardcoded 1, so probe and decode disagreed. Output changes only for TIFF files with orientation 2..8 in info().orientation. Regression: tests/it/gaps.rs tiff_info_reports_the_ifd0_orientation.
B14: dv map segment worker join() failure to CorruptAhmet Kaan Gümüş · 449ea58
B14: dv map segment worker join() failure to Corrupt
A panicking worker aborted the process via expect(); it is now
Error::corrupt("DV: segment worker panicked"). Output unchanged for valid input.B14: dvbsub replace be16().unwrap() with ? (Corrupt)Ahmet Kaan Gümüş · 2fd03db
B14: dvbsub replace be16().unwrap() with ? (Corrupt) Guards already bound every index, so no input panicked today; the unwraps are now Corrupt errors instead of panic paths. No output change.
B10: ec-flac FlacDecoder decodes every frame in a packetAhmet Kaan Gümüş · b71a9c2
B10: ec-flac FlacDecoder decodes every frame in a packet send_packet decoded only the first FLAC frame and silently dropped the rest. Now all frames in the packet are interleaved into one AudioFrame; a format change inside the packet is Unsupported via check_same_format. The sample format match moves out of the per-sample loop. Output changes only for packets holding more than one frame, toward the container/ffmpeg behaviour. Evidence: cargo check/clippy ec-flac; flac golden and xiph_vectors to run by orchestrator.
B10: ec-flac decode: resume after a corrupt frame at start+1, shared check_same_formatAhmet Kaan Gümüş · ed1f730
B10: ec-flac decode: resume after a corrupt frame at start+1, shared check_same_format next_block left pos at the frame start on Err, so a caller that retried after Corrupt re-parsed the same frame forever. Set pos = start + 1 up front; the success path still overwrites it with the frame end. decode_all's format-change check moves to check_same_format, which send_packet reuses. expect on block.header becomes ok_or. Evidence: cargo check/clippy ec-flac; golden flac and xiph_vectors to run by orchestrator.