Mercurial > libavcodec.hg
comparison arm/dsputil_iwmmxt.c @ 12456:a5ddb39627fd libavcodec
Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
symbols, and move them from libavcodec/avcodec.h to libavutil/cpu.h.
author | stefano |
---|---|
date | Sat, 04 Sep 2010 09:59:08 +0000 |
parents | 3fc4c625b6f3 |
children |
comparison
equal
deleted
inserted
replaced
12455:14f85520cd02 | 12456:a5ddb39627fd |
---|---|
17 * You should have received a copy of the GNU Lesser General Public | 17 * You should have received a copy of the GNU Lesser General Public |
18 * License along with FFmpeg; if not, write to the Free Software | 18 * License along with FFmpeg; if not, write to the Free Software |
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 */ | 20 */ |
21 | 21 |
22 #include "libavutil/cpu.h" | |
22 #include "libavcodec/dsputil.h" | 23 #include "libavcodec/dsputil.h" |
23 | 24 |
24 #define DEF(x, y) x ## _no_rnd_ ## y ##_iwmmxt | 25 #define DEF(x, y) x ## _no_rnd_ ## y ##_iwmmxt |
25 #define SET_RND(regd) __asm__ volatile ("mov r12, #1 \n\t tbcsth " #regd ", r12":::"r12"); | 26 #define SET_RND(regd) __asm__ volatile ("mov r12, #1 \n\t tbcsth " #regd ", r12":::"r12"); |
26 #define WAVG2B "wavg2b" | 27 #define WAVG2B "wavg2b" |
151 * then we should install the functions | 152 * then we should install the functions |
152 */ | 153 */ |
153 | 154 |
154 void ff_dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx) | 155 void ff_dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx) |
155 { | 156 { |
156 int mm_flags = FF_MM_IWMMXT; /* multimedia extension flags */ | 157 int mm_flags = AV_CPU_FLAG_IWMMXT; /* multimedia extension flags */ |
157 | 158 |
158 if (avctx->dsp_mask) { | 159 if (avctx->dsp_mask) { |
159 if (avctx->dsp_mask & FF_MM_FORCE) | 160 if (avctx->dsp_mask & AV_CPU_FLAG_FORCE) |
160 mm_flags |= (avctx->dsp_mask & 0xffff); | 161 mm_flags |= (avctx->dsp_mask & 0xffff); |
161 else | 162 else |
162 mm_flags &= ~(avctx->dsp_mask & 0xffff); | 163 mm_flags &= ~(avctx->dsp_mask & 0xffff); |
163 } | 164 } |
164 | 165 |
165 if (!(mm_flags & FF_MM_IWMMXT)) return; | 166 if (!(mm_flags & AV_CPU_FLAG_IWMMXT)) return; |
166 | 167 |
167 c->add_pixels_clamped = add_pixels_clamped_iwmmxt; | 168 c->add_pixels_clamped = add_pixels_clamped_iwmmxt; |
168 | 169 |
169 c->clear_blocks = clear_blocks_iwmmxt; | 170 c->clear_blocks = clear_blocks_iwmmxt; |
170 | 171 |