Spaces:
Runtime error
Runtime error
/* | |
* Copyright (c) 2015 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_pixblockdsp(void) | |
{ | |
LOCAL_ALIGNED_16(uint8_t, src10, [BUF_SIZE]); | |
LOCAL_ALIGNED_16(uint8_t, src11, [BUF_SIZE]); | |
LOCAL_ALIGNED_16(uint8_t, src20, [BUF_SIZE]); | |
LOCAL_ALIGNED_16(uint8_t, src21, [BUF_SIZE]); | |
LOCAL_ALIGNED_16(uint8_t, dst0_, [BUF_SIZE]); | |
LOCAL_ALIGNED_16(uint8_t, dst1_, [BUF_SIZE]); | |
uint16_t *dst0 = (uint16_t *)dst0_; | |
uint16_t *dst1 = (uint16_t *)dst1_; | |
PixblockDSPContext h; | |
AVCodecContext avctx = { | |
.bits_per_raw_sample = 8, | |
}; | |
ff_pixblockdsp_init(&h, &avctx); | |
if (check_func(h.get_pixels, "get_pixels")) | |
check_get_pixels(uint8_t, 1); | |
if (check_func(h.get_pixels_unaligned, "get_pixels_unaligned")) | |
check_get_pixels(uint8_t, 0); | |
report("get_pixels"); | |
if (check_func(h.diff_pixels, "diff_pixels")) | |
check_diff_pixels(uint8_t, 1); | |
if (check_func(h.diff_pixels_unaligned, "diff_pixels_unaligned")) | |
check_diff_pixels(uint8_t, 0); | |
report("diff_pixels"); | |
} | |