xiph / daala

Modern video compression for the internet
https://xiph.org/daala/
BSD 2-Clause "Simplified" License
542 stars 102 forks source link

Fully order the pvq search candidates for portable, stable sorting #198

Closed barrbrain closed 8 years ago

barrbrain commented 8 years ago

I observed different results from AWCY when running the same commit, test clip and configuration on my MacBook. It occurred to me that it could be a result of differences in qsort implementation. Adjusting the sort key to produce a stable sort indeed fixed this for me.

https://arewecompressedyet.com/?r%5B%5D=pvq-sort-good-2016-09-06T02-43-53.523Z&r%5B%5D=master_2016-09-03d&s=objective-1-fast

barrbrain commented 8 years ago

Added a comment and a better commit message.

Strictly speaking, the natural stable order is fully specified by breaking ties with (gain, theta). Gain was sufficient for my test but whether that is absolutely true depends on how k is computed.

jmvalin commented 8 years ago

r+

barrbrain commented 8 years ago

Thanks for the review. Any plans to merge this?