VSE: Scopes improvements #116798
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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 project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#116798
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "aras_p/blender:vse-scopes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Several things about VSE Scopes:
DNA_space_types.h
no longer includesDNA_sequence_types.h
now, so the latter had to be added to a handful of source files that actually need it.Performance numbers everywhere below are with VSE at 4K UHD resolution, with a single 4K resolution PNG image strip. Playback FPS on Ryzen 5950X, Windows/VS2022 build.
Where behavior/look is somewhat different, I'm including both "byte" (PNG) image and "float" (EXR) image cases.
Show Overexposed (zebra) overlay
Luma Waveform
Before, PNG:
After, PNG:
Before, EXR:
After, EXR:
Luma Waveform, Separated colors ("Parade")
Before, PNG:
After, PNG:
Chroma Vectorscope
Before, PNG:
After, PNG:
Histogram
Before, PNG:
After, PNG:
Before, EXR:
After, EXR:
Blender Image Scopes
For comparison, the scopes from Blender's own "image" space below. At first I thought I'd try to factor out that code and make it shared between image and vse, but gave up on trying to do that. The image space scopes displays are "special type of UI button" deep within UI code, and my familiarity with that is very lacking, and I could not find a way to factor out the data they display out of DNA structs (which sounds like completely wrong place to hold it, but it does today). So for now, I have not touched the image scopes code at all.
PNG:
EXR:
@blender-bot build
WIP: VSE: Scopes improvementsto VSE: Scopes improvements+1! I just commented on some superficial things when reading the PR
@ -43,0 +53,4 @@
blender::ed::seq::SeqScopes scopes;
SpaceSeq_Runtime() = default;
SpaceSeq_Runtime(const SpaceSeq_Runtime &) = delete;
BLI_utility_mixins.hh
makes this a bit nicer, withNonCopyable
@ -0,0 +30,4 @@
void cleanup();
ImBuf *reference_ibuf = nullptr;
The style guide mentions putting member variables before method declarations, might as well stay consistent
@ -76,2 +75,4 @@
typedef struct SpaceFile_Runtime SpaceFile_Runtime;
/** Defined in `sequencer_intern.hh`. */
typedef struct SpaceSeq_Runtime SpaceSeq_Runtime;
What about putting the runtime struct into the editor's namespace, like the node and outliner runtime structs?
Nice patch! I have mostly nitpicky comments again, but wanted to mainly clarify usage of overlays here as that is not clear to me how it works actually.
@ -572,0 +537,4 @@
float grid_x_0 = area.xmin;
float grid_x_1 = area.xmax;
/* Float histograms show -0.25 .. 1.25 area horizontally. */
if (hist.data.size() > 256) {
This looks a little bit cursed, along with
(0.25f / 1.5f)
. It wasn't obvious to me, that float images do use 512 wide array and that this oversaples the image. Can you clarify this in a comment?Good point, will add named constants for these things
@ -613,2 +545,2 @@
scope = scopes->histogram_ibuf;
break;
View2D *v2d = ®ion->v2d;
const float text_scale_x = BLI_rctf_size_x(&v2d->cur) / BLI_rcti_size_x(&v2d->mask);
You can use
UI_view2d_scale_get_x()
here@ -615,0 +553,4 @@
/* Label. */
char buf[10];
snprintf(buf, sizeof(buf), "%.2f", val);
Use
BLI_snprintf()
@ -623,0 +616,4 @@
for (int i = 0; i < 3; i++) {
const float y = area.ymin + (area.ymax - area.ymin) * lines[i];
char buf[10];
snprintf(buf, sizeof(buf), "%.1f", lines[i]);
Use
BLI_snprintf()
@ -623,0 +681,4 @@
/* skin tone line */
uchar col_tone[4] = {255, 102, 0, 128};
const float tone_line_len = 0.895f; /* makes it end at outer edge of saturation ring */
I mean, it is a solution :) Just to be clear, no need to do anything about this, just wanted to say, that I laughed a bit.
Eh actually, I noticed a missing full stop at the comment, so that should be fixed.
@ -623,0 +698,4 @@
sequencer_preview_get_rect(&preview, scene, region, sseq, draw_overlay, false);
rctf uv;
if (draw_overlay && (sseq->overlay_frame_type == SEQ_OVERLAY_FRAME_TYPE_RECT)) {
I am bit lost here, why do you need overlay rect for scope?
Nice catch! I don't.
@ -566,4 +284,3 @@
return 511;
}
return int(((f + 0.25f) / 1.5f) * 512);
Perhaps
round_fl_to_int()
would be bit more precise.Rounding would be wrong as-is, since it would result in possible index 512 which is just past the end of the array.