Maybe for the sake of bit-exact identical result with Apple's implementation?

They ships sample IMA4 encoder/decoder in AudioCodecSDK_ACPlugIn.zip .
It can be downloaded from Apple site, but you can browse them here (someone has mirrored at github):
https://github.com/darcyliu/CocoaSampleCode/tree/master/AudioCodecSDK_ACPlugIn/Codecs/IMA4

As far as I can see from Apple source, they use 16bit predictor internally but only writes MSB 9 bits to each frame. The 9 bits predictor in the stream is picked only when internally predicted value significantly differs from it (usually due to seeking or something).

(2014/06/05 21:16), Martin Storsjö wrote:
This was added without explanation in bf334535b, and there are
no references to why this should be done, or what it actually
fixes. The difference to actual decoded output from QuickTime
is not significantly altered by this change.

This also does not match what our encoder does, making the encoder's
attempts to improve quality actually just worsen it (at least
when tested using our decoder).

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to