From: Steve Lhomme Date: Sun, 11 Sep 2022 12:47:11 +0000 (+0200) Subject: KaxSemantic: add KaxEmphasis audio element X-Git-Tag: release-1.7.0~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d74d61f54b49777855c64a7371e5d269fc2ea76;p=libmatroska KaxSemantic: add KaxEmphasis audio element Add in https://github.com/ietf-wg-cellar/matroska-specification/pull/659 --- diff --git a/matroska/KaxSemantic.h b/matroska/KaxSemantic.h index b1e1264..9d24fc9 100644 --- a/matroska/KaxSemantic.h +++ b/matroska/KaxSemantic.h @@ -539,6 +539,9 @@ public: DECLARE_MKX_UINTEGER(KaxAudioBitDepth) }; +DECLARE_MKX_UINTEGER(KaxEmphasis) +}; + DECLARE_MKX_MASTER(KaxTrackOperation) }; @@ -1093,6 +1096,25 @@ typedef enum { MATROSKA_VIDEO_PROJECTIONTYPE_MESH = 3, } MatroskaVideoProjectionType; +/** + *Audio emphasis applied on audio samples. The player **MUST** apply the inverse emphasis to get the proper audio samples. + */ +typedef enum { + MATROSKA_EMPHASIS_NO_EMPHASIS = 0, + MATROSKA_EMPHASIS_CD_AUDIO = 1, // First order filter with zero point at 50 microseconds and a pole at 15 microseconds. Also found on DVD Audio and MPEG audio. + MATROSKA_EMPHASIS_RESERVED = 2, + MATROSKA_EMPHASIS_CCIT_J_17 = 3, // Defined in [@!ITU-J.17]. + MATROSKA_EMPHASIS_FM_50 = 4, // FM Radio in Europe. RC Filter with a time constant of 50 microseconds. + MATROSKA_EMPHASIS_FM_75 = 5, // FM Radio in the USA. RC Filter with a time constant of 75 microseconds. + MATROSKA_EMPHASIS_PHONO_RIAA = 10, // Phono filter with time constants of t1=3180, t2=318 and t3=75 microseconds. [@!NAB1964] + MATROSKA_EMPHASIS_PHONO_IEC_N78 = 11, // Phono filter with time constants of t1=3180, t2=450 and t3=50 microseconds. + MATROSKA_EMPHASIS_PHONO_TELDEC = 12, // Phono filter with time constants of t1=3180, t2=318 and t3=50 microseconds. + MATROSKA_EMPHASIS_PHONO_EMI = 13, // Phono filter with time constants of t1=2500, t2=500 and t3=70 microseconds. + MATROSKA_EMPHASIS_PHONO_COLUMBIA_LP = 14, // Phono filter with time constants of t1=1590, t2=318 and t3=100 microseconds. + MATROSKA_EMPHASIS_PHONO_LONDON = 15, // Phono filter with time constants of t1=1590, t2=318 and t3=50 microseconds. + MATROSKA_EMPHASIS_PHONO_NARTB = 16, // Phono filter with time constants of t1=3180, t2=318 and t3=100 microseconds. +} MatroskaAudioEmphasis; + /** *The kind of plane this track corresponds to. */ diff --git a/src/KaxSemantic.cpp b/src/KaxSemantic.cpp index 1fef714..143f9be 100644 --- a/src/KaxSemantic.cpp +++ b/src/KaxSemantic.cpp @@ -439,6 +439,7 @@ DEFINE_SEMANTIC_ITEM(false, true, KaxAudioOutputSamplingFreq) DEFINE_SEMANTIC_ITEM(true, true, KaxAudioChannels) DEFINE_SEMANTIC_ITEM(false, true, KaxAudioPosition) // not supported DEFINE_SEMANTIC_ITEM(false, true, KaxAudioBitDepth) +DEFINE_SEMANTIC_ITEM(true, true, KaxEmphasis) DEFINE_END_SEMANTIC(KaxTrackAudio) DEFINE_MKX_MASTER(KaxTrackAudio, 0xE1, 1, KaxTrackEntry, "TrackAudio") @@ -447,6 +448,7 @@ DEFINE_MKX_FLOAT(KaxAudioOutputSamplingFreq, 0x78B5, 2, KaxTrackAudio, "AudioOut DEFINE_MKX_UINTEGER_DEF(KaxAudioChannels, 0x9F, 1, KaxTrackAudio, "AudioChannels", 1) DEFINE_MKX_BINARY (KaxAudioPosition, 0x7D7B, 2, KaxTrackAudio, "AudioPosition") DEFINE_MKX_UINTEGER(KaxAudioBitDepth, 0x6264, 2, KaxTrackAudio, "AudioBitDepth") +DEFINE_MKX_UINTEGER_DEF(KaxEmphasis, 0x92F1, 2, KaxTrackAudio, "Emphasis", 0) DEFINE_START_SEMANTIC(KaxTrackOperation) DEFINE_SEMANTIC_ITEM(false, true, KaxTrackCombinePlanes)