Dynamic Operations - Dynamic Operations - 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

Dynamic GOP involves changing the GOP-length, number of B-frames, and forcing IDR picture while the encoder is active.

Bitrate and GOP-length should be set to the largest possible value to increase video quality. The dynamic parameters should not be changed frequently as this can cause stability issues. It is recommended to wait for two or three times the GOP-length.

IDR frames should be inserted on the first frame of a scene change.

Dynamic GOP changes are effective immediately, either closing the current GOP earlier or extending the GOP to meet the new parameters. Dynamic bitrate changes are considered immediately, affecting the QP of the next frames. Average bitrate make take up to a GOP duration to converge.

Change the GOP-length at frame number 100 to 45.

vcu2-gst-encode -w 3840 -h 2160 -e avc -g 30 -o out.h264 -i in.yuv -d GL:100:45

Change the number of B-frames at frame number 20 to 2.

vcu2-gst-encode -w 3840 -h 2160 -e avc -b 4 -o out.h264 -i in.yuv -d BFrm:20:2

Insert IDR frame at frame number 35.

vcu2-gst-encode -w 3840 -h 2160 -e avc -b 4 -o out.h264 -i in.yuv -d KF:35

To insert a key frame in LLP1 based pipeline with low-delay-P GOP mode and horizontal GDR at frame number 100.

vcu2-gst-encode -w 3840 -h 2160 -e hevc -f 60 -s 5 -c 2130706433 -v 2 -a 240 -o out.hevc -i in.yuv -d KF:100

Dynamic Region of Interest (ROI) encoding allows defining several, potentially overlapping regions within a frame and specify a quality (high, medium, low and don't-care) relative to the picture background (untagged region). A region is specified as top x left, width x height and ROI type.

Change at frame 100 the region of interest at position (1280, 360) with 1220x1500 width x height to high quality.

vcu2-gst-encode -w 3840 -h 2160 -e avc -o out.h264 -i in.yuv -d ROI:100:1280x360:1220x1500:high

Change delta QP to 10 for region (allowed values range from -32 to 31). Restriction: must start at frame 0.

vcu2-gst-encode -w 1920 -h 1080 -e avc -f 60 -c 2 -g 30 -o out.h264 -i in.yuv -d ROI_BY_VALUE:0:1200x300:200x200:10 -q 1

Insert a long-term reference picture at frame 10.

vcu2-gst-encode -w 3840 -h 2160 -e avc -o out.h264 -i in.yuv -d IL:10

Use long-term reference picture for frame 15.

vcu2-gst-encode -w 3840 -h 2160 -e avc -o out.h264 -i in.yuv -d UL:15

Using Dynamic LOAD_QP the relative/absolute QP value can be specified for each encoding block of a frame (one byte per 16x16 MB for HEVC, one byte per 32x32 CTB for HEVC).

vcu2-gst-encode -w 3840 -h 2160 -e hevc -f 30 -c 2 -g 30 -b 1 -o out.h265 -q 3 -i in.yuv -d LOADQP:0:QPs.hex