﻿# Live resolution changes: invalidate inference preparation after caps renegotiation

Live resolution changes: invalidate inference preparation after caps renegotiation. A practical streaming-video guide with failure mechanisms, a controlled scenario, acceptance evidence and primary references.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/sv-caps-resolution-change-inference-state/
Language: en

A camera changes resolution mid-session. Media negotiation succeeds, but the inference adapter retains an old resize map, tensor allocation or coordinate transform and produces misplaced results.

## The media mechanism

Negotiated caps establish the current media representation, not the validity of application caches derived from previous caps. Shape-sensitive state needs a generation boundary that follows the actual format change.

## Establish the pipeline boundary

Associate preprocessing state with the negotiated media generation. A cached resize transform, allocation or coordinate mapping should carry the dimensions and format under which it was constructed.

Inspect the actual caps event at the adapter boundary. A source setting changing in a control interface does not establish that downstream negotiation has completed or that every queued buffer already uses the new representation.

Delay an old inference result across the transition and verify that its coordinates are interpreted only with its original geometry. Rebuilding a cache for future frames does not repair old work automatically. If the application cannot support dynamic renegotiation, reject the transition explicitly and resume through a tested restart path. Compare a corner marker and a noncentral marker so an accidental scale-only match cannot hide a wrong crop or offset.

## A constructed failure case

Place a fixed corner marker in frames before and after a resolution switch. A pipeline may remain running, but acceptance requires correct marker alignment and explicit separation of results computed under different format generations.

## A practical validation procedure

Switch a permitted fixture between known resolutions and track caps events with frame identities. Rebuild dependent preprocessing state or reject unsupported changes. Verify overlay alignment and prevent old in-flight outputs from being interpreted under the new geometry.

Keep an unchanged control and a deliberate failure case. Change the relevant setting or interruption independently, then compare observed frame identities and state transitions. Measure through recovery as well as the first error; a restarted worker can retain obsolete results or references.

## Evidence for acceptance

Keep format generations, preprocessing state identity and reviewed output-to-frame alignment.

## Recovery and limits

Matching dimensions alone does not establish matching pixel format, colorimetry or crop geometry.

Define whether recovery drains, discards or isolates pending frames before resuming ordinary service. Preserve compact diagnostic identities and the fixture configuration. Avoid treating a new connection or a live process as proof that previous in-flight work has finished safely.

## References and interpretation

Primary references: [GStreamer capability negotiation](https://gstreamer.freedesktop.org/documentation/additional/design/negotiation.html); [GStreamer video frame layout](https://gstreamer.freedesktop.org/documentation/video/video-frame.html).

This is a proposed operational validation, not an executed Retrivium benchmark. Documentation defines interfaces and supported behavior; the actual pipeline needs its own evidence. Repeat the check after relevant plugin, decoder, source or preprocessing changes.

## Related reading

Continue with [ViTPose keypoints: keep person boxes and crop transforms attached to every pose](/journal/fg2-vitpose-person-box-crop-keypoint-frame/); [Camera endpoint failover: revalidate physical identity and calibration behind a stable URI](/journal/sv-camera-uri-failover-calibration-identity/). Their adjacent context does not replace the specific frame-flow acceptance check described here.
