VSE: Scopes improvements #116798

Merged
Aras Pranckevicius merged 13 commits from aras_p/blender:vse-scopes into main 2024-01-05 22:03:13 +01:00
5 changed files with 32 additions and 10 deletions
Showing only changes of commit c4a4eb4112 - Show all commits

View File

@ -46,6 +46,7 @@ set(SRC
sequencer_intern.hh
sequencer_quads_batch.hh
sequencer_scopes.hh
)
set(LIB

View File

@ -258,14 +258,6 @@ void sequencer_dropboxes();
void sequencer_operatortypes();
void sequencer_keymap(wmKeyConfig *keyconf);
/* sequencer_scope.c */
ImBuf *make_waveform_view_from_ibuf(ImBuf *ibuf);
ImBuf *make_sep_waveform_view_from_ibuf(ImBuf *ibuf);
ImBuf *make_vectorscope_view_from_ibuf(ImBuf *ibuf);
ImBuf *make_zebra_view_from_ibuf(ImBuf *ibuf, float perc);
ImBuf *make_histogram_view_from_ibuf(ImBuf *ibuf);
/* `sequencer_buttons.cc` */
void sequencer_buttons_register(ARegionType *art);

View File

@ -56,8 +56,8 @@
#include "WM_api.hh"
#include "WM_types.hh"
/* Own include. */
#include "sequencer_intern.hh"
#include "sequencer_scopes.hh"
static Sequence *special_seq_update = nullptr;

View File

@ -17,7 +17,7 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "sequencer_intern.hh"
#include "sequencer_scopes.hh"
// #define DEBUG_TIME
@ -506,6 +506,9 @@ static void make_histogram_view_from_ibuf_reduce(const void *__restrict /*userda
static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf)
{
#ifdef DEBUG_TIME
SCOPED_TIMER_AVERAGED(__func__);
#endif
ImBuf *rval = IMB_allocImBuf(515, 128, 32, IB_rect);
int x;
uint nr, ng, nb;
@ -590,6 +593,9 @@ static void make_histogram_view_from_ibuf_float_fn(void *__restrict userdata,
static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf)
{
#ifdef DEBUG_TIME
SCOPED_TIMER_AVERAGED(__func__);
#endif
ImBuf *rval = IMB_allocImBuf(515, 128, 32, IB_rect);
int nr, ng, nb;
int x;
@ -679,6 +685,9 @@ static void vectorscope_put_cross(uchar r, uchar g, uchar b, uchar *tgt, int w,
static ImBuf *make_vectorscope_view_from_ibuf_byte(ImBuf *ibuf)
{
#ifdef DEBUG_TIME
SCOPED_TIMER_AVERAGED(__func__);
#endif
ImBuf *rval = IMB_allocImBuf(515, 515, 32, IB_rect);
int x, y;
const uchar *src = ibuf->byte_buffer.data;
@ -724,6 +733,9 @@ static ImBuf *make_vectorscope_view_from_ibuf_byte(ImBuf *ibuf)
static ImBuf *make_vectorscope_view_from_ibuf_float(ImBuf *ibuf)
{
#ifdef DEBUG_TIME
SCOPED_TIMER_AVERAGED(__func__);
#endif
ImBuf *rval = IMB_allocImBuf(515, 515, 32, IB_rect);
int x, y;
const float *src = ibuf->float_buffer.data;

View File

@ -0,0 +1,17 @@
/* SPDX-FileCopyrightText: 2024 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup spseq
*/
#pragma once
struct ImBuf;
ImBuf *make_waveform_view_from_ibuf(ImBuf *ibuf);
ImBuf *make_sep_waveform_view_from_ibuf(ImBuf *ibuf);
ImBuf *make_vectorscope_view_from_ibuf(ImBuf *ibuf);
ImBuf *make_zebra_view_from_ibuf(ImBuf *ibuf, float perc);
ImBuf *make_histogram_view_from_ibuf(ImBuf *ibuf);