Page 1
Handled by Comments 1.3.1 2018.11.27 Holland Huang Revise the context for SDK v1.3.1 1.1.1 2018.05.18 Holland Huang Revise the context for SDK v1.1.1 Kevin Chien 1.0.0 2017.01.24 Initial draft (Product Manager) Approved by Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 2
Date Approved By 2017.01.24 Dick Lin (Software), Tony Tsai (Hardware) Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
1. Product Introduction 1.1 General Introduction VEGA-3311 enables HEVC, AVC, MPEG2 real-time 1-ch 4K Ultra HD (2160p60) and 4-ch FHD (1080p60) encode and decode. It is particularly relevant for 4K Ultra HD transmission which requires a much higher stream capacity.
8. Check the software has been installed correctly by running the demo and checking the output. If there is no error reported, then VEGA-3311 is now ready for performing video encoding task. Note that only one board per system is supported in the current early access driver.
(can be ignored for VEGA-3311) vega3311_fpga_x64 software package for VEGA-3311 FPGA ffmpeg directory tree: Directory/Subdirectory name Remarks ffmpeg ffmpeg_source A working copy of ffmpeg v3.4.1 with Advantech patch vega_bqb_avc libvegabqbavc AVC encoder source vega_bqb_hevc libvegabqbhevc HEVC source vega3311_ff_capture libvega3311-capture source advantech_v1_3_1.patch The patch file for original ffmpeg source.
Page 8
SDI output (not available in v1.3.1) vega3311_display_api VEGA transmission API library for SDI output (not available in v1.3.1) vega3311_transmit_api VEGA transmission API library tools fpga_fw FPGA firmware vega3311_fpgautil FPGA utility tool Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
$ dmesg snip m30smb(-1):<2>fmb_hw_memmap(111):BAR Config : 32bit-config m30smb(-1):<2>fmb_hw_pci_probe(1916):DMA mask : 64bit m30smb(0):<2>fmb_hw_pci_probe(1988):interrupt Handler Registration m30smb(0):<2>fmb_hw_pci_probe(1992):PCIe fmb device now attached to m30smb m30smb(0):<2>fmb_hw_pci_probe(1994): major : 242 minor snip Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 10
/usr/local/bin vega_bqb_sysctl Sample application /usr/local/lib libvega_bqb_sysctl.a System control API static library /usr/local/lib libvega_bqb_ sysctl.so System control API library /usr/local/include/ VEGA_BQB_decoder.h Video decoder header file libvega_bqb_api /usr/local/include/ VEGA_BQB_system.h System control header file libvega_bqb_api Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
0000:03:00.0: Major 243 Minor 0 assigned vega3311_fpga 0000:03:00.0: Added device to the sys file system vega3311_fpga 0000:03:00.0: VEGA3311 FPGA BAR0 mapped to 0xffffc90003000000 vega3311_fpga 0000:03:00.0: VEGA3311 FPGA BAR2 mapped to 0xffffc90004800000 Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 12
0000:03:00.0: Translation src base low = 0xf0000000 vega3311_fpga 0000:03:00.0: Translation src base high = 0x0 vega3311_fpga 0000:03:00.0: Translation dst base low = 0x44a00000 vega3311_stc_proc_add_entry minor 0 vega3311_stc_proc_add_entry 0: try to create directory vega3311 snip Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
The ffmpeg_source folder in software package is a working copy of ffmpeg version 3.4.1 that has applied Advantech patch, the compilation and installation method are the same as original ffmpeg usage. Follow the steps to install vega_bqb_avc, vega_bqb_hevc library and ffmpeg program.
Page 15
$ sudo make install Make and install ffmpeg. $ cd ffmpeg/ffmpeg_source $ PATH="/usr/local/bin:$PATH" PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" $ ./configure --enable-shared --enable-libvegabqbavc --enable-libvegabqbhevc --enable-libvega3311-capture --enable-nonfree $ make $ sudo make install Load the plug-in libraries. $ sudo ldconfig Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
YUV4:2:0 8bit (NV12 format, refer to Figure 1) YUV4:2:2 8bit (NV16 format, refer to Figure 1) YUV4:2:0 10bit(P010 format with packed data, refer to Figure 2) YUV4:2:2 10bit(P210 format with packed data, refer to Figure 2) Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 17
Figure 1: YUV 8bit format Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 18
Figure 2: YUV 10bit format Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 19
| ES 19 | HEVC | 1920x1080 | 60 | 420 | IB | Y | ES interlace 20 | HEVC | 1920x1080 | 60 | 422 | IB | Y | ES Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 20
Ave VBR : 0 kbps Min VBR : 0 kbps PTS mode : AUTO Output Format : ES Weighted Pred. : Bi-direction M30_DEV_SET_ENCODER_MAIN_STATE:state=2 encode_mode=0 M30_DEV_SET_ENCODER_MAIN_STATE:state=3 encode_mode=1 M30_DEV_CHANGE_EH_ID_STATE: state=2 id_bits=0x1 |:56 fps Snip Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 21
$ ffplay -vf "scale=1920:1080" es_0_0_xxxxxx.265 The encoder can be reset when the application run into fatal error status, run the same application with reset option as below to reset encoder. $ vega_bqb_venc reset Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
VID = 8176 4.3.1 Decoded Video Data Format The decode application inputs the Video Stream data through PCIe, and decodes it to Video RAW data as Y/CbCr separation V210 format. 10-bit: 8-bit: Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
16-bits. The following figure shows the channel map of each layout configuration. The following figure shows the block format of pass_through mode, in this mode VEGA3311 driver directly transfer the data of FPGA with header: Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 31
For pass_through mode, each audio sample size is 32-bits which format is specified in following table: Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Device control property: Driver version: 1.1.0.11329 FPGA hardware version: Ultrascale 060 FPGA firmware version: 0.5.10 Video capture is off Video state: standby Input mode: 1 Channel UltraHD SDI sub image format: Quad Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 37
[chip0:ch0]a_frame_counter: 1139, FPS: 200, PCR(90Khz): 0x0002F91DBF, FPGA: 56C, Encoder: 48C (Press "q" key followed by "enter" key) q pressed DRV DBG: [remove_av_cb_thread] try to remove audio callback thread(ch0) DRV DBG: [callback_thread] audio capture callback thread(ch0) exit safely Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 41
“vega_rtp_mpegts” muxer is designed by ACL. It can support all parameters of “mpegts_enc” muxer. User can refer to FFmpeg documentation on FFmpeg website for the usage. ffmpeg -f vegabqbvif -vegabqbvif-params device=0:channel=2:input-res=1920x1080:pixel-format=yuv420p10:frame-rate=60 -i dev:0 -c:v libvegabqbavc -vegabqbavc-params device=0:channel=2:input-mode=1:bitrate=1000 -f vega_rtp_mpegts -muxrate 1100K rtp://192.168.0.1:12345 Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Play video raw data (default setting is 4k, nv12, SDI): $ ffplay -vf "scale=1920:1080" -f vega3311-video -i dev:0 Play audio raw data (default setting is stereo, 48k sample rate, SDI): $ ffplay -f vega3311-audio -i dev:0 Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Appendix A: Upgrade Codec Firmware Usually VEGA-3311 is provided after flash memory is written, re-write to flash memory is possible with Normal mode for updating the firmware. In the case of upgrading all firmware reversion, re-write the system and mcpu firmware at first.
Page 46
Writing system_fw2.bin... 100% 0.041(sec) flash program success Writing config_system.bin... 100% 1.646(sec) flash program success Writing write_flag.bin... 100% 0.041(sec) flash program success ======================================== Flash Write Start (MAIN_FW) ---------------------------------------- make main fw ---------------------------------------- success Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 47
BAR1: 0x00000000 (0x00000000) BAR2: 0xF7A00000 (0x00100000) BAR3: 0x00000000 (0x00000000) BAR4: 0x00000000 (0x00000000) BAR5: 0x00000000 (0x00000000) ---------------------------------------- start program ---------------------------------------- Writing ... 100% 55.742(sec) flash program success ---------------------------------------- stop flash function ---------------------------------------- stop success ---------------------------------------- Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 48
(WRITE _ALL) ======================================== << Need to restart the host PC >> Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
[fpga0]read complete [fpga0]verify data ... [fpga0]flash data verification PASS [fpga0]firmware upgrade done ... (2) Power off the PC, then power on the PC (not reboot). VEGA-3311 is started up on new FPGA firmware. Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Below figure shows the position of the switch (SW5). Figure3: The SW5 on VEGA-3311 PCI-E Card VEGA-3311 support to write the binaries to HS-SPI flash memory. In the case that the flash is erased or crashed, the SW5 mode[0](bit0) should be set "ON: Maintenance mode". But, if flash memory already has been written, re-write to flash memory is possible with Normal mode for updating the firmwares (refer to appendix: Upgrage HEVC Encoder Firmware for the usage).
Page 51
Capabilities: [3a0 v1] Device Serial Number 00-00-00-00-00-00-00-00 Capabilities: [400 v1] Vendor Specific Information: ID=0020 Rev=3 Len=100 <?> snip Confirm the character strings "Multimedia controller: Device 50c1:0003 (rev 01)" and "LnkSta: Speed 5GT/s, Width x4". Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 52
: 0x02000000 byte sector size : 0x00010000 byte Status Register : 0x00 Volatile Config Register : 0xFB ---------------------------------------- start chip erase ---------------------------------------- ..................................................246.544(sec) flash chip erase success ---------------------------------------- start program Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 54
BAR3: 0x00000000 (0x00000000) BAR4: 0x00000000 (0x00000000) BAR5: 0x00000000 (0x00000000) ---------------------------------------- start program ---------------------------------------- Writing main_fw.bin... 100% 9.482(sec) flash program success Writing write_flag.bin... 100% 0.041(sec) flash program success ======================================== Flash Write Start (AV_CODEC) Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 55
---------------------------------------- start program ---------------------------------------- Writing ... 100% 55.742(sec) flash program success ---------------------------------------- stop flash function ---------------------------------------- stop success ---------------------------------------- program end (WRITE _ALL) ======================================== << Need to restart the host PC >> Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Page 56
(4) Power off the PC. Set the SW5 for Normal mode. (5) Power on the PC. VEGA-3311 is started up the normal mode which is able to run the application from PC Linux. Copyright@2016, Advantech Co., Ltd., All Right reserved. Page...
Need help?
Do you have a question about the VEGA-3311 and is the answer not in the manual?
Questions and answers