Files
retroSoC/publications/datasheets/sections/media-formats.typ
T
maksyuki fc6440989f docs: add environment reference and enhance publication validation
- Introduced  to define the development environment and validate runtime/platform contracts.
- Enhanced  with  to ensure change markers adhere to publication rules.
- Updated  to integrate boot acceptance checks and ensure dependencies are correctly managed.
- Added tests for environment validation, publication change scope, and CI stages to prevent regression and ensure compliance with publication standards.
- Implemented checks in  to validate the presence of development environment dependencies.
- Refactored existing tests to improve coverage and ensure accurate validation of publication claims and software configurations.
2026-09-23 17:09:55 +08:00

75 lines
5.0 KiB
Typst

#import "../style.typ": *
#change-start("v05-emphasis-media-formats","Selected body emphasis: media formats")
==== Data Formats and Peripheral Interoperability <media-interoperability>
#change-start("dev-media-formats","Current format compatibility and transport qualifications")
Matching names such as RGB565, YUV422 or PCM are only the beginning of an interoperability
check. Compare the *exact byte order, container width, stride, alignment, stream boundary and
software lifetime*. A shared address space does not convert formats or make an unavailable
transport usable.
#ds-table("media-format-layouts",[Media representations and their storage/stream boundaries],
([Representation],[Layout],[Boundary / integration check]),
data.system_reference.product_details.formats.map(r=>(r.title,r.layout,r.boundary)),
widths:(1fr,1.45fr,1.7fr))
#change-start("media-format-links","Media overview links to canonical packing figures",category:"cross-reference")
Detailed packing figures:
#data.system_reference.product_details.formats.map(r=>link(label("binary-"+r.id),r.title)).join([; ]).
These shared figures define representation; transport and ownership gates below still apply.
#change-end("media-format-links")
JPEG raster strides are byte strides and must cover the logical row. Its input/output
addresses and descriptor layout have their own alignment requirements; central-DMA word
alignment is not a substitute. The listed JPEG raster formats describe the codec contract,
with bounded normal SoC private-DMA admission through master 6 as documented in
@bus-programming; this is not full-system workload qualification. GA2D adds explicit color-format
conversion and opaque composition as described in @ga2d; it does not supply RGB/YUV conversion.
NPU tensors follow a separate static INT8 layout and quantization contract. A camera frame or
audio PCM buffer is *not directly an NPU model input*: *CPU preprocessing must produce* the
compiler's expected features, byte layout and zero points. NPU receives memory jobs, not a
dedicated camera/audio stream, and its model format is not the APU APUM container.
The DVP core packs two completed 16-bit pixels per 32-bit word, with the first pixel in the
lower half. Its FIFO also carries framing/byte-qualification metadata. That metadata is not
automatically appended to a memory image by central DMA. Configure camera byte order and the
documented swap controls, then verify a known pattern before handing buffers to a consumer.
===== Source-to-consumer compatibility
#ds-table("media-interoperability",[Format compatibility and actual integration gates],
([Composition],[Classification],[Conditions and remaining work]),
data.system_reference.product_details.interoperability.map(r=>(r.title,r.classification,r.condition)),
widths:(1.1fr,0.7fr,2.35fr))
"Format-compatible" means the representations can agree under the stated conditions. It is
not a board or full-application pass. "Conversion required" identifies a software transformation
that is not performed by the interface itself. "Blocked" identifies an active implementation
limitation even if the layouts could otherwise match.
===== Buffer preparation and verification
+ Choose source and destination formats explicitly, including component order and per-row stride.
+ Calculate allocation using the actual stored containers and alignment, as in @software-memory-budget.
+ Prepare a small known pattern with distinguishable channels/components. Check the produced
memory bytes and consumer interpretation before enabling sustained traffic.
+ Preserve frame/line metadata in software when the consumer needs it. Do not interpret every
TLAST as a frame boundary: DVP uses line boundaries, while I2S RX does not assert TLAST.
+ Transfer buffer ownership with the required fences/cache operations and release it only after
confirmed completion or completed recovery.
For an odd-pixel camera row, the final stream beat is partial; the current central DMA requires
full-word qualification. Treat that as an unsupported DMA configuration, not harmless padding.
For packed 24-bit audio files, place each sample in the correct low 24 bits of a 32-bit container;
copying three-byte file data directly into a word-stream DMA buffer changes the sample layout.
No automatic RGB/YUV colorspace conversion, sample-rate conversion, codec activation or
frame-ring service is implied by this overview. JPEG system-integration qualification and APU
codec/corpus and default KWS limitations remain binding. A transport failure and a format mismatch require different recovery:
stop the producer, preserve errors and ownership, and discard or explicitly repair the affected
buffer rather than passing partially valid data onward.
#source-note("rtl/ip/multimedia/dvp_core.sv",title:"Actual DVP pixel packing and framing")
#source-note("crt/src/hal/i2s_math.c",title:"I2S sample-container helpers")
#source-note("docs/ip/jpeg.md",title:"JPEG raster formats, strides and alignment")
#source-note("docs/ip/apu.md",title:"APU transport and production availability boundary")
#change-end("dev-media-formats")
#change-end("v05-emphasis-media-formats")