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>2012-05-20 23:49:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-20 23:49:27 +0400
commit2d2d36fe3b2f3e7eed7d05714abc80f1a5a82303 (patch)
tree7ad54825db128e59312fbf787555fd91edf09a07 /source/blender/imbuf
parent5d9256404159670bec6d65557697accb5b3111b8 (diff)
code cleanup:
- style - multi-line ifs move braces onto new lines. - iterators - convert some to macros, other split up and move brace.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/anim_movie.c11
-rw-r--r--source/blender/imbuf/intern/dds/DirectDrawSurface.cpp2
-rw-r--r--source/blender/imbuf/intern/filter.c5
-rw-r--r--source/blender/imbuf/intern/indexer_dv.c5
-rw-r--r--source/blender/imbuf/intern/tiff.c3
-rw-r--r--source/blender/imbuf/intern/util.c6
6 files changed, 18 insertions, 14 deletions
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index a0856533335..b702e59bc16 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -603,14 +603,14 @@ static int startffmpeg(struct anim *anim)
#ifdef FFMPEG_SWSCALE_COLOR_SPACE_SUPPORT
/* Try do detect if input has 0-255 YCbCR range (JFIF Jpeg MotionJpeg) */
if (!sws_getColorspaceDetails(anim->img_convert_ctx, (int **)&inv_table, &srcRange,
- &table, &dstRange, &brightness, &contrast, &saturation)) {
-
+ &table, &dstRange, &brightness, &contrast, &saturation))
+ {
srcRange = srcRange || anim->pCodecCtx->color_range == AVCOL_RANGE_JPEG;
inv_table = sws_getCoefficients(anim->pCodecCtx->colorspace);
if (sws_setColorspaceDetails(anim->img_convert_ctx, (int *)inv_table, srcRange,
- table, dstRange, brightness, contrast, saturation)) {
-
+ table, dstRange, brightness, contrast, saturation))
+ {
printf("Warning: Could not set libswscale colorspace details.\n");
}
}
@@ -940,7 +940,8 @@ static ImBuf *ffmpeg_fetchibuf(struct anim *anim, int position,
(long long int)pts_to_search, pts_time_base, frame_rate, st_time);
if (anim->last_frame &&
- anim->last_pts <= pts_to_search && anim->next_pts > pts_to_search) {
+ anim->last_pts <= pts_to_search && anim->next_pts > pts_to_search)
+ {
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
"FETCH: frame repeat: last: %lld next: %lld\n",
(long long int)anim->last_pts,
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
index 3966135ea32..438988fbe48 100644
--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
+++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
@@ -1507,7 +1507,7 @@ void DirectDrawSurface::printInfo() const
printf("\tMisc flag: %u\n", header.header10.miscFlag);
printf("\tArray size: %u\n", header.header10.arraySize);
}
-
+
if (header.reserved[9] == FOURCC_NVTT)
{
int major = (header.reserved[10] >> 16) & 0xFF;
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c
index 30142e5f5d5..a0434691807 100644
--- a/source/blender/imbuf/intern/filter.c
+++ b/source/blender/imbuf/intern/filter.c
@@ -339,8 +339,9 @@ static int check_pixel_assigned(const void *buffer, const char *mask, const int
if (mask != NULL) {
res = mask[index] != 0 ? 1 : 0;
}
- else if ( (is_float && ((const float *) buffer)[alpha_index] != 0.0f) ||
- (!is_float && ((const unsigned char *) buffer)[alpha_index] != 0) ) {
+ else if ((is_float && ((const float *) buffer)[alpha_index] != 0.0f) ||
+ (!is_float && ((const unsigned char *) buffer)[alpha_index] != 0) )
+ {
res = 1;
}
}
diff --git a/source/blender/imbuf/intern/indexer_dv.c b/source/blender/imbuf/intern/indexer_dv.c
index 460ca93435e..0090577062f 100644
--- a/source/blender/imbuf/intern/indexer_dv.c
+++ b/source/blender/imbuf/intern/indexer_dv.c
@@ -269,7 +269,8 @@ static void fill_gap(indexer_dv_context *This, int isPAL)
}
while (This->gap_start != This->ref_time_read ||
- This->gap_frame != This->curr_frame) {
+ This->gap_frame != This->curr_frame)
+ {
inc_frame(&This->gap_frame, &This->gap_start, isPAL);
This->frameno_offset++;
}
@@ -320,7 +321,7 @@ static void proc_frame(indexer_dv_context *This,
This->gap_frame = -1;
}
}
- else if (This->ref_time_read_new == This->ref_time_read) {
+ else if (This->ref_time_read_new == This->ref_time_read) {
// do nothing
}
else {
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index 2178b6a4155..556ec64e59a 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -819,7 +819,8 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
TIFFSetField(image, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
if (TIFFWriteEncodedStrip(image, 0,
(bitspersample == 16) ? (unsigned char *)pixels16 : pixels,
- ibuf->x * ibuf->y * samplesperpixel * bitspersample / 8) == -1) {
+ ibuf->x * ibuf->y * samplesperpixel * bitspersample / 8) == -1)
+ {
fprintf(stderr,
"imb_savetiff: Could not write encoded TIFF.\n");
TIFFClose(image);
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 4820347f048..a86e2bed0e5 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -188,9 +188,9 @@ static int IMB_ispic_name(const char *name)
int IMB_ispic(const char *filename)
{
if (U.uiflag & USER_FILTERFILEEXTS) {
- if ( (BLI_testextensie_array(filename, imb_ext_image)) ||
- (G.have_quicktime && BLI_testextensie_array(filename, imb_ext_image_qt))
- ) {
+ if ((BLI_testextensie_array(filename, imb_ext_image)) ||
+ (G.have_quicktime && BLI_testextensie_array(filename, imb_ext_image_qt)))
+ {
return IMB_ispic_name(filename);
}
else {