Skip to content

Commit

Permalink
Improve "ITU-T H.273" implementation consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Aug 22, 2022
1 parent 92f0c64 commit f72019e
Show file tree
Hide file tree
Showing 23 changed files with 3,191 additions and 1,224 deletions.
68 changes: 68 additions & 0 deletions BIBLIOGRAPHY.bib
Original file line number Diff line number Diff line change
Expand Up @@ -1052,11 +1052,36 @@ @misc{Erdogana
adhere to the official terms assigned to the CIE system to avoid
any ambiguity.},
}
@misc{EuropeanBroadcastingUnion1975,
title = {{{EBU Tech}} 3213 - {{EBU Standard}} for
{{Chromaticity Tolerances}} for {{Studio Monitors}}},
author = {{European Broadcasting Union}},
year = 1975,
month = aug,
}
@misc{EuropeanColorInitiative2002a,
title = {{{ECI RGB}} V2},
author = {{European Color Initiative}},
year = 2002,
}
@misc{FFmpegDevelopers2022,
title = {{{FFmpeg}}::{{AVColorPrimaries}}},
author = {{FFmpeg Developers}},
year = 2022,
month = aug,
}
@misc{FFmpegDevelopers2022a,
title = {{{FFmpeg}}::{{AVColorTransferCharacteristic}}},
author = {{FFmpeg Developers}},
year = 2022,
month = aug,
}
@misc{FFmpegDevelopers2022b,
title = {{{FFmpeg}}::{{AVColorSpace}}},
author = {{FFmpeg Developers}},
year = 2022,
month = aug,
}
@article{Fairchild1991a,
title = {Formulation and Testing of an
Incomplete-Chromatic-Adaptation Model},
Expand Down Expand Up @@ -1719,6 +1744,35 @@ @misc{InternationalOrganizationforStandardization2012
author = {{International Organization for Standardization}},
year = 2012,
}
@misc{InternationalOrganizationforStandardization2013,
title = {{{INTERNATIONAL STANDARD ISO}}/{{IEC}} 23001-8 -
{{Information}} Technology - {{MPEG}} Systems Technologies -
{{Part}} 8: {{Coding-independent}} Code Points},
author = {{International Organization for Standardization}},
year = 2013,
}
@misc{InternationalOrganizationforStandardization2020,
title = {{{INTERNATIONAL STANDARD ISO}}/{{IEC}} 14496-10 -
{{Information}} Technology - {{Coding}} of Audio-Visual Objects -
{{Part}} 10: {{Advanced}} Video Coding},
author = {{International Organization for Standardization}},
year = 2020,
}
@misc{InternationalOrganizationforStandardization2021,
title = {{{INTERNATIONAL STANDARD ISO}}/{{IEC}} 23091-2 -
{{Information}} Technology - {{Coding-}} Independent Code Points -
{{Part}} 2: {{Video}}},
author = {{International Organization for Standardization}},
year = 2021,
}
@misc{InternationalTelecommunicationUnion1998,
title = {Recommendation {{ITU-R BT}}.1361 - {{Worldwide}}
Unified Colorimetry and Related Characteristics of Future
Television and Imaging Systems},
author = {{International Telecommunication Union}},
year = 1998,
pages = {1--32},
}
@misc{InternationalTelecommunicationUnion1998a,
title = {Recommendation {{ITU-R BT}}.470-6 - {{CONVENTIONAL
TELEVISION SYSTEMS}}},
Expand Down Expand Up @@ -1803,6 +1857,13 @@ @misc{InternationalTelecommunicationUnion2019
year = 2019,
pages = {1--36},
}
@misc{InternationalTelecommunicationUnion2021,
title = {Recommendation {{ITU-T H}}.273 -
{{Coding-independent}} Code Points for Video Signal Type
Identification},
author = {{International Telecommunication Union}},
year = 2021,
}
@article{Jakob2019,
ids = {Jakob},
title = {A {{Low}}-{{Dimensional Function Space}} for
Expand Down Expand Up @@ -3054,6 +3115,13 @@ @misc{SocietyofMotionPictureandTelevisionEngineers2014a
non-broadcast content. This standard also specifies an
Inverse-EOTF derived from the EOTF.},
}
@misc{SocietyofMotionPictureandTelevisionEngineers2019,
title = {{{ST}} 428-1:2019 - {{D-Cinema Distribution Master}}
\textemdash{} {{Image Characteristic}}},
author = {{Society of Motion Picture and Television Engineers}},
year = 2019,
doi = {10.5594/SMPTE.ST428-1.2019},
}
@misc{SonyCorporation,
title = {S-{{Log Whitepaper}}},
author = {{Sony Corporation}},
Expand Down
68 changes: 66 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -911,15 +911,16 @@ RGB Colourspaces
'CIE RGB',
'Cinema Gamut',
'ColorMatch RGB',
'DaVinci Wide Gamut',
'DCDM XYZ',
'DCI-P3',
'DCI-P3+',
'DCI-P3-P',
'DJI D-Gamut',
'DRAGONcolor',
'DRAGONcolor2',
'DaVinci Wide Gamut',
'Display P3',
'Don RGB 4',
'EBU Tech. 3213-E',
'ECI RGB v2',
'ERIMM RGB',
'Ekta Space PS 5',
Expand All @@ -929,7 +930,10 @@ RGB Colourspaces
'ITU-R BT.470 - 525',
'ITU-R BT.470 - 625',
'ITU-R BT.709',
'ITU-T H.273 - 22 Unspecified',
'ITU-T H.273 - Generic Film',
'Max RGB',
'N-Gamut',
'NTSC (1953)',
'NTSC (1987)',
'P3-D65',
Expand Down Expand Up @@ -957,6 +961,8 @@ RGB Colourspaces
'aces',
'adobe1998',
'prophoto',
'sRGB']
OETFs
*****
Expand All @@ -972,8 +978,12 @@ OETFs
'ITU-R BT.2100 PQ',
'ITU-R BT.601',
'ITU-R BT.709',
'ITU-T H.273 IEC 61966-2',
'ITU-T H.273 Log',
'ITU-T H.273 Log Sqrt',
'SMPTE 240M']
EOTFs
*****
Expand All @@ -985,6 +995,7 @@ EOTFs
'ITU-R BT.1886',
'ITU-R BT.2100 HLG',
'ITU-R BT.2100 PQ',
'ITU-T H.273 ST.428-1',
'SMPTE 240M',
'ST 2084',
'sRGB']
Expand Down Expand Up @@ -1083,6 +1094,59 @@ CCTFs Encoding / Decoding
'ViperLog',
'sRGB']
Recommendation ITU-T H.273 Code points for Video Signal Type Identification
***************************************************************************
.. code-block:: python
>>> colour.COLOUR_PRIMARIES_ITUTH273.keys()
dict_keys([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 23])
>>> colour.COLOUR_PRIMARIES_ITUTH273.keys()
>>> description = colour.models.describe_video_signal_colour_primaries(1)
===============================================================================
* *
* Colour Primaries: 1 *
* ------------------- *
* *
* Primaries : [[ 0.64 0.33] *
* [ 0.3 0.6 ] *
* [ 0.15 0.06]] *
* Whitepoint : [ 0.3127 0.329 ] *
* Whitepoint Name : D65 *
* NPM : [[ 0.4123908 0.35758434 0.18048079] *
* [ 0.21263901 0.71516868 0.07219232] *
* [ 0.01933082 0.11919478 0.95053215]] *
* NPM -1 : [[ 3.24096994 -1.53738318 -0.49861076] *
* [-0.96924364 1.8759675 0.04155506] *
* [ 0.05563008 -0.20397696 1.05697151]] *
* FFmpeg Constants : ['AVCOL_PRI_BT709', 'BT709'] *
* *
===============================================================================
>>> colour.TRANSFER_CHARACTERISTICS_ITUTH273.keys()
dict_keys([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19])
>>> description = colour.models.describe_video_signal_transfer_characteristics(1)
===============================================================================
* *
* Transfer Characteristics: 1 *
* --------------------------- *
* *
* Function : <function oetf_BT709 at 0x165bb3550> *
* FFmpeg Constants : ['AVCOL_TRC_BT709', 'BT709'] *
* *
===============================================================================
>>> colour.MATRIX_COEFFICIENTS_ITUTH273.keys()
dict_keys([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
>>> description = colour.models.describe_video_signal_matrix_coefficients(1)
===============================================================================
* *
* Matrix Coefficients: 1 *
* ---------------------- *
* *
* Matrix Coefficients : [ 0.2126 0.0722] *
* FFmpeg Constants : ['AVCOL_SPC_BT709', 'BT709'] *
* *
===============================================================================
Colour Notation Systems - ``colour.notation``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
6 changes: 6 additions & 0 deletions colour/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@
CMY_to_CMYK,
CMY_to_RGB,
COLOURSPACE_MODELS,
COLOUR_PRIMARIES_ITUTH273,
CV_range,
DATA_MACADAM_1942_ELLIPSES,
DIN99_to_Lab,
Expand Down Expand Up @@ -277,6 +278,7 @@
Luv_to_XYZ,
Luv_to_uv,
Luv_uv_to_xy,
MATRIX_COEFFICIENTS_ITUTH273,
OETFS,
OETF_INVERSES,
OOTFS,
Expand All @@ -301,6 +303,7 @@
RGB_to_YCbCr,
RGB_to_YCoCg,
RGB_to_YcCbcCrc,
TRANSFER_CHARACTERISTICS_ITUTH273,
UCS_to_XYZ,
UCS_to_uv,
UCS_uv_to_xy,
Expand Down Expand Up @@ -657,6 +660,7 @@ def __getattr__(self, attribute) -> Any:
"CMY_to_CMYK",
"CMY_to_RGB",
"COLOURSPACE_MODELS",
"COLOUR_PRIMARIES_ITUTH273",
"CV_range",
"DATA_MACADAM_1942_ELLIPSES",
"DIN99_to_Lab",
Expand Down Expand Up @@ -696,6 +700,7 @@ def __getattr__(self, attribute) -> Any:
"Luv_to_XYZ",
"Luv_to_uv",
"Luv_uv_to_xy",
"MATRIX_COEFFICIENTS_ITUTH273",
"OETFS",
"OETF_INVERSES",
"OOTFS",
Expand All @@ -720,6 +725,7 @@ def __getattr__(self, attribute) -> Any:
"RGB_to_YCbCr",
"RGB_to_YCoCg",
"RGB_to_YcCbcCrc",
"TRANSFER_CHARACTERISTICS_ITUTH273",
"UCS_to_XYZ",
"UCS_to_uv",
"UCS_uv_to_xy",
Expand Down
29 changes: 29 additions & 0 deletions colour/examples/models/examples_rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,32 @@
colour.RGB_COLOURSPACES["ACEScg"],
)
)

print("\n")

message_box(
'"Recommendation ITU-T H.273" '
"Code points for Video Signal Type Identification"
)

message_box(
f"Colour Primaries: {list(colour.COLOUR_PRIMARIES_ITUTH273.keys())}"
)
colour.models.describe_video_signal_colour_primaries(1)

print("\n")

message_box(
f"Transfer Characteristics: "
f"{list(colour.TRANSFER_CHARACTERISTICS_ITUTH273.keys())}"
)
colour.models.describe_video_signal_transfer_characteristics(1)

print("\n")

message_box(
f"Matrix Coefficients: "
f"{list(colour.MATRIX_COEFFICIENTS_ITUTH273.keys())}"
)

colour.models.describe_video_signal_matrix_coefficients(1)

0 comments on commit f72019e

Please sign in to comment.