diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-12-03 15:47:42 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-12-03 15:48:00 +0300 |
commit | ab927f5ca7a35393ea28de56e7a8d2a938c5de34 (patch) | |
tree | fe87d0a81c749c19668572e3cd072da1f3d44ac1 /source/blender/sequencer/intern | |
parent | c4e041da23b9c45273fcd4874308c536b6a315d1 (diff) |
ImBuf: Made Wrapping and Cropping optional in IMB_transform.
`IMB_transform` is used in VSE. It had a required crop parameter
for cropping the source buffer. This is not always needed.
In the image engine we want to use the use the `IMB_transform`
with wrap repeat. Both options are mutual exclusive and due
to performance reasons the wrap repeat is only available when
performing a nearest interpolation.
Diffstat (limited to 'source/blender/sequencer/intern')
-rw-r--r-- | source/blender/sequencer/intern/render.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 6030b49537c..27274626929 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -459,11 +459,7 @@ static void sequencer_thumbnail_transform(ImBuf *in, ImBuf *out) transform_pivot_set_m4(transform_matrix, pivot); invert_m4(transform_matrix); - /* No crop. */ - rctf source_crop; - BLI_rctf_init(&source_crop, 0, in->x, 0, in->y); - - IMB_transform(in, out, transform_matrix, &source_crop, IMB_FILTER_NEAREST); + IMB_transform(in, out, IMB_TRANSFORM_MODE_REGULAR, IMB_FILTER_NEAREST, transform_matrix, NULL); } /* Check whether transform introduces transparent ares in the result (happens when the transformed @@ -528,7 +524,7 @@ static void sequencer_preprocess_transform_crop( const eIMBInterpolationFilterMode filter = context->for_render ? IMB_FILTER_BILINEAR : IMB_FILTER_NEAREST; - IMB_transform(in, out, transform_matrix, &source_crop, filter); + IMB_transform(in, out, IMB_TRANSFORM_MODE_CROP_SRC, filter, transform_matrix, &source_crop); if (!seq_image_transform_transparency_gained(context, seq)) { out->planes = in->planes; |