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 }
static void bfin_put_pixels16_y2_nornd(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:97
av_cold void ff_hpeldsp_init_bfin(HpelDSPContext *c, int flags)
Definition: hpeldsp_bfin.c:102
static void bfin_put_pixels16_x2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:56
void ff_bfin_put_pixels8uc_nornd(uint8_t *block, const uint8_t *s0, const uint8_t *s1, int line_size, int h) attribute_l1_text
static void bfin_put_pixels8_x2_nornd(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:76
static void bfin_put_pixels16_x2_nornd(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:92
static void bfin_put_pixels8_nornd(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:71
void ff_bfin_put_pixels16uc(uint8_t *block, const uint8_t *s0, const uint8_t *s1, int dest_size, int line_size, int h) attribute_l1_text
Macro definitions for various function/variable attributes.
uint8_t
#define av_cold
Definition: attributes.h:78
static void bfin_put_pixels16_y2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:61
void ff_bfin_put_pixels16uc_nornd(uint8_t *block, const uint8_t *s0, const uint8_t *s1, int line_size, int h) attribute_l1_text
void ff_bfin_z_put_pixels8_xy2(uint8_t *block, const uint8_t *s0, int dest_size, int line_size, int h) attribute_l1_text
static void bfin_put_pixels16_nornd(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:87
#define s0
Definition: regdef.h:37
void ff_bfin_z_put_pixels16_xy2(uint8_t *block, const uint8_t *s0, int dest_size, int line_size, int h) attribute_l1_text
static void bfin_put_pixels16(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:51
static void bfin_put_pixels8_xy2(uint8_t *block, const uint8_t *s0, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:46
Half-pel DSP context.
Definition: hpeldsp.h:45
static void bfin_put_pixels8_y2_nornd(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:81
Half-pel DSP functions.
op_pixels_func put_pixels_tab[4][4]
Halfpel motion compensation with rounding (a+b+1)>>1.
Definition: hpeldsp.h:56
static void bfin_put_pixels16_xy2(uint8_t *block, const uint8_t *s0, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:66
op_pixels_func put_no_rnd_pixels_tab[4][4]
Halfpel motion compensation with no rounding (a+b)>>1.
Definition: hpeldsp.h:80
void ff_bfin_put_pixels8uc(uint8_t *block, const uint8_t *s0, const uint8_t *s1, int dest_size, int line_size, int h) attribute_l1_text
static void bfin_put_pixels8_y2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:41
static int flags
Definition: cpu.c:23
static void bfin_put_pixels8_x2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:36
static double c[64]
static void bfin_put_pixels8(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Definition: hpeldsp_bfin.c:31