mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
h265decoder: Pass max_dpb_size to new_sequence vfunc
same as we are doing in h264decoder
This commit is contained in:
parent
b70a192220
commit
5609d8751c
3 changed files with 7 additions and 8 deletions
|
@ -239,7 +239,7 @@ gst_h265_decoder_process_sps (GstH265Decoder * self, GstH265SPS * sps)
|
|||
|
||||
g_assert (klass->new_sequence);
|
||||
|
||||
if (!klass->new_sequence (self, sps)) {
|
||||
if (!klass->new_sequence (self, sps, max_dpb_size)) {
|
||||
GST_ERROR_OBJECT (self, "subclass does not want accept new sequence");
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,8 @@ struct _GstH265DecoderClass
|
|||
GstVideoDecoderClass parent_class;
|
||||
|
||||
gboolean (*new_sequence) (GstH265Decoder * decoder,
|
||||
const GstH265SPS * sps);
|
||||
const GstH265SPS * sps,
|
||||
gint max_dpb_size);
|
||||
|
||||
gboolean (*new_picture) (GstH265Decoder * decoder,
|
||||
GstH265Picture * picture);
|
||||
|
|
|
@ -53,9 +53,6 @@ DEFINE_GUID (GST_GUID_D3D11_DECODER_PROFILE_HEVC_VLD_MAIN,
|
|||
DEFINE_GUID (GST_GUID_D3D11_DECODER_PROFILE_HEVC_VLD_MAIN10,
|
||||
0x107af0e0, 0xef1a, 0x4d19, 0xab, 0xa8, 0x67, 0xa1, 0x63, 0x07, 0x3d, 0x13);
|
||||
|
||||
/* worst case 16 + 4 margin */
|
||||
#define NUM_OUTPUT_VIEW 20
|
||||
|
||||
typedef struct _GstD3D11H265Dec
|
||||
{
|
||||
GstH265Decoder parent;
|
||||
|
@ -123,7 +120,7 @@ static gboolean gst_d3d11_h265_dec_src_query (GstVideoDecoder * decoder,
|
|||
|
||||
/* GstH265Decoder */
|
||||
static gboolean gst_d3d11_h265_dec_new_sequence (GstH265Decoder * decoder,
|
||||
const GstH265SPS * sps);
|
||||
const GstH265SPS * sps, gint max_dpb_size);
|
||||
static gboolean gst_d3d11_h265_dec_new_picture (GstH265Decoder * decoder,
|
||||
GstH265Picture * picture);
|
||||
static GstFlowReturn gst_d3d11_h265_dec_output_picture (GstH265Decoder *
|
||||
|
@ -445,7 +442,7 @@ gst_d3d11_h265_dec_src_query (GstVideoDecoder * decoder, GstQuery * query)
|
|||
|
||||
static gboolean
|
||||
gst_d3d11_h265_dec_new_sequence (GstH265Decoder * decoder,
|
||||
const GstH265SPS * sps)
|
||||
const GstH265SPS * sps, gint max_dpb_size)
|
||||
{
|
||||
GstD3D11H265Dec *self = GST_D3D11_H265_DEC (decoder);
|
||||
gint crop_width, crop_height;
|
||||
|
@ -520,7 +517,8 @@ gst_d3d11_h265_dec_new_sequence (GstH265Decoder * decoder,
|
|||
gst_d3d11_decoder_reset (self->d3d11_decoder);
|
||||
if (!gst_d3d11_decoder_open (self->d3d11_decoder, GST_D3D11_CODEC_H265,
|
||||
&info, self->coded_width, self->coded_height,
|
||||
NUM_OUTPUT_VIEW, &profile_guid, 1)) {
|
||||
/* Additional 4 views margin for zero-copy rendering */
|
||||
max_dpb_size + 4, &profile_guid, 1)) {
|
||||
GST_ERROR_OBJECT (self, "Failed to create decoder");
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue