comparison x86/h264dsp_mmx.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 14896fa76003
comparison
equal deleted inserted replaced
12474:cf54b8e98e7a 12475:9fef0a8ddd63
16 * You should have received a copy of the GNU Lesser General Public 16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software 17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20 20
21 #include "libavutil/cpu.h"
21 #include "libavutil/x86_cpu.h" 22 #include "libavutil/x86_cpu.h"
22 #include "libavcodec/h264dsp.h" 23 #include "libavcodec/h264dsp.h"
23 #include "dsputil_mmx.h" 24 #include "dsputil_mmx.h"
24 25
25 DECLARE_ALIGNED(8, static const uint64_t, ff_pb_3_1 ) = 0x0103010301030103ULL; 26 DECLARE_ALIGNED(8, static const uint64_t, ff_pb_3_1 ) = 0x0103010301030103ULL;
740 H264_BIWEIGHT_MMX ( 4, 4) 741 H264_BIWEIGHT_MMX ( 4, 4)
741 H264_BIWEIGHT_MMX ( 4, 2) 742 H264_BIWEIGHT_MMX ( 4, 2)
742 743
743 void ff_h264dsp_init_x86(H264DSPContext *c) 744 void ff_h264dsp_init_x86(H264DSPContext *c)
744 { 745 {
745 int mm_flags = mm_support(); 746 int mm_flags = av_get_cpu_flags();
746 747
747 if (mm_flags & AV_CPU_FLAG_MMX) { 748 if (mm_flags & AV_CPU_FLAG_MMX) {
748 c->h264_idct_dc_add= 749 c->h264_idct_dc_add=
749 c->h264_idct_add= ff_h264_idct_add_mmx; 750 c->h264_idct_add= ff_h264_idct_add_mmx;
750 c->h264_idct8_dc_add= 751 c->h264_idct8_dc_add=