diff options
author | Matt Ebb <matt@mke3.net> | 2010-04-06 06:05:54 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-04-06 06:05:54 +0400 |
commit | bfe248b3d629d28fed3798e9f6a42bccb5d40f9e (patch) | |
tree | d4b75ad54067d790cdabaa7e843624b1d423a5af /source/blender/makesdna | |
parent | ea7fdb55a3e8f088161b218b96220c1cba9380a1 (diff) |
Patch [#21750] Add luma waveform and vectorscope to image view
by Xavier Thomas
This adds the waveform monitor and vectorscope to the image editor 'scopes'
region, bringing it inline (plus a bit more) with sequence editor functionality,
and a big step closer to the end goal of unifying the display code for image/
comp/sequence editor. It's non-intrusive, using the same code paths as
the histogram.
There's still room for more tweaks - I modified the original patch, changing
the openGL immediate mode drawing of the waveform display to vertex arrays for
speed optimisation. Xavier can look at doing this for the vectorscope now too.
Thanks very much Xavier!
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_color_types.h | 43 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 5 |
2 files changed, 45 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h index 2a6dcfcb64e..dd31c349615 100644 --- a/source/blender/makesdna/DNA_color_types.h +++ b/source/blender/makesdna/DNA_color_types.h @@ -90,18 +90,57 @@ typedef enum CurveMappingPreset { CURVE_PRESET_MID9 } CurveMappingPreset; +/* histogram->mode */ +#define HISTO_MODE_LUMA 0 +#define HISTO_MODE_RGB 1 +#define HISTO_MODE_R 2 +#define HISTO_MODE_G 3 +#define HISTO_MODE_B 4 + typedef struct Histogram { int channels; int x_resolution; float data_r[256]; float data_g[256]; float data_b[256]; + float data_luma[256]; float xmax, ymax; + int mode; int height; +} Histogram; + +struct ImBuf; + +typedef struct Scopes { int ok; - int flag; + int sample_full; + int sample_lines; + float accuracy; + int wavefrm_mode; + float wavefrm_alpha; + float wavefrm_yfac; + int wavefrm_height; + float vecscope_alpha; + int vecscope_height; + float rgbminmax[3][2]; + float yccminmax[3][2]; + float ycc709minmax[3][2]; + struct ImBuf *samples_ibuf; + struct Histogram hist; + float *waveform_1; + float *waveform_2; + float *waveform_3; + int waveform_tot; int pad; -} Histogram; +} Scopes; + +/* scopes->wavefrm_mode */ +#define SCOPES_WAVEFRM_LUM 0 +#define SCOPES_WAVEFRM_RGB 1 +#define SCOPES_WAVEFRM_YCC_601 2 +#define SCOPES_WAVEFRM_YCC_709 3 +#define SCOPES_WAVEFRM_YCC_JPEG 4 + #endif diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 00ade3156c5..6cb22f3b08f 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -44,6 +44,7 @@ struct Text; struct Script; struct ImBuf; struct Image; +struct Scopes; struct Histogram; struct SpaceIpo; struct BlendHandle; @@ -260,8 +261,10 @@ typedef struct SpaceImage { struct bGPdata *gpd; /* grease pencil data */ - struct Histogram hist; /* viewer histogram */ + struct Scopes scopes; /* histogram waveform and vectorscope */ + struct Histogram sample_line_hist; /* sample line histogram */ + } SpaceImage; typedef struct SpaceNla { |