2015-10-02 17:22:42 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2013 Paul B Mahol
|
|
|
|
*
|
|
|
|
* This file is part of FFmpeg.
|
|
|
|
*
|
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2016-01-29 04:00:33 +02:00
|
|
|
#ifndef AVFILTER_BLEND_H
|
|
|
|
#define AVFILTER_BLEND_H
|
|
|
|
|
2015-10-02 17:22:42 +02:00
|
|
|
#include "libavutil/eval.h"
|
|
|
|
#include "avfilter.h"
|
|
|
|
|
|
|
|
enum BlendMode {
|
|
|
|
BLEND_UNSET = -1,
|
|
|
|
BLEND_NORMAL,
|
|
|
|
BLEND_ADDITION,
|
|
|
|
BLEND_AND,
|
|
|
|
BLEND_AVERAGE,
|
|
|
|
BLEND_BURN,
|
|
|
|
BLEND_DARKEN,
|
|
|
|
BLEND_DIFFERENCE,
|
2017-08-24 14:43:00 +02:00
|
|
|
BLEND_GRAINEXTRACT,
|
2015-10-02 17:22:42 +02:00
|
|
|
BLEND_DIVIDE,
|
|
|
|
BLEND_DODGE,
|
|
|
|
BLEND_EXCLUSION,
|
|
|
|
BLEND_HARDLIGHT,
|
|
|
|
BLEND_LIGHTEN,
|
|
|
|
BLEND_MULTIPLY,
|
|
|
|
BLEND_NEGATION,
|
|
|
|
BLEND_OR,
|
|
|
|
BLEND_OVERLAY,
|
|
|
|
BLEND_PHOENIX,
|
|
|
|
BLEND_PINLIGHT,
|
|
|
|
BLEND_REFLECT,
|
|
|
|
BLEND_SCREEN,
|
|
|
|
BLEND_SOFTLIGHT,
|
|
|
|
BLEND_SUBTRACT,
|
|
|
|
BLEND_VIVIDLIGHT,
|
|
|
|
BLEND_XOR,
|
|
|
|
BLEND_HARDMIX,
|
|
|
|
BLEND_LINEARLIGHT,
|
|
|
|
BLEND_GLOW,
|
2017-08-24 14:43:00 +02:00
|
|
|
BLEND_GRAINMERGE,
|
2016-02-07 20:24:49 +02:00
|
|
|
BLEND_MULTIPLY128,
|
2016-02-24 20:28:35 +02:00
|
|
|
BLEND_HEAT,
|
|
|
|
BLEND_FREEZE,
|
2017-06-25 16:39:10 +02:00
|
|
|
BLEND_EXTREMITY,
|
2021-09-26 23:08:14 +02:00
|
|
|
BLEND_SOFTDIFFERENCE,
|
2021-09-29 19:10:29 +02:00
|
|
|
BLEND_GEOMETRIC,
|
2021-09-29 19:19:06 +02:00
|
|
|
BLEND_HARMONIC,
|
2021-09-30 01:20:18 +02:00
|
|
|
BLEND_BLEACH,
|
|
|
|
BLEND_STAIN,
|
|
|
|
BLEND_INTERPOLATE,
|
|
|
|
BLEND_HARDOVERLAY,
|
2015-10-02 17:22:42 +02:00
|
|
|
BLEND_NB
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct FilterParams {
|
|
|
|
enum BlendMode mode;
|
|
|
|
double opacity;
|
|
|
|
AVExpr *e;
|
|
|
|
char *expr_str;
|
|
|
|
void (*blend)(const uint8_t *top, ptrdiff_t top_linesize,
|
|
|
|
const uint8_t *bottom, ptrdiff_t bottom_linesize,
|
|
|
|
uint8_t *dst, ptrdiff_t dst_linesize,
|
2016-02-14 04:01:35 +02:00
|
|
|
ptrdiff_t width, ptrdiff_t height,
|
2016-05-23 21:47:02 +02:00
|
|
|
struct FilterParams *param, double *values, int starty);
|
2015-10-02 17:22:42 +02:00
|
|
|
} FilterParams;
|
|
|
|
|
2018-11-15 14:41:45 +02:00
|
|
|
void ff_blend_init_x86(FilterParams *param, int depth);
|
2016-01-29 04:00:33 +02:00
|
|
|
|
|
|
|
#endif /* AVFILTER_BLEND_H */
|