From 0a2a41c81b67b9b12a11a949e4ef455c3aef6367 Mon Sep 17 00:00:00 2001 From: Ruben Gonzalez Date: Fri, 22 Nov 2024 13:23:37 +0100 Subject: [PATCH 1/2] Update list of decoders --- README.md | 202 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 119 insertions(+), 83 deletions(-) diff --git a/README.md b/README.md index d559c804..e6d22234 100644 --- a/README.md +++ b/README.md @@ -155,101 +155,137 @@ CHROMIUM-10bit-AV1-TEST-VECTORS List of available decoders: H264 - Chromium-H.264: Chromium H.264 decoder for Chromium... ❌ - FFmpeg-H.264: FFmpeg H.264 SW decoder... ✔️ - FFmpeg-H.264-D3D11VA: FFmpeg H.264 D3D11VA decoder... ❌ - FFmpeg-H.264-DXVA2: FFmpeg H.264 DXVA2 decoder... ❌ - FFmpeg-H.264-VAAPI: FFmpeg H.264 VAAPI decoder... ✔️ - FFmpeg-H.264-VDPAU: FFmpeg H.264 VDPAU decoder... ✔️ - FFmpeg-H.264-h264_v4l2m2m: FFmpeg H.264 h264_v4l2m2m decoder... ✔️ - Fluendo-H.264-HW-Gst1.0: Fluendo H.264 HW decoder for GStreamer 1.0... ❌ - Fluendo-H.264-HW-hwvah264dec-Gst1.0: Fluendo H.264 HW decoder for GStreamer 1.0... ❌ - Fluendo-H.264-SW-Gst1.0: Fluendo H.264 SW decoder for GStreamer 1.0... ❌ - GStreamer-H.264-D3D11-Gst1.0: GStreamer H.264 D3D11 decoder for GStreamer 1.0... ❌ - GStreamer-H.264-Libav-Gst1.0: GStreamer H.264 Libav decoder for GStreamer 1.0... ✔️ - GStreamer-H.264-MSDK-Gst1.0: GStreamer H.264 MSDK decoder for GStreamer 1.0... ❌ - GStreamer-H.264-NVDEC-Gst1.0: GStreamer H.264 NVDEC decoder for GStreamer 1.0... ❌ - GStreamer-H.264-NVDECSL-Gst1.0: GStreamer H.264 NVDECSL decoder for GStreamer 1.0... ❌ - GStreamer-H.264-V4L2-Gst1.0: GStreamer H.264 V4L2 decoder for GStreamer 1.0... ❌ - GStreamer-H.264-V4L2SL-Gst1.0: GStreamer H.264 V4L2SL decoder for GStreamer 1.0... ❌ - GStreamer-H.264-VA-Gst1.0: GStreamer H.264 VA decoder for GStreamer 1.0... ❌ - GStreamer-H.264-VAAPI-Gst1.0: GStreamer H.264 VAAPI decoder for GStreamer 1.0... ❌ - JCT-VT-H.264: JCT-VT H.264/AVC reference decoder... ✔️ + Chromium-H.264: Chromium H.264 decoder for Chromium + FFmpeg-H.264: FFmpeg H.264 SW decoder + FFmpeg-H.264-CUDA: FFmpeg H.264 CUDA decoder + FFmpeg-H.264-D3D11VA: FFmpeg H.264 D3D11VA decoder + FFmpeg-H.264-DXVA2: FFmpeg H.264 DXVA2 decoder + FFmpeg-H.264-VAAPI: FFmpeg H.264 VAAPI decoder + FFmpeg-H.264-VDPAU: FFmpeg H.264 VDPAU decoder + FFmpeg-H.264-Vulkan: FFmpeg H.264 Vulkan decoder + FFmpeg-H.264-v4l2m2m: FFmpeg H.264 v4l2m2m decoder + Fluendo-H.264-DXVA2-Gst1.0: Fluendo H.264 DXVA2 decoder for GStreamer 1.0 + Fluendo-H.264-HW-Gst1.0: Fluendo H.264 HW decoder for GStreamer 1.0 + Fluendo-H.264-HW-hwvah264dec-Gst1.0: Fluendo H.264 HW decoder for GStreamer 1.0 + Fluendo-H.264-HW-lcevchwvah264dec-Gst1.0: Fluendo H.264 HW decoder for GStreamer 1.0 + Fluendo-H.264-SW-Gst1.0: Fluendo H.264 SW decoder for GStreamer 1.0 + Fluendo-H.264-VAAPI-Gst1.0: Fluendo H.264 VAAPI decoder for GStreamer 1.0 + Fluendo-H.264-VDA-Gst1.0: Fluendo H.264 VDA decoder for GStreamer 1.0 + Fluendo-H.264-VDPAU-Gst1.0: Fluendo H.264 VDPAU decoder for GStreamer 1.0 + Fluendo-H.264-VT-Gst1.0: Fluendo H.264 VT decoder for GStreamer 1.0 + GStreamer-H.264-D3D11-Gst1.0: GStreamer H.264 D3D11 decoder for GStreamer 1.0 + GStreamer-H.264-D3D12-Gst1.0: GStreamer H.264 D3D12 decoder for GStreamer 1.0 + GStreamer-H.264-Libav-Gst1.0: GStreamer H.264 Libav decoder for GStreamer 1.0 + GStreamer-H.264-MSDK-Gst1.0: GStreamer H.264 MSDK decoder for GStreamer 1.0 + GStreamer-H.264-NVDEC-Gst1.0: GStreamer H.264 NVDEC decoder for GStreamer 1.0 + GStreamer-H.264-NVDECSL-Gst1.0: GStreamer H.264 NVDECSL decoder for GStreamer 1.0 + GStreamer-H.264-V4L2-Gst1.0: GStreamer H.264 V4L2 decoder for GStreamer 1.0 + GStreamer-H.264-V4L2SL-Gst1.0: GStreamer H.264 V4L2SL decoder for GStreamer 1.0 + GStreamer-H.264-VA-Gst1.0: GStreamer H.264 VA decoder for GStreamer 1.0 + GStreamer-H.264-VAAPI-Gst1.0: GStreamer H.264 VAAPI decoder for GStreamer 1.0 + GStreamer-H.264-Vulkan-Gst1.0: GStreamer H.264 Vulkan decoder for GStreamer 1.0 + JCT-VT-H.264: JCT-VT H.264/AVC reference decoder + VKVS-H.264: Vulkan Video Samples H.264 decoder + ccdec-H.264: H.264 cros-codecs decoder DUMMY - Dummy: This is a dummy implementation for the dummy codec... ✔️ + Dummy: This is a dummy implementation for the dummy codec AV1 - FFmpeg-AV1-VAAPI: FFmpeg AV1 VAAPI decoder... ✔️ - GStreamer-AV1-D3D11-Gst1.0: GStreamer AV1 D3D11 decoder for GStreamer 1.0... ❌ - GStreamer-AV1-V4L2SL-Gst1.0: GStreamer AV1 V4L2SL decoder for GStreamer 1.0... ❌ - GStreamer-AV1-VA-Gst1.0: GStreamer AV1 VA decoder for GStreamer 1.0... ❌ - GStreamer-AV1-VAAPI-Gst1.0: GStreamer AV1 VAAPI decoder for GStreamer 1.0... ❌ - libaom-AV1: libaom AV1 reference decoder... ✔️ + FFmpeg-AV1-CUDA: FFmpeg AV1 CUDA decoder + FFmpeg-AV1-VAAPI: FFmpeg AV1 VAAPI decoder + FFmpeg-AV1-VDPAU: FFmpeg AV1 VDPAU decoder + FFmpeg-AV1-Vulkan: FFmpeg AV1 Vulkan decoder + GStreamer-AV1-D3D11-Gst1.0: GStreamer AV1 D3D11 decoder for GStreamer 1.0 + GStreamer-AV1-D3D12-Gst1.0: GStreamer AV1 D3D12 decoder for GStreamer 1.0 + GStreamer-AV1-V4L2SL-Gst1.0: GStreamer AV1 V4L2SL decoder for GStreamer 1.0 + GStreamer-AV1-VA-Gst1.0: GStreamer AV1 VA decoder for GStreamer 1.0 + GStreamer-AV1-VAAPI-Gst1.0: GStreamer AV1 VAAPI decoder for GStreamer 1.0 + GStreamer-AV1-dav1d-Gst1.0: GStreamer AV1 dav1d decoder for GStreamer 1.0 + VKVS-AV1: Vulkan Video Samples AV1 decoder + ccdec-AV1: AV1 cros-codecs decoder + dav1d-AV1: dav1d AV1 decoder + libaom-AV1: libaom AV1 reference decoder H265 - FFmpeg-H.265: FFmpeg H.265 SW decoder... ✔️ - FFmpeg-H.265-D3D11VA: FFmpeg H.265 D3D11VA decoder... ❌ - FFmpeg-H.265-DXVA2: FFmpeg H.265 DXVA2 decoder... ❌ - FFmpeg-H.265-VAAPI: FFmpeg H.265 VAAPI decoder... ✔️ - FFmpeg-H.265-VDPAU: FFmpeg H.265 VDPAU decoder... ✔️ - Fluendo-H.265-HW-hwvah265dec-Gst1.0: Fluendo H.265 HW decoder for GStreamer 1.0... ❌ - Fluendo-H.265-SW-Gst1.0: Fluendo H.265 SW decoder for GStreamer 1.0... ❌ - Fluendo-H.265-byte-stream-au-HW-Gst1.0: Fluendo H.265-byte-stream-au HW decoder for GStreamer 1.0... ❌ - Fluendo-H.265-byte-stream-nal-HW-Gst1.0: Fluendo H.265-byte-stream-nal HW decoder for GStreamer 1.0... ❌ - Fluendo-H.265-hev1-au-HW-Gst1.0: Fluendo H.265-hev1-au HW decoder for GStreamer 1.0... ❌ - Fluendo-H.265-hev1-nal-HW-Gst1.0: Fluendo H.265-hev1-nal HW decoder for GStreamer 1.0... ❌ - Fluendo-H.265-hvc1-au-HW-Gst1.0: Fluendo H.265-hvc1-au HW decoder for GStreamer 1.0... ❌ - Fluendo-H.265-hvc1-nal-HW-Gst1.0: Fluendo H.265-hvc1-nal HW decoder for GStreamer 1.0... ❌ - GStreamer-H.265-D3D11-Gst1.0: GStreamer H.265 D3D11 decoder for GStreamer 1.0... ❌ - GStreamer-H.265-Libav-Gst1.0: GStreamer H.265 Libav decoder for GStreamer 1.0... ✔️ - GStreamer-H.265-MSDK-Gst1.0: GStreamer H.265 MSDK decoder for GStreamer 1.0... ❌ - GStreamer-H.265-NVDEC-Gst1.0: GStreamer H.265 NVDEC decoder for GStreamer 1.0... ❌ - GStreamer-H.265-NVDECSL-Gst1.0: GStreamer H.265 NVDECSL decoder for GStreamer 1.0... ❌ - GStreamer-H.265-V4L2-Gst1.0: GStreamer H.265 V4L2 decoder for GStreamer 1.0... ❌ - GStreamer-H.265-V4L2SL-Gst1.0: GStreamer H.265 V4L2SL decoder for GStreamer 1.0... ❌ - GStreamer-H.265-VA-Gst1.0: GStreamer H.265 VA decoder for GStreamer 1.0... ❌ - GStreamer-H.265-VAAPI-Gst1.0: GStreamer H.265 VAAPI decoder for GStreamer 1.0... ❌ - JCT-VT-H.265: JCT-VT H.265/HEVC reference decoder... ✔️ + FFmpeg-H.265: FFmpeg H.265 SW decoder + FFmpeg-H.265-CUDA: FFmpeg H.265 CUDA decoder + FFmpeg-H.265-D3D11VA: FFmpeg H.265 D3D11VA decoder + FFmpeg-H.265-DXVA2: FFmpeg H.265 DXVA2 decoder + FFmpeg-H.265-VAAPI: FFmpeg H.265 VAAPI decoder + FFmpeg-H.265-VDPAU: FFmpeg H.265 VDPAU decoder + FFmpeg-H.265-Vulkan: FFmpeg H.265 Vulkan decoder + FFmpeg-H.265-v4l2m2m: FFmpeg H.265 v4l2m2m decoder + Fluendo-H.265-DXVA2-Gst1.0: Fluendo H.265 DXVA2 decoder for GStreamer 1.0 + Fluendo-H.265-HW-hwvah265dec-Gst1.0: Fluendo H.265 HW decoder for GStreamer 1.0 + Fluendo-H.265-SW-Gst1.0: Fluendo H.265 SW decoder for GStreamer 1.0 + Fluendo-H.265-VAAPI-Gst1.0: Fluendo H.265 VAAPI decoder for GStreamer 1.0 + Fluendo-H.265-VDA-Gst1.0: Fluendo H.265 VDA decoder for GStreamer 1.0 + Fluendo-H.265-VDPAU-Gst1.0: Fluendo H.265 VDPAU decoder for GStreamer 1.0 + Fluendo-H.265-VT-Gst1.0: Fluendo H.265 VT decoder for GStreamer 1.0 + GStreamer-H.265-D3D11-Gst1.0: GStreamer H.265 D3D11 decoder for GStreamer 1.0 + GStreamer-H.265-D3D12-Gst1.0: GStreamer H.265 D3D12 decoder for GStreamer 1.0 + GStreamer-H.265-Libav-Gst1.0: GStreamer H.265 Libav decoder for GStreamer 1.0 + GStreamer-H.265-MSDK-Gst1.0: GStreamer H.265 MSDK decoder for GStreamer 1.0 + GStreamer-H.265-NVDEC-Gst1.0: GStreamer H.265 NVDEC decoder for GStreamer 1.0 + GStreamer-H.265-NVDECSL-Gst1.0: GStreamer H.265 NVDECSL decoder for GStreamer 1.0 + GStreamer-H.265-V4L2-Gst1.0: GStreamer H.265 V4L2 decoder for GStreamer 1.0 + GStreamer-H.265-V4L2SL-Gst1.0: GStreamer H.265 V4L2SL decoder for GStreamer 1.0 + GStreamer-H.265-VA-Gst1.0: GStreamer H.265 VA decoder for GStreamer 1.0 + GStreamer-H.265-VAAPI-Gst1.0: GStreamer H.265 VAAPI decoder for GStreamer 1.0 + GStreamer-H.265-Vulkan-Gst1.0: GStreamer H.265 Vulkan decoder for GStreamer 1.0 + JCT-VT-H.265: JCT-VT H.265/HEVC reference decoder + VKVS-H.265: Vulkan Video Samples H.265 decoder + ccdec-H.265: H.265 cros-codecs decoder + +H266 + FFmpeg-H.266: FFmpeg H.266 SW decoder + Fluendo-H.266-SW-Gst1.0: Fluendo H.266 SW decoder for GStreamer 1.0 + GStreamer-H.266-Libav-Gst1.0: GStreamer H.266 Libav decoder for GStreamer 1.0 + GStreamer-H.266-VVdeC-Gst1.0: GStreamer H.266 VVdeC decoder for GStreamer 1.0 + VVCSoftware_VTM-H266: VVCSoftware_VTM H.266/VVC reference decoder + VVdeC-H266: VVdeC H.266/VVC decoder VP8 - FFmpeg-VP8: FFmpeg VP8 SW decoder... ✔️ - FFmpeg-VP8-VAAPI: FFmpeg VP8 VAAPI decoder... ✔️ - FFmpeg-VP8-vp8_v4l2m2m: FFmpeg VP8 vp8_v4l2m2m decoder... ✔️ - GStreamer-VP8-D3D11-Gst1.0: GStreamer VP8 D3D11 decoder for GStreamer 1.0... ❌ - GStreamer-VP8-Libav-Gst1.0: GStreamer VP8 Libav decoder for GStreamer 1.0... ✔️ - GStreamer-VP8-NVDEC-Gst1.0: GStreamer VP8 NVDEC decoder for GStreamer 1.0... ❌ - GStreamer-VP8-NVDECSL-Gst1.0: GStreamer VP8 NVDECSL decoder for GStreamer 1.0... ❌ - GStreamer-VP8-V4L2-Gst1.0: GStreamer VP8 V4L2 decoder for GStreamer 1.0... ❌ - GStreamer-VP8-V4L2SL-Gst1.0: GStreamer VP8 V4L2SL decoder for GStreamer 1.0... ❌ - GStreamer-VP8-VA-Gst1.0: GStreamer VP8 VA decoder for GStreamer 1.0... ❌ - GStreamer-VP8-VAAPI-Gst1.0: GStreamer VP8 VAAPI decoder for GStreamer 1.0... ❌ - GStreamer-VP8-libvpx-Gst1.0: GStreamer VP8 libvpx decoder for GStreamer 1.0... ✔️ - libvpx-VP8: VP8 reference decoder... ✔️ + FFmpeg-VP8: FFmpeg VP8 SW decoder + FFmpeg-VP8-CUDA: FFmpeg VP8 CUDA decoder + FFmpeg-VP8-VAAPI: FFmpeg VP8 VAAPI decoder + FFmpeg-VP8-v4l2m2m: FFmpeg VP8 v4l2m2m decoder + GStreamer-VP8-D3D11-Gst1.0: GStreamer VP8 D3D11 decoder for GStreamer 1.0 + GStreamer-VP8-Libav-Gst1.0: GStreamer VP8 Libav decoder for GStreamer 1.0 + GStreamer-VP8-NVDEC-Gst1.0: GStreamer VP8 NVDEC decoder for GStreamer 1.0 + GStreamer-VP8-NVDECSL-Gst1.0: GStreamer VP8 NVDECSL decoder for GStreamer 1.0 + GStreamer-VP8-V4L2-Gst1.0: GStreamer VP8 V4L2 decoder for GStreamer 1.0 + GStreamer-VP8-V4L2SL-Gst1.0: GStreamer VP8 V4L2SL decoder for GStreamer 1.0 + GStreamer-VP8-VA-Gst1.0: GStreamer VP8 VA decoder for GStreamer 1.0 + GStreamer-VP8-VAAPI-Gst1.0: GStreamer VP8 VAAPI decoder for GStreamer 1.0 + GStreamer-VP8-libvpx-Gst1.0: GStreamer VP8 libvpx decoder for GStreamer 1.0 + ccdec-VP8: VP8 cros-codecs decoder + libvpx-VP8: VP8 reference decoder VP9 - FFmpeg-VP9: FFmpeg VP9 SW decoder... ✔️ - FFmpeg-VP9-VAAPI: FFmpeg VP9 VAAPI decoder... ✔️ - FFmpeg-VP9-vp9_v4l2m2m: FFmpeg VP9 vp9_v4l2m2m decoder... ✔️ - GStreamer-VP9-D3D11-Gst1.0: GStreamer VP9 D3D11 decoder for GStreamer 1.0... ❌ - GStreamer-VP9-Libav-Gst1.0: GStreamer VP9 Libav decoder for GStreamer 1.0... ✔️ - GStreamer-VP9-NVDEC-Gst1.0: GStreamer VP9 NVDEC decoder for GStreamer 1.0... ❌ - GStreamer-VP9-NVDECSL-Gst1.0: GStreamer VP9 NVDECSL decoder for GStreamer 1.0... ❌ - GStreamer-VP9-V4L2SL-Gst1.0: GStreamer VP9 V4L2SL decoder for GStreamer 1.0... ❌ - GStreamer-VP9-VA-Gst1.0: GStreamer VP9 VA decoder for GStreamer 1.0... ❌ - GStreamer-VP9-VAAPI-Gst1.0: GStreamer VP9 VAAPI decoder for GStreamer 1.0... ❌ - GStreamer-VP9-libvpx-Gst1.0: GStreamer VP9 libvpx decoder for GStreamer 1.0... ✔️ - libvpx-VP9: VP9 reference decoder... ✔️ + FFmpeg-VP9: FFmpeg VP9 SW decoder + FFmpeg-VP9-CUDA: FFmpeg VP9 CUDA decoder + FFmpeg-VP9-VAAPI: FFmpeg VP9 VAAPI decoder + FFmpeg-VP9-VDPAU: FFmpeg VP9 VDPAU decoder + FFmpeg-VP9-v4l2m2m: FFmpeg VP9 v4l2m2m decoder + GStreamer-VP9-D3D11-Gst1.0: GStreamer VP9 D3D11 decoder for GStreamer 1.0 + GStreamer-VP9-D3D12-Gst1.0: GStreamer VP9 D3D12 decoder for GStreamer 1.0 + GStreamer-VP9-Libav-Gst1.0: GStreamer VP9 Libav decoder for GStreamer 1.0 + GStreamer-VP9-NVDEC-Gst1.0: GStreamer VP9 NVDEC decoder for GStreamer 1.0 + GStreamer-VP9-NVDECSL-Gst1.0: GStreamer VP9 NVDECSL decoder for GStreamer 1.0 + GStreamer-VP9-V4L2-Gst1.0: GStreamer VP9 V4L2 decoder for GStreamer 1.0 + GStreamer-VP9-V4L2SL-Gst1.0: GStreamer VP9 V4L2SL decoder for GStreamer 1.0 + GStreamer-VP9-VA-Gst1.0: GStreamer VP9 VA decoder for GStreamer 1.0 + GStreamer-VP9-VAAPI-Gst1.0: GStreamer VP9 VAAPI decoder for GStreamer 1.0 + GStreamer-VP9-libvpx-Gst1.0: GStreamer VP9 libvpx decoder for GStreamer 1.0 + ccdec-VP9: VP9 cros-codecs decoder + libvpx-VP9: VP9 reference decoder AAC - Fluendo-AAC-SW-Gst1.0: Fluendo AAC SW decoder for GStreamer 1.0... ✔️ - ISO-MPEG4-AAC: ISO MPEG4 AAC reference decoder... ✔️ - -H266 - GStreamer-H.266-VVdeC-Gst1.0: GStreamer H.266 VVdeC decoder for GStreamer 1.0... ✔️ - VVCSoftware_VTM-H266: VVCSoftware_VTM H.266/VVC reference decoder... ✔️ - VVdeC-H266: VVdeC H.266/VVC reference decoder... ✔️ - + Fluendo-AAC-SW-Gst1.0: Fluendo AAC SW decoder for GStreamer 1.0 + ISO-MPEG2-AAC: ISO MPEG2 AAC reference decoder + ISO-MPEG4-AAC: ISO MPEG4 AAC reference decoder ``` 4. Run the test suite (or a number of them) for all decoders (or a number of From b2e70c22f1ec518ada5874095158565b85f45fad Mon Sep 17 00:00:00 2001 From: Ruben Gonzalez Date: Fri, 22 Nov 2024 13:25:00 +0100 Subject: [PATCH 2/2] Add the codec option in list command to show only info about related ``` ./fluster.py list --codec H.266 List of available test suites: JVET-VVC_draft6 Codec: H.266 Description: JVET VVC draft6 Test vectors: 282 List of available decoders: H.266 FFmpeg-H.266: FFmpeg H.266 SW decoder Fluendo-H.266-SW-Gst1.0: Fluendo H.266 SW decoder for GStreamer 1.0 GStreamer-H.266-Libav-Gst1.0: GStreamer H.266 Libav decoder for GStreamer 1.0 GStreamer-H.266-VVdeC-Gst1.0: GStreamer H.266 VVdeC decoder for GStreamer 1.0 VVCSoftware_VTM-H266: VVCSoftware_VTM H.266/VVC reference decoder VVdeC-H266: VVdeC H.266/VVC decoder ``` --- fluster/codec.py | 3 +++ fluster/fluster.py | 19 +++++++++++++------ fluster/main.py | 18 ++++++++++++++++-- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/fluster/codec.py b/fluster/codec.py index 73a5a9be..3127c2db 100644 --- a/fluster/codec.py +++ b/fluster/codec.py @@ -31,6 +31,9 @@ class Codec(Enum): AAC = "AAC" AV1 = "AV1" + def __str__(self) -> str: + return self.value + class OutputFormat(Enum): """Output format""" diff --git a/fluster/fluster.py b/fluster/fluster.py index 47f879cc..6afd66a3 100644 --- a/fluster/fluster.py +++ b/fluster/fluster.py @@ -185,7 +185,9 @@ def _load_test_suites(self) -> None: if len(self.test_suites) == 0: raise Exception(f'No test suites found in "{self.test_suites_dir}"') - def list_decoders(self, check: bool, verbose: bool) -> None: + def list_decoders( + self, check: bool, verbose: bool, codec: Optional[Codec] = None + ) -> None: """List all the available decoders""" print("\nList of available decoders:") decoders_dict: Dict[Codec, List[Decoder]] = {} @@ -194,8 +196,10 @@ def list_decoders(self, check: bool, verbose: bool) -> None: decoders_dict[dec.codec] = [] decoders_dict[dec.codec].append(dec) - for codec, decoder_list in decoders_dict.items(): - print(f'\n{str(codec).split(".")[1]}') + for current_codec, decoder_list in decoders_dict.items(): + if codec and codec != current_codec: + continue + print(f"\n{current_codec}") for decoder in decoder_list: string = f"{decoder}" if check: @@ -210,16 +214,19 @@ def list_test_suites( self, show_test_vectors: bool = False, test_suites: Optional[List[str]] = None, + codec: Optional[Codec] = None, ) -> None: """List all test suites""" self._load_test_suites() print("\nList of available test suites:") if test_suites: test_suites = [x.lower() for x in test_suites] + for test_suite in self.test_suites: - if test_suites: - if test_suite.name.lower() not in test_suites: - continue + if test_suites and test_suite.name.lower() not in test_suites: + continue + if codec and test_suite.codec != codec: + continue print(test_suite) if show_test_vectors: for test_vector in test_suite.test_vectors.values(): diff --git a/fluster/main.py b/fluster/main.py index c73959fa..82440fb6 100644 --- a/fluster/main.py +++ b/fluster/main.py @@ -26,6 +26,7 @@ from tempfile import gettempdir from fluster.fluster import Fluster, Context, SummaryFormat +from fluster.codec import Codec from fluster import utils APPNAME = "fluster" @@ -190,6 +191,13 @@ def _add_list_cmd(self, subparsers: Any) -> None: help="show stdout and stderr of commands executed", action="store_true", ) + subparser.add_argument( + "-d", + "--codec", + help="show decoders and test suites of a codec", + type=Codec, + choices=list(Codec), + ) subparser.set_defaults(func=self._list_cmd) def _add_run_cmd(self, subparsers: Any) -> None: @@ -366,9 +374,15 @@ def _add_download_cmd(self, subparsers: Any) -> None: @staticmethod def _list_cmd(args: Any, fluster: Fluster) -> None: fluster.list_test_suites( - show_test_vectors=args.testvectors, test_suites=args.testsuites + show_test_vectors=args.testvectors, + test_suites=args.testsuites, + codec=args.codec, + ) + fluster.list_decoders( + check=args.check, + verbose=args.verbose, + codec=args.codec, ) - fluster.list_decoders(check=args.check, verbose=args.verbose) @staticmethod def _run_cmd(args: Any, fluster: Fluster) -> None: