Commit graph

16 commits

Author SHA1 Message Date
Seungha Yang
6eb9856f59 codecs: vp9decoder: Pass GstVideoCodecFrame to duplicate_picture()
... and fix picture duplication logic for vavp9dec

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2112>
2021-04-07 19:32:29 +00:00
Seungha Yang
1f769839c0 codecs: vp9decoder: Port to GstVp9StatefulParser
Use newly implemented VP9 parser. Since new GstVp9FrameHeader
struct holds all the information of the stream, baseclass will not
pass parser object to new_sequence() method anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2112>
2021-04-07 19:32:29 +00:00
Seungha Yang
771326a0fb codecs: vp9decoder: Don't check codec change with show_existing_frame
Show existing frame will zero frame_type value but it doesn't mean
it's keyframe.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2112>
2021-04-07 19:32:29 +00:00
Seungha Yang
76e5e479be codecs: vp9decoder: Fix to output frame when show_existing_frame flag is set
When show_existing_frame flag is set, show_frame flag is zero
but we should output previously decoded frame as specified in frame header.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2114>
2021-03-26 14:50:18 +00:00
Víctor Manuel Jáquez Leal
113867766e codecs: vp9decoder: Add segmentation to picture.
VA-API needs AC and DC quant scales for both luma and chroma, and the loop
filter level for current frame, but these values are not available outside
the private GstVp9Parser structure. And these values may change from frame
to frame, so they are picture specific.

This patch add GstVp9Segmentation structure array to GstVp9Picture to expose
it to derived classes. This approach is safer than passing the parser at
picture handling flow.

Also, this patch, in order to solve Documentation CI, mark as private the
GstVp9Picture structure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1700>
2020-10-16 17:50:42 +00:00
Víctor Manuel Jáquez Leal
5e3c7f2092 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>
2020-10-16 17:50:42 +00:00
Seungha Yang
a31a6608fe codecs: vp9decoder: handle the show_frame check in base class
Same as vp8 decoder update https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1670

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1697>
2020-10-15 18:36:54 +00:00
Seungha Yang
7f10f8a93e codecs: vp9decoder: Relying on upstream vp9parse for super frame handling
By this way, we can simplify the decoding flow. Moreover, we don't
need to worry about the case where multiple visible-frames are
composed in one super-frame, since upstream vp9parse will split
them per frame unit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1567>
2020-09-15 15:54:53 +00:00
Seungha Yang
95db5e7182 codecs: vp9decoder: Remove unused pts variable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1567>
2020-09-15 15:54:53 +00:00
Seungha Yang
e754d5a5b2 codecs: vp9decoder: Sync up with h264decoder implementation
* Pass GstVideoCodecFrame to new_picture() and output_picture()
* Pass the last reference of GstVp9Picture to subclass if possible

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1455>
2020-07-23 15:41:39 +00:00
Seungha Yang
5a29917a63 codecs: Add minimal state validation
... to prevent requesting decoding before the preparation.
For instance, baseclass should not request decoding a picture if there
is no parsed valid headers, since subclass is most likely
not ready to decoding it.
2020-04-09 19:33:56 +00:00
Thibault Saunier
b9e0ccd8b7 codecs: Add basic documentation stubs 2020-04-08 08:47:46 -04:00
Seungha Yang
f487648b03 vp9decoder: Update document
s/GstH264Picture/GstVp9Picture/g and minor update since this baseclass
is no more d3d11 specific one.
2020-03-05 15:27:42 +00:00
Seungha Yang
82f1d5e8be codecs: Change output_picture() to mandatory implementation
GstVideoCodecFrame is expected to be consumed by subclass
per output_picture(). So the implementation cannot be optional.
2020-03-05 15:27:42 +00:00
Nicolas Dufresne
56c3b40c30 h264picture: Add system_frame_num
This allow cross-referencing GstH264Picture and GstVideoCodecFrame.
2020-03-05 03:06:16 +00:00
Nicolas Dufresne
00d04784d3 Move CODEC base classes into it's own library
This introduce a library which contains a set of base classes which
handles the parsing and the state tracking for the purpose of decoding
different CODECs. Currently H264, H265 and VP9 are supported. These
bases classes are used to decode with low level decoding API like DXVA,
NVDEC, VDPAU, VAAPI and V4L2 State Less decoders. The new library is
named gstreamer-codecs-1.0 / libgstcodecs.
2020-03-05 03:06:16 +00:00
Renamed from sys/d3d11/gstvp9decoder.c (Browse further)