mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
lib: decoder: vp9: Set chroma_type by VP9 bit_depth
The decoder's surface chroma type should depend on the bit depth of VP9's parser. For 10bits VP9 stream, we need to use P10LE kind 10 bits surface as the decoder result. Fixes #155
This commit is contained in:
parent
838045b9e2
commit
9c1f3ad172
1 changed files with 10 additions and 1 deletions
|
@ -220,7 +220,16 @@ ensure_context (GstVaapiDecoderVp9 * decoder)
|
|||
|
||||
info.profile = priv->profile;
|
||||
info.entrypoint = entrypoint;
|
||||
info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
|
||||
if (priv->parser->bit_depth == GST_VP9_BIT_DEPTH_8) {
|
||||
info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
|
||||
} else if (priv->parser->bit_depth == GST_VP9_BIT_DEPTH_10) {
|
||||
info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420_10BPP;
|
||||
} else {
|
||||
GST_WARNING ("VP9 with depth %d, bigger than 10BPP not supported now",
|
||||
priv->parser->bit_depth);
|
||||
return GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_CHROMA_FORMAT;
|
||||
}
|
||||
|
||||
info.width = priv->width;
|
||||
info.height = priv->height;
|
||||
info.ref_frames = 8;
|
||||
|
|
Loading…
Reference in a new issue