A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.
This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.
Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.
Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:
https://reuse.software/faq/
49 lines
1.1 KiB
C++
49 lines
1.1 KiB
C++
/* SPDX-FileCopyrightText: 2021 Blender Foundation.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
#include "BLI_array.h"
|
|
|
|
#include "COM_MultiThreadedOperation.h"
|
|
|
|
namespace blender::compositor {
|
|
|
|
/**
|
|
* Executes buffer updates per row. To be inherited only by operations with correlated coordinates
|
|
* between inputs and output.
|
|
*/
|
|
class MultiThreadedRowOperation : public MultiThreadedOperation {
|
|
protected:
|
|
struct PixelCursor {
|
|
float *out;
|
|
int out_stride;
|
|
const float *row_end;
|
|
Array<const float *> ins;
|
|
Array<int> in_strides;
|
|
|
|
public:
|
|
PixelCursor(int num_inputs);
|
|
|
|
void next()
|
|
{
|
|
BLI_assert(out < row_end);
|
|
out += out_stride;
|
|
for (int i = 0; i < ins.size(); i++) {
|
|
ins[i] += in_strides[i];
|
|
}
|
|
}
|
|
};
|
|
|
|
protected:
|
|
virtual void update_memory_buffer_row(PixelCursor &p) = 0;
|
|
|
|
private:
|
|
void update_memory_buffer_partial(MemoryBuffer *output,
|
|
const rcti &area,
|
|
Span<MemoryBuffer *> inputs) final;
|
|
};
|
|
|
|
} // namespace blender::compositor
|