Skip to main content
Version: v5.9.0

PPU Resolution Reconfiguration During Decoding

We support dynamic reconfiguration of PPU output resolution during decoding by introducing a new AVPacketSideDataType called AV_PKT_DATA_PPU_CONFIG. This allows you to modify the resolution of PPU0, PPU1, and PPU2 by setting the elements of the AVNIPPUConfig struct.

Configuration Modes​

The parameter ppu_reconfig_mode determines how the PPU resolution is updated:

Mode 0 (ppu_reconfig_mode = 0)​

Resolution changes only apply to packets containing header information.

SEI (Supplemental Enhancement Information) in packets without headers will not trigger reconfiguration.

Mode 1 (ppu_reconfig_mode = 1)​

Resolution changes apply to any packet, but some frames may be dropped during the transition.

Next, I will explain this implementation with a specific example:

Suppose I have successfully sent 100 packets (1080P) to the firmware, and then I send a command to configure the PPU parameters (720P). At this point, the 101st packet will not be sent. The firmware will wait until the 100th packet is decoded before allowing the host to send the 101st packet. The 101st packet will not be decoded until the new PPU parameters are successfully configured. By then, the 101st packet will be decoded as 720P, while the 100th and earlier packets will remain 1080P.

For H.265 decoding:​

  • If the stream consists entirely of I-frames or IPPPP-frames, no frames will be dropped.
  • If there are B-frames, frames will be dropped according to the following logic:
  • If the display order of frames decoded before the 101th frame (1080P) comes after the display order of the 101st decoded frame, those frames will be discarded.

For H.264 decoding:​

  • If the stream consists entirely of I-frames or IPPPP-frames, one frame will be dropped.
  • If there are B-frames, the frame-dropping logic is the same as for H.265.
note
  • Resolution Constraints
  • Maximum: 8192×8192 (8K UHD)
  • Minimum: 16×16
  • Both width and height must be even numbers (no odd values)
  • Initialization Requirements
  • The corresponding decoder must be initialized first
  • Example: To reconfigure PPU1, enable_out1 must be enabled during initialization
  • System Configuration Prerequisites
  • Hardware decoding must be active (out=hw)
  • Adaptive buffers disabled (disableAdaptiveBuffers=1) when use Mode 1
  • Multicore joint mode disabled (MulticoreJointMode=0) when use Mode 1
  • Supported Codecs
  • H.264/AVC
  • H.265/HEVC