Interlaced Video - 2020.2 English

H.264/H.265 Video Codec Unit v1.2 Solutions LogiCORE IP Product Guide (PG252)

Document ID
PG252
Release Date
2020-11-24
Version
2020.2 English

The Interlaced video is a technique to double the perceived frame rate of a video display with the same bandwidth. The interlaced frame contains two fields captured at two different times. This improves motion perception to the viewer, and reduces flicker by taking advantage of viewing in rapid succession as continuous motion.

Interlaced signals require a display that is capable of showing the individual fields in a sequential order. CRT displays are made for displaying interlaced signals. Interlaced scan refers to drawing a video image on display screen by scanning each line or row of pixels. This technique uses two fields to create a frame. One field contains all odd-numbered lines in the image and the other contains all even-numbered lines.

The Xilinx VCU supports encoding and decoding of H265 interlaced video. VCU can decode and encode of various video resolutions like 1920x1080i, 720x576i, and 720x480i.

Gstreamer pipelines:

  • filesrc → omxh265dec → omxh265enc → filesink
    gst-launch-1.0 filesrc location=file_1080i.h265 ! omxh265dec ! omxh265enc 
    target-bitrate=10000 control-rate=2 ! queue max-size-bytes=-1 ! filesink 
    location=file.h265
  • v4l2src → omxh265enc → omxh265dec → kmssink
     gst-launch-1.0 v4l2src io-mode=4 ! video/x-raw\(format:Interlaced\),interlace-mode=alternate, format=NV16_10LE32,width=1920,height=1080,framerate=30/1 ! omxh265enc target-bitrate=10000 control-rate=2 ! omxh265dec ! queue max-size-bytes=-1 ! kmssink bus-id=drm-pl-disp-drv connector-properties="props,sdi_mode=0,sdi_data_stream=2,is_frac=0" 
  • Audio serial pipeline: v4l2src → omxh265enc → omxh265dec → kmssink alsasrc → audioconvert → audioresample → alsasink
    gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw\(format:Interlaced\),interlace-mode=alternate,field-order=bottom-field-first,format=NV16_10LE32,width=1920,height=1080,framerate=30/1 ! omxh265enc target-bitrate=20000 ! queue ! omxh265dec ! queue max-size-bytes=0 ! kmssink bus-id=amba_pl@0:drm-pl-disp-drv connector-properties="props,sdi_mode=0,sdi_data_stream=2,is_frac=0" show-preroll-frame=false sync=true alsasrc device=hw:1,1 ! queue ! audioconvert ! audioresample ! audio/x-raw, rate=48000, channels=2, format=S24_32LE ! alsasink device="hw:1,0"
    
  • Audio file playback pipeline: filesrc → tsdemux → omxh265dec → kmssink tsdemux → faad → audioconvert → audioresample → alsasink
    gst-launch-1.0 filesrc location=/media/usb/video/sdi_cap_1080i_aac_coffea_long.ts ! video/mpegts ! tsdemux name=demux demux. ! queue ! h265parse ! omxh265dec ! queue ! kmssink bus-id=amba_pl@0:drm-pl-disp-drv connector-properties="props,sdi_mode=0,sdi_data_stream=2,is_frac=0" show-preroll-frame=false sync=true demux. ! queue ! aacparse ! faad ! volume volume=9 ! audioconvert ! audioresample ! audio/x-raw, rate=48000, channnels=2, format=S24_32LE ! alsasink device="hw:1,0" provide-clock=false
Note: It is suggested not to use alsasink clock as the Gstreamer clock provider. There is a limitation of interlaced audio that alsasink clock and video rendering depending on each other, so setting alsasink provide-clock to FALSE for file playback case.