VSE: add Cubic Mitchell filtering, rename previous cubic to Cubic BSpline #117517

Merged
Aras Pranckevicius merged 1 commits from aras_p/blender:vse-mitchell into main 2024-01-26 11:57:28 +01:00

Part of overall "improve filtering situation" (#116980) task:

  • Add "Cubic Mitchell" filtering option to VSE strips. This is a cubic (4x4) filter that generally looks better than bilinear, while not blurring the image as much as the Cubic BSpline filter that exists elsewhere within Blender. It is also default in many other apps.
  • Rename the (very recently added) VSE Bicubic filter option to Cubic BSpline.

Here's how a tiny image upscaled 16x looks like with various filters: Cubic Mitchell is what's added by this PR.
vse_filtering.png

And a more extensive comparison: https://aras-p.info/img/misc/upsample_filter_comp_2024/

Whether other parts of Blender (e.g. compositor) should get an option to Cubic Mitchell filtering, is a discussion for the future.

Part of overall "improve filtering situation" (#116980) task: - Add "Cubic Mitchell" filtering option to VSE strips. This is a cubic (4x4) filter that generally looks better than bilinear, while not blurring the image as much as the Cubic BSpline filter that exists elsewhere within Blender. It is also default in many other apps. - Rename the (very recently added) VSE Bicubic filter option to Cubic BSpline. Here's how a tiny image upscaled 16x looks like with various filters: Cubic Mitchell is what's added by this PR. ![vse_filtering.png](/attachments/5e6f84c7-7e38-471d-802d-5c0b2758aabe) And a more extensive comparison: https://aras-p.info/img/misc/upsample_filter_comp_2024/ Whether other parts of Blender (e.g. compositor) should get an option to Cubic Mitchell filtering, is a discussion for the future.
Aras Pranckevicius added 1 commit 2024-01-25 18:22:48 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
f6f33d3dbb
VSE: add Cubic Mitchell filtering, rename previous cubic to Cubic BSpline
Part of overall "improve filtering situation" (#116980) task:

- Add "Cubic Mitchell" filtering option to VSE strips. This is a cubic
  (4x4) filter that generally looks better than bilinear, while not
  blurring the image as much as the Cubic BSpline filter that exists
  elsewhere within Blender. It is also default in many other apps.
- Rename the (very recently added) VSE Bicubic filter option to
  Cubic BSpline.
Aras Pranckevicius added this to the Video Sequencer project 2024-01-25 18:23:42 +01:00
Author
Member

@blender-bot build

@blender-bot build
Sergey Sharybin reviewed 2024-01-26 10:12:00 +01:00
@ -178,0 +199,4 @@
for (int i = 0; i < components; i++) {
out[i] = math::max(out[i], 0.0f);
if constexpr (std::is_same_v<T, uchar>) {
out[i] = math::min(out[i], 255.0f);

Not very obvious why negative lobe could lead to values above 255.

Not very obvious why negative lobe could lead to values above 255.
aras_p marked this conversation as resolved
@ -387,3 +397,2 @@
}
else if (filter == IMB_FILTER_BICUBIC) {
transform_scanlines_filter<IMB_FILTER_BICUBIC>(ctx, y_range);
else if (filter == IMB_FILTER_CUBIC_BSPLINE) {

This should probably become a switch statement.

This should probably become a `switch` statement.
Sergey Sharybin requested review from Sergey Sharybin 2024-01-26 10:12:15 +01:00

@blender-bot build

@blender-bot build
Sergey Sharybin approved these changes 2024-01-26 11:36:06 +01:00
Aras Pranckevicius merged commit b7cf71d567 into main 2024-01-26 11:57:28 +01:00
Aras Pranckevicius deleted branch vse-mitchell 2024-01-26 11:57:30 +01:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#117517
No description provided.