diff options
author | Paul B Mahol <onemda@gmail.com> | 2015-10-02 17:22:42 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2015-10-03 21:26:17 +0200 |
commit | 9762554dd0e9116d28169f602380e7ccd2949ac5 (patch) | |
tree | c5f53a415850a401820097985d7f95522137d669 /libavfilter/blend.h | |
parent | 061b67fb50e2d5aab790d193ef93342e0312ddb2 (diff) |
avfilter/vf_blend: add x86 SIMD for some modes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/blend.h')
-rw-r--r-- | libavfilter/blend.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/libavfilter/blend.h b/libavfilter/blend.h new file mode 100644 index 0000000000..c22ecd20d6 --- /dev/null +++ b/libavfilter/blend.h @@ -0,0 +1,70 @@ +/* + * 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 + */ + +#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, + BLEND_DIFFERENCE128, + 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, + BLEND_ADDITION128, + 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, + int width, int start, int end, + struct FilterParams *param, double *values); +} FilterParams; + +void ff_blend_init_x86(FilterParams *param, int is_16bit); |