fix(windows): initialise COM on threads entering Media Foundation; record video decisions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-02 10:11:17 +00:00
1 parent f74ca54b33
commit a15cecd658
3 files changed
+9

No files matched your search

+5
View File
@@ -50,3 +50,8 @@ One line per decision: date · decision · alternative · reason.
| 2026-10-02 | HEIF `irot`/`imir` override Exif orientation (imir axis 0 = top↔bottom). | Exif first | HEIF decoders apply the transforms themselves; both would rotate twice. |
| 2026-10-02 | Main image size comes from the container's own size field (SOF, IHDR, ispe, VP8X, RAF crop record, RW2 borders, CR3 CMP1) before raster IFDs. | Always the largest raster IFD | That is what each container defines and what decoders output. |
| 2026-10-02 | Only MPF large-thumbnail entries count as previews; XMP date-only values are never used as capture times. | Every secondary image / midnight | Gain maps are not previews; midnight would be invented. |
| 2026-10-02 | Media Foundation interop uses `[GeneratedComInterface]` with explicit release; threads entering MF call `Win32Com.EnsureInitialized()` (MTA unless already STA). | `[ComImport]` like WIC | Hardware encoders stall when sample references wait for GC; source-generated COM does not initialise apartments, so it is done explicitly. |
| 2026-10-02 | MP4: 16-byte `free`+`mdat` placeholder rewritten to a 64-bit header past 4 GiB; negative composition offsets shifted to ctts v0 plus an edit list; parameter sets moved into avcC/hvcC; fast start on by default. | Always 64-bit mdat / ctts v1 | Small files stay maximally compatible; wider player support. |
| 2026-10-02 | GIF: Wu-criterion median cut, frame differencing against the source last drawn, identical frames merged by holding one back. | Plain median cut / diff against dithered output | Max palette error 37 → small; 945 KB → 52 KB at equal PSNR; exact delays. |
| 2026-10-02 | AVI always carries OpenDML indexes plus idx1 (1 GiB RIFF segments). | idx1 only | Files beyond 2 GB stay playable. |
| 2026-10-02 | MF encoder capabilities: software H.264 ≤ 4096×2304, hardware assumed 4096² (H.264) / 8192² (HEVC/AV1); an unsupported size fails at media-type negotiation and the next encoder is tried. | Querying limits | MF has no reliable capability query. |