diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-16 19:03:18 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-16 19:03:18 +0400 |
commit | 14a92fc3a24735900693617cb1b89bf9918893df (patch) | |
tree | 8b17fbf9355a414179aeb5cfe2a2c52cc924ff3e /source/blender/blenkernel/intern/movieclip.c | |
parent | aa747f588936899bf56fa7142a936eafcd7d822d (diff) |
Tomato: run aspect correction before stabilizing shot.
Diffstat (limited to 'source/blender/blenkernel/intern/movieclip.c')
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index c93c03a4424..ce0d169557d 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -279,7 +279,7 @@ typedef struct MovieClipCache { int framenr; int postprocess_flag; - float loc[2], scale, angle; + float loc[2], scale, angle, aspect; int proxy; short render_flag; } stabilized; @@ -727,6 +727,10 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int if(cache->stabilized.postprocess_flag != postprocess_flag) return NULL; + /* stabilization also depends on pixel aspect ratio */ + if(cache->stabilized.aspect != clip->tracking.camera.pixel_aspect) + return NULL; + stableibuf = cache->stabilized.ibuf; BKE_tracking_stabilization_data(&clip->tracking, framenr, stableibuf->x, stableibuf->y, tloc, &tscale, &tangle); @@ -763,6 +767,7 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user cache->stabilized.scale = tscale; cache->stabilized.angle = tangle; cache->stabilized.framenr = framenr; + cache->stabilized.aspect = clip->tracking.camera.pixel_aspect; if(clip->flag&MCLIP_USE_PROXY) { cache->stabilized.proxy= rendersize_to_proxy(user, clip->flag); |