mirror of
https://github.com/morluto/rea.git
synced 2026-11-30 16:18:26 +00:00
bcb38e2ae5eee0ffa79d61baa5981dc37e1fdd5c
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d74703ff50 |
feat(artifacts): report declared Ogg Opus, RIFF/XMA2, Bink 2 and Vulkan pipeline-cache headers (#14700)
* feat(artifacts): report declared Ogg Opus, RIFF/XMA2, Bink 2 and Vulkan pipeline-cache headers Recognize the four remaining #14155 media/cache containers by their public header signatures and inventory them as archives. Root format metadata carries the declared header facts; each named byte region is a member that is hashed and extractable. Payloads stay opaque: no audio, video or pipeline-cache body decode. Disagreeing extents stay in extent_check with unknown coverage rather than a refusal. Structural header faults refuse as malformed input with format and offset. Completes the remaining formats from #14155 after #14248. * fix(artifacts): bound media-asset header walks and document formats Stop RIFF inventory from buffering opaque chunks, keep chunk walks inside the declared form, follow spanned OpusTags before audio, preserve first-page truncation, ground the Bink fixture/table split, and document the formats. * fix(media): keep truncated RIFF chunk facts and register guide sidebar Record incomplete RIFF/XMA2 chunk headers in metadata, treat cut-off fmt as truncated rather than missing, and add media-asset-headers to the VitePress sidebar registry. * fix(artifacts): report cut-off media headers as truncated Short RIFF, Bink 2, and Vulkan pipeline-cache headers that end before the declared header size are truncated inputs, not malformed structure. * fix(artifacts): read Bink 2 headers at their demuxer offsets and keep Ogg and RIFF facts * fix(pe): name media asset formats as PE overlay leading formats * refactor(artifacts): format the Bink revision byte with the shared hex helper * fix(artifacts): bound Bink frames.bin to the declared file end Trailing bytes past the header size field are no longer claimed as frame payload. Tables that do not fit the declared extent stay unlisted. * fix(artifacts): keep unlisted Bink tables in the extent check When header tables end past the declared file size, still measure the frame-offset table against the file so extent_check reports truncated instead of consistent while the tables remain unlisted. * fix(artifacts): admit media asset regions with a per-call limit and report incomplete headers * refactor(artifacts): import the reader limit failure through the resources entry * fix(artifacts): keep Ogg page records as ranges, not buffer slices Growing the read buffer with Buffer.concat left each saved page's packet slice pinning the previous copy, so a long OpusTags continuation retained O(n²) bytes before region_count refused the walk. Page records now store packet offsets and read from the final buffer. * fix(media-asset): read Ogg pages by position and report required region count * fix(media-asset): keep Bink audio track facts inside the declared end Refuse to decode track tables past declaredEnd so appended physical bytes are not reported as audio_tracks. * fix(artifacts): keep Ogg header reads inside their own packet --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
78d2593a45 |
feat(artifacts): report declared DDS, GLB, KTX and KTX2 headers and regions (#14248)
* feat(artifacts): report declared DDS, GLB, KTX and KTX2 headers and regions Recognize DDS (including the DX10 extension), GLB, KTX 1.1 and KTX 2.0 by their header signatures and inventory them as containers. The root format metadata carries the declared header facts. Each declared byte region is a member that is hashed, classified and extractable: the DDS payload; GLB JSON and BIN chunks and BIN-stored images; KTX key/value data and mip levels; and KTX2 DFD, KVD, SGD and levels. Nothing is decoded. A DDS payload is checked against the size derived from its dimensions, mips, faces, layers and block size. Disagreeing extents are reported in extent_check with unknown coverage rather than refused, and regions past the end of the file are dropped, not clipped. Structural header faults refuse as malformed input with the format and offset. Part of #14155 * fix(gpu-assets): bound GLB chunks and keep unexamined regions unknown - Stop the GLB chunk walk at 1,024 chunks with unknown coverage. - Refuse a GLB chunk that crosses the declared length, or a chunk table that stops short of a physically present declared end, as malformed. - Report coverage unknown when GLB images were not all listed: past the image allowance, an unparsed JSON chunk, or an unresolved bufferView. - Leave the DDS payload size unknown when rows are padded to a declared pitch or more than 32 mip levels are declared, instead of deriving it from different dimensions. * fix(gpu-assets): report GLB images in URI-backed buffers as external Only buffers[0] without a uri is the GLB BIN chunk. An image whose bufferView sits in a buffer with a uri, or an image named by uri, is stored outside the file; it was counted as an unresolved image and made coverage unknown. Such images are now counted in external_images and leave coverage complete; only views that resolve to no buffer stay unknown. * fix(gpu-assets): report KTX2 level-index failures at file offsets The 64-bit level-index fields were read from a buffer that starts at file offset 80, but an unsafe value reported its index-relative position. The reader now takes the buffer's file base and reports base plus position, so every failure offset is a file offset. * fix(gpu-assets): count a GLB image as external only for a URI string An image or buffer whose uri is present but not a string, and an image with neither a uri nor a bufferView, were counted in external_images and left coverage complete without an established source. Only a URI string now marks a source external; other sources stay unresolved and keep coverage unknown. |