FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
blockdsp.c
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
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.
8  *
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.
13  *
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
17  */
18 
19 #include <stdint.h>
20 #include <string.h>
21 
22 #include "config.h"
23 #include "libavutil/attributes.h"
24 #include "avcodec.h"
25 #include "blockdsp.h"
26 #include "version.h"
27 
28 static void clear_block_c(int16_t *block)
29 {
30  memset(block, 0, sizeof(int16_t) * 64);
31 }
32 
33 static void clear_blocks_c(int16_t *blocks)
34 {
35  memset(blocks, 0, sizeof(int16_t) * 6 * 64);
36 }
37 
38 static void fill_block16_c(uint8_t *block, uint8_t value, int line_size, int h)
39 {
40  int i;
41 
42  for (i = 0; i < h; i++) {
43  memset(block, value, 16);
44  block += line_size;
45  }
46 }
47 
48 static void fill_block8_c(uint8_t *block, uint8_t value, int line_size, int h)
49 {
50  int i;
51 
52  for (i = 0; i < h; i++) {
53  memset(block, value, 8);
54  block += line_size;
55  }
56 }
57 
59 {
62 
65 
66  if (ARCH_ALPHA)
68  if (ARCH_ARM)
70  if (ARCH_PPC)
72  if (ARCH_X86)
73  ff_blockdsp_init_x86(c, avctx);
74  if (ARCH_MIPS)
76 }
av_cold void ff_blockdsp_init_alpha(BlockDSPContext *c)
void(* clear_block)(int16_t *block)
Definition: blockdsp.h:35
void(* clear_blocks)(int16_t *blocks)
Definition: blockdsp.h:36
Macro definitions for various function/variable attributes.
static int16_t block[64]
Definition: dct.c:113
uint8_t
#define av_cold
Definition: attributes.h:82
av_cold void ff_blockdsp_init_arm(BlockDSPContext *c)
Libavcodec version macros.
av_cold void ff_blockdsp_init_ppc(BlockDSPContext *c)
Definition: blockdsp.c:146
void ff_blockdsp_init_x86(BlockDSPContext *c, AVCodecContext *avctx)
Definition: blockdsp_init.c:34
static void clear_blocks_c(int16_t *blocks)
Definition: blockdsp.c:33
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
void ff_blockdsp_init_mips(BlockDSPContext *c)
static void fill_block8_c(uint8_t *block, uint8_t value, int line_size, int h)
Definition: blockdsp.c:48
Libavcodec external API header.
av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx)
Definition: blockdsp.c:58
main external API structure.
Definition: avcodec.h:1649
static void fill_block16_c(uint8_t *block, uint8_t value, int line_size, int h)
Definition: blockdsp.c:38
static double c[64]
static void clear_block_c(int16_t *block)
Definition: blockdsp.c:28
op_fill_func fill_block_tab[2]
Definition: blockdsp.h:38