Dynamic Resolution Changes - Dynamic Resolution Changes - 3.0 English - PG447

H.264/H.265/JPEG Video Codec Unit 2 (VCU2) Solutions LogiCORE IP Product Guide (PG447)

Document ID
PG447
Release Date
2026-03-06
Version
3.0 English
The following constraints apply:
  • The maximum resolution must be known.
  • All the streams should belong to same codec either AVC or HEVC.
  • Same chroma-format and bit-depth.
  • Maximum resolution can be set either with the pre-allocation mode or with the first valid SPS. In case the SPS defines a resolution higher than the one provided in pre-allocation, the decoder skips the frames until the next valid SPS.
  • While going from low to high without pre-allocation, resolutions lower than or equal to the first valid resolution that are met are decoded. Pictures and references should always fit in the DPB.

Use --prealloc-args widthxheight:video-mode:chroma-mode:bitdepth:profile-idc:level to specify maximum width and height and other parameters.

ctrlsw_decoder -avc -i in.avc --prealloc-args 3840x2160:progr:420:8:66:51 -o out.yuv

For GStreamer the first sequence in the stream must have the maximum width and height.

gst-launch-1.0 filesrc location=in.avc ! h264parse ! omxh264dec low-latency=0 internal-entropy-buffers=5 ! queue max-size-bytes=0 ! filesink location=out.yuv

Using ctrlsw-encoder to switch between 1920x1080@30p and 720x480@60, specify in the .cfg file:

[INPUT]
YUVFile      = input_1.yuv
Format       = NV12
Width        = 1920
Height       = 1080
CmdFile      = input_cmd.txt
[DYNAMIC_INPUT]
YUVFile      = input_2.yuv
Width        = 720
Height       = 480

and in file input_cmd.txt:

50: Fps=30, Input=1
90: Fps=60, Input=2

For GStreamer the first sequence should have the maximum resolution in the stream.

Transcode a dynamic resolution stream.

gst-launch-1.0 filesrc location=in.avc ! h264parse ! omxh264dec low-latency=0 internal-entropy-buffers=9 ! queue max-size-bytes=0 ! omxh265enc target-bitrate=50000 ! video/x-h265, profile=main, alignment=au ! filesink location=out.hevc