2 * This file is part of FFmpeg.
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 #include "libavutil/attributes.h"
28 static void clear_block_c(int16_t *block)
30 memset(block, 0, sizeof(int16_t) * 64);
33 static void clear_blocks_c(int16_t *blocks)
35 memset(blocks, 0, sizeof(int16_t) * 6 * 64);
38 static void fill_block16_c(uint8_t *block, uint8_t value, ptrdiff_t line_size,
43 for (i = 0; i < h; i++) {
44 memset(block, value, 16);
49 static void fill_block8_c(uint8_t *block, uint8_t value, ptrdiff_t line_size,
54 for (i = 0; i < h; i++) {
55 memset(block, value, 8);
60 av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx)
62 c->clear_block = clear_block_c;
63 c->clear_blocks = clear_blocks_c;
65 c->fill_block_tab[0] = fill_block16_c;
66 c->fill_block_tab[1] = fill_block8_c;
69 ff_blockdsp_init_alpha(c);
71 ff_blockdsp_init_arm(c);
73 ff_blockdsp_init_ppc(c);
75 ff_blockdsp_init_x86(c, avctx);
77 ff_blockdsp_init_mips(c);