Skip to content

Commit

Permalink
gen_jct_vc: add support for more test suites
Browse files Browse the repository at this point in the history
Add support for MV-HEVC, RExt and SCC.
  • Loading branch information
dwlsalmeida authored and rgonzalezfluendo committed Sep 4, 2023
1 parent dbf15ca commit 8027ccc
Show file tree
Hide file tree
Showing 4 changed files with 667 additions and 2 deletions.
64 changes: 62 additions & 2 deletions scripts/gen_jct_vc.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
".avc",
".26l",
)
MD5_EXTS = ("yuv.md5", ".md5", "md5.txt")
MD5_EXTS = ("yuv_2.md5", "yuv.md5", ".md5", "md5.txt", "md5sum.txt")
MD5_EXCLUDES = (".bin.md5", "bit.md5")
RAW_EXTS = ("nogray.yuv", ".yuv", ".qcif")

Expand Down Expand Up @@ -116,6 +116,9 @@ def generate(self, download, jobs):
# The first item in the AVCv1 list is a readme file
if "00readme_H" in url:
continue
elif "replaced" in url:
# This is in HEVC-SHVC, we don't want that.
continue
file_url = os.path.basename(url)
name = os.path.splitext(file_url)[0]
file_input = f"{name}.bin"
Expand Down Expand Up @@ -159,7 +162,33 @@ def generate(self, download, jobs):

result = utils.run_pipe_command_with_std_output(command)
pix_fmt = result[0]
test_vector.output_format = OutputFormat[pix_fmt.upper()]
try:
test_vector.output_format = OutputFormat[pix_fmt.upper()]
except KeyError as e:
exceptions = {
# Feature: Test unequal luma and chroma bitdepth
# setting. The luma bitdepth is higher than the chroma
# bitdepth. Luma is 12bit, chroma is 8bit. Considering
# 12bit.
"Bitdepth_A_RExt_Sony_1": OutputFormat.YUV444P12LE,
# Same as above, but the chroma is 12bit and luma is 8bit.
"Bitdepth_B_RExt_Sony_1": OutputFormat.YUV444P12LE,
# Rest is taken by examining the error displayed by ffprobe, e.g.:
# The following bit-depths are currently specified: 8,
# 9, 10 and 12 bits, chroma_format_idc is 3, depth is 16
"EXTPREC_MAIN_444_16_INTRA_10BIT_RExt_Sony_1": OutputFormat.YUV444P16LE,
"EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_16BIT_RExt_Sony_1": OutputFormat.YUV444P16LE,
"EXTPREC_MAIN_444_16_INTRA_16BIT_RExt_Sony_1": OutputFormat.YUV444P16LE,
"GENERAL_16b_400_RExt_Sony_1" : OutputFormat.GRAY16LE,
"GENERAL_16b_444_highThroughput_RExt_Sony_2" : OutputFormat.YUV444P16LE,
"GENERAL_16b_444_RExt_Sony_2": OutputFormat.YUV444P16LE,
"WAVETILES_RExt_Sony_2" : OutputFormat.YUV444P16LE
}
if test_vector.name in exceptions.keys():
test_vector.output_format = exceptions[test_vector.name]
else:
raise e


if self.codec == Codec.H265:
self._fill_checksum_h265(test_vector, dest_dir)
Expand Down Expand Up @@ -265,6 +294,37 @@ def _find_by_ext(self, dest_dir, exts, excludes=None):
H265_URL,
)
generator.generate(not args.skip_download, args.jobs)

generator = JCTVTGenerator(
"RExt",
"JCT-VC-RExt",
Codec.H265,
"JCT-VC HEVC Range Extension",
H265_URL,
True
)
generator.generate(not args.skip_download, args.jobs)

generator = JCTVTGenerator(
"SCC",
"JCT-VC-SCC",
Codec.H265,
"JCT-VC HEVC Screen Content Coding Extension",
H265_URL,
True
)
generator.generate(not args.skip_download, args.jobs)

generator = JCTVTGenerator(
"MV-HEVC",
"JCT-VC-MV-HEVC",
Codec.H265,
"JCT-VC HEVC Multiview Extension",
H265_URL,
True
)
generator.generate(not args.skip_download, args.jobs)

