Cleanup: formatting

This commit is contained in:
Lukas Stockner
2023-05-08 01:20:41 +02:00
parent c431b69a8a
commit 893bd37bc0
2 changed files with 6 additions and 10 deletions

View File

@@ -734,8 +734,7 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
if (c->time_base.num != 1) {
AVRational new_time_base;
if (av_reduce(
&new_time_base.num, &new_time_base.den, c->time_base.num, c->time_base.den, INT_MAX))
{
&new_time_base.num, &new_time_base.den, c->time_base.num, c->time_base.den, INT_MAX)) {
/* Exact reduction was possible. Use the new value. */
c->time_base = new_time_base;
}

View File

@@ -169,7 +169,6 @@ static void bake_update_image(ScrArea *area, Image *image)
}
}
/* Bias almost-flat normals in tangent space to be flat to avoid artifacts in byte textures.
* For some types of normal baking, especially bevels, you can end up with a small amount
* of noise in the result. Since the border between pixel value 127 and 128 is exactly 0.5,
@@ -181,11 +180,7 @@ static void bake_update_image(ScrArea *area, Image *image)
* textures (which includes 16-bit formats). Also, it's only applied to the first two channels,
* since on flat surfaces the Z channel will be close enough to 1.0 to reliably end up on 255.
*/
void bias_tangent_normal_pixels(float *rect,
int channels,
int width,
int height,
int stride)
void bias_tangent_normal_pixels(float *rect, int channels, int width, int height, int stride)
{
BLI_assert(channels >= 3);
@@ -832,7 +827,8 @@ static bool bake_targets_output_internal(const BakeAPIRender *bkr,
Mesh *mesh_eval)
{
bool all_ok = true;
const bool is_tangent_normal = (bkr->pass_type == SCE_PASS_NORMAL) && (bkr->normal_space == R_BAKE_SPACE_TANGENT);
const bool is_tangent_normal = (bkr->pass_type == SCE_PASS_NORMAL) &&
(bkr->normal_space == R_BAKE_SPACE_TANGENT);
for (int i = 0; i < targets->images_num; i++) {
BakeImage *bk_image = &targets->images[i];
@@ -914,7 +910,8 @@ static bool bake_targets_output_external(const BakeAPIRender *bkr,
ReportList *reports)
{
bool all_ok = true;
const bool is_tangent_normal = (bkr->pass_type == SCE_PASS_NORMAL) && (bkr->normal_space == R_BAKE_SPACE_TANGENT);
const bool is_tangent_normal = (bkr->pass_type == SCE_PASS_NORMAL) &&
(bkr->normal_space == R_BAKE_SPACE_TANGENT);
for (int i = 0; i < targets->images_num; i++) {
BakeImage *bk_image = &targets->images[i];