[R35.1] Does nv3dsink support Y42B format from NVMM memory?

I see that nv3dsink pretends to support Y42B format from both system and NVMM memory:

gst-inspect-1.0 nv3dsink
...
Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw
                 format: { (string)RGBA, (string)BGRA, (string)ARGB, (string)ABGR, (string)RGBx, (string)BGRx, (string)xRGB, (string)xBGR, (string)AYUV, (string)Y444, (string)I420, (string)YV12, (string)NV12, (string)NV21, (string)Y42B, (string)Y41B, (string)RGB, (string)BGR, (string)RGB16 }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw(memory:NVMM)
                 format: { (string)RGBA, (string)BGRA, (string)ARGB, (string)ABGR, (string)RGBx, (string)BGRx, (string)xRGB, (string)xBGR, (string)AYUV, (string)Y444, (string)I420, (string)YV12, (string)NV12, (string)NV21, (string)Y42B, (string)Y41B, (string)RGB, (string)BGR, (string)RGB16 }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]

However, it works from system memory:

gst-launch-1.0 videotestsrc ! video/x-raw,format=Y42B ! nv3dsink

but doesn’t work from NVMM memory:

gst-launch-1.0 videotestsrc ! video/x-raw,format=Y42B ! nvvidconv ! 'video/x-raw(memory:NVMM),format=Y42B' ! nv3dsink 
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.001645571
Setting pipeline to NULL ...
Freeing pipeline ...

Though, nv3dsink works from NVMM memory using NV12 format:

gst-launch-1.0 videotestsrc ! video/x-raw,format=Y42B ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nv3dsink

So is Y42B from NVMM memory expected to work, or is it just a nv3dsink caps reporting error ?

Hi Honey Patouceul,
Thanks for reporting this. We are checking if NVMM Y42B is supported in nv3dsink

Hi Honey Patouceul,
This will be fixed in next Jetpack 5 release. As a quick solution, please modify gst_nv_video_context_egl_new() to have:

  gst_caps_append (caps,
      gst_nv_video_context_egl_new_template_caps (GST_VIDEO_FORMAT_NV12));
  gst_caps_append (caps,
      gst_nv_video_context_egl_new_template_caps (GST_VIDEO_FORMAT_NV21));
  gst_caps_append (caps,
      gst_nv_video_context_egl_new_template_caps (GST_VIDEO_FORMAT_I420));
  gst_caps_append (caps,
      gst_nv_video_context_egl_new_template_caps (GST_VIDEO_FORMAT_RGBA));

  /* add Y42B here and change n+4 to n+5*/
  gst_caps_append (caps,
      gst_nv_video_context_egl_new_template_caps (GST_VIDEO_FORMAT_Y42B));
  for (i = n; i < n+5; i++) {
    GstCapsFeatures *features = gst_caps_features_new ("memory:NVMM", NULL);
    gst_caps_set_features (caps, i, features);
  }

source/public/gst-plugins-nv-video-sinks/common/egl/context_egl.c

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.