为什么我在读取 VUI 时会得到无效的 num_units_in_tick 和 time_scale?
Why do I get invalid num_units_in_tick and time_scale while reading VUI?
我正在阅读视频可用性信息,它对所有 29.97fps 文件都是正确的,但对于 25fps 文件,我得到了错误的值。
对于 num_units_in_tick
我得到 771,对于 time_scale
我得到 3892314307。
标准对 fps 没有影响:
if( timing_info_present_flag )
{
num_units_in_tick u (32)
time_scale u (32)
fixed_frame_rate_flag u (1)
}
为什么我可以从一个文件中读取正确的值,但不能从另一个文件中读取?
编辑:
纳鲁:
00 00 00 01 67 64 00 28 AD 84 3F FF C2 1F FF E1
0F FF F0 87 FF F8 43 FF FC 21 FF FE 10 FF FF FF
FF FF FF FF FF 08 7F FF FF FF FF FF FF FF 2C C5
01 E0 11 3F 78 0A 10 10 10 1F 00 00 03 03 E8 00
00 C3 50 94
问题出在 emulation byte
。如果我们看一下最后 10 个字节,我们有:
00 00 03 03 E8 00 00 C3 50 94
第一个 03 是一个防止仿真的字节,应该跳过它。然后我们有 num_units_in_tick = 1000 和 time_scale = 50000.
我正在阅读视频可用性信息,它对所有 29.97fps 文件都是正确的,但对于 25fps 文件,我得到了错误的值。
对于 num_units_in_tick
我得到 771,对于 time_scale
我得到 3892314307。
标准对 fps 没有影响:
if( timing_info_present_flag )
{
num_units_in_tick u (32)
time_scale u (32)
fixed_frame_rate_flag u (1)
}
为什么我可以从一个文件中读取正确的值,但不能从另一个文件中读取?
编辑: 纳鲁:
00 00 00 01 67 64 00 28 AD 84 3F FF C2 1F FF E1 0F FF F0 87 FF F8 43 FF FC 21 FF FE 10 FF FF FF FF FF FF FF FF 08 7F FF FF FF FF FF FF FF 2C C5 01 E0 11 3F 78 0A 10 10 10 1F 00 00 03 03 E8 00 00 C3 50 94
问题出在 emulation byte
。如果我们看一下最后 10 个字节,我们有:
00 00 03 03 E8 00 00 C3 50 94
第一个 03 是一个防止仿真的字节,应该跳过它。然后我们有 num_units_in_tick = 1000 和 time_scale = 50000.