clock: Improve slaving regression.
authorJan Schmidt <jan@centricular.com>
Wed, 14 Jan 2015 23:05:32 +0000 (10:05 +1100)
committerJan Schmidt <jan@centricular.com>
Wed, 21 Jan 2015 11:27:18 +0000 (22:27 +1100)
commit81d613694c993e6cce55289a66554ad28bfba923
treebd3d507b376afb2bc4954c73799fa32fb5085df5
parentf9f45834e73ef619a49eb5873eee53e892a45fc6
clock: Improve slaving regression.

Add domain checks for the input values, and a variable precision
calculation that loops if necessary to ensure we never overflow
accumulators and then silently produce garbage results.

Make the (non-public) linear regression function available for
unit testing by putting it in a separate source file the test
can include. Add a unit test that the new regression function
produces sensible results for several inputs taken from real-world
captures.
gst/Makefile.am
gst/gst_private.h
gst/gstclock-linreg.c [new file with mode: 0644]
gst/gstclock.c
tests/check/gst/gstclock.c