Scene Change Detection - Scene Change Detection - 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

Separate AMD Video Scene Change Detection IP can be added to a system to implement scene change detection. The IP core calculates the histogram on a vertically sub-sampled luma frame for consecutive frames. The histograms of these frames are then compared using the sum of absolute differences (SAD). This IP core is programmable through a comprehensive register interface to control the frame size, video format, and sub-sampling value. For more information, see the Video Scene Change Detection LogiCORE IP Product Guide (PG322).

This configurable IP core that can read up to eight video streams in memory mode. All inputs are read from a memory mapped AXI4 interface. Resolutions supported range from 64x64 to 7680x4320 with various 8-bit, 10-bit and 12-bit color formats. The SAD values are calculated for every input stream one after the other sequentially and the interrupt is generated after the SAD calculation of the final stream. Then the SAD values are read from SAD registers for the configured number of streams to compare them with a threshold value that to determine if a scene change has occurred.

Interlaced scene-change detection is supported in memory mode. For interlaced content, SAD values are computed for each field instead of each frame, so a scene change can be detected in-between fields of the same frame.

The most important application of scene change detection are where video quality is important even with large changes in content (scene change). In these use cases, the IP would be in the capture pipeline and the generated event is attached with each buffer captured. The same event is passed along with the buffer to the encoder, where the encoder makes decisions to insert an I-frame instead of a P- or a B-frame. Inserting an I-frame at the place where a scene is changed would retain the quality of the video.

Transcode with scene-change detection xilinxscd.

gst-launch-1.0 filesrc location=in.mp4 ! qtdemux ! h264parse ! omxh264dec ! queue ! xilinxscd io-mode=5 ! queue ! omxh264enc target-bitrate=20000 control-rate=2 cpb-size=5000 ! filesink location=out.264

Encode from file using xilinxscd.

gst-launch-1.0 filesrc location=in.yuv ! rawvideoparse width=1920 height=1080 format=nv12 framerate=30/1 ! xilinxscd ! omxh264enc target-bitrate=8000 control-rate=2 cpb-size=4000 ! filesink location=out.264