comparison x86/vp56dsp_init.c @ 12475:9fef0a8ddd63 libavcodec

Move mm_support() from libavcodec to libavutil, make it a public function and rename it to av_get_cpu_flags().
author stefano
date Wed, 08 Sep 2010 15:07:14 +0000
parents a5ddb39627fd
children
comparison
equal deleted inserted replaced
12474:cf54b8e98e7a 12475:9fef0a8ddd63
18 * You should have received a copy of the GNU Lesser General Public 18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software 19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */ 21 */
22 22
23 #include "libavutil/cpu.h"
23 #include "libavutil/x86_cpu.h" 24 #include "libavutil/x86_cpu.h"
24 #include "libavcodec/dsputil.h" 25 #include "libavcodec/dsputil.h"
25 #include "libavcodec/vp56dsp.h" 26 #include "libavcodec/vp56dsp.h"
26 27
27 void ff_vp6_filter_diag4_mmx(uint8_t *dst, uint8_t *src, int stride, 28 void ff_vp6_filter_diag4_mmx(uint8_t *dst, uint8_t *src, int stride,
30 const int16_t *h_weights,const int16_t *v_weights); 31 const int16_t *h_weights,const int16_t *v_weights);
31 32
32 av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec) 33 av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec)
33 { 34 {
34 #if HAVE_YASM 35 #if HAVE_YASM
35 int mm_flags = mm_support(); 36 int mm_flags = av_get_cpu_flags();
36 37
37 if (CONFIG_VP6_DECODER && codec == CODEC_ID_VP6) { 38 if (CONFIG_VP6_DECODER && codec == CODEC_ID_VP6) {
38 if (mm_flags & AV_CPU_FLAG_MMX) { 39 if (mm_flags & AV_CPU_FLAG_MMX) {
39 c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx; 40 c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx;
40 } 41 }