avi中scale 和 rate 是什么意思
zez 2006-08-07 10:24:59 我们在做自己的 avi 解析,不过里面的音频,视频的 scale 和rate 的意义理解有冲突
我认为 rate 表示一秒的 采样 这个意思.., scale = rate/scale
但我同事认为 scale 表示的是一秒的 采样这样的意思.. ,而 rate= scale * 帧率 ,
我知道 rate/scale 表示一秒多少帧.. 但涉及到同步,时标计算的时候需要明确一下 scale 和reate的意义..
查看msdn解释:
dwScale
Used with dwRate to specify the time scale that this stream will use. Dividing dwRate by dwScale gives the number of samples per second. For video streams, this rate should be the frame rate. For audio streams, this rate should correspond to the time needed for nBlockAlign bytes of audio, which for PCM audio simply reduces to the sample rate.