From fae45a43fab410eb1e46a9bf4d4b6133b5a7bbdd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 7 Mar 2022 10:51:22 +1100 Subject: Cleanup: use doxy-sections for pipeline, text_drag & effects Also improve on the doc-string for RE_RenderFrame & RE_RenderAnim. --- source/blender/sequencer/intern/effects.c | 155 +++++++++++++++++++++++++----- source/blender/sequencer/intern/effects.h | 7 -- 2 files changed, 130 insertions(+), 32 deletions(-) (limited to 'source/blender/sequencer/intern') diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c index aa433eeed09..faa4cd14825 100644 --- a/source/blender/sequencer/intern/effects.c +++ b/source/blender/sequencer/intern/effects.c @@ -58,6 +58,10 @@ static struct SeqEffectHandle get_sequence_effect_impl(int seq_type); +/* -------------------------------------------------------------------- */ +/** \name Internal Utilities + * \{ */ + static void slice_get_byte_buffers(const SeqRenderData *context, const ImBuf *ibuf1, const ImBuf *ibuf2, @@ -108,7 +112,11 @@ static void slice_get_float_buffers(const SeqRenderData *context, } } -/*********************** Glow effect *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Glow Effect + * \{ */ enum { GlowR = 0, @@ -178,7 +186,11 @@ static ImBuf *prepare_effect_imbufs(const SeqRenderData *context, return out; } -/*********************** Alpha Over *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Alpha Over Effect + * \{ */ static void init_alpha_over_or_under(Sequence *seq) { @@ -288,7 +300,11 @@ static void do_alphaover_effect(const SeqRenderData *context, } } -/*********************** Alpha Under *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Alpha Under Effect + * \{ */ static void do_alphaunder_effect_byte( float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out) @@ -405,7 +421,11 @@ static void do_alphaunder_effect(const SeqRenderData *context, } } -/*********************** Cross *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Cross Effect + * \{ */ static void do_cross_effect_byte( float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out) @@ -482,7 +502,11 @@ static void do_cross_effect(const SeqRenderData *context, } } -/*********************** Gamma Cross *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Gamma Cross + * \{ */ /* copied code from initrender.c */ static unsigned short gamtab[65536]; @@ -726,7 +750,11 @@ static void do_gammacross_effect(const SeqRenderData *context, } } -/*********************** Add *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Color Add Effect + * \{ */ static void do_add_effect_byte( float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out) @@ -802,7 +830,11 @@ static void do_add_effect(const SeqRenderData *context, } } -/*********************** Sub *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Color Subtract Effect + * \{ */ static void do_sub_effect_byte( float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out) @@ -880,7 +912,11 @@ static void do_sub_effect(const SeqRenderData *context, } } -/*********************** Drop *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Drop Effect + * \{ */ /* Must be > 0 or add precopy, etc to the function */ #define XOFF 8 @@ -954,7 +990,11 @@ static void do_drop_effect_float( memcpy(out, rt1, sizeof(*out) * yoff * 4 * x); } -/*********************** Mul *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Multiply Effect + * \{ */ static void do_mul_effect_byte( float fac, int x, int y, unsigned char *rect1, unsigned char *rect2, unsigned char *out) @@ -1035,7 +1075,12 @@ static void do_mul_effect(const SeqRenderData *context, } } -/*********************** Blend Mode ***************************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Blend Mode Effect + * \{ */ + typedef void (*IMB_blend_func_byte)(unsigned char *dst, const unsigned char *src1, const unsigned char *src2); @@ -1268,7 +1313,13 @@ static void do_blend_mode_effect(const SeqRenderData *context, fac, context->rectx, total_lines, rect1, rect2, seq->blend_mode, rect_out); } } -/*********************** Color Mix Effect *************************/ + +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Color Mix Effect + * \{ */ + static void init_colormix_effect(Sequence *seq) { ColorMixVars *data; @@ -1314,7 +1365,11 @@ static void do_colormix_effect(const SeqRenderData *context, } } -/*********************** Wipe *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Wipe Effect + * \{ */ typedef struct WipeZone { float angle; @@ -1334,7 +1389,9 @@ static void precalc_wipe_zone(WipeZone *wipezone, WipeVars *wipe, int xo, int yo wipezone->pythangle = 1.0f / sqrtf(wipezone->angle * wipezone->angle + 1.0f); } -/* This function calculates the blur band for the wipe effects */ +/** + * This function calculates the blur band for the wipe effects. + */ static float in_band(float width, float dist, int side, int dir) { float alpha; @@ -1757,7 +1814,11 @@ static ImBuf *do_wipe_effect(const SeqRenderData *context, return out; } -/*********************** Transform *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Transform Effect + * \{ */ static void init_transform_effect(Sequence *seq) { @@ -1909,7 +1970,11 @@ static void do_transform_effect(const SeqRenderData *context, transform->interpolation); } -/*********************** Glow *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Glow Effect + * \{ */ static void RVBlurBitmap2_float(float *map, int width, int height, float blur, int quality) { @@ -2229,7 +2294,11 @@ static ImBuf *do_glow_effect(const SeqRenderData *context, return out; } -/*********************** Solid color *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Solid Color Effect + * \{ */ static void init_solid_color(Sequence *seq) { @@ -2324,9 +2393,13 @@ static ImBuf *do_solid_color(const SeqRenderData *context, return out; } -/*********************** Mulitcam *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Mulit-Camera Effect + * \{ */ -/* no effect inputs for multicam, we use give_ibuf_seq */ +/** No effect inputs for multi-camera, we use #give_ibuf_seq. */ static int num_inputs_multicam(void) { return 0; @@ -2367,9 +2440,13 @@ static ImBuf *do_multicam(const SeqRenderData *context, return out; } -/*********************** Adjustment *************************/ +/** \} */ -/* no effect inputs for adjustment, we use give_ibuf_seq */ +/* -------------------------------------------------------------------- */ +/** \name Adjustment Effect + * \{ */ + +/** No effect inputs for adjustment, we use #give_ibuf_seq. */ static int num_inputs_adjustment(void) { return 0; @@ -2438,7 +2515,11 @@ static ImBuf *do_adjustment(const SeqRenderData *context, return out; } -/*********************** Speed *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Speed Effect + * \{ */ static void init_speed_effect(Sequence *seq) { @@ -2639,7 +2720,11 @@ static ImBuf *do_speed_effect(const SeqRenderData *context, return IMB_dupImBuf(ibuf1); } -/*********************** overdrop *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Over-Drop Effect + * \{ */ static void do_overdrop_effect(const SeqRenderData *context, Sequence *UNUSED(seq), @@ -2675,7 +2760,11 @@ static void do_overdrop_effect(const SeqRenderData *context, } } -/*********************** Gaussian Blur *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Gaussian Blur + * \{ */ /* NOTE: This gaussian blur implementation accumulates values in the square * kernel rather that doing X direction and then Y direction because of the @@ -3099,7 +3188,11 @@ static ImBuf *do_gaussian_blur_effect(const SeqRenderData *context, return out; } -/*********************** text *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Text Effect + * \{ */ static void init_text_effect(Sequence *seq) { @@ -3341,7 +3434,11 @@ static ImBuf *do_text_effect(const SeqRenderData *context, return out; } -/*********************** sequence effect factory *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Sequence Effect Factory + * \{ */ static void init_noop(Sequence *UNUSED(seq)) { @@ -3592,6 +3689,12 @@ static struct SeqEffectHandle get_sequence_effect_impl(int seq_type) return rval; } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Public Sequencer Effect API + * \{ */ + struct SeqEffectHandle SEQ_effect_handle_get(Sequence *seq) { struct SeqEffectHandle rval = {false, false, NULL}; @@ -3639,3 +3742,5 @@ int SEQ_effect_get_num_inputs(int seq_type) } return 0; } + +/** \} */ diff --git a/source/blender/sequencer/intern/effects.h b/source/blender/sequencer/intern/effects.h index 573f8df4352..c15701a2047 100644 --- a/source/blender/sequencer/intern/effects.h +++ b/source/blender/sequencer/intern/effects.h @@ -15,13 +15,6 @@ struct Scene; struct SeqRenderData; struct Sequence; -/* ********************************************************************** - * sequencer.c - * - * Sequencer editing functions - * ********************************************************************** - */ - struct SeqEffectHandle seq_effect_get_sequence_blend(struct Sequence *seq); /** * Build frame map when speed in mode #SEQ_SPEED_MULTIPLY is animated. -- cgit v1.2.3