工具/软件:Linux
您好!
我使用 ducatijpegdec Gstreamer 插件已有一段时间、我注意到我认为 VPE 驱动程序存在兼容性问题。 解码1080p 图像(jpeg)时、解码器将经常添加8行额外的图像、其中 GStreamer 和 VPE 驱动程序将其识别为1088行图像。 下面是 GStreamer 中的 CAP 协商过程、以及来自 VPE 驱动程序的一些用于以下 GStreamer 管道的内核调试消息:
发件人管道:
GST-LAUNCH-1.0视频测试 src! VIDEO/x-RAW、FORMAT=I420、width=1920、height=1080、framerate=30/1! jpegenc! rtpjpegpay MTU = 1472! udpsink host=192.168.1.233多播-iface=enp0s31f6 port=1234
接收器管道(AM572x EVM):
gs-launch-1.0 udpsrc multicast-iface=eth0 port=1234! application/x-rtp、encoding-name=JPEG、PAYLOAD=26! 很棒的酒店! jpegparse! 极好的体验! VPE! VIDEO/x-RAW、FORMAT=NV12、width=1920、height=1080! 应用
GStreamer 电容协商:
/GstPipeline0/GstCapsFilter:capsfilter0.GstPad:src:cap ="application/x-rtp\、\ coding-name\=(string\) JPEG\、\ PAYLOAD\=(int\) 26\、\ media\=(string\) video\、\时钟速率\= 90000"(int)
/GstPipeline0/GstRtpJPEGDepay:rtpjpegdepay0.GstPad:SINK:CAP="application/x-rtp\、\编码名称\=(字符串\) JPEG\、\ PAYLOAD\\=(int\) 26\、\媒体\\\(字符串\)视频、\(字符串\) 90000时钟速率)
(GST-LAUNCH-1.0:1594):Gstreamer-warning **:./../gstreamer-1.6.3/gst/gstpad.c:4943:STORE_STACK_EVENT: 粘滞事件错误排序、在"大写"之前被"封装"
/GstPipeline0/GstRtpJPEGDepay:rtpjppegdepay0.GstPad:src:cap ="image/jpeg、\ framerate\=(frame\) 0/1\、\ width\=(int\) 1920\、\ height\=(int\) 108"
(GST-LAUNCH-1.0:1594):Gstreamer-warning **:./../gstreamer-1.6.3/gst/gstpad.c:4943:STORE_STACK_EVENT: 粘滞事件错误排序、在"大写"之前被"封装"
/GstPipeline0/GstJpegParse:jpegparse0.GstPad:SINK:SINK:CAP="image/jpeg\、\ framerate\=(frame\) 0/1\、\ width\=(int\) 1920\、\ height\=(int\) 108"
/GstPipeline0/GstJpegParse:jpegparse0.GstPad:src:cap ="image/jpeg\、\已解析\=(布尔\) true、\格式\=(string \) I420\、\ width\=(int\)\、\高度\=(1020x) frate\(int\)/framex 1) 102020
/GstPipeline0/GstDucatiJpegDec:ducatijpegdec0.GstPad:src:cap ="VIDEO/x-ray\、\ format\=(string\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1088\、\、\(try\) begray\(try\) m\(try\) mes\(try\) m\(try\)布尔值1)
/GstPipeline0/GstVpe:vpe0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1080/\、\ framerate\=(frame\) 0/1"
/GstPipeline0/GstCapsFilter:capsfilter1.GstPad:src:cap ="video/x-raw、\ format\=(string\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1080/\、\ framerate\=(string\) 1/frapy
/GstPipeline0/GstAppSink:appsink.GstPad:灌电流:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1080/\、\ framerate\=(string\) 1/frame\
/GstPipeline0/GstCapsFilter:capsfilter1.GstPad:SINK:SINK:CAPs ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1080/\、\ framerate\=(string\) 1/fraper\
/GstPipeline0/GstVpe:vpe0.GstPad:SINK:SINK:SINK:CAPs ="VIDEO/x-RAW\、\ FORMAT\=(STRING\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1088\、\、\ framerate\\(frame\=(frame\) m\(try\) m\(try\) m\(try\) 1) me/boolean
/GstPipeline0/GstDucatiJpegDec:ducatijpegdec0.GstPad:灌电流:cap ="image/jpeg、\\=(已解析\) true\、\格式\\(string \) I420\、\宽\=\(int\) 1920\、\高度= 1) 1080 (布尔值/帧速率1)
/GstPipeline0/GstDucatiJpegDec:ducatijpegdec0.GstPad:src:cap ="VIDEO/x-ray\、\ format\=(string\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1088\、\、\(try\) me-ref1 (try\) mes\(try\(try\) mes\(try\) mes\(try\) begray\(try\) m\
/GstPipeline0/GstVpe:vpe0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1080/\、\ framerate\=(frame\) 0/1"
/GstPipeline0/GstCapsFilter:capsfilter1.GstPad:SINK:SINK:CAPs ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1080/\、\ framerate\=(string\) 1/fraper\
/GstPipeline0/GstVpe:vpe0.GstPad:SINK:SINK:SINK:CAPS ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1088\、\、帧速率\=(frame\) 1 (trape\)、try\(tramp1) me-mref)、trbole1 m\
/GstPipeline0/GstVpe:vpe0.GstPad:src:cap ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1080/\、\ framerate\=(frame\) 0/1"
/GstPipeline0/GstCapsFilter:capsfilter1.GstPad:SINK:SINK:CAPs ="VIDEO/x-RAW\、\ format\=(string\) NV12\、\ width\=(int\) 1920\、\ height\=(int\) 1080/\、\ framerate\=(string\) 1/fraper\
VPE 内核调试消息
[5451.226486] VPE 489d0000.VPE:设置类型10的格式、WxH:1920x1088、fmt:842094158 BPL_y 1920
[5451.226497] VPE 489d0000.VPE:BPL_UV 1920
[5451.226512] VPE 489d0000.VPE:HS 配置:src_w = 1920、dst_w = 1920、抽取=无、LIN_ACC_inc = 01000000
[5451.226523] VPE 489d0000.VPE:vs config (Poly):src_h = 1088、dst_h = 1080、ROW_ACC_inc = 000101e5
[5451.226547] VPE 489d0000.VPE:设置类型9的格式、WxH:1920x1080、fmt:842094158 BPL_y 1920
[5451.226556] VPE 489d0000.VPE:BPL_UV 1920
[5451.226606] VPE 489d0000.VPE:获取大小为2088960的32个缓冲器
[5451.226615] VPE 489d0000.VPE:和1044480
[5451.227248] VPE 489d0000.VPE:获取大小为2073600的6个缓冲器
[5451.227259] VPE 489d0000.VPE:和1036800
在尝试处理 VPE 驱动器中的这些缓冲器时、接收器管道会立即分段故障。 根据 VPE 调整发送器管道以输出为1280*720的说明,可以解决此问题。 我猜这是因为 VPE 无法接受大于1080p 的图像、这符合 AM572x 技术参考手册(SPRUHZ64第10.3.4.1节、第2364页)中列出的规格。
这是接收器 GStreamer 管道的调试日志。
e2e.ti.com/.../5751.jul13_5F00_nv12_5F00_appsink1080.log
需要注意 的是、这是 PSDK 03.03版本中使用的提交:e797c1d832cc8ee1dd66d1683991cb6d7316ed63。
编辑1:
我一直在浏览 GS-PLUGP-Ducati repo、我认为创建1088p 映像的原因是与 IVA-HD 通信所需的缓冲器对齐。 1080不能被16或32分频、缓冲器大小以及 GStreamer 电容器由 ALIGN2宏协商。 1088可被16和32除、1920也是如此。
/*将 x 与2^n 的下一个最高倍数对齐*/ #define ALIGN2 (x、n)((((x)+((1 <<(n)- 1)))&~((1 <<(n)- 1))))