mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
codecs: vp9decoder: Pass parser as new_sequence() parameter.
In order to know the chroma format, besides profile, subsampling_x and subsampling_y are needed (Spec 7.2.2 Color config semantics). These values are in GstVp9Parser but not in GstVp9Framehdr. Also, bit_depth is available in parser but not frame header. Evenmore, those values are copied to picture structure later. In case of VA-API, to configure the pipeline, it is require to know the chroma format and depth. It is possible to know chroma and depth through caps coming from vp9parser, but it requires string parsing. It would be less error prone to get these values through the parser structure at new_sequence() virtual method. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1700>
This commit is contained in:
parent
dcb3044478
commit
5e3c7f2092
3 changed files with 4 additions and 3 deletions
|
@ -187,7 +187,7 @@ gst_vp9_decoder_check_codec_change (GstVp9Decoder * self,
|
||||||
|
|
||||||
priv->had_sequence = TRUE;
|
priv->had_sequence = TRUE;
|
||||||
if (klass->new_sequence)
|
if (klass->new_sequence)
|
||||||
priv->had_sequence = klass->new_sequence (self, frame_hdr);
|
priv->had_sequence = klass->new_sequence (self, priv->parser, frame_hdr);
|
||||||
|
|
||||||
ret = priv->had_sequence;
|
ret = priv->had_sequence;
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,7 @@ struct _GstVp9DecoderClass
|
||||||
GstVideoDecoderClass parent_class;
|
GstVideoDecoderClass parent_class;
|
||||||
|
|
||||||
gboolean (*new_sequence) (GstVp9Decoder * decoder,
|
gboolean (*new_sequence) (GstVp9Decoder * decoder,
|
||||||
|
const GstVp9Parser * parser,
|
||||||
const GstVp9FrameHdr * frame_hdr);
|
const GstVp9FrameHdr * frame_hdr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -133,7 +133,7 @@ static gboolean gst_d3d11_vp9_dec_src_query (GstVideoDecoder * decoder,
|
||||||
|
|
||||||
/* GstVp9Decoder */
|
/* GstVp9Decoder */
|
||||||
static gboolean gst_d3d11_vp9_dec_new_sequence (GstVp9Decoder * decoder,
|
static gboolean gst_d3d11_vp9_dec_new_sequence (GstVp9Decoder * decoder,
|
||||||
const GstVp9FrameHdr * frame_hdr);
|
const GstVp9Parser * parser, const GstVp9FrameHdr * frame_hdr);
|
||||||
static gboolean gst_d3d11_vp9_dec_new_picture (GstVp9Decoder * decoder,
|
static gboolean gst_d3d11_vp9_dec_new_picture (GstVp9Decoder * decoder,
|
||||||
GstVideoCodecFrame * frame, GstVp9Picture * picture);
|
GstVideoCodecFrame * frame, GstVp9Picture * picture);
|
||||||
static GstVp9Picture *gst_d3d11_vp9_dec_duplicate_picture (GstVp9Decoder *
|
static GstVp9Picture *gst_d3d11_vp9_dec_duplicate_picture (GstVp9Decoder *
|
||||||
|
@ -342,7 +342,7 @@ gst_d3d11_vp9_dec_src_query (GstVideoDecoder * decoder, GstQuery * query)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_d3d11_vp9_dec_new_sequence (GstVp9Decoder * decoder,
|
gst_d3d11_vp9_dec_new_sequence (GstVp9Decoder * decoder,
|
||||||
const GstVp9FrameHdr * frame_hdr)
|
const GstVp9Parser * parser, const GstVp9FrameHdr * frame_hdr)
|
||||||
{
|
{
|
||||||
GstD3D11Vp9Dec *self = GST_D3D11_VP9_DEC (decoder);
|
GstD3D11Vp9Dec *self = GST_D3D11_VP9_DEC (decoder);
|
||||||
gboolean modified = FALSE;
|
gboolean modified = FALSE;
|
||||||
|
|
Loading…
Reference in a new issue