Implement support for 2-pattern cadence.
An N pattern cadence is simply figuring out if N times the frame duration has an integer cadence (M) relative to the render interval, then figuring out how to distribute N values such that sum(x1 + x2 + x3 ... xN) == M. I haven't dug through our discussion on how to compute this for N > 2, but for N == 2, it's simple to just use x1 == ceil(M/2), x2 == floor(M/2) This change refactors the main function in VideoCadenceEstimator into smaller pieces (an original review request :) in order to reuse them for detecting 2-pattern cadence. BUG=439548 TEST=all unit tests still pass, 3:2 cadence tests pass. Review URL: https://codereview.chromium.org/1125893002 Cr-Commit-Position: refs/heads/master@{#329813}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment