diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-09 22:28:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-09 22:28:30 +0400 |
commit | 89a963fb7fdff543b77de790355b9dac3019bd33 (patch) | |
tree | 4e1d2245e20f8c21625e99d771776f66c233a0de /source/blender/imbuf | |
parent | de4bd55e01bc574c13977537ace1a0901dcfcaf0 (diff) |
style cleanup: comment blocks
Diffstat (limited to 'source/blender/imbuf')
23 files changed, 165 insertions, 164 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 1e0cdf10dba..a68bbb97b62 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -185,18 +185,17 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx, typedef enum IMB_Timecode_Type { IMB_TC_NONE = 0, /* don't use timecode files at all */ - IMB_TC_RECORD_RUN = 1, /* use images in the order as they are recorded - (currently, this is the only one implemented - and is a sane default) - */ + + IMB_TC_RECORD_RUN = 1, /* use images in the order as they are recorded + * (currently, this is the only one implemented + * and is a sane default) */ + IMB_TC_FREE_RUN = 2, /* use global timestamp written by recording - device (prosumer camcorders e.g. can do - that) */ - IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN = 4, - /* interpolate a global timestamp using the - record date and time written by recording - device (*every* consumer camcorder can do - that :) )*/ + * device (prosumer camcorders e.g. can do that) */ + IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN = 4, /* interpolate a global timestamp using the + * record date and time written by recording + * device (*every* consumer camcorder can do + * that :) )*/ IMB_TC_RECORD_RUN_NO_GAPS = 8, IMB_TC_MAX_SLOT = 4 } IMB_Timecode_Type; @@ -367,8 +366,8 @@ void IMB_interlace(struct ImBuf *ibuf); /* create char buffer, color corrected if necessary, for ImBufs that lack one */ void IMB_rect_from_float(struct ImBuf *ibuf); -/* create char buffer for part of the image, color corrected if necessary, - Changed part will be stored in buffer. This is expected to be used for texture painting updates */ +/* Create char buffer for part of the image, color corrected if necessary, + * Changed part will be stored in buffer. This is expected to be used for texture painting updates */ void IMB_partial_rect_from_float(struct ImBuf *ibuf, float *buffer, int x, int y, int w, int h); void IMB_float_from_rect(struct ImBuf *ibuf); void IMB_float_from_rect_simple(struct ImBuf *ibuf); /* no profile conversion */ diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index c2b42db447d..076f518585b 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -84,8 +84,8 @@ typedef struct ImBuf { /* pixels */ unsigned int *rect; /* pixel values stored here */ float *rect_float; /* floating point Rect equivalent - Linear RGB color space - may need gamma correction to - sRGB when generating 8bit representations */ + * Linear RGB color space - may need gamma correction to + * sRGB when generating 8bit representations */ /* resolution - pixels per meter */ double ppm[2]; diff --git a/source/blender/imbuf/IMB_moviecache.h b/source/blender/imbuf/IMB_moviecache.h index 3fa98a04d8d..f6927d4f31d 100644 --- a/source/blender/imbuf/IMB_moviecache.h +++ b/source/blender/imbuf/IMB_moviecache.h @@ -36,8 +36,8 @@ #include "BLI_ghash.h" /* Cache system for movie data - now supports stoting ImBufs only - Supposed to provide unified cache system for movie clips, sequencer and - other movie-related areas */ + * Supposed to provide unified cache system for movie clips, sequencer and + * other movie-related areas */ struct ImBuf; struct MovieCache; diff --git a/source/blender/imbuf/intern/IMB_indexer.h b/source/blender/imbuf/intern/IMB_indexer.h index 6546840ea85..dc16b4d7e36 100644 --- a/source/blender/imbuf/intern/IMB_indexer.h +++ b/source/blender/imbuf/intern/IMB_indexer.h @@ -33,26 +33,24 @@ #include <stdio.h> #include "BKE_utildefines.h" #include "IMB_anim.h" - /* - separate animation index files to solve the following problems: - - a) different timecodes within one file (like DTS/PTS, Timecode-Track, - "implicit" timecodes within DV-files and HDV-files etc.) - b) seeking difficulties within ffmpeg for files with timestamp holes - c) broken files that miss several frames / have varying framerates - d) use proxies accordingly - - ... we need index files, that provide us with - - the binary(!) position, where we have to seek into the file *and* - the continuous frame number (ignoring the holes) starting from the - beginning of the file, so that we know, which proxy frame to serve. - - This index has to be only built once for a file and is written into - the BL_proxy directory structure for later reuse in different blender files. - -*/ + * separate animation index files to solve the following problems: + * + * a) different timecodes within one file (like DTS/PTS, Timecode-Track, + * "implicit" timecodes within DV-files and HDV-files etc.) + * b) seeking difficulties within ffmpeg for files with timestamp holes + * c) broken files that miss several frames / have varying framerates + * d) use proxies accordingly + * + * ... we need index files, that provide us with + * + * the binary(!) position, where we have to seek into the file *and* + * the continuous frame number (ignoring the holes) starting from the + * beginning of the file, so that we know, which proxy frame to serve. + * + * This index has to be only built once for a file and is written into + * the BL_proxy directory structure for later reuse in different blender files. + */ typedef struct anim_index_entry { int frameno; diff --git a/source/blender/imbuf/intern/IMB_metadata.h b/source/blender/imbuf/intern/IMB_metadata.h index 8211896b185..336a5f95082 100644 --- a/source/blender/imbuf/intern/IMB_metadata.h +++ b/source/blender/imbuf/intern/IMB_metadata.h @@ -42,13 +42,13 @@ typedef struct ImMetaData { int len; } ImMetaData; -/** The metadata is a list of key/value pairs (both char*) that can me - saved in the header of several image formats. - Apart from some common keys like - 'Software' and 'Description' (png standard) we'll use keys within the - Blender namespace, so should be called 'Blender::StampInfo' or 'Blender::FrameNum' - etc... -*/ +/** The metadata is a list of key/value pairs (both char*) that can me + * saved in the header of several image formats. + * Apart from some common keys like + * 'Software' and 'Description' (png standard) we'll use keys within the + * Blender namespace, so should be called 'Blender::StampInfo' or 'Blender::FrameNum' + * etc... + */ /* free blender ImMetaData struct */ @@ -58,7 +58,7 @@ void IMB_metadata_free(struct ImBuf* img); * \param img - the ImBuf that contains the image data * \param key - the key of the field * \param value - the data in the field, first one found with key is returned, - memory has to be allocated by user. + * memory has to be allocated by user. * \param len - length of value buffer allocated by user. * \return - 1 (true) if ImageInfo present and value for the key found, 0 (false) otherwise */ diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 8722ca8e90a..2719f2e296b 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -61,7 +61,7 @@ #endif #include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail - BLI_countlist BLI_stringdec */ + * BLI_countlist BLI_stringdec */ #include "BLI_utildefines.h" #include "BLI_math_base.h" @@ -603,10 +603,10 @@ static int startffmpeg(struct anim * anim) } /* postprocess the image in anim->pFrame and do color conversion - and deinterlacing stuff. - - Output is anim->last_frame -*/ + * and deinterlacing stuff. + * + * Output is anim->last_frame + */ static void ffmpeg_postprocess(struct anim * anim) { @@ -621,7 +621,7 @@ static void ffmpeg_postprocess(struct anim * anim) } /* This means the data wasnt read properly, - this check stops crashing */ + * this check stops crashing */ if (input->data[0]==0 && input->data[1]==0 && input->data[2]==0 && input->data[3]==0){ fprintf(stderr, "ffmpeg_fetchibuf: " diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index 77fc6bdf856..1b6184c8b58 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -40,9 +40,9 @@ #include "IMB_filetype.h" /* some code copied from article on microsoft.com, copied - here for enhanced BMP support in the future - http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0197/mfcp1/mfcp1.htm&nav=/msj/0197/newnav.htm -*/ + * here for enhanced BMP support in the future + * http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0197/mfcp1/mfcp1.htm&nav=/msj/0197/newnav.htm + */ typedef struct BMPINFOHEADER{ unsigned int biSize; @@ -129,10 +129,13 @@ struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags) y = LITTLE_LONG(bmi.biHeight); depth = LITTLE_SHORT(bmi.biBitCount); - /* printf("skip: %d, x: %d y: %d, depth: %d (%x)\n", skip, x, y, - depth, bmi.biBitCount); */ - /* printf("skip: %d, x: %d y: %d, depth: %d (%x)\n", skip, x, y, - depth, bmi.biBitCount); */ +#if 0 + printf("skip: %d, x: %d y: %d, depth: %d (%x)\n", skip, x, y, + depth, bmi.biBitCount); + printf("skip: %d, x: %d y: %d, depth: %d (%x)\n", skip, x, y, + depth, bmi.biBitCount); +#endif + if (flags & IB_test) { ibuf = IMB_allocImBuf(x, y, depth, 0); } else { diff --git a/source/blender/imbuf/intern/cache.c b/source/blender/imbuf/intern/cache.c index 7213979b500..3bac570da4e 100644 --- a/source/blender/imbuf/intern/cache.c +++ b/source/blender/imbuf/intern/cache.c @@ -40,13 +40,13 @@ #include "imbuf.h" /* We use a two level cache here. A per-thread cache with limited number of - tiles. This can be accessed without locking and so is hoped to lead to most - tile access being lock-free. The global cache is shared between all threads - and requires slow locking to access, and contains all tiles. - - The per-thread cache should be big enough that one might hope to not fall - back to the global cache every pixel, but not to big to keep too many tiles - locked and using memory. */ + * tiles. This can be accessed without locking and so is hoped to lead to most + * tile access being lock-free. The global cache is shared between all threads + * and requires slow locking to access, and contains all tiles. + * + * The per-thread cache should be big enough that one might hope to not fall + * back to the global cache every pixel, but not to big to keep too many tiles + * locked and using memory. */ #define IB_THREAD_CACHE_SIZE 100 @@ -207,7 +207,7 @@ void imb_tile_cache_init(void) BLI_mutex_init(&GLOBAL_CACHE.mutex); /* initialize for one thread, for places that access textures - outside of rendering (displace modifier, painting, ..) */ + * outside of rendering (displace modifier, painting, ..) */ IMB_tile_cache_params(0, 0); GLOBAL_CACHE.initialized = 1; @@ -286,8 +286,8 @@ static ImGlobalTile *imb_global_cache_get_tile(ImBuf *ibuf, int tx, int ty, ImGl if(gtile) { /* found tile. however it may be in the process of being loaded - by another thread, in that case we do stupid busy loop waiting - for the other thread to load the tile */ + * by another thread, in that case we do stupid busy loop waiting + * for the other thread to load the tile */ gtile->refcount++; BLI_mutex_unlock(&GLOBAL_CACHE.mutex); @@ -428,7 +428,7 @@ void IMB_tiles_to_rect(ImBuf *ibuf) for(ty=0; ty<mipbuf->ytiles; ty++) { for(tx=0; tx<mipbuf->xtiles; tx++) { /* acquire tile through cache, this assumes cache is initialized, - which it is always now but it's a weak assumption ... */ + * which it is always now but it's a weak assumption ... */ gtile= imb_global_cache_get_tile(mipbuf, tx, ty, NULL); /* setup pointers */ diff --git a/source/blender/imbuf/intern/cineon/logmemfile.c b/source/blender/imbuf/intern/cineon/logmemfile.c index d3a32774efd..289dd0357a4 100644 --- a/source/blender/imbuf/intern/cineon/logmemfile.c +++ b/source/blender/imbuf/intern/cineon/logmemfile.c @@ -68,8 +68,8 @@ int logimage_fread(void *buffer, unsigned int size, unsigned int count, void *lo if (file->file) return fread(buffer, size, count, file->file); else { /*we're reading from memory*/ int i; - /*we convert ot uchar just on the off chance some platform can't handle - pointer arithmetic with type (void*). */ + /* we convert ot uchar just on the off chance some platform can't handle + * pointer arithmetic with type (void*). */ unsigned char *buf = (unsigned char *) buffer; for (i=0; i<count; i++) { diff --git a/source/blender/imbuf/intern/dds/Image.h b/source/blender/imbuf/intern/dds/Image.h index 9c2220567aa..5dcf3011c76 100644 --- a/source/blender/imbuf/intern/dds/Image.h +++ b/source/blender/imbuf/intern/dds/Image.h @@ -55,12 +55,12 @@ public: ~Image(); void allocate(uint w, uint h); - /* +#if 0 bool load(const char * name); void wrap(void * data, uint w, uint h); void unwrap(); - */ +#endif uint width() const; uint height() const; diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c index 29da7973654..0d821126492 100644 --- a/source/blender/imbuf/intern/filter.c +++ b/source/blender/imbuf/intern/filter.c @@ -372,11 +372,14 @@ void IMB_filter_extend(struct ImBuf *ibuf, char *mask, int filter) /* build a weights buffer */ n= 1; - /*k= 0; + +#if 0 + k= 0; for(i = -n; i <= n; i++) for(j = -n; j <= n; j++) weight[k++] = sqrt((float) i * i + j * j); - */ +#endif + weight[0]=1; weight[1]=2; weight[2]=1; weight[3]=2; weight[4]=0; weight[5]=2; weight[6]=1; weight[7]=2; weight[8]=1; diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c index cd3fc654d8e..0462c998e44 100644 --- a/source/blender/imbuf/intern/imageprocess.c +++ b/source/blender/imbuf/intern/imageprocess.c @@ -49,7 +49,7 @@ #include "math.h" /* This define should be relocated to a global header some where Kent Mein -I stole it from util.h in the plugins api */ + * I stole it from util.h in the plugins api */ #define MAX2(x,y) ( (x)>(y) ? (x) : (y) ) /* Only this one is used liberally here, and in imbuf */ @@ -100,16 +100,15 @@ static void pixel_from_buffer(struct ImBuf *ibuf, unsigned char **outI, float ** } /************************************************************************** -* INTERPOLATIONS -* -* Reference and docs: -* http://wiki.blender.org/index.php/User:Damiles#Interpolations_Algorithms -***************************************************************************/ - -/* BICUBIC Interpolation functions */ -/* More info: http://wiki.blender.org/index.php/User:Damiles#Bicubic_pixel_interpolation -*/ -/* function assumes out to be zero'ed, only does RGBA */ + * INTERPOLATIONS + * + * Reference and docs: + * http://wiki.blender.org/index.php/User:Damiles#Interpolations_Algorithms + ***************************************************************************/ + +/* BICUBIC Interpolation functions + * More info: http://wiki.blender.org/index.php/User:Damiles#Bicubic_pixel_interpolation + * function assumes out to be zero'ed, only does RGBA */ static float P(float k) { diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index b219d4b592e..c2bdb44be10 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -68,24 +68,24 @@ int imb_is_a_jp2(unsigned char *buf) /** -sample error callback expecting a FILE* client object -*/ + * sample error callback expecting a FILE* client object + */ static void error_callback(const char *msg, void *client_data) { FILE *stream = (FILE*)client_data; fprintf(stream, "[ERROR] %s", msg); } /** -sample warning callback expecting a FILE* client object -*/ + * sample warning callback expecting a FILE* client object + */ static void warning_callback(const char *msg, void *client_data) { FILE *stream = (FILE*)client_data; fprintf(stream, "[WARNING] %s", msg); } /** -sample debug callback expecting no client object -*/ + * sample debug callback expecting no client object + */ static void info_callback(const char *msg, void *client_data) { (void)client_data; @@ -292,11 +292,11 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags) /* -2048x1080 (2K) at 24 fps or 48 fps, or 4096x2160 (4K) at 24 fps; 3x12 bits per pixel, XYZ color space - - * In 2K, for Scope (2.39:1) presentation 2048x858 pixels of the imager is used - * In 2K, for Flat (1.85:1) presentation 1998x1080 pixels of the imager is used -*/ + * 2048x1080 (2K) at 24 fps or 48 fps, or 4096x2160 (4K) at 24 fps; 3x12 bits per pixel, XYZ color space + * + * - In 2K, for Scope (2.39:1) presentation 2048x858 pixels of the imager is used + * - In 2K, for Flat (1.85:1) presentation 1998x1080 pixels of the imager is used + */ /* ****************************** COPIED FROM image_to_j2k.c */ @@ -679,9 +679,9 @@ int imb_savejp2(struct ImBuf *ibuf, const char *name, int flags) (void)flags; /* unused */ /* - configure the event callbacks (not required) - setting of each callback is optionnal - */ + * configure the event callbacks (not required) + * setting of each callback is optionnal + */ memset(&event_mgr, 0, sizeof(opj_event_mgr_t)); event_mgr.error_handler = error_callback; event_mgr.warning_handler = warning_callback; @@ -692,7 +692,7 @@ int imb_savejp2(struct ImBuf *ibuf, const char *name, int flags) /* compression ratio */ /* invert range, from 10-100, 100-1 - * where jpeg see's 1 and highest quality (lossless) and 100 is very low quality*/ + * where jpeg see's 1 and highest quality (lossless) and 100 is very low quality*/ parameters.tcp_rates[0]= ((100-quality)/90.0f*99.0f) + 1; diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index ca30628c62f..2aab497649a 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -69,11 +69,11 @@ static ImBuf * ibJpegImageFromCinfo(struct jpeg_decompress_struct * cinfo, int f * * 1. jpeg - standard printing, u & v at quarter of resulution * 2. jvid - standaard video, u & v half resolution, frame not interlaced - -type 3 is unsupported as of jul 05 2000 Frank. - + * + * type 3 is unsupported as of jul 05 2000 Frank. + * * 3. jstr - as 2, but written in 2 separate fields - + * * 4. jmax - no scaling in the components */ @@ -142,8 +142,8 @@ static boolean fill_input_buffer(j_decompress_ptr cinfo) my_src_ptr src = (my_src_ptr) cinfo->src; /* Since we have given all we have got already - * we simply fake an end of file - */ + * we simply fake an end of file + */ src->pub.next_input_byte = src->terminal; src->pub.bytes_in_buffer = 2; diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index e076dcfa286..bd79a6ea48b 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -1,8 +1,4 @@ -/** \file blender/imbuf/intern/openexr/openexr_api.cpp - * \ingroup openexr - */ /* -* * ***** BEGIN GPLLICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -29,6 +25,10 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file blender/imbuf/intern/openexr/openexr_api.cpp + * \ingroup openexr + */ + #include <stdlib.h> #include <stdio.h> #include <stddef.h> @@ -384,11 +384,11 @@ int imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags) /* ********************* Nicer API, MultiLayer and with Tile file support ************************************ */ /* naming rules: - - parse name from right to left - - last character is channel ID, 1 char like 'A' 'R' 'G' 'B' 'X' 'Y' 'Z' 'W' 'U' 'V' - - separated with a dot; the Pass name (like "Depth", "Color", "Diffuse" or "Combined") - - separated with a dot: the Layer name (like "Lamp1" or "Walls" or "Characters") -*/ + * - parse name from right to left + * - last character is channel ID, 1 char like 'A' 'R' 'G' 'B' 'X' 'Y' 'Z' 'W' 'U' 'V' + * - separated with a dot; the Pass name (like "Depth", "Color", "Diffuse" or "Combined") + * - separated with a dot: the Layer name (like "Lamp1" or "Walls" or "Characters") + */ static ListBase exrhandles= {NULL, NULL}; diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h index 0d51461c2e8..e0358361713 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.h +++ b/source/blender/imbuf/intern/openexr/openexr_api.h @@ -39,7 +39,7 @@ extern "C" { #include <stdio.h> - /** +/** * Test presence of OpenEXR file. * \param mem pointer to loaded OpenEXR bitstream */ diff --git a/source/blender/imbuf/intern/openexr/openexr_multi.h b/source/blender/imbuf/intern/openexr/openexr_multi.h index cb18ddd219b..88d8b09675b 100644 --- a/source/blender/imbuf/intern/openexr/openexr_multi.h +++ b/source/blender/imbuf/intern/openexr/openexr_multi.h @@ -36,7 +36,7 @@ /* experiment with more advanced exr api */ /* Note: as for now openexr only supports 32 chars in channel names. - This api also supports max 8 channels per pass now. easy to fix! */ + * This api also supports max 8 channels per pass now. easy to fix! */ #define EXR_LAY_MAXNAME 19 #define EXR_PASS_MAXNAME 11 #define EXR_TOT_MAXNAME 32 diff --git a/source/blender/imbuf/intern/openexr/openexr_stub.cpp b/source/blender/imbuf/intern/openexr/openexr_stub.cpp index 29b12a2984b..e896fc58cf3 100644 --- a/source/blender/imbuf/intern/openexr/openexr_stub.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_stub.cpp @@ -1,8 +1,4 @@ -/** \file blender/imbuf/intern/openexr/openexr_stub.cpp - * \ingroup openexr - */ /* -* * ***** BEGIN GPLLICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -29,6 +25,9 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file blender/imbuf/intern/openexr/openexr_stub.cpp + * \ingroup openexr + */ #include "openexr_api.h" #include "openexr_multi.h" diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index 74047ae74f5..84f3e18591d 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -205,15 +205,15 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags) png_init_io(png_ptr, fp); } - /* +#if 0 png_set_filter(png_ptr, 0, - PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | - PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | - PNG_FILTER_UP | PNG_FILTER_VALUE_UP | - PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | - PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| - PNG_ALL_FILTERS); - */ + PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | + PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | + PNG_FILTER_UP | PNG_FILTER_VALUE_UP | + PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | + PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| + PNG_ALL_FILTERS); +#endif png_set_compression_level(png_ptr, compression); diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index 23db6b47b9d..9265da8d8dc 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -30,12 +30,12 @@ */ /* ---------------------------------------------------------------------- - Radiance High Dynamic Range image file IO - For description and code for reading/writing of radiance hdr files - by Greg Ward, refer to: - http://radsite.lbl.gov/radiance/refer/Notes/picture_format.html ----------------------------------------------------------------------- -*/ + * Radiance High Dynamic Range image file IO + * For description and code for reading/writing of radiance hdr files + * by Greg Ward, refer to: + * http://radsite.lbl.gov/radiance/refer/Notes/picture_format.html + * ---------------------------------------------------------------------- + */ #ifdef WIN32 # include <io.h> diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index 97b94ae7b27..492d0af2ac8 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -47,8 +47,8 @@ static void blend_color_mix(char *cp, char *cp1, char *cp2, int fac) { /* this and other blending modes previously used >>8 instead of /255. both - are not equivalent (>>8 is /256), and the former results in rounding - errors that can turn colors black fast after repeated blending */ + * are not equivalent (>>8 is /256), and the former results in rounding + * errors that can turn colors black fast after repeated blending */ int mfac= 255-fac; cp[0]= (mfac*cp1[0]+fac*cp2[0])/255; @@ -93,7 +93,7 @@ static void blend_color_mul(char *cp, char *cp1, char *cp2, int fac) static void blend_color_lighten(char *cp, char *cp1, char *cp2, int fac) { /* See if are lighter, if so mix, else dont do anything. - if the paint col is darker then the original, then ignore */ + * if the paint col is darker then the original, then ignore */ if (cp1[0]+cp1[1]+cp1[2] > cp2[0]+cp2[1]+cp2[2]) { cp[0]= cp1[0]; cp[1]= cp1[1]; @@ -106,7 +106,7 @@ static void blend_color_lighten(char *cp, char *cp1, char *cp2, int fac) static void blend_color_darken(char *cp, char *cp1, char *cp2, int fac) { /* See if were darker, if so mix, else dont do anything. - if the paint col is brighter then the original, then ignore */ + * if the paint col is brighter then the original, then ignore */ if (cp1[0]+cp1[1]+cp1[2] < cp2[0]+cp2[1]+cp2[2]) { cp[0]= cp1[0]; cp[1]= cp1[1]; @@ -202,7 +202,7 @@ static void blend_color_mul_float(float *cp, float *cp1, float *cp2, float fac) static void blend_color_lighten_float(float *cp, float *cp1, float *cp2, float fac) { /* See if are lighter, if so mix, else dont do anything. - if the pafloat col is darker then the original, then ignore */ + * if the pafloat col is darker then the original, then ignore */ if (cp1[0]+cp1[1]+cp1[2] > cp2[0]+cp2[1]+cp2[2]) { cp[0]= cp1[0]; cp[1]= cp1[1]; @@ -215,7 +215,7 @@ static void blend_color_lighten_float(float *cp, float *cp1, float *cp2, float f static void blend_color_darken_float(float *cp, float *cp1, float *cp2, float fac) { /* See if were darker, if so mix, else dont do anything. - if the pafloat col is brighter then the original, then ignore */ + * if the pafloat col is brighter then the original, then ignore */ if (cp1[0]+cp1[1]+cp1[2] < cp2[0]+cp2[1]+cp2[2]) { cp[0]= cp1[0]; cp[1]= cp1[1]; diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index c131d385874..361faa08b29 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -773,27 +773,27 @@ static void q_scale_float(float* in, float* out, int in_width, } } -/* q_scale_linear_interpolation (derived from ppmqscale, http://libdv.sf.net) - - q stands for quick _and_ quality :) - - only handles common cases when we either - - scale both, x and y or - shrink both, x and y - - but that is pretty fast: - * does only blit once instead of two passes like the old code - (fewer cache misses) - * uses fixed point integer arithmetic for byte buffers - * doesn't branch in tight loops - - Should be comparable in speed to the ImBuf ..._fast functions at least - for byte-buffers. - - NOTE: disabled, due to inacceptable inaccuracy and quality loss, see bug #18609 (ton) - -*/ +/** + * q_scale_linear_interpolation (derived from ppmqscale, http://libdv.sf.net) + * + * q stands for quick _and_ quality :) + * + * only handles common cases when we either + * + * scale both, x and y or + * shrink both, x and y + * + * but that is pretty fast: + * - does only blit once instead of two passes like the old code + * (fewer cache misses) + * - uses fixed point integer arithmetic for byte buffers + * - doesn't branch in tight loops + * + * Should be comparable in speed to the ImBuf ..._fast functions at least + * for byte-buffers. + * + * NOTE: disabled, due to inacceptable inaccuracy and quality loss, see bug #18609 (ton) + */ static int q_scale_linear_interpolation( struct ImBuf *ibuf, int newx, int newy) { @@ -1473,7 +1473,7 @@ struct ImBuf *IMB_scaleImBuf(struct ImBuf * ibuf, unsigned int newx, unsigned in if (newx == ibuf->x && newy == ibuf->y) { return ibuf; } /* scaleup / scaledown functions below change ibuf->x and ibuf->y - so we first scale the Z-buffer (if any) */ + * so we first scale the Z-buffer (if any) */ scalefast_Z_ImBuf(ibuf, newx, newy); /* try to scale common cases in a fast way */ diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index afc64e1a528..1e6bc216128 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -554,7 +554,7 @@ ImBuf *imb_loadtiff(unsigned char *mem, size_t size, int flags) } /* detect if we are reading a tiled/mipmapped texture, in that case - we don't read pixels but leave it to the cache to load tiles */ + * we don't read pixels but leave it to the cache to load tiles */ if(flags & IB_tilecache) { format= NULL; TIFFGetField(image, TIFFTAG_PIXAR_TEXTUREFORMAT, &format); |