On Wed, Apr 23, 2014 at 4:47 PM, Niels Möller <[email protected]> wrote: > Now I get sane sample values, except that they are so low... For > testing, I'm still using "Master Audio 5.0 96khz.dts". In the decoded > samples, I get peaks at 1500 or so, and these are supposed to be 24-bit > values. When converted to 16-bit au, I get peaks at -7 and +6, so it's > very close to silence: > > $ au2ascii < out.au |tr ' ' '\n' |sort -n |uniq -c > 1 -7 > 1 -6 > 6 -5 > 40 -4 > 879 -3 > 19613 -2 > 234702 -1 > 1738350 0 > 233593 1 > 19517 2 > 863 3 > 59 4 > 6 5 > > This low level would make more sense for residual encoded channel, but > as far as I see, the residual_encode flag is false. Do you agree that > this file does *not* use residual encoding?
I briefly skimmed over your code and the spec, and the spec says that nResidualChEncode with flag 0 for each channel means it is actually using residiual encoding, and flag 1 for a channel means no residual. Quote: For a particular encoded channel the value of corresponding bit in nResidualChEncode equal to '0' indicates that the residual in that channel is obtained by subtracting the lossy decoded audio from the original audio. For a particular encoded channel the value of corresponding bit in nResidualChEncode equal to '1' indicates that the residual in that channel is the original audio. Your interpretation of that value seems to neither take the bit-mask nature into account, nor the inverted logic of "0 = residuals" Unless I'm entirely wrong, which might also be the case. Or the spec is lying through its teeth, which happened before. - Hendrik _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
