Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

Separating Decode, Presentation, and Capture Order When Video Timestamps Appear to Run Backward | Crystal & Oscillator Handbook

A compressed video unit can arrive later and have an earlier presentation time. Some pictures depend on a reference that is presented later but decoded earlier. Verify acquisition time, decoder input order, and presentation order separately.

Three clocks or orders can describe one frame

Capture timestamps can refer to exposure or frame delivery, and a stream may not expose either directly. DTS gives decode time. PTS gives presentation time. A decoder can hold a later reference while producing an earlier display picture. Some formats do not reorder or expose both timestamps. Network arrival, file position, and name do not substitute for either field. Work from owned offline clips.

Worked example: a 40 ms reversal in decode order

Assume 25 pictures per second, 40 ms apart, with two frame intervals of display buffering. Pictures A, B, and C are presented in order, but B depends on A and C.

Decode inputDTSPTSPicture
A0 ms80 msFirst reference
C40 ms160 msLater reference
B80 ms120 msDepends on both references

Decode-order PTS is 80, 160, 120 ms. Presentation order is 80, 120, 160 ms. Moving the buffer origin shifts times without reconciling the two orders. Actual streams can omit DTS or have nonzero origins, edits, and discontinuities.

With a time base of 1/90000 second per tick, 40 ms is 3,600 ticks. PTS values of 7,200, 14,400, and 10,800 convert to the table values. Preserve raw ticks and converted time. Treating ticks as milliseconds creates a separate scale error.

Investigate the 27 MHz reference when real timing differs

For a compatible 27 MHz, 1.2 V single-ended CMOS active input, SCTF SX2M27.000E20F30THN is an example. Confirm receiving level, supply, load, temperature, routing, and board revision. Its nominal period is about 37.04 ns. If it drives the timestamp timebase, reference error can accumulate against independent time. It does not remove coding dependencies.

Investigate capture cadence, timing sources, and conversions if presentation intervals also fail or actual capture drifts. Resets and timeline changes can also cause real discontinuities.

Preserve capture, container, and actual display evidence

Use a short synthetic pattern with frame IDs. Preserve the original container, input order, DTS, PTS, timebase, and decoded output. Compare an approved non-reordered mode and note any other differences. Check capture logs and frame IDs for actual loss or repeats.

CheckKeepUse
AcquisitionPicture ID, capture origin, and conversionCheck exposure or capture order
Codec and containerDecode order, timebase, and available DTS/PTSIdentify order-dependent reversals
DisplayReordered output and scene boundariesCheck actual presentation gaps or repeats
ReferencePart code, supply, route, and pointQualify timing independently

Specify allowed reordering, maximum buffering, and required time fields for algorithmic use. A 25 fps requirement alone does not limit first-frame latency or establish that a reader can use packet order. Retain software version, units, and origin across exports, and keep player-relative values separate from raw timestamp counts.

Frequently asked questions

Can we sort all compressed input by PTS? Doing so can break decode dependencies. Inspect both orders and use a format-aware decoder for presentation.

Does a one-frame reversal prove reordering? Verify the dependency and display sequence and rule out edits, conversion, missing fields, or incorrect markers.

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.