On Mon Aug 4 22:55:17 2025 +0000, Elizabeth Figura wrote:
Is that actually the case? GStreamer has a default alignment for any
given format, but we can and do change that. That's the point of all that complicated alignment logic we have. Is some component rejecting alignment _below_ the default?
See my comment higher up. Alignment in gstreamer is hard-coded to 4
for NV12, and when d3d-awareness is enabled, we allocate the sample buffer, which ends up being too small for gstreamer to use. Where is it hard-coded? gst_video_info_align_full() does specify 4-byte alignment, but as far as I can tell, if you manually fill any part of the GstVideoInfo structure, that'll be respected. I couldn't easily find any code that depends on 4-byte alignment. Of course it could exist, if it's the default, but it's not clear to me that's what you're saying, or you'd presumably be pointing to something more concrete.
The `fill_planes()` helper in `gst-plugins-base/gst-libs/gst/video/video-info.c` called from `gst_video_info_align_full()` sets the minimum alignment. Apparently, setting an alignment manually in `GstVideoInfo` can only increase it. If I set `plane_align = 1` in `wg_transform_read_data()`, gstreamer still can't fit the output in the buffer.