如何提取 H.264 中基本或主要配置文件的色度格式?

How to extract chroma format for the base or main profile in H.264?

chroma_format_idc 存在于 High profile (profile_idc == 100) 的 SPS 中,但不存在于 Base 和 Main。如何从 Main 或 Base 配置文件中读取色度格式?

Rec.ITU-T H.264 说:

当 chroma_format_idc 不存在时,应推断为等于 1(4:2:0 色度格式)。

所以,我想就是这样。