Commits
Commits on
0c091c3d7b3bb2b013acd0c8e6d9e712b29d6b8fToday
Revert "ec-aac: drop doc comments added in d8db6262 (no comments in code); code unchanged, cargo check -p ec-aac --all-targets clean"Ahmet Kaan Gümüş · 0c091c3
Revert "ec-aac: drop doc comments added in d8db6262 (no comments in code); code unchanged, cargo check -p ec-aac --all-targets clean" This reverts commit 1fd0b3979d821b1c317b17fc782b541cb4daf1bc.
ec-aac: drop doc comments added in d8db6262 (no comments in code); code unchanged, cargo check -p ec-aac --all-targets cleanAhmet Kaan Gümüş · 1fd0b39Browse files
ec-aac SBR: downsampled SBR (ext rate < 2*core, e.g. al_sbr_sr_48_2_fsaac48 ASC 11 90 56 e5 98) ran the 64-band doubling chain with band tables at the 48 kHz ext rate: ours 2048/AU and band-table errors (no sideinfo rows, ours 1001472 = cap at 489 AUs x 2048 vs ffmpeg 1148 x 1024). ffmpeg (aacsbr_template.c 1147/1683/1418): sbr->sample_rate = 2*core for tables, downsampled = ext_sample_rate < sbr->sample_rate -> 32-band synthesis with the decimated window (ds[n]=c[2n]), 32 output samples/slot. Fix: parser rate always 2*core, SbrChain::set_downsampled, Synthesis::downsampled (N=32, v 640, shift -0.5 matching our analysis phase; python replica of analysis->synth32 corr 0.995 at lag 289 vs 0.9967 for the 64-band pair), k2 clamped to 32, LFE bypass uses the same bank. Also QMF_WINDOW[384] and [512] had the wrong sign vs ffmpeg us/ds tables (ffmpeg flips at 385/513, mirror-symmetric with 128/256; ours at 384/512; table now equals ffmpeg's us and ds to 1e-10), pinned sum updated 81.46300943655164 -> 82.21187106118578. cargo check -p ec-aac --all-targets clean; tests not runAhmet Kaan Gümüş · d8db626Browse files
ec-aac test: lag-search window skipped digital silence; own-core reference interpolates linearly. Root cause (measured with pinned ffmpeg, f32le): decoder timing is right, instruments were not. (1) ps_06 is 4x53 AUs; AUs 53-55 of ffmpeg output are digital silence (rms 0 over [108544,112640)). With the now-correct 2048/AU length (434176/ch, = ffmpeg) every lag search anchored at len/4 = 108544 lands exactly there, so corr is noise and the winner sits at the +/-100000 / +/-20000 bound (sbr_real_library_matches_reference, per_au_low_band_divergence, sbr_header_feature_table, synthetic_heaac_matrix ps_06). On main the shorter output moved the window to loud audio, hence the earlier pass. window_start() (single source for 4 copies) advances to the first 4x1024 block louder than 1e-4 of mean power in both signals, unchanged when the base block is loud. (2) full_chain_low_band ps_04 corr 0.964 at lag -961: nearest-neighbor 2x of the core carries a half-sample error; hold-resampling ffmpeg's own ps_04 output gives at best 0.9578 for any decoder, linear interpolation 0.9936 (cm_48_2: 0.9985 -> 0.9999, matches observed 0.9987). upsample_2x is linear; threshold stays 0.99. Also ch0 of a PS stream is not the mono core (ffmpeg ps_06 corr(L,L+R) 0.937 over 10 s), so the comparison stops where the channels first differ (mono_prefix). Decoder evidence: ours vs ffmpeg ps_04 lag 0 corr 1.000000, 52/53 windows exactly 1.0 (1 silent), len 217088 = 106*2048, pre-header AUs included; ps_06 headers only from AU 106. cargo check -p ec-aac --all-targets clean; tests not runAhmet Kaan Gümüş · a62782eBrowse files
ec-aac SBR: explicit-PS mono elements stayed 1 plane until a PS payload arrived, so pre-header AUs (and AUs without PS data) output mono while later AUs output stereo: interleave/channel count flipped, ps_06 lag -19877/-100021 at search bounds, ps_04 corr 0.96. ffmpeg (ff_aac_sbr_apply: m4ac.ps==1 -> nch=2, X[1]=X[0] when ps.start==0) always outputs 2 planes. Fix: expand_for_ps when ps_config; apply_low_only and apply_data synthesize the same slots through both channel states (dup). Delay path itself already matches (6-slot low delay = ENVELOPE_ADJUSTMENT_OFFSET gap, kx=32). Evidence: source reading + test log (cm_48_2 lag -961 is the normal QMF delay vs core, not a regression); cargo check -p ec-aac --all-targets clean; tests not runAhmet Kaan Gümüş · 90f2426Browse files
ec-aac SBR: revert out-of-scope changes from a657a423 (sbr_header resets DT state again; variable grids need >=2 envelopes again); ffmpeg resets on changed spectrum params, no decode evidence for either. Keeps the pre-header QMF pass-through fix (AUs before first sbr_header output 2048/ch like ffmpeg sbr->start=0, kx=32; al_sbr_ps_06 length gap 108544 = 106 AUs*1024)Ahmet Kaan Gümüş · 386140aBrowse files
ec-aac SBR: AUs before the first sbr_header stayed at core rate (1024/ch) instead of QMF pass-through at 2048 like ffmpeg (sbr->start=0, kx=32, m=0), shifting every later sample; al_sbr_ps_06 ours 325632 vs ffmpeg 434176 = exactly 106 AUs*1024 (first header at AU 106), cm_48_2 first header at AU ~28 -> lag >20000, corr 0.037. Fix: SbrChain::apply_low_only (analysis, 6-slot delay, 64-band synthesis, kx=32) when no SBR data was ever parsed; chirp state resized to n_q on parse. Also: sbr_header no longer zeroes DT state (ffmpeg keeps env_facs_q across headers), VARFIX/FIXVAR/VARVAR 1-envelope grids accepted (ffmpeg only rejects >5)Ahmet Kaan Gümüş · a657a42Browse files
ec-aac SBR: FIXVAR/VARVAR trailing relative borders applied in reverse orderAhmet Kaan Gümüş · f958102
ec-aac SBR: FIXVAR/VARVAR trailing relative borders applied in reverse order sbr_payload.rs parse_grid read the trailing rel borders in wire order but subtracted the last-read one from the trailing edge. FFmpeg n8.0 aacsbr_template.c read_sbr_grid assigns the first-read rel to t_env[n-1] (FIXVAR: t_env[bs_num_env-1-i] = t_env[bs_num_env-i] - 2*bits-2, same in VARVAR). Only differs when there are 2+ trailing rels (num_env >= 3), so a uniform list hid it. Fix: rel index num_env-1-i in both trailing loops.
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.