generator = JCTVTGenerator(
"AVCv1", "JVT-AVC_V1", Codec.H264, "JVT AVC version 1", H264_URL
)
Expand Down
79 changes: 79 additions & 0 deletions test_suites/h265/JCT-VC-MV-HEVC.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"name": "JCT-VC-MV-HEVC",
"codec": "H.265",
"description": "JCT-VC HEVC Multiview Extension",
"test_vectors": [
{
"name": "MVHEVCS_A_Qualcomm_3",
"source": "https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/MV-HEVC/MVHEVCS_A_Qualcomm_3.zip",
"source_checksum": "8d042304d64777d57822a23801caf12c",
"input_file": "MVHEVCS_A_Qualcomm_3/MVHEVCS_A.bit",
"output_format": "yuv420p",
"result": "2a453ecf60a17a684dca4c51b11ae16e"
},
{
"name": "MVHEVCS_B_Sharp_3",
"source": "https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/MV-HEVC/MVHEVCS_B_Sharp_3.zip",
"source_checksum": "51c95458c403bcdb547faa5c4df5addb",
"input_file": "MVHEVCS_B_Sharp_3/MVHEVCS_B.bit",
"output_format": "yuv420p",
"result": "8396fde1ccc50548f3eb1795990ed0c0"
},
{
"name": "MVHEVCS_C_Sony_3",
"source": "https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/MV-HEVC/MVHEVCS_C_Sony_3.zip",
"source_checksum": "fbda521fadb7f70692941f833b434c4d",
"input_file": "MVHEVCS_C/MVHEVCS_C.bit",
"output_format": "yuv420p",
"result": "6b5d705225c00d0cc196fe0a2fadd925"
},
{
"name": "MVHEVCS_D_NTT_3",
"source": "https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/MV-HEVC/MVHEVCS_D_NTT_3.zip",
"source_checksum": "f81f4594b769395f0ad99e98b31467db",
"input_file": "MVHEVCS_D_NTT_3/MVHEVCS_D.bit",
"output_format": "yuv420p",
"result": "f16251dba49bcdd1b335a5d3606f6934"
},
{
"name": "MVHEVCS_E_Qualcomm_3",
"source": "https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/MV-HEVC/MVHEVCS_E_Qualcomm_3.zip",
"source_checksum": "1a30afef95c2771b9ef9066323c684ca",
"input_file": "MVHEVCS_E_Qualcomm_3/MVHEVCS_E.bit",
"output_format": "yuv420p",
"result": "96c07ed86f99e2e4bd3a9ce990c7c488"
},
{
"name": "MVHEVCS_F_Qualcomm_3",
"source": "https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/MV-HEVC/MVHEVCS_F_Qualcomm_3.zip",
"source_checksum": "b4228b0c66a4907606aeff34e7ee50ed",
"input_file": "MVHEVCS_F_Qualcomm_3/MVHEVCS_F.bit",
"output_format": "yuv420p",
"result": "96c07ed86f99e2e4bd3a9ce990c7c488"
},
{
"name": "MVHEVCS_G_NTT_3",
"source": "https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/MV-HEVC/MVHEVCS_G_NTT_3.zip",
"source_checksum": "095259a45425a2d96558821b4341631f",
"input_file": "MVHEVCS_G_NTT_3/MVHEVCS_G.bit",
"output_format": "yuv420p",
"result": "3bab3455424334d069ce5cce318872b2"
},
{
"name": "MVHEVCS_H_LGE_3",
"source": "https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/MV-HEVC/MVHEVCS_H_LGE_3.zip",
"source_checksum": "583d65b7728083758b70644eb8a8ccd8",
"input_file": "MVHEVCS_H.bit",
"output_format": "yuv420p",
"result": "927abd6fb088c9e834fb76724f2aaf6d"
},
{
"name": "MVHEVCS_I_Nokia_3",
"source": "https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/MV-HEVC/MVHEVCS_I_Nokia_3.zip",
"source_checksum": "bbe731cbbccced6ea25cb1850c91eacc",
"input_file": "MVHEVCS_I.bit",
"output_format": "yuv420p",
"result": "ae8c055003352954d9e599cdc9008a9b"
}
]
}
Loading

0 comments on commit 8027ccc

Please sign in to comment.