Multi-threaded frame calculation for movie clip proxies
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 15 Mar 2013 11:59:46 +0000 (11:59 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 15 Mar 2013 11:59:46 +0000 (11:59 +0000)
commit6dc4ea34e44ae77125918ab9eda0fcfe7d9f0b3c
tree20c04bcd39de1a63b515154789e1a8551e77f082
parent0807c976f45f81bc289aa87e1c8cedd07f8245c1
Multi-threaded frame calculation for movie clip proxies

This commit implements multi-threaded calculation of frames
when building proxies. Both scaling and undistortion steps
are now threaded.

Frames and proxy resolution are still handled one-by-one,
saving files after every single step. So if HDD is not so
fast, this commit could have not so much benefit.

Internal changes:

- Added IMB_scaleImBuf_threaded which scales given image
  buffer in multiple threads and uses bilinear filtering.

- libmv's camera intrinsics now have SetThreads() method
  which is used to specify how many OpenMP threads to use
  for buffer distortion/undistortion.

  And yeah, this code is using OpenMP for threading.

- Reshuffled a bit libmv-capi calls and added function
  BKE_tracking_distortion_set_threads to specify number
  of threads used by intrinscis.
extern/libmv/libmv-capi.cpp
extern/libmv/libmv-capi.h
extern/libmv/libmv/simple_pipeline/camera_intrinsics.cc
extern/libmv/libmv/simple_pipeline/camera_intrinsics.h
source/blender/blenkernel/BKE_tracking.h
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/tracking.c
source/blender/editors/space_clip/clip_ops.c
source/blender/imbuf/IMB_imbuf.h
source/blender/imbuf/intern/scaling.c