FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hpeldsp_bfin.c
Go to the documentation of this file.
1 /*
2  * BlackFin DSPUTILS
3  *
4  * Copyright (C) 2007 Marc Hoffman <marc.hoffman@analog.com>
5  * Copyright (c) 2006 Michael Benjamin <michael.benjamin@analog.com>
6  *
7  * This file is part of FFmpeg.
8  *
9  * FFmpeg is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * FFmpeg is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with FFmpeg; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  */
23 
24 #include <stddef.h>
25 #include <stdint.h>
26 
27 #include "libavutil/attributes.h"
28 #include "libavcodec/hpeldsp.h"
29 #include "hpeldsp_bfin.h"
30 
31 static void bfin_put_pixels8 (uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
32 {
33  ff_bfin_put_pixels8uc (block, pixels, pixels, line_size, line_size, h);
34 }
35 
36 static void bfin_put_pixels8_x2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
37 {
38  ff_bfin_put_pixels8uc (block, pixels, pixels+1, line_size, line_size, h);
39 }
40 
41 static void bfin_put_pixels8_y2 (uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
42 {
43  ff_bfin_put_pixels8uc (block, pixels, pixels+line_size, line_size, line_size, h);
44 }
45 
46 static void bfin_put_pixels8_xy2 (uint8_t *block, const uint8_t *s0, ptrdiff_t line_size, int h)
47 {
48  ff_bfin_z_put_pixels8_xy2 (block,s0,line_size, line_size, h);
49 }
50 
51 static void bfin_put_pixels16 (uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
52 {
53  ff_bfin_put_pixels16uc (block, pixels, pixels, line_size, line_size, h);
54 }
55 
56 static void bfin_put_pixels16_x2 (uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
57 {
58  ff_bfin_put_pixels16uc (block, pixels, pixels+1, line_size, line_size, h);
59 }
60 
61 static void bfin_put_pixels16_y2 (uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
62 {
63  ff_bfin_put_pixels16uc (block, pixels, pixels+line_size, line_size, line_size, h);
64 }
65 
66 static void bfin_put_pixels16_xy2 (uint8_t *block, const uint8_t *s0, ptrdiff_t line_size, int h)
67 {
68  ff_bfin_z_put_pixels16_xy2 (block,s0,line_size, line_size, h);
69 }
70 
71 static void bfin_put_pixels8_nornd (uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
72 {
73  ff_bfin_put_pixels8uc_nornd (block, pixels, pixels, line_size, h);
74 }
75 
76 static void bfin_put_pixels8_x2_nornd (uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
77 {
78  ff_bfin_put_pixels8uc_nornd (block, pixels, pixels+1, line_size, h);
79 }
80 
81 static void bfin_put_pixels8_y2_nornd (uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
82 {
83  ff_bfin_put_pixels8uc_nornd (block, pixels, pixels+line_size, line_size, h);
84 }
85 
86 
87 static void bfin_put_pixels16_nornd (uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
88 {
89  ff_bfin_put_pixels16uc_nornd (block, pixels, pixels, line_size, h);
90 }
91 
92 static void bfin_put_pixels16_x2_nornd (uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
93 {
94  ff_bfin_put_pixels16uc_nornd (block, pixels, pixels+1, line_size, h);
95 }
96 
97 static void bfin_put_pixels16_y2_nornd (uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
98 {
99  ff_bfin_put_pixels16uc_nornd (block, pixels, pixels+line_size, line_size, h);
100 }
101 
103 {
108 
109  c->put_pixels_tab[1][0] = bfin_put_pixels8;
113 
117 /* c->put_no_rnd_pixels_tab[1][3] = ff_bfin_put_pixels8_xy2_nornd; */
118 
122 /* c->put_no_rnd_pixels_tab[0][3] = ff_bfin_put_pixels16_xy2_nornd; */
123 }