Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GStreamer based VVdeC decoder #137

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ application that runs a number of test suites with the supported decoders. Its
purpose is to check different decoder implementations against known test suites
with known and proven results. It was originally designed to check the
conformance of H.265/HEVC decoders, but it also supports H.264/AVC, H.266/VVC,
VP8, VP9, AV1 and AAC. It can easily be extended to add more decoders and test
VP8, VP9, AV1 and AAC. It can easily be extended to add more decoders and test
suites.

## Table of Contents
Expand Down Expand Up @@ -248,6 +248,7 @@ AAC
ISO-MPEG4-AAC: ISO MPEG4 AAC reference decoder... ✔️

H266
GStreamer-H.266-VVdeC-Gst1.0: GStreamer H.266 VVdeC decoder for GStreamer 1.0... ✔
VVdeC-H266: VVdeC H.266/VVC reference decoder... ✔️

```
Expand Down Expand Up @@ -294,6 +295,7 @@ H266
- Fluendo's proprietary decoders for H.264/AVC and H.265/HEVC that are included
in [Fluendo Codec
Pack](https://fluendo.com/en/products/enterprise/fluendo-codec-pack/).
- [GStreamer's](https://gstreamer.freedesktop.org/) for H.266/VVC.
- [GStreamer's](https://gstreamer.freedesktop.org/) for H.265/HEVC.
- [GStreamer's](https://gstreamer.freedesktop.org/) for H.264/AVC.
- [FFmpeg's](https://FFmpeg.org) for H.265/HEVC.
Expand Down Expand Up @@ -512,7 +514,7 @@ results are obtained, we can do the following procedure:
gstreamer1.0-tools gstreamer1.0-libav gstreamer1.0-plugins-bad ffmpeg
vpx-tools aom-tools
```

5. Create a new PR with your changes.
6. Make sure the GitHub Actions is running and its result is a pass.

Expand Down
15 changes: 14 additions & 1 deletion fluster/decoders/gstreamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def gst_element_exists(element: str) -> bool:
def output_format_to_gst(output_format: OutputFormat) -> str:
"""Return GStreamer pixel format"""
mapping = {
OutputFormat.GRAY: "GRAY8",
OutputFormat.GRAY16LE: "GRAY16_LE",
OutputFormat.YUV420P: "I420",
OutputFormat.YUV422P: "Y42B",
OutputFormat.YUV420P10LE: "I420_10LE",
Expand All @@ -56,7 +58,8 @@ def output_format_to_gst(output_format: OutputFormat) -> str:
OutputFormat.YUV444P12LE: "Y444_12LE",
}
if output_format not in mapping:
raise Exception(f"No matching output format found in GStreamer for {output_format}")
raise Exception(
f"No matching output format found in GStreamer for {output_format}")
return mapping[output_format]


Expand Down Expand Up @@ -597,6 +600,15 @@ class GStreamerNvdecSLVP9Gst10Decoder(GStreamer10Video):
hw_acceleration = True


@register_decoder
class GStreamerVVdeCH266Decoder(GStreamer10Video):
'''GStreamer H.266/VVC VVdeC decoder implementation for GStreamer 1.0'''
codec = Codec.H266
decoder_bin = ' h266parse ! vvdec '
api = 'VVdeC'
hw_acceleration = False


@register_decoder
class FluendoH265Gst10Decoder(GStreamer10Video):
'''Fluendo H.265 software decoder implementation for GStreamer 1.0'''
Expand Down Expand Up @@ -747,6 +759,7 @@ class FluendoFluVAH264DecGst10Decoder(GStreamer10Video):
@register_decoder
class FluendoFluAACDecGst10Decoder(GStreamer10Audio):
'''Fluendo AAC plugin decoder for GStreamer 1.0'''

def __init__(self) -> None:
self.codec = Codec.AAC
self.decoder_bin = 'fluaacdec trim=0'
Expand Down
Loading
Loading