]> git.sesse.net Git - movit/commit
Fix a bug where intermediate phase outputs could get too low height.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 23 Jan 2013 23:43:26 +0000 (00:43 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 23 Jan 2013 23:43:26 +0000 (00:43 +0100)
commitfc55857d9ccf1edcc141fa0853a8bf2d6b40b4dc
treebf57aa40daf78ff25647f9c0e58aa05bbdc94e1c
parente2962f03fe8fb0b1c47be56eca26761da97453a0
Fix a bug where intermediate phase outputs could get too low height.

Basically our aspect ratio adjustment and lack of proper roundoff
could conspire to let e.g. mix(1280x720, 939x939) = 1669x938,
which is obviously wrong. I could probably have fixed it with
an extra lrintf(), but it seems more robust to simply avoid the
extra conversion (ie., never convert height -> width -> height).

Add a unit test to verify.
effect_chain.cpp
effect_chain.h
effect_chain_test.cpp