v4l2videodec : enable resolution change 28/272928/1
authorMing Qian <ming.qian@nxp.com>
Tue, 19 Oct 2021 08:10:06 +0000 (16:10 +0800)
committerJeongmo Yang <jm80.yang@samsung.com>
Mon, 28 Mar 2022 05:46:14 +0000 (14:46 +0900)
commit99a8209bc96e4d09939fe6559d30c24e13f26a6c
treeb755096caf2637d1cbaace885c2e8da2c29e1e93
parentf25d008d24e6837264ab1795f4e5ad28340ddf9c
v4l2videodec : enable resolution change

The dynamic resolution changes when
the sequence starts when the decoder detects a coded frame with one or
more of the following parameters different from those previously
established (and reflected by corresponding queries):
1.coded resolution (OUTPUT width and height),
2.visible resolution (selection rectangles),
3.the minimum number of buffers needed for decoding,
4.bit-depth of the bitstream has been changed.

Although gstreamer parser has parsed the stream resolution.
but there are some case that we need to handle resolution change event.
1. bit-depth is different from the negotiated format.
2. the capture buffer count can meet the demand
3. there are some hardware limitations that the decoded resolution may
be larger than the display size. For example, the stream size is
1920x1080, but some vpu may decode it to 1920x1088.

Change-Id: I99c7e973c197490b462b5d3100b413007fc19c39
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1381>
subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c
subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.h