mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
d3d11vp9dec: Drop frames on non-keyframe format change
... in case of NVIDIA GPU Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1407>
This commit is contained in:
parent
2c834b5fc7
commit
e87791592e
1 changed files with 12 additions and 0 deletions
|
@ -67,6 +67,7 @@
|
|||
#endif
|
||||
|
||||
#include "gstd3d11vp9dec.h"
|
||||
#include "gstd3d11pluginutils.h"
|
||||
|
||||
#include <gst/codecs/gstvp9decoder.h>
|
||||
#include <string.h>
|
||||
|
@ -252,6 +253,7 @@ gst_d3d11_vp9_dec_set_context (GstElement * element, GstContext * context)
|
|||
static gboolean
|
||||
gst_d3d11_vp9_dec_open (GstVideoDecoder * decoder)
|
||||
{
|
||||
GstVp9Decoder *vp9dec = GST_VP9_DECODER (decoder);
|
||||
GstD3D11Vp9Dec *self = GST_D3D11_VP9_DEC (decoder);
|
||||
GstD3D11Vp9DecInner *inner = self->inner;
|
||||
GstD3D11Vp9DecClass *klass = GST_D3D11_VP9_DEC_GET_CLASS (self);
|
||||
|
@ -263,6 +265,16 @@ gst_d3d11_vp9_dec_open (GstVideoDecoder * decoder)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* XXX: ConfigDecoderSpecific bit 12 indicates whether accelerator can
|
||||
* support non-keyframe format change or not, but it doesn't seem to be
|
||||
* reliable, since 1b means that it's supported and 0b indicates it may not be
|
||||
* supported. Because some GPUs can support it even if the bit 12 is not
|
||||
* set, do filtering by vendor for now (AMD and Intel looks fine) */
|
||||
if (gst_d3d11_get_device_vendor (inner->device) ==
|
||||
GST_D3D11_DEVICE_VENDOR_NVIDIA) {
|
||||
gst_vp9_decoder_set_non_keyframe_format_change_support (vp9dec, FALSE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue