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>2010-03-22 12:30:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-03-22 12:30:00 +0300
commit1e9bf0cfdb6c925b28af6f0330467e7d9d798c05 (patch)
treec8356d8bc812dc6e3f23b9c381e94ec4c9d4c879 /source/blender/imbuf/intern
parent9b2dd9aac65aa49c05176bb8b7aabde9fe1aeeac (diff)
spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r--source/blender/imbuf/intern/IMB_anim.h2
-rw-r--r--source/blender/imbuf/intern/IMB_imginfo.h4
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c2
-rw-r--r--source/blender/imbuf/intern/anim.c54
-rw-r--r--source/blender/imbuf/intern/anim5.c2
-rw-r--r--source/blender/imbuf/intern/bmp.c2
-rw-r--r--source/blender/imbuf/intern/data.c6
-rw-r--r--source/blender/imbuf/intern/dds/DirectDrawSurface.h10
-rw-r--r--source/blender/imbuf/intern/divers.c2
-rw-r--r--source/blender/imbuf/intern/jp2.c4
-rw-r--r--source/blender/imbuf/intern/jpeg.c4
-rw-r--r--source/blender/imbuf/intern/md5.c270
-rw-r--r--source/blender/imbuf/intern/md5.h10
-rw-r--r--source/blender/imbuf/intern/png.c4
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c2
-rw-r--r--source/blender/imbuf/intern/readimage.c2
-rw-r--r--source/blender/imbuf/intern/scaling.c42
-rw-r--r--source/blender/imbuf/intern/targa.c8
-rw-r--r--source/blender/imbuf/intern/tiff.c2
-rw-r--r--source/blender/imbuf/intern/util.c4
20 files changed, 218 insertions, 218 deletions
diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
index 0305c6c6b49..39b8e48fb7f 100644
--- a/source/blender/imbuf/intern/IMB_anim.h
+++ b/source/blender/imbuf/intern/IMB_anim.h
@@ -62,7 +62,7 @@
#endif
#include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail
- BLI_countlist BLI_stringdec */
+ BLI_countlist BLI_stringdec */
#include "imbuf.h"
#include "imbuf_patch.h"
diff --git a/source/blender/imbuf/intern/IMB_imginfo.h b/source/blender/imbuf/intern/IMB_imginfo.h
index 18a2231b0fc..2884abcaf6e 100644
--- a/source/blender/imbuf/intern/IMB_imginfo.h
+++ b/source/blender/imbuf/intern/IMB_imginfo.h
@@ -44,7 +44,7 @@ typedef struct ImgInfo {
} ImgInfo;
/** The imginfo is a list of key/value pairs (both char*) that can me
- saved in the header of several image formats.
+ 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'
@@ -59,7 +59,7 @@ void IMB_imginfo_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/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 52ec5b37a6f..710dbde21b2 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -302,7 +302,7 @@ short imb_addrectImBuf(struct ImBuf * ibuf)
imb_freerectImBuf(ibuf);
size = ibuf->x * ibuf->y;
- size = size * sizeof(unsigned int);
+ size = size * sizeof(unsigned int);
if ( (ibuf->rect = MEM_mapallocN(size, "imb_addrectImBuf")) ){
ibuf->mall |= IB_rect;
diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c
index d5ca605cad4..5a5b5ada4a1 100644
--- a/source/blender/imbuf/intern/anim.c
+++ b/source/blender/imbuf/intern/anim.c
@@ -59,7 +59,7 @@
#endif
#include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail
- BLI_countlist BLI_stringdec */
+ BLI_countlist BLI_stringdec */
#include "DNA_userdef_types.h"
#include "BKE_global.h"
@@ -256,7 +256,7 @@ static int an_stringdec(char *string, char* kop, char *staart,unsigned short *nu
static void an_stringenc(char *string, char *head, char *start, unsigned short numlen, int pic) {
- BLI_stringenc(string, head, start, numlen, pic);
+ BLI_stringenc(string, head, start, numlen, pic);
}
static void free_anim_avi (struct anim *anim) {
@@ -536,7 +536,7 @@ static int startffmpeg(struct anim * anim) {
dump_format(pFormatCtx, 0, anim->name, 0);
- /* Find the first video stream */
+ /* Find the first video stream */
videoStream=-1;
for(i=0; i<pFormatCtx->nb_streams; i++)
if(get_codec_from_stream(pFormatCtx->streams[i])->codec_type
@@ -552,7 +552,7 @@ static int startffmpeg(struct anim * anim) {
pCodecCtx = get_codec_from_stream(pFormatCtx->streams[videoStream]);
- /* Find the decoder for the video stream */
+ /* Find the decoder for the video stream */
pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
if(pCodec==NULL) {
av_close_input_file(pFormatCtx);
@@ -599,7 +599,7 @@ static int startffmpeg(struct anim * anim) {
anim->pFrameRGB = avcodec_alloc_frame();
if (avpicture_get_size(PIX_FMT_RGBA, anim->x, anim->y)
- != anim->x * anim->y * 4) {
+ != anim->x * anim->y * 4) {
fprintf (stderr,
"ffmpeg has changed alloc scheme ... ARGHHH!\n");
avcodec_close(anim->pCodecCtx);
@@ -613,11 +613,11 @@ static int startffmpeg(struct anim * anim) {
if (anim->ib_flags & IB_animdeinterlace) {
avpicture_fill((AVPicture*) anim->pFrameDeinterlaced,
- MEM_callocN(avpicture_get_size(
+ MEM_callocN(avpicture_get_size(
anim->pCodecCtx->pix_fmt,
anim->x, anim->y),
"ffmpeg deinterlace"),
- anim->pCodecCtx->pix_fmt, anim->x, anim->y);
+ anim->pCodecCtx->pix_fmt, anim->x, anim->y);
}
if (pCodecCtx->has_b_frames) {
@@ -664,13 +664,13 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
ibuf = IMB_allocImBuf(anim->x, anim->y, 32, IB_rect, 0);
avpicture_fill((AVPicture*) anim->pFrameRGB,
- (unsigned char*) ibuf->rect,
- PIX_FMT_RGBA, anim->x, anim->y);
+ (unsigned char*) ibuf->rect,
+ PIX_FMT_RGBA, anim->x, anim->y);
if (position != anim->curposition + 1) {
if (position > anim->curposition + 1
- && anim->preseek
- && position - (anim->curposition + 1) < anim->preseek) {
+ && anim->preseek
+ && position - (anim->curposition + 1) < anim->preseek) {
while(av_read_frame(anim->pFormatCtx, &packet)>=0) {
if (packet.stream_index == anim->videoStream) {
avcodec_decode_video(
@@ -698,11 +698,11 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
#else
double frame_rate =
av_q2d(anim->pFormatCtx->streams[anim->videoStream]
- ->r_frame_rate);
+ ->r_frame_rate);
#endif
double time_base =
av_q2d(anim->pFormatCtx->streams[anim->videoStream]
- ->time_base);
+ ->time_base);
long long pos = (long long) (position - anim->preseek)
* AV_TIME_BASE / frame_rate;
long long st_time = anim->pFormatCtx
@@ -717,7 +717,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
}
av_seek_frame(anim->pFormatCtx, -1,
- pos, AVSEEK_FLAG_BACKWARD);
+ pos, AVSEEK_FLAG_BACKWARD);
pts_to_search = (long long)
(((double) position) / time_base / frame_rate);
@@ -732,8 +732,8 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
while(av_read_frame(anim->pFormatCtx, &packet)>=0) {
if(packet.stream_index == anim->videoStream) {
avcodec_decode_video(anim->pCodecCtx,
- anim->pFrame, &frameFinished,
- packet.data, packet.size);
+ anim->pFrame, &frameFinished,
+ packet.data, packet.size);
if (frameFinished && !pos_found) {
if (packet.dts >= pts_to_search) {
@@ -748,21 +748,21 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
/* This means the data wasnt read properly,
this check stops crashing */
if (input->data[0]==0 && input->data[1]==0
- && input->data[2]==0 && input->data[3]==0){
+ && input->data[2]==0 && input->data[3]==0){
av_free_packet(&packet);
break;
}
if (anim->ib_flags & IB_animdeinterlace) {
if (avpicture_deinterlace(
- (AVPicture*)
- anim->pFrameDeinterlaced,
- (const AVPicture*)
- anim->pFrame,
- anim->pCodecCtx->pix_fmt,
- anim->pCodecCtx->width,
- anim->pCodecCtx->height)
- < 0) {
+ (AVPicture*)
+ anim->pFrameDeinterlaced,
+ (const AVPicture*)
+ anim->pFrame,
+ anim->pCodecCtx->pix_fmt,
+ anim->pCodecCtx->width,
+ anim->pCodecCtx->height)
+ < 0) {
filter_y = 1;
} else {
input = anim->pFrameDeinterlaced;
@@ -931,8 +931,8 @@ static ImBuf * redcode_fetchibuf(struct anim * anim, int position) {
return NULL;
}
- ibuf = IMB_allocImBuf(raw_frame->width * 2,
- raw_frame->height * 2, 32, IB_rectfloat, 0);
+ ibuf = IMB_allocImBuf(raw_frame->width * 2,
+ raw_frame->height * 2, 32, IB_rectfloat, 0);
redcode_decode_video_float(raw_frame, ibuf->rect_float, 1);
diff --git a/source/blender/imbuf/intern/anim5.c b/source/blender/imbuf/intern/anim5.c
index 28ba23ef73c..41c4c2c610b 100644
--- a/source/blender/imbuf/intern/anim5.c
+++ b/source/blender/imbuf/intern/anim5.c
@@ -30,7 +30,7 @@
*/
#include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail
- BLI_countlist BLI_stringdec */
+ BLI_countlist BLI_stringdec */
#include "imbuf.h"
#include "imbuf_patch.h"
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c
index 0fd483b6b49..606cce645ee 100644
--- a/source/blender/imbuf/intern/bmp.c
+++ b/source/blender/imbuf/intern/bmp.c
@@ -207,7 +207,7 @@ short imb_savebmp(struct ImBuf *ibuf, char *name, int flags) {
data = (uchar *) ibuf->rect;
ofile = fopen(name,"wb");
- if (!ofile) return 0;
+ if (!ofile) return 0;
putShortLSB(19778,ofile); /* "BM" */
putIntLSB(0,ofile); /* This can be 0 for BI_RGB bitmaps */
diff --git a/source/blender/imbuf/intern/data.c b/source/blender/imbuf/intern/data.c
index 526f7012768..3b1f3035d62 100644
--- a/source/blender/imbuf/intern/data.c
+++ b/source/blender/imbuf/intern/data.c
@@ -104,9 +104,9 @@ static unsigned short quadbase[511] = {
558, 525, 493, 462, 432, 403, 375, 348,
322, 297, 273, 250, 228, 207, 187, 168,
150, 133, 117, 102, 88, 75, 63, 52,
- 42, 33, 25, 18, 12, 7, 3, 0,
- 3, 7, 12, 18, 25, 33, 42, 52,
- 63, 75, 88, 102, 117, 133, 150, 168,
+ 42, 33, 25, 18, 12, 7, 3, 0,
+ 3, 7, 12, 18, 25, 33, 42, 52,
+ 63, 75, 88, 102, 117, 133, 150, 168,
187, 207, 228, 250, 273, 297, 322, 348,
375, 403, 432, 462, 493, 525, 558, 592,
627, 663, 700, 738, 777, 817, 858, 900,
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.h b/source/blender/imbuf/intern/dds/DirectDrawSurface.h
index e48a06b12f1..ed1972aa966 100644
--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.h
+++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.h
@@ -83,11 +83,11 @@ struct DDSCaps
/// DDS file header for DX10.
struct DDSHeader10
{
- uint dxgiFormat;
- uint resourceDimension;
- uint miscFlag;
- uint arraySize;
- uint reserved;
+ uint dxgiFormat;
+ uint resourceDimension;
+ uint miscFlag;
+ uint arraySize;
+ uint reserved;
};
/// DDS file header.
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index 8ed70b5509f..4e8d61f8675 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -156,7 +156,7 @@ void IMB_gamwarp(struct ImBuf *ibuf, double gamma)
if (rect) {
for (i = 255 ; i >= 0 ; i--)
gam[i] = (255.0 * pow(i / 255.0 ,
- gamma)) + 0.5;
+ gamma)) + 0.5;
for (i = ibuf->x * ibuf->y ; i>0 ; i--, rect+=4){
rect[0] = gam[rect[0]];
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index d7d45b711fc..b2ed8b87d0f 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -296,8 +296,8 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, int size, int flags)
/*
2048x1080 (2K) at 24 fps or 48 fps, or 4096x2160 (4K) at 24 fps; 3×12 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
+ * 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 */
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 2c4b8618637..127145c967d 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -207,7 +207,7 @@ static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, int siz
if (bytes_in_buffer == 0) { \
if (! (*datasrc->fill_input_buffer) (cinfo)) \
{ action; } \
- INPUT_RELOAD(cinfo); \
+ INPUT_RELOAD(cinfo); \
} \
bytes_in_buffer--
@@ -699,7 +699,7 @@ static int save_jstjpeg(char * name, struct ImBuf * ibuf)
sprintf(fieldname, "%s.jf0", name);
returnval = save_vidjpeg(fieldname, tbuf) ;
- if (returnval == 1) {
+ if (returnval == 1) {
IMB_rectcpy(tbuf, ibuf, 0, 0, tbuf->x, 0, ibuf->x, ibuf->y);
sprintf(fieldname, "%s.jf1", name);
returnval = save_vidjpeg(fieldname, tbuf);
diff --git a/source/blender/imbuf/intern/md5.c b/source/blender/imbuf/intern/md5.c
index a3165467b53..a2528fbd93c 100644
--- a/source/blender/imbuf/intern/md5.c
+++ b/source/blender/imbuf/intern/md5.c
@@ -31,7 +31,7 @@
#ifdef WORDS_BIGENDIAN
# define SWAP(n) \
- (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
+ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
#else
# define SWAP(n) (n)
#endif
@@ -46,7 +46,7 @@ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
(RFC 1321, 3.3: Step 3) */
void
md5_init_ctx (ctx)
- struct md5_ctx *ctx;
+ struct md5_ctx *ctx;
{
ctx->A = 0x67452301;
ctx->B = 0xefcdab89;
@@ -58,8 +58,8 @@ md5_init_ctx (ctx)
be in little endian byte order. */
void *
md5_read_ctx (ctx, resbuf)
- const struct md5_ctx *ctx;
- void *resbuf;
+ const struct md5_ctx *ctx;
+ void *resbuf;
{
((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
@@ -74,8 +74,8 @@ md5_read_ctx (ctx, resbuf)
beginning at RESBLOCK. */
int
md5_stream (stream, resblock)
- FILE *stream;
- void *resblock;
+ FILE *stream;
+ void *resblock;
{
/* Important: BLOCKSIZE must be a multiple of 64. */
#define BLOCKSIZE 4096
@@ -92,49 +92,49 @@ md5_stream (stream, resblock)
/* Iterate over full file contents. */
while (1)
- {
- /* We read the file in blocks of BLOCKSIZE bytes. One call of the
+ {
+ /* We read the file in blocks of BLOCKSIZE bytes. One call of the
computation function processes the whole buffer so that with the
next round of the loop another block can be read. */
- size_t n;
- sum = 0;
+ size_t n;
+ sum = 0;
- /* Read block. Take care for partial reads. */
- do
+ /* Read block. Take care for partial reads. */
+ do
{
n = fread (buffer, 1, BLOCKSIZE - sum, stream);
sum += n;
}
- while (sum < BLOCKSIZE && n != 0);
- if (n == 0 && ferror (stream))
- return 1;
+ while (sum < BLOCKSIZE && n != 0);
+ if (n == 0 && ferror (stream))
+ return 1;
- /* RFC 1321 specifies the possible length of the file up to 2^64 bits.
+ /* RFC 1321 specifies the possible length of the file up to 2^64 bits.
Here we only compute the number of bytes. Do a double word
- increment. */
- len[0] += sum;
- if (len[0] < sum)
+ increment. */
+ len[0] += sum;
+ if (len[0] < sum)
++len[1];
- /* If end of file is reached, end the loop. */
- if (n == 0)
+ /* If end of file is reached, end the loop. */
+ if (n == 0)
break;
- /* Process buffer with BLOCKSIZE bytes. Note that
+ /* Process buffer with BLOCKSIZE bytes. Note that
BLOCKSIZE % 64 == 0
- */
- md5_process_block (buffer, BLOCKSIZE, &ctx);
- }
+ */
+ md5_process_block (buffer, BLOCKSIZE, &ctx);
+ }
/* We can copy 64 byte because the buffer is always big enough. FILLBUF
- contains the needed bits. */
+ contains the needed bits. */
memcpy (&buffer[sum], fillbuf, 64);
/* Compute amount of padding bytes needed. Alignment is done to
(N + PAD) % 64 == 56
- There is always at least one byte padded. I.e. even the alignment
- is correctly aligned 64 padding bytes are added. */
+ There is always at least one byte padded. I.e. even the alignment
+ is correctly aligned 64 padding bytes are added. */
pad = sum & 63;
pad = pad >= 56 ? 64 + 56 - pad : 56 - pad;
@@ -157,9 +157,9 @@ md5_stream (stream, resblock)
digest. */
void *
md5_buffer (buffer, len, resblock)
- const char *buffer;
- size_t len;
- void *resblock;
+ const char *buffer;
+ size_t len;
+ void *resblock;
{
struct md5_ctx ctx;
char restbuf[64 + 72];
@@ -177,11 +177,11 @@ md5_buffer (buffer, len, resblock)
/* Copy to own buffer. */
memcpy (restbuf, &buffer[blocks], rest);
/* Append needed fill bytes at end of buffer. We can copy 64 byte
- because the buffer is always big enough. */
+ because the buffer is always big enough. */
memcpy (&restbuf[rest], fillbuf, 64);
/* PAD bytes are used for padding to correct alignment. Note that
- always at least one byte is padded. */
+ always at least one byte is padded. */
pad = rest >= 56 ? 64 + 56 - rest : 56 - rest;
/* Put length of buffer in *bits* in last eight bytes. */
@@ -210,9 +210,9 @@ md5_buffer (buffer, len, resblock)
void
md5_process_block (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct md5_ctx *ctx;
+ const void *buffer;
+ size_t len;
+ struct md5_ctx *ctx;
{
md5_uint32 correct_words[16];
const md5_uint32 *words = buffer;
@@ -224,16 +224,16 @@ md5_process_block (buffer, len, ctx)
md5_uint32 D = ctx->D;
/* Process all bytes in the buffer with 64 bytes in each round of
- the loop. */
+ the loop. */
while (words < endp)
- {
- md5_uint32 *cwp = correct_words;
- md5_uint32 A_save = A;
- md5_uint32 B_save = B;
- md5_uint32 C_save = C;
- md5_uint32 D_save = D;
-
- /* First round: using the given function, the context and a constant
+ {
+ md5_uint32 *cwp = correct_words;
+ md5_uint32 A_save = A;
+ md5_uint32 B_save = B;
+ md5_uint32 C_save = C;
+ md5_uint32 D_save = D;
+
+ /* First round: using the given function, the context and a constant
the next context is computed. Because the algorithms processing
unit is a 32-bit word and it is determined to work on words in
little endian byte order we perhaps have to change the byte order
@@ -241,116 +241,116 @@ md5_process_block (buffer, len, ctx)
we store the swapped words in the array CORRECT_WORDS. */
#define OP(a, b, c, d, s, T) \
- do \
- { \
+ do \
+ { \
a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T; \
++words; \
CYCLIC (a, s); \
a += b; \
- } \
- while (0)
+ } \
+ while (0)
- /* It is unfortunate that C does not provide an operator for
+ /* It is unfortunate that C does not provide an operator for
cyclic rotation. Hope the C compiler is smart enough. */
#define CYCLIC(w, s) (w = (w << s) | (w >> (32 - s)))
- /* Before we start, one word to the strange constants.
+ /* Before we start, one word to the strange constants.
They are defined in RFC 1321 as
T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64
- */
-
- /* Round 1. */
- OP (A, B, C, D, 7, 0xd76aa478);
- OP (D, A, B, C, 12, 0xe8c7b756);
- OP (C, D, A, B, 17, 0x242070db);
- OP (B, C, D, A, 22, 0xc1bdceee);
- OP (A, B, C, D, 7, 0xf57c0faf);
- OP (D, A, B, C, 12, 0x4787c62a);
- OP (C, D, A, B, 17, 0xa8304613);
- OP (B, C, D, A, 22, 0xfd469501);
- OP (A, B, C, D, 7, 0x698098d8);
- OP (D, A, B, C, 12, 0x8b44f7af);
- OP (C, D, A, B, 17, 0xffff5bb1);
- OP (B, C, D, A, 22, 0x895cd7be);
- OP (A, B, C, D, 7, 0x6b901122);
- OP (D, A, B, C, 12, 0xfd987193);
- OP (C, D, A, B, 17, 0xa679438e);
- OP (B, C, D, A, 22, 0x49b40821);
-
- /* For the second to fourth round we have the possibly swapped words
+ */
+
+ /* Round 1. */
+ OP (A, B, C, D, 7, 0xd76aa478);
+ OP (D, A, B, C, 12, 0xe8c7b756);
+ OP (C, D, A, B, 17, 0x242070db);
+ OP (B, C, D, A, 22, 0xc1bdceee);
+ OP (A, B, C, D, 7, 0xf57c0faf);
+ OP (D, A, B, C, 12, 0x4787c62a);
+ OP (C, D, A, B, 17, 0xa8304613);
+ OP (B, C, D, A, 22, 0xfd469501);
+ OP (A, B, C, D, 7, 0x698098d8);
+ OP (D, A, B, C, 12, 0x8b44f7af);
+ OP (C, D, A, B, 17, 0xffff5bb1);
+ OP (B, C, D, A, 22, 0x895cd7be);
+ OP (A, B, C, D, 7, 0x6b901122);
+ OP (D, A, B, C, 12, 0xfd987193);
+ OP (C, D, A, B, 17, 0xa679438e);
+ OP (B, C, D, A, 22, 0x49b40821);
+
+ /* For the second to fourth round we have the possibly swapped words
in CORRECT_WORDS. Redefine the macro to take an additional first
argument specifying the function to use. */
#undef OP
#define OP(f, a, b, c, d, k, s, T) \
- do \
+ do \
{ \
a += f (b, c, d) + correct_words[k] + T; \
CYCLIC (a, s); \
a += b; \
} \
- while (0)
-
- /* Round 2. */
- OP (FG, A, B, C, D, 1, 5, 0xf61e2562);
- OP (FG, D, A, B, C, 6, 9, 0xc040b340);
- OP (FG, C, D, A, B, 11, 14, 0x265e5a51);
- OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa);
- OP (FG, A, B, C, D, 5, 5, 0xd62f105d);
- OP (FG, D, A, B, C, 10, 9, 0x02441453);
- OP (FG, C, D, A, B, 15, 14, 0xd8a1e681);
- OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8);
- OP (FG, A, B, C, D, 9, 5, 0x21e1cde6);
- OP (FG, D, A, B, C, 14, 9, 0xc33707d6);
- OP (FG, C, D, A, B, 3, 14, 0xf4d50d87);
- OP (FG, B, C, D, A, 8, 20, 0x455a14ed);
- OP (FG, A, B, C, D, 13, 5, 0xa9e3e905);
- OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8);
- OP (FG, C, D, A, B, 7, 14, 0x676f02d9);
- OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a);
-
- /* Round 3. */
- OP (FH, A, B, C, D, 5, 4, 0xfffa3942);
- OP (FH, D, A, B, C, 8, 11, 0x8771f681);
- OP (FH, C, D, A, B, 11, 16, 0x6d9d6122);
- OP (FH, B, C, D, A, 14, 23, 0xfde5380c);
- OP (FH, A, B, C, D, 1, 4, 0xa4beea44);
- OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9);
- OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60);
- OP (FH, B, C, D, A, 10, 23, 0xbebfbc70);
- OP (FH, A, B, C, D, 13, 4, 0x289b7ec6);
- OP (FH, D, A, B, C, 0, 11, 0xeaa127fa);
- OP (FH, C, D, A, B, 3, 16, 0xd4ef3085);
- OP (FH, B, C, D, A, 6, 23, 0x04881d05);
- OP (FH, A, B, C, D, 9, 4, 0xd9d4d039);
- OP (FH, D, A, B, C, 12, 11, 0xe6db99e5);
- OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8);
- OP (FH, B, C, D, A, 2, 23, 0xc4ac5665);
-
- /* Round 4. */
- OP (FI, A, B, C, D, 0, 6, 0xf4292244);
- OP (FI, D, A, B, C, 7, 10, 0x432aff97);
- OP (FI, C, D, A, B, 14, 15, 0xab9423a7);
- OP (FI, B, C, D, A, 5, 21, 0xfc93a039);
- OP (FI, A, B, C, D, 12, 6, 0x655b59c3);
- OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92);
- OP (FI, C, D, A, B, 10, 15, 0xffeff47d);
- OP (FI, B, C, D, A, 1, 21, 0x85845dd1);
- OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f);
- OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0);
- OP (FI, C, D, A, B, 6, 15, 0xa3014314);
- OP (FI, B, C, D, A, 13, 21, 0x4e0811a1);
- OP (FI, A, B, C, D, 4, 6, 0xf7537e82);
- OP (FI, D, A, B, C, 11, 10, 0xbd3af235);
- OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb);
- OP (FI, B, C, D, A, 9, 21, 0xeb86d391);
-
- /* Add the starting values of the context. */
- A += A_save;
- B += B_save;
- C += C_save;
- D += D_save;
- }
+ while (0)
+
+ /* Round 2. */
+ OP (FG, A, B, C, D, 1, 5, 0xf61e2562);
+ OP (FG, D, A, B, C, 6, 9, 0xc040b340);
+ OP (FG, C, D, A, B, 11, 14, 0x265e5a51);
+ OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa);
+ OP (FG, A, B, C, D, 5, 5, 0xd62f105d);
+ OP (FG, D, A, B, C, 10, 9, 0x02441453);
+ OP (FG, C, D, A, B, 15, 14, 0xd8a1e681);
+ OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8);
+ OP (FG, A, B, C, D, 9, 5, 0x21e1cde6);
+ OP (FG, D, A, B, C, 14, 9, 0xc33707d6);
+ OP (FG, C, D, A, B, 3, 14, 0xf4d50d87);
+ OP (FG, B, C, D, A, 8, 20, 0x455a14ed);
+ OP (FG, A, B, C, D, 13, 5, 0xa9e3e905);
+ OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8);
+ OP (FG, C, D, A, B, 7, 14, 0x676f02d9);
+ OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a);
+
+ /* Round 3. */
+ OP (FH, A, B, C, D, 5, 4, 0xfffa3942);
+ OP (FH, D, A, B, C, 8, 11, 0x8771f681);
+ OP (FH, C, D, A, B, 11, 16, 0x6d9d6122);
+ OP (FH, B, C, D, A, 14, 23, 0xfde5380c);
+ OP (FH, A, B, C, D, 1, 4, 0xa4beea44);
+ OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9);
+ OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60);
+ OP (FH, B, C, D, A, 10, 23, 0xbebfbc70);
+ OP (FH, A, B, C, D, 13, 4, 0x289b7ec6);
+ OP (FH, D, A, B, C, 0, 11, 0xeaa127fa);
+ OP (FH, C, D, A, B, 3, 16, 0xd4ef3085);
+ OP (FH, B, C, D, A, 6, 23, 0x04881d05);
+ OP (FH, A, B, C, D, 9, 4, 0xd9d4d039);
+ OP (FH, D, A, B, C, 12, 11, 0xe6db99e5);
+ OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8);
+ OP (FH, B, C, D, A, 2, 23, 0xc4ac5665);
+
+ /* Round 4. */
+ OP (FI, A, B, C, D, 0, 6, 0xf4292244);
+ OP (FI, D, A, B, C, 7, 10, 0x432aff97);
+ OP (FI, C, D, A, B, 14, 15, 0xab9423a7);
+ OP (FI, B, C, D, A, 5, 21, 0xfc93a039);
+ OP (FI, A, B, C, D, 12, 6, 0x655b59c3);
+ OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92);
+ OP (FI, C, D, A, B, 10, 15, 0xffeff47d);
+ OP (FI, B, C, D, A, 1, 21, 0x85845dd1);
+ OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f);
+ OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0);
+ OP (FI, C, D, A, B, 6, 15, 0xa3014314);
+ OP (FI, B, C, D, A, 13, 21, 0x4e0811a1);
+ OP (FI, A, B, C, D, 4, 6, 0xf7537e82);
+ OP (FI, D, A, B, C, 11, 10, 0xbd3af235);
+ OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb);
+ OP (FI, B, C, D, A, 9, 21, 0xeb86d391);
+
+ /* Add the starting values of the context. */
+ A += A_save;
+ B += B_save;
+ C += C_save;
+ D += D_save;
+ }
/* Put checksum in context given as argument. */
ctx->A = A;
diff --git a/source/blender/imbuf/intern/md5.h b/source/blender/imbuf/intern/md5.h
index b49f8f559f7..1299eacffbf 100644
--- a/source/blender/imbuf/intern/md5.h
+++ b/source/blender/imbuf/intern/md5.h
@@ -54,11 +54,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
typedef unsigned short md5_uint32;
# else
# if ULONG_MAX == UINT_MAX_32_BITS
- typedef unsigned long md5_uint32;
+ typedef unsigned long md5_uint32;
# else
- /* The following line is intended to evoke an error.
- Using #error is not portable enough. */
- "Cannot determine unsigned 32-bit data type."
+ /* The following line is intended to evoke an error.
+ Using #error is not portable enough. */
+ "Cannot determine unsigned 32-bit data type."
# endif
# endif
#endif
@@ -93,7 +93,7 @@ void md5_init_ctx __P ((struct md5_ctx *ctx));
starting at BUFFER.
It is necessary that LEN is a multiple of 64!!! */
void md5_process_block __P ((const void *buffer, size_t len,
- struct md5_ctx *ctx));
+ struct md5_ctx *ctx));
/* Put result from CTX in first 16 bytes following RESBUF. The result is
always in little endian byte order, so that a byte-wise output yields
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c
index 7f686b11087..2dafa043da6 100644
--- a/source/blender/imbuf/intern/png.c
+++ b/source/blender/imbuf/intern/png.c
@@ -188,7 +188,7 @@ short imb_savepng(struct ImBuf *ibuf, char *name, int flags)
Flush);
} else {
fp = fopen(name, "wb");
- if (!fp) {
+ if (!fp) {
MEM_freeN(pixels);
return 0;
}
@@ -443,7 +443,7 @@ struct ImBuf *imb_loadpng(unsigned char *mem, int size, int flags)
for(i = 0; i < count; i++) {
IMB_imginfo_add_field(ibuf, text_chunks[i].key, text_chunks[i].text);
ibuf->flags |= IB_imginfo;
- }
+ }
}
png_read_end(png_ptr, info_ptr);
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index 570d8961758..9ad28abeae4 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -257,7 +257,7 @@ static int fwritecolrs(FILE* file, int width, int channels, unsigned char* ibufs
rgbe_scan = (RGBE*)MEM_mallocN(sizeof(RGBE)*width, "radhdr_write_tmpscan");
/* convert scanline */
- j= 0;
+ j= 0;
for (i=0;i<width;i++) {
if (fpscan) {
fcol[RED] = fpscan[j];
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index 4896ff0ab33..c23daacb919 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -221,7 +221,7 @@ struct ImBuf *IMB_loadiffmem(int *mem, int flags) {
if (GET_ID(mem) == FORM){
len = ((GET_BIG_LONG(mem+1) + 1) & ~1) + 8;
if ((GET_ID(mem+2) == ILBM) || (GET_ID(mem+2) == ANIM)) break;
- mem = (int *)((uchar *)mem +len);
+ mem = (int *)((uchar *)mem +len);
maxlen -= len;
} else return(0);
}
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index 14b1753f586..b3e25b52140 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -263,7 +263,7 @@ struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1)
for(x = ibuf2->x ; x>0 ; x--) *dest1++ = *dest2++ = *p1++;
dest1 = dest2;
}
- if (do_float) {
+ if (do_float) {
dest2f = dest1f + (4*ibuf2->x);
for(x = ibuf2->x*4 ; x>0 ; x--) *dest1f++ = *dest2f++ = *p1f++;
dest1f = dest2f;
@@ -520,38 +520,38 @@ static void enlarge_picture_byte(
*dst++ = ((((line1[x] * weight1y) >> 16)
* weight1x) >> 16)
+ ((((line2[x] * weight2y) >> 16)
- * weight1x) >> 16)
+ * weight1x) >> 16)
+ ((((line1[4 + x] * weight1y) >> 16)
* weight2x) >> 16)
+ ((((line2[4 + x] * weight2y) >> 16)
- * weight2x) >> 16);
+ * weight2x) >> 16);
*dst++ = ((((line1[x + 1] * weight1y) >> 16)
* weight1x) >> 16)
+ ((((line2[x + 1] * weight2y) >> 16)
- * weight1x) >> 16)
+ * weight1x) >> 16)
+ ((((line1[4 + x + 1] * weight1y) >> 16)
* weight2x) >> 16)
+ ((((line2[4 + x + 1] * weight2y) >> 16)
- * weight2x) >> 16);
+ * weight2x) >> 16);
*dst++ = ((((line1[x + 2] * weight1y) >> 16)
* weight1x) >> 16)
+ ((((line2[x + 2] * weight2y) >> 16)
- * weight1x) >> 16)
+ * weight1x) >> 16)
+ ((((line1[4 + x + 2] * weight1y) >> 16)
* weight2x) >> 16)
+ ((((line2[4 + x + 2] * weight2y) >> 16)
- * weight2x) >> 16);
+ * weight2x) >> 16);
*dst++ = ((((line1[x + 3] * weight1y) >> 16)
* weight1x) >> 16)
+ ((((line2[x + 3] * weight2y) >> 16)
- * weight1x) >> 16)
+ * weight1x) >> 16)
+ ((((line1[4 + x + 3] * weight1y) >> 16)
* weight2x) >> 16)
+ ((((line2[4 + x + 3] * weight2y) >> 16)
- * weight2x) >> 16);
+ * weight2x) >> 16);
x_src += dx_src;
}
@@ -661,7 +661,7 @@ static void shrink_picture_byte(
*dst++ = (val= (dst_line1[x].a * f) >> 15) > 255 ? 255: val;
}
memset(dst_line1, 0, dst_width *
- sizeof(struct scale_outpix_byte));
+ sizeof(struct scale_outpix_byte));
temp = dst_line1;
dst_line1 = dst_line2;
dst_line2 = temp;
@@ -688,10 +688,10 @@ static void q_scale_byte(unsigned char* in, unsigned char* out, int in_width,
{
if (dst_width > in_width && dst_height > in_height) {
enlarge_picture_byte(in, out, in_width, in_height,
- dst_width, dst_height);
+ dst_width, dst_height);
} else if (dst_width < in_width && dst_height < in_height) {
shrink_picture_byte(in, out, in_width, in_height,
- dst_width, dst_height);
+ dst_width, dst_height);
}
}
@@ -777,7 +777,7 @@ static void shrink_picture_float(
double ratioy = (double) (dst_height) / (double) (src_height);
uintptr_t x_src;
uintptr_t y_src;
- float dx_dst, x_dst;
+ float dx_dst, x_dst;
float dy_dst, y_dst;
float y_counter;
float * dst_begin = dst;
@@ -862,7 +862,7 @@ static void shrink_picture_float(
*dst++ = dst_line1[x].a * f;
}
memset(dst_line1, 0, dst_width *
- sizeof(struct scale_outpix_float));
+ sizeof(struct scale_outpix_float));
temp = dst_line1;
dst_line1 = dst_line2;
dst_line2 = temp;
@@ -888,10 +888,10 @@ static void q_scale_float(float* in, float* out, int in_width,
{
if (dst_width > in_width && dst_height > in_height) {
enlarge_picture_float(in, out, in_width, in_height,
- dst_width, dst_height);
+ dst_width, dst_height);
} else if (dst_width < in_width && dst_height < in_height) {
shrink_picture_float(in, out, in_width, in_height,
- dst_width, dst_height);
+ dst_width, dst_height);
}
}
@@ -906,7 +906,7 @@ static void q_scale_float(float* in, float* out, int in_width,
but that is pretty fast:
* does only blit once instead of two passes like the old code
- (fewer cache misses)
+ (fewer cache misses)
* uses fixed point integer arithmetic for byte buffers
* doesn't branch in tight loops
@@ -920,7 +920,7 @@ static int q_scale_linear_interpolation(
struct ImBuf *ibuf, int newx, int newy)
{
if ((newx >= ibuf->x && newy <= ibuf->y) ||
- (newx <= ibuf->x && newy >= ibuf->y)) {
+ (newx <= ibuf->x && newy >= ibuf->y)) {
return FALSE;
}
@@ -928,7 +928,7 @@ static int q_scale_linear_interpolation(
unsigned char * newrect =
MEM_mallocN(newx * newy * sizeof(int), "q_scale rect");
q_scale_byte((unsigned char *)ibuf->rect, newrect, ibuf->x, ibuf->y,
- newx, newy);
+ newx, newy);
imb_freerectImBuf(ibuf);
ibuf->mall |= IB_rect;
@@ -937,9 +937,9 @@ static int q_scale_linear_interpolation(
if (ibuf->rect_float) {
float * newrect =
MEM_mallocN(newx * newy * 4 *sizeof(float),
- "q_scale rectfloat");
+ "q_scale rectfloat");
q_scale_float(ibuf->rect_float, newrect, ibuf->x, ibuf->y,
- newx, newy);
+ newx, newy);
imb_freerectfloatImBuf(ibuf);
ibuf->mall |= IB_rectfloat;
ibuf->rect_float = newrect;
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index aafc9711a4e..092c52d427b 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -287,7 +287,7 @@ short imb_savetarga(struct ImBuf * ibuf, char *name, int flags)
buf[17] |= 0x08;
}
fildes = fopen(name,"wb");
- if (!fildes) return 0;
+ if (!fildes) return 0;
if (fwrite(buf, 1, 18,fildes) != 18) {
fclose(fildes);
@@ -297,9 +297,9 @@ short imb_savetarga(struct ImBuf * ibuf, char *name, int flags)
if (ibuf->cmap){
for (i = 0 ; i<ibuf->maxcol ; i++){
if (fwrite(((uchar *)(ibuf->cmap + i)) + 1,1,3,fildes) != 3) {
- fclose(fildes);
- return (0);
- }
+ fclose(fildes);
+ return (0);
+ }
}
}
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index 5a31a705591..dd18c77c5c6 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -92,7 +92,7 @@ static void imb_tiff_DummyUnmapProc(thandle_t fd, tdata_t base, toff_t size)
static int imb_tiff_DummyMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
{
- return (0);
+ return (0);
}
/**
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 216f82fada5..b1ca414434f 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -327,7 +327,7 @@ static int isffmpeg (char *filename) {
if(UTIL_DEBUG) dump_format(pFormatCtx, 0, filename, 0);
- /* Find the first video stream */
+ /* Find the first video stream */
videoStream=-1;
for(i=0; i<pFormatCtx->nb_streams; i++)
if(pFormatCtx->streams[i] &&
@@ -345,7 +345,7 @@ static int isffmpeg (char *filename) {
pCodecCtx = get_codec_from_stream(pFormatCtx->streams[videoStream]);
- /* Find the decoder for the video stream */
+ /* Find the decoder for the video stream */
pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
if(pCodec==NULL) {
av_close_input_file(pFormatCtx);