diff --git a/fluster/codec.py b/fluster/codec.py index 4c18e781..d606e0c4 100644 --- a/fluster/codec.py +++ b/fluster/codec.py @@ -30,6 +30,7 @@ class Codec(Enum): VP9 = "VP9" AAC = "AAC" AV1 = "AV1" + AC4 = "AC4" MPEG2_VIDEO = "MPEG2_VIDEO" MPEG4_VIDEO = "MPEG4_VIDEO" diff --git a/fluster/decoders/ac4_decoder_reference.py b/fluster/decoders/ac4_decoder_reference.py new file mode 100644 index 00000000..8e5d5bd7 --- /dev/null +++ b/fluster/decoders/ac4_decoder_reference.py @@ -0,0 +1,48 @@ +# Fluster - testing framework for decoders conformance +# Copyright (C) 2020, Fluendo, S.A. +# Author: Pablo Marcos Oltra , Fluendo, S.A. +# Author: Andoni Morales Alastruey , Fluendo, S.A. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License +# as published by the Free Software Foundation, either version 3 +# of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library. If not, see . + +from fluster.codec import Codec, OutputFormat +from fluster.decoder import Decoder, register_decoder +from fluster.utils import file_checksum, run_command + + +@register_decoder +class DolbyPADSDecoder(Decoder): + """AC-4 Dolby Pro Audio Decoder Software Development Kit reference decoder implementation""" + + name = "DolbyPADSReferenceDecoder" + description = "AC-4 Dolby Pro Audio Decoder Software Development Kit reference decoder implementation" + binary = "decoder_reference_app_linux_x86_64" + codec = Codec.AC4 + + def decode( + self, + input_filepath: str, + output_filepath: str, + output_format: OutputFormat, + timeout: int, + verbose: bool, + keep_files: bool, + ) -> str: + """Decodes input_filepath in output_filepath""" + run_command( + [self.binary, "-i", input_filepath, "-o", output_filepath], + timeout=timeout, + verbose=verbose, + ) + return file_checksum(output_filepath) diff --git a/fluster/decoders/gstreamer.py b/fluster/decoders/gstreamer.py index 2a1ea47e..5284c2e6 100644 --- a/fluster/decoders/gstreamer.py +++ b/fluster/decoders/gstreamer.py @@ -844,6 +844,19 @@ def __init__(self) -> None: super().__init__() +@register_decoder +class FluendoFluAC4DecGst10Decoder(GStreamer10Audio): + """Fluendo AC4 plugin decoder for GStreamer 1.0""" + + def __init__(self) -> None: + self.codec = Codec.AC4 + self.decoder_bin = "fluac4dec" + self.provider = "Fluendo" + self.api = "SW" + self.parser = "audio/x-ac4" + super().__init__() + + @register_decoder class FluendoFluLCEVCVAH264DecGst10Decoder(GStreamer10Video): """LCEVC-H264 decoder for GStreamer 1.0""" diff --git a/test_suites/ac4/elementary_streams.json b/test_suites/ac4/elementary_streams.json new file mode 100644 index 00000000..1f99dbe4 --- /dev/null +++ b/test_suites/ac4/elementary_streams.json @@ -0,0 +1,104 @@ +{ + "name": "AC4_ELEMENTARY_STREAMS", + "codec": "AC4", + "description": "The test signals are used in the test procedure to verify the correct operation of a content creation product that packetizes Dolby AC-4 bitstreams into online delivery formats.", + "test_vectors": [ + { + "name": "Audio_ID_2ch_64kbps_25fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Audio_ID_2ch_64kbps_25fps_ac4.ac4", + "output_format": "Unknown", + "result": "fafbaf85aba8a356ed5028a9bac0763a" + }, + { + "name": "Audio_ID_2ch_64kbps_2997fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Audio_ID_2ch_64kbps_2997fps_ac4.ac4", + "output_format": "Unknown", + "result": "dc8426318b18c294ccdb373cfdd0470e" + }, + { + "name": "Audio_ID_514ch_192kbps_25fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Audio_ID_514ch_192kbps_25fps_ac4.ac4", + "output_format": "Unknown", + "result": "86ac79ed8802a6d99c8c6dc13709ef67" + }, + { + "name": "Audio_ID_514ch_192kbps_2997fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Audio_ID_514ch_192kbps_2997fps_ac4.ac4", + "output_format": "Unknown", + "result": "495e8f8966c085e50f2c3e69829256bb" + }, + { + "name": "Audio_ID_6ch_128kbps_25fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Audio_ID_6ch_128kbps_25fps_ac4.ac4", + "output_format": "Unknown", + "result": "a014c4a87fb1ba3d6e4aa270df26003a" + }, + { + "name": "Audio_ID_6ch_128kbps_2997fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Audio_ID_6ch_128kbps_2997fps_ac4.ac4", + "output_format": "Unknown", + "result": "59d2d88797f4a5873121e901ebb61db7" + }, + { + "name": "Audio_ID_ims_112kbps_25fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Audio_ID_ims_112kbps_25fps_ac4.ac4", + "output_format": "Unknown", + "result": "3be6544de42243e72e5320efee7ad853" + }, + { + "name": "Audio_ID_ims_112kbps_2997fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Audio_ID_ims_112kbps_2997fps_ac4.ac4", + "output_format": "Unknown", + "result": "412894104735faa4d9271ffe55606bfc" + }, + { + "name": "Holi_en_6ch_128kbps_25fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Holi_en_6ch_128kbps_25fps_ac4.ac4", + "output_format": "Unknown", + "result": "69df080a341691b7e09f8d45efe57139" + }, + { + "name": "Holi_en_6ch_128kbps_2997fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Holi_en_6ch_128kbps_2997fps_ac4.ac4", + "output_format": "Unknown", + "result": "b645245723ce8c3b5fd12cfd9e04ac3f" + }, + { + "name": "Holi_fr_6ch_128kbps_25fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Holi_fr_6ch_128kbps_25fps_ac4.ac4", + "output_format": "Unknown", + "result": "638d1fb73e868247fb689b04c45a6dd1" + }, + { + "name": "Holi_fr_6ch_128kbps_2997fps_ac4.ac4", + "source": "https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/elementary_streams/Audio.zip", + "source_checksum": "03c1abb0778a546c2c31f631e62b8c89", + "input_file": "Audio/Holi_fr_6ch_128kbps_2997fps_ac4.ac4", + "output_format": "Unknown", + "result": "05636608b15c8986440f9e3348c88c27" + } + ], + "test_method": "md5" +}