Spaces:
Runtime error
Runtime error
/* | |
* Copyright (c) 2016 Tiancheng "Timothy" Gu | |
* | |
* This file is part of FFmpeg. | |
* | |
* FFmpeg is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 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 General Public License for more details. | |
* | |
* You should have received a copy of the GNU 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. | |
*/ | |
void checkasm_check_blend(void) | |
{ | |
uint8_t *top1 = av_malloc(BUF_SIZE); | |
uint8_t *top2 = av_malloc(BUF_SIZE); | |
uint8_t *bot1 = av_malloc(BUF_SIZE); | |
uint8_t *bot2 = av_malloc(BUF_SIZE); | |
uint8_t *dst1 = av_malloc(BUF_SIZE); | |
uint8_t *dst2 = av_malloc(BUF_SIZE); | |
FilterParams param = { | |
.opacity = 1.0, | |
}; | |
check_and_report(addition, BLEND_ADDITION, 1) | |
check_and_report(grainmerge, BLEND_GRAINMERGE, 1) | |
check_and_report(and, BLEND_AND, 1) | |
check_and_report(average, BLEND_AVERAGE, 1) | |
check_and_report(darken, BLEND_DARKEN, 1) | |
check_and_report(grainextract, BLEND_GRAINEXTRACT, 1) | |
check_and_report(hardmix, BLEND_HARDMIX, 1) | |
check_and_report(lighten, BLEND_LIGHTEN, 1) | |
check_and_report(multiply, BLEND_MULTIPLY, 1) | |
check_and_report(or, BLEND_OR, 1) | |
check_and_report(phoenix, BLEND_PHOENIX, 1) | |
check_and_report(screen, BLEND_SCREEN, 1) | |
check_and_report(subtract, BLEND_SUBTRACT, 1) | |
check_and_report(xor, BLEND_XOR, 1) | |
check_and_report(difference, BLEND_DIFFERENCE, 1) | |
check_and_report(extremity, BLEND_EXTREMITY, 1) | |
check_and_report(negation, BLEND_NEGATION, 1) | |
report("8bit"); | |
check_and_report(addition_16, BLEND_ADDITION, 2) | |
check_and_report(grainmerge_16, BLEND_GRAINMERGE, 2) | |
check_and_report(and_16, BLEND_AND, 2) | |
check_and_report(average_16, BLEND_AVERAGE, 2) | |
check_and_report(darken_16, BLEND_DARKEN, 2) | |
check_and_report(grainextract_16, BLEND_GRAINEXTRACT, 2) | |
check_and_report(difference_16, BLEND_DIFFERENCE, 2) | |
check_and_report(extremity_16, BLEND_EXTREMITY, 2) | |
check_and_report(negation_16, BLEND_NEGATION, 2) | |
check_and_report(lighten_16, BLEND_LIGHTEN, 2) | |
check_and_report(or_16, BLEND_OR, 2) | |
check_and_report(phoenix_16, BLEND_PHOENIX, 2) | |
check_and_report(subtract_16, BLEND_SUBTRACT, 2) | |
check_and_report(xor_16, BLEND_SUBTRACT, 2) | |
report("16bit"); | |
av_freep(&top1); | |
av_freep(&top2); | |
av_freep(&bot1); | |
av_freep(&bot2); | |
av_freep(&dst1); | |
av_freep(&dst2); | |
} | |