Expand description
What the full-frame software sessions share: planar input, quantizer, rate settings. What the full-frame software sessions share: the planar picture a packed host frame is converted into, at 8 or 10 bits, the constant quantizer that follows the session quality index, the rate-control settings a live change is compared against, and the frames an encoder has been handed but not yet answered.
Structs§
- Pending
- The frames handed to an encoder and not yet answered, by the timestamp each was submitted with, so a packet names the frame it encodes rather than the one submitted alongside it. An encoder that pipelines answers a frame several later, and one that drops a frame never answers it at all, so taking a timestamp discards every submission it passed over.
- Planes
- A planar picture, 4:2:0 or 4:4:4, with tightly packed rows: 8-bit samples in
y,u, andv, or 10-bit ones iny16,u16, andv16, the planes of the other depth staying empty. - Quality
- The constant quantizer of a session, moved toward the one the quality index selects: a
decrease sharpens the picture and applies at once, an increase waits out
QP_HYSTERESIS_LIMITconsecutive requests so transient motion does not make quality blink. The domain is the codec’s own (Codec::quantizer). - Rate
Settings - The rate-control and frame-rate settings a session was configured with, so a live change re-programs the encoder only when a value it reads actually moved.
Functions§
- check_
host_ frame - Whether
pixelsholds awidthxheightpacked picture atstridebytes per row. - convert_
into - Convert a packed host frame into planes a library owns, at
strides(luma, chroma) bytes per row, asPlanes::convertdoes into its own. - encode_
threads - The encode threads a software session spreads across: one less than the host’s cores, between one and eight.