From dd32e2efbcf0d6141bcaf7eaca2bc3c777ba7117 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sun, 17 Apr 2022 23:55:55 +0900 Subject: [PATCH] d3d11decoder: Do not preallocate texture using downstream d3d11 buffer pool Our decoder implementation does not use downstream d3d11 pool for decoding because of special requirement of D3D11/DXVA. So preallocation using the downstream buffer pool will waste GPU memory in most cases. Part-of: --- subprojects/gst-plugins-bad/sys/d3d11/gstd3d11decoder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11decoder.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11decoder.cpp index 3e0aae1..53fe381 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11decoder.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11decoder.cpp @@ -1709,6 +1709,10 @@ gst_d3d11_decoder_decide_allocation (GstD3D11Decoder * decoder, } GST_DEBUG_OBJECT (videodec, "Downstream min buffres: %d", min); + + /* We will not use downstream pool for decoding, and therefore preallocation + * is unnecessary. So, Non-zero min buffer will be a waste of GPU memory */ + min = 0; } gst_buffer_pool_set_config (pool, config); -- 2.7.4