Skip to main content

Module session

Module session 

Source
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, and v, or 10-bit ones in y16, u16, and v16, 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_LIMIT consecutive requests so transient motion does not make quality blink. The domain is the codec’s own (Codec::quantizer).
RateSettings
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 pixels holds a width x height packed picture at stride bytes per row.
convert_into
Convert a packed host frame into planes a library owns, at strides (luma, chroma) bytes per row, as Planes::convert does into its own.
encode_threads
The encode threads a software session spreads across: one less than the host’s cores, between one and eight.