Blender V4.3
sequencer_scopes.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "BLI_array.hh"
13#include "BLI_utility_mixins.hh"
14
15struct ImBuf;
16
17namespace blender::ed::seq {
18
20 /* Byte images just have bins for the 0..255 range. */
21 static constexpr int BINS_BYTE = 256;
22 /* Float images spread -0.25..+1.25 range over 512 bins. */
23 static constexpr int BINS_FLOAT = 512;
24 static constexpr float FLOAT_VAL_MIN = -0.25f;
25 static constexpr float FLOAT_VAL_MAX = 1.25f;
28
29 void calc_from_ibuf(const ImBuf *ibuf);
30 bool is_float_hist() const
31 {
32 return data.size() == BINS_FLOAT;
33 }
34};
35
36struct SeqScopes : public NonCopyable {
38 ImBuf *zebra_ibuf = nullptr;
39 ImBuf *waveform_ibuf = nullptr;
41 ImBuf *vector_ibuf = nullptr;
43
44 SeqScopes() = default;
45 ~SeqScopes();
46
47 void cleanup();
48};
49
53ImBuf *make_zebra_view_from_ibuf(const ImBuf *ibuf, float perc);
54
55} // namespace blender::ed::seq
ImBuf * make_zebra_view_from_ibuf(const ImBuf *ibuf, float perc)
ImBuf * make_waveform_view_from_ibuf(const ImBuf *ibuf)
ImBuf * make_vectorscope_view_from_ibuf(const ImBuf *ibuf)
ImBuf * make_sep_waveform_view_from_ibuf(const ImBuf *ibuf)
void calc_from_ibuf(const ImBuf *ibuf)
static constexpr float FLOAT_VAL_MAX
static constexpr float FLOAT_VAL_MIN