算术编码器的最佳精度是多少?
我在这里实现了一个算术编码器 - https://github.com/danieleades/arithmetic-coding
我正在努力理解选择最佳位数来表示编码器内整数的一般方法。我正在使用一个模型,其中概率表示为有理数。
我知道,为了防止下溢/溢出,编码器/解码器中用于表示整数的位数必须比用于表示概率分母的最大位数至少大 2 位。
例如,如果我最多使用 10 位来表示概率的分母,那么为了确保编码/解码工作正常,我需要至少使用 MAX_DENOMINATOR_BITS + 2 = 12
位来表示整数。
如果我使用 32 位整数来存储这些值,我还会有另外 10 位(对吗?)。
我见过几个使用 12 位整数、8 位概率和 32 位整数类型的示例。这是否是最佳选择,或者这只是一个相当通用的选择?
我发现将精度提高到最小值以上会稍微提高压缩比(但很快就会饱和)。鉴于提高精度可以提高压缩率,最佳选择是什么?我是否应该简单地致力于最大化用于表示给定分母的整数的位数?性能对于我的应用程序来说不是一个目标,以防万一这是一个考虑因素。
是否可以量化移动 64 位内部表示以提供更多精度位的好处?
我的实现基于这篇(优秀)文章 - https://marknelson.us/posts/2014/10/19/data-compression-with-arithmetic-coding.html
I've implemented an arithmetic coder here - https://github.com/danieleades/arithmetic-coding
i'm struggling to understand a general way to choose an optimal number of bits for representing integers within the encoder. I'm using a model where probabilities are represented as rationals.
I know that to prevent underflows/overflows, the number of bits used to represent integers within the encoder/decoder must be at least 2 bits greater than the maximum number of bits used to represent the denominator of the probabilities.
for example, if i use a maximum of 10 bits to represent the denominator of the probabilities, then to ensure the encoding/decoding works, i need to use at least MAX_DENOMINATOR_BITS + 2 = 12
bits to represent the integers.
If i was to use 32bit integers to store these values, I would have another 10 bits up my sleeve (right?).
I've seen a couple of examples that use 12 bits for integers, and 8 bits for probabilities, with a 32bit integer type. Is this somehow optimal, or is this just a fairly generic choice?
I've found that increasing the precision above the minimum improves the compression ratio slightly (but it saturates quickly). Given that increasing the precision improves compression, what is the optimum choice? Should I simply aim to maximise the number of bits i use to represent the integers for a given denominator? Performance is a non-goal for my application, in case that's a consideration.
Is it possible to quantify the benefit of moving to say, a 64bit internal representation to provide a greater number of precision bits?
I've based my implementation on this (excellent) article - https://marknelson.us/posts/2014/10/19/data-compression-with-arithmetic-coding.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论