Skip to content

Decoder transition state diverges from libopus around redundancy and PLC #251

Description

@thomas-vilte

I found these while reviewing #247 and #250 against libopus v1.6.1. All three are already present on main, and I could not find corpus coverage for any of them.

  1. PLC does not update previousMode/previousRedundancy (decodePLCToFloat32). libopus sets prev_mode = mode and prev_redundancy = 0 at the end of every opus_decode_frame, including PLC (src/opus_decoder.c:702-703). After a packet ending in SILK -> CELT redundancy, a loss, and then a SILK or Hybrid packet, libopus takes the transition path and we do not.
  2. SILK -> CELT redundancy is decoded before the Hybrid -> SILK fade-out (decodeSilkFrames). libopus decodes the silence frame first (:622-625), then resets CELT and decodes redundancy (from :636). Our fade-out therefore uses a freshly reset CELT state.
  3. CELT -> SILK redundancy is applied without the prev_mode != MODE_SILK_ONLY || prev_redundancy guard (:650) in both applySilkTransitions and the Hybrid path.

I think each fix needs a libopus-generated sequence to lock down the behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions