Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-06-17 18:04:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-17 18:04:54 +0300
commite74bd46ede9a957c03821e36b80ad2d2f378bf73 (patch)
tree76fa7d9f44992dc5715525e06da71b36e69356ce /source/blender/imbuf/intern/indexer.c
parent1eed46c788f1c9e0d92985857bdbf5a7045f6791 (diff)
Cleanup: trailing space for imbuf module
Diffstat (limited to 'source/blender/imbuf/intern/indexer.c')
-rw-r--r--source/blender/imbuf/intern/indexer.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index eaf4dfd84b4..167f2e4f8e0 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -142,7 +142,7 @@ void IMB_index_builder_finish(anim_index_builder *fp, int rollback)
}
fclose(fp->fp);
-
+
if (rollback) {
unlink(fp->temp_name);
}
@@ -185,7 +185,7 @@ struct anim_index *IMB_indexer_open(const char *name)
idx = MEM_callocN(sizeof(struct anim_index), "anim_index");
BLI_strncpy(idx->name, name, sizeof(idx->name));
-
+
fseek(fp, 0, SEEK_END);
idx->num_entries = (ftell(fp) - 12) /
@@ -257,7 +257,7 @@ int IMB_indexer_get_frame_index(struct anim_index *idx, int frameno)
int first = 0;
/* bsearch (lower bound) the right index */
-
+
while (len > 0) {
half = len >> 1;
middle = first;
@@ -389,7 +389,7 @@ static void get_proxy_filename(struct anim *anim, IMB_Proxy_Size preview_size,
char proxy_name[256];
char stream_suffix[20];
const char *name = (temp) ? "proxy_%d%s_part.avi" : "proxy_%d%s.avi";
-
+
stream_suffix[0] = 0;
if (anim->streamindex > 0) {
@@ -418,18 +418,18 @@ static void get_tc_filename(struct anim *anim, IMB_Timecode_Type tc,
char stream_suffix[20];
char index_name[256];
-
+
stream_suffix[0] = 0;
if (anim->streamindex > 0) {
BLI_snprintf(stream_suffix, 20, "_st%d", anim->streamindex);
}
-
+
BLI_snprintf(index_name, 256, index_names[i], stream_suffix, anim->suffix);
get_index_dir(anim, index_dir, sizeof(index_dir));
-
- BLI_join_dirfile(fname, FILE_MAXFILE + FILE_MAXDIR,
+
+ BLI_join_dirfile(fname, FILE_MAXFILE + FILE_MAXDIR,
index_dir, index_name);
}
@@ -475,7 +475,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
{
struct proxy_output_ctx *rv = MEM_callocN(
sizeof(struct proxy_output_ctx), "alloc_proxy_output");
-
+
char fname[FILE_MAX];
int ffmpeg_quality;
@@ -491,7 +491,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
rv->of = avformat_alloc_context();
rv->of->oformat = av_guess_format("avi", NULL, NULL);
-
+
BLI_strncpy(rv->of->filename, fname, sizeof(rv->of->filename));
fprintf(stderr, "Starting work on proxy: %s\n", rv->of->filename);
@@ -611,7 +611,7 @@ static int add_to_proxy_output_ffmpeg(
ret = avcodec_encode_video2(ctx->c, &packet, frame, &got_output);
if (ret < 0) {
- fprintf(stderr, "Error encoding proxy frame %d for '%s'\n",
+ fprintf(stderr, "Error encoding proxy frame %d for '%s'\n",
ctx->cfra - 1, ctx->of->filename);
return 0;
}
@@ -661,9 +661,9 @@ static void free_proxy_output_ffmpeg(struct proxy_output_ctx *ctx,
avcodec_flush_buffers(ctx->c);
av_write_trailer(ctx->of);
-
+
avcodec_close(ctx->c);
-
+
if (ctx->of->oformat) {
if (!(ctx->of->oformat->flags & AVFMT_NOFILE)) {
avio_close(ctx->of->pb);
@@ -678,19 +678,19 @@ static void free_proxy_output_ffmpeg(struct proxy_output_ctx *ctx,
av_free(ctx->frame);
}
- get_proxy_filename(ctx->anim, ctx->proxy_size,
+ get_proxy_filename(ctx->anim, ctx->proxy_size,
fname_tmp, true);
if (rollback) {
unlink(fname_tmp);
}
else {
- get_proxy_filename(ctx->anim, ctx->proxy_size,
+ get_proxy_filename(ctx->anim, ctx->proxy_size,
fname, false);
unlink(fname);
BLI_rename(fname_tmp, fname);
}
-
+
MEM_freeN(ctx);
}
@@ -883,7 +883,7 @@ static void index_rebuild_ffmpeg_proc_decoded_frame(
if (tc_types[i] == IMB_TC_RECORD_RUN_NO_GAPS)
tc_frameno = context->frameno_gapless;
-
+
IMB_index_builder_proc_frame(
context->indexer[i],
curr_packet->data,
@@ -892,7 +892,7 @@ static void index_rebuild_ffmpeg_proc_decoded_frame(
s_pos, s_dts, pts);
}
}
-
+
context->frameno_gapless++;
}
@@ -1006,12 +1006,12 @@ static AviMovie *alloc_proxy_output_avi(
float frs_sec_base = 1.0;
IMB_anim_get_fps(anim, &frs_sec, &frs_sec_base, false);
-
+
x = width;
y = height;
framerate = (double) frs_sec / (double) frs_sec_base;
-
+
avi = MEM_mallocN(sizeof(AviMovie), "avimovie");
format = AVI_FORMAT_MJPEG;
@@ -1020,7 +1020,7 @@ static AviMovie *alloc_proxy_output_avi(
MEM_freeN(avi);
return NULL;
}
-
+
AVI_set_compress_option(avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_WIDTH, &x);
AVI_set_compress_option(avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_HEIGHT, &y);
AVI_set_compress_option(avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_QUALITY, &quality);
@@ -1111,7 +1111,7 @@ static void index_rebuild_fallback(FallbackIndexBuilderContext *context,
*progress = next_progress;
*do_update = true;
}
-
+
if (*stop) {
break;
}
@@ -1128,7 +1128,7 @@ static void index_rebuild_fallback(FallbackIndexBuilderContext *context,
IMB_scalefastImBuf(s_ibuf, x, y);
IMB_convert_rgba_to_abgr(s_ibuf);
-
+
AVI_write_frame(context->proxy_ctx[i], pos,
AVI_FORMAT_RGB32,
s_ibuf->rect, x * y * 4);
@@ -1178,7 +1178,7 @@ IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, IMB_Timecod
}
}
}
-
+
if (!overwrite) {
IMB_Proxy_Size built_proxies = IMB_anim_proxy_get_existing(anim);
if (built_proxies != 0) {
@@ -1194,13 +1194,13 @@ IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, IMB_Timecod
}
proxy_sizes_to_build &= ~built_proxies;
}
-
+
fflush(stdout);
if (proxy_sizes_to_build == 0) {
return NULL;
}
-
+
switch (anim->curtype) {
#ifdef WITH_FFMPEG
@@ -1313,7 +1313,7 @@ struct anim *IMB_anim_open_proxy(
/* proxies are generated in the same color space as animation itself */
anim->proxy_anim[i] = IMB_open_anim(fname, 0, 0, anim->colorspace);
-
+
anim->proxies_tried |= preview_size;
return anim->proxy_anim[i];
@@ -1336,7 +1336,7 @@ struct anim_index *IMB_anim_open_index(
get_tc_filename(anim, tc, fname);
anim->curr_idx[i] = IMB_indexer_open(fname);
-
+
anim->indices_tried |= tc;
return anim->curr_idx[i];