Mercurial > libavcodec.hg
annotate bfin/dsputil_bfin.c @ 10384:c44205b868dc libavcodec
ARM: simplify movrel definition as CONFIG_PIC is now set for shared libs
author | mru |
---|---|
date | Sun, 11 Oct 2009 10:15:48 +0000 |
parents | 5da84f0d0a55 |
children | 00b80bf84ad9 |
rev | line source |
---|---|
3728 | 1 /* |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
2 * BlackFin DSPUTILS |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
3 * |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
4 * Copyright (C) 2007 Marc Hoffman <marc.hoffman@analog.com> |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
5 * Copyright (c) 2006 Michael Benjamin <michael.benjamin@analog.com> |
3728 | 6 * |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3728
diff
changeset
|
7 * This file is part of FFmpeg. |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3728
diff
changeset
|
8 * |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3728
diff
changeset
|
9 * FFmpeg is free software; you can redistribute it and/or |
3728 | 10 * modify it under the terms of the GNU Lesser General Public |
11 * License as published by the Free Software Foundation; either | |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3728
diff
changeset
|
12 * version 2.1 of the License, or (at your option) any later version. |
3728 | 13 * |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3728
diff
changeset
|
14 * FFmpeg is distributed in the hope that it will be useful, |
3728 | 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 | |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3728
diff
changeset
|
20 * License along with FFmpeg; if not, write to the Free Software |
3728 | 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 */ | |
23 | |
6763 | 24 #include "libavcodec/avcodec.h" |
25 #include "libavcodec/dsputil.h" | |
5180
3d6f2ff62910
renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents:
5130
diff
changeset
|
26 #include "dsputil_bfin.h" |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
27 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
28 int off; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
29 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
30 |
8250 | 31 void ff_bfin_idct (DCTELEM *block) attribute_l1_text; |
32 void ff_bfin_fdct (DCTELEM *block) attribute_l1_text; | |
33 void ff_bfin_vp3_idct (DCTELEM *block); | |
34 void ff_bfin_vp3_idct_put (uint8_t *dest, int line_size, DCTELEM *block); | |
35 void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, DCTELEM *block); | |
9727 | 36 void ff_bfin_add_pixels_clamped (const DCTELEM *block, uint8_t *dest, int line_size) attribute_l1_text; |
37 void ff_bfin_put_pixels_clamped (const DCTELEM *block, uint8_t *dest, int line_size) attribute_l1_text; | |
38 void ff_bfin_diff_pixels (DCTELEM *block, const uint8_t *s1, const uint8_t *s2, int stride) attribute_l1_text; | |
8250 | 39 void ff_bfin_get_pixels (DCTELEM *restrict block, const uint8_t *pixels, int line_size) attribute_l1_text; |
40 int ff_bfin_pix_norm1 (uint8_t * pix, int line_size) attribute_l1_text; | |
41 int ff_bfin_z_sad8x8 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h) attribute_l1_text; | |
42 int ff_bfin_z_sad16x16 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h) attribute_l1_text; | |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
43 |
8250 | 44 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; |
45 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; | |
46 void ff_bfin_put_pixels16_xy2_nornd (uint8_t *block, const uint8_t *s0, int line_size, int h) attribute_l1_text; | |
47 void ff_bfin_put_pixels8_xy2_nornd (uint8_t *block, const uint8_t *s0, int line_size, int h) attribute_l1_text; | |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
48 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
49 |
8250 | 50 int ff_bfin_pix_sum (uint8_t *p, int stride) attribute_l1_text; |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
51 |
8250 | 52 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; |
53 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; | |
54 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; | |
55 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; | |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
56 |
8250 | 57 int ff_bfin_sse4 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) attribute_l1_text; |
58 int ff_bfin_sse8 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) attribute_l1_text; | |
59 int ff_bfin_sse16 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) attribute_l1_text; | |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
60 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
61 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
62 static void bfin_idct_add (uint8_t *dest, int line_size, DCTELEM *block) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
63 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
64 ff_bfin_idct (block); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
65 ff_bfin_add_pixels_clamped (block, dest, line_size); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
66 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
67 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
68 static void bfin_idct_put (uint8_t *dest, int line_size, DCTELEM *block) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
69 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
70 ff_bfin_idct (block); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
71 ff_bfin_put_pixels_clamped (block, dest, line_size); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
72 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
73 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
74 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
75 static void bfin_clear_blocks (DCTELEM *blocks) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
76 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
77 // This is just a simple memset. |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
78 // |
8031 | 79 __asm__("P0=192; " |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
80 "I0=%0; " |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
81 "R0=0; " |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
82 "LSETUP(clear_blocks_blkfn_lab,clear_blocks_blkfn_lab)LC0=P0;" |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
83 "clear_blocks_blkfn_lab:" |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
84 "[I0++]=R0;" |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
85 ::"a" (blocks):"P0","I0","R0"); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
86 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
87 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
88 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
89 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
90 static void bfin_put_pixels8 (uint8_t *block, const uint8_t *pixels, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
91 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
92 ff_bfin_put_pixels8uc (block, pixels, pixels, line_size, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
93 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
94 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
95 static void bfin_put_pixels8_x2(uint8_t *block, const uint8_t *pixels, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
96 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
97 ff_bfin_put_pixels8uc (block, pixels, pixels+1, line_size, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
98 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
99 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
100 static void bfin_put_pixels8_y2 (uint8_t *block, const uint8_t *pixels, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
101 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
102 ff_bfin_put_pixels8uc (block, pixels, pixels+line_size, line_size, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
103 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
104 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
105 static void bfin_put_pixels8_xy2 (uint8_t *block, const uint8_t *s0, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
106 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
107 ff_bfin_z_put_pixels8_xy2 (block,s0,line_size, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
108 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
109 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
110 static void bfin_put_pixels16 (uint8_t *block, const uint8_t *pixels, int line_size, int h) |
3728 | 111 { |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
112 ff_bfin_put_pixels16uc (block, pixels, pixels, line_size, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
113 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
114 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
115 static void bfin_put_pixels16_x2 (uint8_t *block, const uint8_t *pixels, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
116 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
117 ff_bfin_put_pixels16uc (block, pixels, pixels+1, line_size, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
118 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
119 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
120 static void bfin_put_pixels16_y2 (uint8_t *block, const uint8_t *pixels, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
121 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
122 ff_bfin_put_pixels16uc (block, pixels, pixels+line_size, line_size, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
123 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
124 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
125 static void bfin_put_pixels16_xy2 (uint8_t *block, const uint8_t *s0, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
126 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
127 ff_bfin_z_put_pixels16_xy2 (block,s0,line_size, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
128 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
129 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
130 void bfin_put_pixels8_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
131 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
132 ff_bfin_put_pixels8uc_nornd (block, pixels, pixels, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
133 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
134 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
135 static void bfin_put_pixels8_x2_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
136 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
137 ff_bfin_put_pixels8uc_nornd (block, pixels, pixels+1, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
138 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
139 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
140 static void bfin_put_pixels8_y2_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
141 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
142 ff_bfin_put_pixels8uc_nornd (block, pixels, pixels+line_size, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
143 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
144 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
145 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
146 void bfin_put_pixels16_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
147 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
148 ff_bfin_put_pixels16uc_nornd (block, pixels, pixels, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
149 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
150 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
151 static void bfin_put_pixels16_x2_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
152 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
153 ff_bfin_put_pixels16uc_nornd (block, pixels, pixels+1, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
154 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
155 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
156 static void bfin_put_pixels16_y2_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
157 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
158 ff_bfin_put_pixels16uc_nornd (block, pixels, pixels+line_size, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
159 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
160 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
161 static int bfin_pix_abs16 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
162 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
163 return ff_bfin_z_sad16x16 (blk1,blk2,line_size,line_size,h); |
3728 | 164 } |
165 | |
5690 | 166 static int bfin_vsad_intra16 (void *c, uint8_t *blk1, uint8_t *dummy, int stride, int h) { |
167 return ff_bfin_z_sad16x16 (blk1,blk1+stride,stride<<1,stride<<1,h); | |
168 } | |
169 | |
170 static int bfin_vsad (void *c, uint8_t *blk1, uint8_t *blk2, int stride, int h) { | |
171 return ff_bfin_z_sad16x16 (blk1,blk1+stride,stride<<1,stride<<1,h) | |
172 + ff_bfin_z_sad16x16 (blk2,blk2+stride,stride<<1,stride<<1,h); | |
173 } | |
174 | |
6362
78aa57eba353
FLAT objects cannot have multiple sections, so using the L1 attributes breaks
diego
parents:
5776
diff
changeset
|
175 static uint8_t vtmp_blk[256] attribute_l1_data_b; |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
176 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
177 static int bfin_pix_abs16_x2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
178 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
179 ff_bfin_put_pixels16uc (vtmp_blk, blk2, blk2+1, 16, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
180 return ff_bfin_z_sad16x16 (blk1, vtmp_blk, line_size, 16, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
181 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
182 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
183 static int bfin_pix_abs16_y2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
184 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
185 ff_bfin_put_pixels16uc (vtmp_blk, blk2, blk2+line_size, 16, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
186 return ff_bfin_z_sad16x16 (blk1, vtmp_blk, line_size, 16, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
187 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
188 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
189 static int bfin_pix_abs16_xy2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
190 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
191 ff_bfin_z_put_pixels16_xy2 (vtmp_blk, blk2, 16, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
192 return ff_bfin_z_sad16x16 (blk1, vtmp_blk, line_size, 16, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
193 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
194 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
195 static int bfin_pix_abs8 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
196 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
197 return ff_bfin_z_sad8x8 (blk1,blk2,line_size,line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
198 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
199 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
200 static int bfin_pix_abs8_x2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
201 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
202 ff_bfin_put_pixels8uc (vtmp_blk, blk2, blk2+1, 8, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
203 return ff_bfin_z_sad8x8 (blk1, vtmp_blk, line_size, 8, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
204 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
205 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
206 static int bfin_pix_abs8_y2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
207 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
208 ff_bfin_put_pixels8uc (vtmp_blk, blk2, blk2+line_size, 8, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
209 return ff_bfin_z_sad8x8 (blk1, vtmp_blk, line_size, 8, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
210 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
211 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
212 static int bfin_pix_abs8_xy2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h) |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
213 { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
214 ff_bfin_z_put_pixels8_xy2 (vtmp_blk, blk2, 8, line_size, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
215 return ff_bfin_z_sad8x8 (blk1, vtmp_blk, line_size, 8, h); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
216 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
217 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
218 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
219 /* |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
220 decoder optimization |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
221 start on 2/11 100 frames of 352x240@25 compiled with no optimization -g debugging |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
222 9.824s ~ 2.44x off |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
223 6.360s ~ 1.58x off with -O2 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
224 5.740s ~ 1.43x off with idcts |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
225 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
226 2.64s 2/20 same sman.mp4 decode only |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
227 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
228 */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
229 |
3728 | 230 void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx ) |
231 { | |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
232 c->get_pixels = ff_bfin_get_pixels; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
233 c->diff_pixels = ff_bfin_diff_pixels; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
234 c->put_pixels_clamped = ff_bfin_put_pixels_clamped; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
235 c->add_pixels_clamped = ff_bfin_add_pixels_clamped; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
236 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
237 c->clear_blocks = bfin_clear_blocks; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
238 c->pix_sum = ff_bfin_pix_sum; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
239 c->pix_norm1 = ff_bfin_pix_norm1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
240 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
241 c->sad[0] = bfin_pix_abs16; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
242 c->sad[1] = bfin_pix_abs8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
243 |
9728 | 244 /* c->vsad[0] = bfin_vsad; */ |
245 /* c->vsad[4] = bfin_vsad_intra16; */ | |
5690 | 246 |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
247 /* TODO [0] 16 [1] 8 */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
248 c->pix_abs[0][0] = bfin_pix_abs16; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
249 c->pix_abs[0][1] = bfin_pix_abs16_x2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
250 c->pix_abs[0][2] = bfin_pix_abs16_y2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
251 c->pix_abs[0][3] = bfin_pix_abs16_xy2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
252 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
253 c->pix_abs[1][0] = bfin_pix_abs8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
254 c->pix_abs[1][1] = bfin_pix_abs8_x2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
255 c->pix_abs[1][2] = bfin_pix_abs8_y2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
256 c->pix_abs[1][3] = bfin_pix_abs8_xy2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
257 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
258 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
259 c->sse[0] = ff_bfin_sse16; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
260 c->sse[1] = ff_bfin_sse8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
261 c->sse[2] = ff_bfin_sse4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
262 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
263 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
264 /** |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
265 * Halfpel motion compensation with rounding (a+b+1)>>1. |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
266 * This is an array[4][4] of motion compensation functions for 4 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
267 * horizontal blocksizes (8,16) and the 4 halfpel positions |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
268 * *pixels_tab[ 0->16xH 1->8xH ][ xhalfpel + 2*yhalfpel ] |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
269 * @param block destination where the result is stored |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
270 * @param pixels source |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
271 * @param line_size number of bytes in a horizontal line of block |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
272 * @param h height |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
273 */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
274 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
275 c->put_pixels_tab[0][0] = bfin_put_pixels16; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
276 c->put_pixels_tab[0][1] = bfin_put_pixels16_x2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
277 c->put_pixels_tab[0][2] = bfin_put_pixels16_y2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
278 c->put_pixels_tab[0][3] = bfin_put_pixels16_xy2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
279 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
280 c->put_pixels_tab[1][0] = bfin_put_pixels8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
281 c->put_pixels_tab[1][1] = bfin_put_pixels8_x2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
282 c->put_pixels_tab[1][2] = bfin_put_pixels8_y2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
283 c->put_pixels_tab[1][3] = bfin_put_pixels8_xy2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
284 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
285 c->put_no_rnd_pixels_tab[1][0] = bfin_put_pixels8_nornd; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
286 c->put_no_rnd_pixels_tab[1][1] = bfin_put_pixels8_x2_nornd; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
287 c->put_no_rnd_pixels_tab[1][2] = bfin_put_pixels8_y2_nornd; |
9728 | 288 /* c->put_no_rnd_pixels_tab[1][3] = ff_bfin_put_pixels8_xy2_nornd; */ |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
289 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
290 c->put_no_rnd_pixels_tab[0][0] = bfin_put_pixels16_nornd; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
291 c->put_no_rnd_pixels_tab[0][1] = bfin_put_pixels16_x2_nornd; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
292 c->put_no_rnd_pixels_tab[0][2] = bfin_put_pixels16_y2_nornd; |
9728 | 293 /* c->put_no_rnd_pixels_tab[0][3] = ff_bfin_put_pixels16_xy2_nornd; */ |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
294 |
9726
28796439526a
blackfin: use optimised (I)DCT only when ctx->(i)dct_algo is auto
mru
parents:
8250
diff
changeset
|
295 if (avctx->dct_algo == FF_DCT_AUTO) |
28796439526a
blackfin: use optimised (I)DCT only when ctx->(i)dct_algo is auto
mru
parents:
8250
diff
changeset
|
296 c->fdct = ff_bfin_fdct; |
28796439526a
blackfin: use optimised (I)DCT only when ctx->(i)dct_algo is auto
mru
parents:
8250
diff
changeset
|
297 |
5776
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
5690
diff
changeset
|
298 if (avctx->idct_algo==FF_IDCT_VP3) { |
9726
28796439526a
blackfin: use optimised (I)DCT only when ctx->(i)dct_algo is auto
mru
parents:
8250
diff
changeset
|
299 c->idct_permutation_type = FF_NO_IDCT_PERM; |
5776
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
5690
diff
changeset
|
300 c->idct = ff_bfin_vp3_idct; |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
5690
diff
changeset
|
301 c->idct_add = ff_bfin_vp3_idct_add; |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
5690
diff
changeset
|
302 c->idct_put = ff_bfin_vp3_idct_put; |
9726
28796439526a
blackfin: use optimised (I)DCT only when ctx->(i)dct_algo is auto
mru
parents:
8250
diff
changeset
|
303 } else if (avctx->idct_algo == FF_IDCT_AUTO) { |
28796439526a
blackfin: use optimised (I)DCT only when ctx->(i)dct_algo is auto
mru
parents:
8250
diff
changeset
|
304 c->idct_permutation_type = FF_NO_IDCT_PERM; |
5541
6c385356e61f
special handling for vp3 idct, use the c reference
mhoffman
parents:
5181
diff
changeset
|
305 c->idct = ff_bfin_idct; |
6c385356e61f
special handling for vp3 idct, use the c reference
mhoffman
parents:
5181
diff
changeset
|
306 c->idct_add = bfin_idct_add; |
6c385356e61f
special handling for vp3 idct, use the c reference
mhoffman
parents:
5181
diff
changeset
|
307 c->idct_put = bfin_idct_put; |
6c385356e61f
special handling for vp3 idct, use the c reference
mhoffman
parents:
5181
diff
changeset
|
308 } |
3728 | 309 } |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
310 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
311 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
3947
diff
changeset
|
312 |