diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-03 05:36:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-03 05:36:00 +0400 |
commit | ff7b353ce68a2b16fd4649d4d81214db7a802307 (patch) | |
tree | de7659c35aea39a888c53cc8b9c90506550e37b2 /source/blender | |
parent | 6a47f756a6a3868b16b015752226dfa3303cb505 (diff) |
style cleanup
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/writeffmpeg.c | 21 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_texture.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 2 |
5 files changed, 16 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index eddbaff0238..3249de49fe6 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -123,7 +123,7 @@ static int write_audio_frame(void) { AVCodecContext *c = NULL; AVPacket pkt; - AVFrame* frame; + AVFrame *frame; int got_output = 0; c = audio_stream->codec; @@ -142,12 +142,12 @@ static int write_audio_frame(void) AUD_readDevice(audio_mixdown_device, audio_input_buffer, audio_input_samples); audio_time += (double) audio_input_samples / (double) c->sample_rate; - if(audio_deinterleave) { + if (audio_deinterleave) { int channel, i; - uint8_t* temp; + uint8_t *temp; - for(channel = 0; channel < c->channels; channel++) { - for(i = 0; i < frame->nb_samples; i++) { + for (channel = 0; channel < c->channels; channel++) { + for (i = 0; i < frame->nb_samples; i++) { memcpy(audio_deinterleave_buffer + (i + channel * frame->nb_samples) * audio_sample_size, audio_input_buffer + (c->channels * i + channel) * audio_sample_size, audio_sample_size); } @@ -159,14 +159,14 @@ static int write_audio_frame(void) } avcodec_fill_audio_frame(frame, c->channels, c->sample_fmt, audio_input_buffer, - audio_input_samples * c->channels * audio_sample_size, 0); + audio_input_samples * c->channels * audio_sample_size, 0); - if(avcodec_encode_audio2(c, &pkt, frame, &got_output) < 0) { + if (avcodec_encode_audio2(c, &pkt, frame, &got_output) < 0) { // XXX error("Error writing audio packet"); return -1; } - if(got_output) { + if (got_output) { if (c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE) { pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, audio_stream->time_base); PRINT("Audio Frame PTS: %d\n", (int) pkt.pts); @@ -733,7 +733,7 @@ static AVStream *alloc_audio_stream(RenderData *rd, int codec_id, AVFormatContex audio_input_buffer = (uint8_t *) av_malloc(audio_input_samples * c->channels * audio_sample_size); - if(audio_deinterleave) + if (audio_deinterleave) audio_deinterleave_buffer = (uint8_t *) av_malloc(audio_input_samples * c->channels * audio_sample_size); audio_time = 0.0f; @@ -1036,8 +1036,7 @@ int BKE_ffmpeg_start(struct Scene *scene, RenderData *rd, int rectx, int recty, AUD_DeviceSpecs specs; specs.channels = c->channels; - switch(av_get_packed_sample_fmt(c->sample_fmt)) - { + switch (av_get_packed_sample_fmt(c->sample_fmt)) { case AV_SAMPLE_FMT_U8: specs.format = AUD_FORMAT_U8; break; diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 76b01bc7f57..40a18734948 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -520,7 +520,7 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve float len, factor; sub_v2_v2v2_int(mdiff, event->mval, scd->br->stencil_pos); len = sqrtf(mdiff[0] * mdiff[0] + mdiff[1] * mdiff[1]); - factor = len/scd->lenorig; + factor = len / scd->lenorig; mdiff[0] = factor * scd->init_sdim[0]; mdiff[1] = factor * scd->init_sdim[1]; copy_v2_v2_int(scd->br->stencil_dimension, mdiff); diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index b54e515bd6d..315fdd2fb32 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -382,7 +382,7 @@ static int brush_curve_preset_exec(bContext *C, wmOperator *op) { Brush *br = paint_brush(paint_get_active_from_context(C)); - if(br) + if (br) BKE_brush_curve_preset(br, RNA_enum_get(op->ptr, "shape")); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index b3d5d4884ff..5a7d70d279c 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -333,14 +333,14 @@ static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg) ct->texture = tex; - if(user->ptr.type == &RNA_ParticleSettingsTextureSlot) { + if (user->ptr.type == &RNA_ParticleSettingsTextureSlot) { /* stupid exception for particle systems which still uses influence * from the old texture system, set the active texture slots as well */ ParticleSettings *part = user->ptr.id.data; int a; - for(a = 0; a < MAX_MTEX; a++) - if(user->ptr.data == part->mtex[a]) + for (a = 0; a < MAX_MTEX; a++) + if (user->ptr.data == part->mtex[a]) part->texact = a; } } diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 6ae4b9d2a49..76e22ed9170 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -540,7 +540,7 @@ static int rna_SpaceView3D_viewport_shade_get(PointerRNA *ptr) { Scene *scene = ((bScreen *)ptr->id.data)->scene; RenderEngineType *type = RE_engines_find(scene->r.engine); - View3D *v3d= (View3D*)ptr->data; + View3D *v3d = (View3D *)ptr->data; int drawtype = v3d->drawtype; if (drawtype == OB_MATERIAL && !BKE_scene_use_new_shading_nodes(scene)) |