Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_MovieClipOperation.cc
| Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | switch (sampler) { | ||||
| break; | break; | ||||
| case PixelSampler::Bicubic: | case PixelSampler::Bicubic: | ||||
| bicubic_interpolation_color(ibuf, nullptr, output, x, y); | bicubic_interpolation_color(ibuf, nullptr, output, x, y); | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void MovieClipBaseOperation::update_memory_buffer_partial(MemoryBuffer *output, | |||||
| const rcti &area, | |||||
| Span<MemoryBuffer *> UNUSED(inputs)) | |||||
| { | |||||
| if (m_movieClipBuffer) { | |||||
| output->copy_from(m_movieClipBuffer, area); | |||||
| } | |||||
| else { | |||||
| output->fill(area, COM_COLOR_TRANSPARENT); | |||||
| } | |||||
| } | |||||
| MovieClipOperation::MovieClipOperation() : MovieClipBaseOperation() | MovieClipOperation::MovieClipOperation() : MovieClipBaseOperation() | ||||
| { | { | ||||
| this->addOutputSocket(DataType::Color); | this->addOutputSocket(DataType::Color); | ||||
| } | } | ||||
| MovieClipAlphaOperation::MovieClipAlphaOperation() : MovieClipBaseOperation() | MovieClipAlphaOperation::MovieClipAlphaOperation() : MovieClipBaseOperation() | ||||
| { | { | ||||
| this->addOutputSocket(DataType::Value); | this->addOutputSocket(DataType::Value); | ||||
| } | } | ||||
| void MovieClipAlphaOperation::executePixelSampled(float output[4], | void MovieClipAlphaOperation::executePixelSampled(float output[4], | ||||
| float x, | float x, | ||||
| float y, | float y, | ||||
| PixelSampler sampler) | PixelSampler sampler) | ||||
| { | { | ||||
| float result[4]; | float result[4]; | ||||
| MovieClipBaseOperation::executePixelSampled(result, x, y, sampler); | MovieClipBaseOperation::executePixelSampled(result, x, y, sampler); | ||||
| output[0] = result[3]; | output[0] = result[3]; | ||||
| } | } | ||||
| void MovieClipAlphaOperation::update_memory_buffer_partial(MemoryBuffer *output, | |||||
| const rcti &area, | |||||
| Span<MemoryBuffer *> UNUSED(inputs)) | |||||
| { | |||||
| if (m_movieClipBuffer) { | |||||
| output->copy_from(m_movieClipBuffer, area, 3, COM_DATA_TYPE_VALUE_CHANNELS, 0); | |||||
| } | |||||
| else { | |||||
| output->fill(area, COM_VALUE_ZERO); | |||||
| } | |||||
| } | |||||
| } // namespace blender::compositor | } // namespace blender::compositor | ||||