[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47577] trunk/blender/source/blender/ blenkernel/intern/movieclip.c: Avoid imbuf loading when getting movie clip size

Sergey Sharybin sergey.vfx at gmail.com
Thu Jun 7 18:15:30 CEST 2012


Revision: 47577
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47577
Author:   nazgul
Date:     2012-06-07 16:15:24 +0000 (Thu, 07 Jun 2012)
Log Message:
-----------
Avoid imbuf loading when getting movie clip size

This prevents high memory usage by non-proxied frames when doing mask parenting.

Description from code:

  Originally was needed to support image sequences with different image dimensions,
  which might be useful for such things as reconstruction of unordered image sequence,
  or painting/rotoscoping of non-equal-sized images, but this ended up in unneeded
  cache lookups and even unwanted non-proxied files loading when doing mask parenting,
  so let's disable this for now and assume image sequence consists of images with equal sizes

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/movieclip.c

Modified: trunk/blender/source/blender/blenkernel/intern/movieclip.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/movieclip.c	2012-06-07 15:49:02 UTC (rev 47576)
+++ trunk/blender/source/blender/blenkernel/intern/movieclip.c	2012-06-07 16:15:24 UTC (rev 47577)
@@ -916,7 +916,17 @@
 
 void BKE_movieclip_get_size(MovieClip *clip, MovieClipUser *user, int *width, int *height)
 {
+#if 0
+	/* originally was needed to support image sequences with different image dimensions,
+	 * which might be useful for such things as reconstruction of unordered image sequence,
+	 * or painting/rotoscoping of non-equal-sized images, but this ended up in unneeded
+	 * cache lookups and even unwanted non-proxied files loading when doing mask parenting,
+	 * so let's disable this for now and assume image sequence consists of images with
+	 * equal sizes (sergey)
+	 */
 	if (user->framenr == clip->lastframe) {
+#endif
+	if (clip->lastsize[0] != 0 && clip->lastsize[1] != 0) {
 		*width = clip->lastsize[0];
 		*height = clip->lastsize[1];
 	}




More information about the Bf-blender-cvs mailing list