SPRADG0A April   2024  – August 2024 AM62P , AM62P-Q1

 

  1.   Abstract
  2.   2
  3.   Trademarks
  4. 1Introduction
    1. 1.1 Change Cortex-A53 Clock Frequency
  5. 2Processor Core and Compute Benchmarks
    1. 2.1 Dhrystone
    2. 2.2 CoreMark-Pro
    3. 2.3 Fast Fourier Transform
    4. 2.4 Cryptographic Benchmarks
    5. 2.5 IPC Mailbox Latency
  6. 3Memory System Benchmarks
    1. 3.1 Memory Bandwidth and Latency
      1. 3.1.1 LMBench
      2. 3.1.2 STREAM
    2. 3.2 Critical Memory Access Latency
    3. 3.3 UDMA: DDR to DDR Data Copy
  7. 4Graphics Processing Unit Benchmarks
    1. 4.1 Glmark2
    2. 4.2 GFXBench5
  8. 5Video Codec
  9. 6References
  10. 7Revision History

Video Codec

This section introduces benchmarks for the video codec in AM62P. Specifically, the benchmark focuses on using of the H264 encoder and decoder. The results are collected from a close to real use-case scenario which includes transmitting of a live video stream over UDP using gstreamer pipeline. The setup uses a USB camera with resolution of 1920x1080 and rate of 30FPS. The transmitter side captures the live video stream from the camera, encodes the stream using codec accelerator with H264 format, and transmits the video over UDP. The other side receives the video stream over UDP, decodes and displays on the screen. Both the transmitter and receiver side are executed on the same AM62P device. This shows the codec capability of executing both the encoder and decoder at the same time. The latency of each component in the pipeline can be measured using the gstreamer tracer that outputs live logs of the measurements to a file that you specify.

Following is the gstreamer pipeline for the encoder sider and UDP transmitter side with the gstreamer tracer configured to log the latency measurement at "/run/trace_encode.log".

GST_TRACERS="latency(flags=pipeline+element)" GST_DEBUG=GST_TRACER:7 GST_DEBUG_FILE="/run/trace_encode.log" \
gst-launch-1.0 \
v4l2src device=/dev/video2 ! image/jpeg, width=1920, height=1080, framerate=30/1 ! jpegdec !videoconvert ! v4l2h264enc ! h264parse ! rtph264pay ! udpsink host=$1 port=5000 sync=false

Following is the gstreamer pipeline for the decoder, UDP receiver and display side with the gstreamer tracer configured to log the latency measurement at "/run/trace_decode.log".

GST_TRACERS="latency(flags=element+pipeline)" GST_DEBUG=GST_TRACER:7 
GST_DEBUG_FILE=/run/trace_decode.log \
gst-launch-1.0 -v \
udpsrc port=5000 ! 'application/x-rtp, encoding-name=H264, payload=96' ! 
rtpjitterbuffer latency=50 ! rtph264depay ! h264parse ! v4l2h264dec ! 
queue ! kmssink driver-name=tidss sync=false plane-id=31

The python script provided at /opt/edgai-gst-apps/seripts/gst_tracers/parse_gst_tracers.py can be used to calculate the average of the latency measurements recorded in the .log files for each component in pipeline. This script can be executed in parallel with the gstreamer pipeline to show live updates of the latency measurements. For instance this is the printout for the decoder side.

root@am62pxx-evm:/opt/edgeai-gst-apps/scripts/gst_tracers/# parse_gst_tracers.py /run/trace_decode.log
.
.
+-----------------------------------------------------------------------------------+
|element            latency        out-latancy   out-fps     frames |
+-----------------------------------------------------------------------------------+
|capsfilter0         0.16              27.54       36        30938  |
|rtpjitterbuffer0    0.36              27.53       36        30938  |
|rtph264depay0       0.20              35.86       27        23752  |
|h264parse0          0.26              35.86       27        23752  |
|v4l2h264dec0        48.12             35.86       27        23751  |
|udpsrc0             49.73             35.86       27        23751  |
|queue0              0.75              35.86       27        23751  |
+-----------------------------------------------------------------------------------+

The average latency measurements for the encoder and decoder are shown inVideo Codec Latency.

Table 5-1 Video Codec Latency
Codec H264 Resolution Latency [ms]
Encoder 1920x1080 10.58
Decoder 1920x1080 48.12