vapostproc error flood when using intervideo*: vaGetImage: operation failed
Hey,
Using intervideo* in combination with v4l2src and vapostproc results in a strange flood of errors. The stream itself works flawlessly. I have narrowed it down to the vapostproc element before vah264enc, but I am not familiar enough with the va code base to debug this further.
Pipeline configuration causing issues: GST_DEBUG=1 gst-launch-1.0 v4l2src ! vapostproc ! intervideosink intervideosrc ! queue ! vapostproc ! vah264enc ! h264parse ! avdec_h264 ! fakevideosink
Output
```sh Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Got context from element 'vapostproc0': gst.va.display.handle=context, gst-display=(GstObject)"\(GstVaDisplayDrm\)\ vadisplaydrm3", description=(string)"Mesa\ Gallium\ driver\ 23.0.3\ for\ AMD\ Radeon\ Graphics\ \(renoir\,\ LLVM\ 15.0.7\,\ DRM\ 3.49\,\ 6.1.62\)", path=(string)/dev/dri/renderD128; Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Redistribute latency... Redistribute latency... Redistribute latency... Redistribute latency... 0:00:00.306153226 33269 0x7f72f4000e00 ERROR vadisplay vasurfaceimage.c:190:va_get_image: vaGetImage: operation failed 0:00:00.326211152 33269 0x7f72f4000e00 ERROR vadisplay vasurfaceimage.c:190:va_get_image: vaGetImage: operation failed 0:00:00.356445093 33269 0x7f72f4000e00 ERROR vadisplay vasurfaceimage.c:106:va_create_surfaces: vaCreateSurfaces: resource allocation failed 0:00:00.356603004 33269 0x7f72f4000e00 ERROR vadisplay vasurfaceimage.c:190:va_get_image: vaGetImage: operation failed 0:00:00.389916456 33269 0x7f72f4000e00 ERROR vadisplay vasurfaceimage.c:106:va_create_surfaces: vaCreateSurfaces: resource allocation failed ... ```The following pipeline does not cause floods: GST_DEBUG=1 gst-launch-1.0 v4l2src ! vapostproc ! queue ! vah264enc ! h264parse ! avdec_h264 ! queue ! fakevideosink
System:
- OS: NixOS 23.05
- Kernel: 6.1.62
- CPU: AMD Ryzen 7 5700G with Radeon Graphics (16) @ 3.800GHz
- GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series
V4L2 Device
```sh Driver Info: Driver name : uvcvideo Card type : Cam Link 4K: Cam Link 4K Bus info : usb-0000:05:00.4-1 Driver version : 6.1.62 Capabilities : 0x84a00001 Video Capture Metadata Capture Streaming Extended Pix Format Device Capabilities Device Caps : 0x04200001 Video Capture Streaming Extended Pix Format Media Driver Info: Driver name : uvcvideo Model : Cam Link 4K: Cam Link 4K Serial : 00045D6F85000 Bus info : usb-0000:05:00.4-1 Media version : 6.1.62 Hardware revision: 0x00000000 (0) Driver version : 6.1.62 Interface Info: ID : 0x03000002 Type : V4L Video Entity Info: ID : 0x00000001 (1) Name : Cam Link 4K: Cam Link 4K Function : V4L2 I/O Flags : default Pad 0x01000007 : 0: Sink Link 0x0200000d: from remote pad 0x100000a of entity 'Processing 2' (Video Pixel Formatter): Data, Enabled, Immutable Priority: 2 Video input : 0 (Input 1: ok) Format Video Capture: Width/Height : 1920/1080 Pixel Format : 'NV12' (Y/UV 4:2:0) Field : None Bytes per Line : 1920 Size Image : 3110400 Colorspace : sRGB Transfer Function : Rec. 709 YCbCr/HSV Encoding: Rec. 709 Quantization : Default (maps to Limited Range) Flags : Crop Capability Video Capture: Bounds : Left 0, Top 0, Width 1920, Height 1080 Default : Left 0, Top 0, Width 1920, Height 1080 Pixel Aspect: 1/1 Selection Video Capture: crop_default, Left 0, Top 0, Width 1920, Height 1080, Flags: Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1920, Height 1080, Flags: Streaming Parameters Video Capture: Capabilities : timeperframe Frames per second: 50.000 (50/1) Read buffers : 0User Controls
brightness 0x00980900 (int) : min=-128 max=127 step=1 default=0 value=0
contrast 0x00980901 (int) : min=0 max=255 step=1 default=128 value=128
saturation 0x00980902 (int) : min=0 max=255 step=1 default=128 value=128
hue 0x00980903 (int) : min=-128 max=127 step=1 default=0 value=0
</details>
All pipeline dot graphs: [dot-files.zip](/uploads/338050f24d200de6c20c701a8da3f5e2/dot-files.zip)