Cinema 2K and Cinema 4K profiles are printed as such. #201
This commit is contained in:
parent
869f8e9e3e
commit
661f5bfadb
3 changed files with 23 additions and 3 deletions
|
|
@ -55,8 +55,8 @@ _CAPABILITIES_DISPLAY = _Keydefaultdict(_factory,
|
||||||
{ _NO_PROFILE: 'no profile',
|
{ _NO_PROFILE: 'no profile',
|
||||||
_PROFILE_0: '0',
|
_PROFILE_0: '0',
|
||||||
_PROFILE_1: '1',
|
_PROFILE_1: '1',
|
||||||
_PROFILE_3: '3',
|
_PROFILE_3: 'Cinema 2K',
|
||||||
_PROFILE_4: '4'} )
|
_PROFILE_4: 'Cinema 4K'} )
|
||||||
|
|
||||||
# Need a catch-all list of valid markers.
|
# Need a catch-all list of valid markers.
|
||||||
# See table A-1 in ISO/IEC FCD15444-1.
|
# See table A-1 in ISO/IEC FCD15444-1.
|
||||||
|
|
|
||||||
|
|
@ -611,3 +611,14 @@ issue_186_progression_order = """COD marker segment @ (174, 12)
|
||||||
Vertically stripe causal context: False
|
Vertically stripe causal context: False
|
||||||
Predictable termination: False
|
Predictable termination: False
|
||||||
Segmentation symbols: False"""
|
Segmentation symbols: False"""
|
||||||
|
|
||||||
|
# Cinema 2K profile
|
||||||
|
cinema2k_profile = """SIZ marker segment @ (2, 47)
|
||||||
|
Profile: Cinema 2K
|
||||||
|
Reference Grid Height, Width: (1080 x 1920)
|
||||||
|
Vertical, Horizontal Reference Grid Offset: (0 x 0)
|
||||||
|
Reference Tile Height, Width: (1080 x 1920)
|
||||||
|
Vertical, Horizontal Reference Tile Offset: (0 x 0)
|
||||||
|
Bitdepth: (12, 12, 12)
|
||||||
|
Signed: (False, False, False)
|
||||||
|
Vertical, Horizontal Subsampling: ((1, 1), (1, 1), (1, 1))"""
|
||||||
|
|
|
||||||
|
|
@ -653,6 +653,16 @@ class TestPrintingOpjDataRoot(unittest.TestCase):
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def test_cinema_profile(self):
|
||||||
|
"""Should print Cinema 2K when the profile is 3."""
|
||||||
|
filename = opj_data_file('input/nonregression/_00042.j2k')
|
||||||
|
j2k = Jp2k(filename)
|
||||||
|
with patch('sys.stdout', new=StringIO()) as fake_out:
|
||||||
|
c = j2k.get_codestream()
|
||||||
|
print(c.segment[1])
|
||||||
|
actual = fake_out.getvalue().strip()
|
||||||
|
self.assertEqual(actual, fixtures.cinema2k_profile)
|
||||||
|
|
||||||
def test_invalid_colorspace(self):
|
def test_invalid_colorspace(self):
|
||||||
"""An invalid colorspace shouldn't cause an error."""
|
"""An invalid colorspace shouldn't cause an error."""
|
||||||
filename = opj_data_file('input/nonregression/edf_c2_1103421.jp2')
|
filename = opj_data_file('input/nonregression/edf_c2_1103421.jp2')
|
||||||
|
|
@ -662,7 +672,6 @@ class TestPrintingOpjDataRoot(unittest.TestCase):
|
||||||
with patch('sys.stdout', new=StringIO()) as fake_out:
|
with patch('sys.stdout', new=StringIO()) as fake_out:
|
||||||
print(jp2)
|
print(jp2)
|
||||||
|
|
||||||
|
|
||||||
def test_bad_rsiz(self):
|
def test_bad_rsiz(self):
|
||||||
"""Should still be able to print if rsiz is bad, issue196"""
|
"""Should still be able to print if rsiz is bad, issue196"""
|
||||||
filename = opj_data_file('input/nonregression/edf_c2_1002767.jp2')
|
filename = opj_data_file('input/nonregression/edf_c2_1002767.jp2')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue