diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-06 19:15:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-06 19:15:33 +0400 |
commit | c93d7a193ab450f89664a70e0204c14531be4877 (patch) | |
tree | 7263e2b9b83922d766f59f3f7531157c0f71be35 /source/blender/blenkernel/intern/movieclip.c | |
parent | 53b221960acaa63cc50bd8095d0ea11f9de539e1 (diff) |
style cleanup: BKE_*.c files which deal with library functions
Diffstat (limited to 'source/blender/blenkernel/intern/movieclip.c')
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 849dbd83366..31741718a09 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -71,7 +71,7 @@ #include "BKE_main.h" #include "BKE_utildefines.h" #include "BKE_movieclip.h" -#include "BKE_image.h" /* openanim */ +#include "BKE_image.h" /* openanim */ #include "BKE_tracking.h" #include "IMB_imbuf_types.h" @@ -205,7 +205,7 @@ static ImBuf *movieclip_load_sequence_file(MovieClip *clip, MovieClipUser *user, else get_sequence_fname(clip, framenr, name); - loadflag = IB_rect|IB_multilayer; + loadflag = IB_rect | IB_multilayer; /* read ibuf */ ibuf = IMB_loadiffname(name, loadflag); @@ -250,7 +250,7 @@ static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, in dur = IMB_anim_get_duration(clip->anim, tc); fra = framenr - 1; - if (fra<0) + if (fra < 0) fra = 0; if (fra > (dur - 1)) @@ -283,7 +283,7 @@ static void movieclip_calc_length(MovieClip *clip) clip->len = framenr + 1; } else { - for (;;) { + for (;; ) { get_sequence_fname(clip, framenr, name); if (!BLI_exists(name)) { @@ -338,7 +338,7 @@ typedef struct MovieClipImBufCacheKey { static void moviecache_keydata(void *userkey, int *framenr, int *proxy, int *render_flags) { - MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey*)userkey; + MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey *)userkey; *framenr = key->framenr; *proxy = key->proxy; @@ -347,7 +347,7 @@ static void moviecache_keydata(void *userkey, int *framenr, int *proxy, int *ren static unsigned int moviecache_hashhash(const void *keyv) { - MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey*)keyv; + MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey *)keyv; int rval = key->framenr; return rval; @@ -355,8 +355,8 @@ static unsigned int moviecache_hashhash(const void *keyv) static int moviecache_hashcmp(const void *av, const void *bv) { - const MovieClipImBufCacheKey *a = (MovieClipImBufCacheKey*)av; - const MovieClipImBufCacheKey *b = (MovieClipImBufCacheKey*)bv; + const MovieClipImBufCacheKey *a = (MovieClipImBufCacheKey *)av; + const MovieClipImBufCacheKey *b = (MovieClipImBufCacheKey *)bv; if (a->framenr < b->framenr) return -1; @@ -406,7 +406,7 @@ static void put_imbuf_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, i clip->cache = MEM_callocN(sizeof(MovieClipCache), "movieClipCache"); clip->cache->moviecache = IMB_moviecache_create(sizeof(MovieClipImBufCacheKey), moviecache_hashhash, - moviecache_hashcmp, moviecache_keydata); + moviecache_hashcmp, moviecache_keydata); } key.framenr = user->framenr; @@ -529,8 +529,8 @@ static void real_ibuf_size(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, in break; case MCLIP_PROXY_RENDER_SIZE_75: - *width = ((float)*width)*4.0f/3.0f; - *height = ((float)*height)*4.0f/3.0f; + *width = ((float)*width) * 4.0f / 3.0f; + *height = ((float)*height) * 4.0f / 3.0f; break; } } @@ -669,8 +669,8 @@ static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *u if (postprocess_flag) { int disable_red = postprocess_flag & MOVIECLIP_DISABLE_RED, disable_green = postprocess_flag & MOVIECLIP_DISABLE_GREEN, - disable_blue = postprocess_flag & MOVIECLIP_DISABLE_BLUE, - grayscale = postprocess_flag & MOVIECLIP_PREVIEW_GRAYSCALE; + disable_blue = postprocess_flag & MOVIECLIP_DISABLE_BLUE, + grayscale = postprocess_flag & MOVIECLIP_PREVIEW_GRAYSCALE; if (!postproc_ibuf) postproc_ibuf = IMB_dupImBuf(ibuf); @@ -801,8 +801,8 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int /* check for stabilization parameters */ if (tscale != cache->stabilized.scale || - tangle != cache->stabilized.angle || - !equals_v2v2(tloc, cache->stabilized.loc)) + tangle != cache->stabilized.angle || + !equals_v2v2(tloc, cache->stabilized.loc)) { return NULL; } @@ -1049,17 +1049,17 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip BKE_movieclip_get_size(clip, user, &width, &height); undist_marker.pos[0] *= width; - undist_marker.pos[1] *= height*aspy; + undist_marker.pos[1] *= height * aspy; BKE_tracking_invert_intrinsics(&clip->tracking, undist_marker.pos, undist_marker.pos); undist_marker.pos[0] /= width; - undist_marker.pos[1] /= height*aspy; + undist_marker.pos[1] /= height * aspy; } /* NOTE: margin should be kept in sync with value from ui_draw_but_TRACKPREVIEW */ tmpibuf = BKE_tracking_get_pattern_imbuf(ibuf, track, &undist_marker, 3 /* margin */, - 1 /* anchor */, scopes->track_pos, NULL); + 1 /* anchor */, scopes->track_pos, NULL); if (tmpibuf->rect_float) IMB_rect_from_float(tmpibuf); @@ -1073,11 +1073,11 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip IMB_freeImBuf(ibuf); } - if ((track->flag & TRACK_LOCKED)==0) { + if ((track->flag & TRACK_LOCKED) == 0) { scopes->marker = marker; scopes->track = track; - scopes->slide_scale[0] = track->pat_max[0]-track->pat_min[0]; - scopes->slide_scale[1] = track->pat_max[1]-track->pat_min[1]; + scopes->slide_scale[0] = track->pat_max[0] - track->pat_min[0]; + scopes->slide_scale[1] = track->pat_max[1] - track->pat_min[1]; } } } |