Originally committed as revision 25040 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -75,7 +75,7 @@ static void simple_idct_arm_add(uint8_t *dest, int line_size, DCTELEM *block) |
| 75 | 75 |
|
| 76 | 76 |
int mm_support(void) |
| 77 | 77 |
{
|
| 78 |
- return HAVE_IWMMXT * FF_MM_IWMMXT; |
|
| 78 |
+ return HAVE_IWMMXT * AV_CPU_FLAG_IWMMXT; |
|
| 79 | 79 |
} |
| 80 | 80 |
|
| 81 | 81 |
void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx) |
| ... | ... |
@@ -19,6 +19,7 @@ |
| 19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 |
+#include "libavutil/cpu.h" |
|
| 22 | 23 |
#include "libavcodec/dsputil.h" |
| 23 | 24 |
|
| 24 | 25 |
#define DEF(x, y) x ## _no_rnd_ ## y ##_iwmmxt |
| ... | ... |
@@ -153,16 +154,16 @@ static void nop(uint8_t *block, const uint8_t *pixels, int line_size, int h) |
| 153 | 153 |
|
| 154 | 154 |
void ff_dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx) |
| 155 | 155 |
{
|
| 156 |
- int mm_flags = FF_MM_IWMMXT; /* multimedia extension flags */ |
|
| 156 |
+ int mm_flags = AV_CPU_FLAG_IWMMXT; /* multimedia extension flags */ |
|
| 157 | 157 |
|
| 158 | 158 |
if (avctx->dsp_mask) {
|
| 159 |
- if (avctx->dsp_mask & FF_MM_FORCE) |
|
| 159 |
+ if (avctx->dsp_mask & AV_CPU_FLAG_FORCE) |
|
| 160 | 160 |
mm_flags |= (avctx->dsp_mask & 0xffff); |
| 161 | 161 |
else |
| 162 | 162 |
mm_flags &= ~(avctx->dsp_mask & 0xffff); |
| 163 | 163 |
} |
| 164 | 164 |
|
| 165 |
- if (!(mm_flags & FF_MM_IWMMXT)) return; |
|
| 165 |
+ if (!(mm_flags & AV_CPU_FLAG_IWMMXT)) return; |
|
| 166 | 166 |
|
| 167 | 167 |
c->add_pixels_clamped = add_pixels_clamped_iwmmxt; |
| 168 | 168 |
|
| ... | ... |
@@ -18,6 +18,7 @@ |
| 18 | 18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | 19 |
*/ |
| 20 | 20 |
|
| 21 |
+#include "libavutil/cpu.h" |
|
| 21 | 22 |
#include "libavcodec/avcodec.h" |
| 22 | 23 |
#include "libavcodec/dsputil.h" |
| 23 | 24 |
#include "libavcodec/mpegvideo.h" |
| ... | ... |
@@ -111,7 +112,7 @@ static void dct_unquantize_h263_inter_iwmmxt(MpegEncContext *s, |
| 111 | 111 |
|
| 112 | 112 |
void MPV_common_init_iwmmxt(MpegEncContext *s) |
| 113 | 113 |
{
|
| 114 |
- if (!(mm_flags & FF_MM_IWMMXT)) return; |
|
| 114 |
+ if (!(mm_flags & AV_CPU_FLAG_IWMMXT)) return; |
|
| 115 | 115 |
|
| 116 | 116 |
s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_iwmmxt; |
| 117 | 117 |
#if 0 |
| ... | ... |
@@ -29,6 +29,7 @@ |
| 29 | 29 |
*/ |
| 30 | 30 |
|
| 31 | 31 |
|
| 32 |
+#include "libavutil/cpu.h" |
|
| 32 | 33 |
#include "avcodec.h" |
| 33 | 34 |
|
| 34 | 35 |
|
| ... | ... |
@@ -93,7 +94,7 @@ typedef struct AVAudioConvert AVAudioConvert; |
| 93 | 93 |
* @param in_fmt Input sample format |
| 94 | 94 |
* @param in_channels Number of input channels |
| 95 | 95 |
* @param[in] matrix Channel mixing matrix (of dimension in_channel*out_channels). Set to NULL to ignore. |
| 96 |
- * @param flags See FF_MM_xx |
|
| 96 |
+ * @param flags See AV_CPU_FLAG_xx |
|
| 97 | 97 |
* @return NULL on error |
| 98 | 98 |
*/ |
| 99 | 99 |
AVAudioConvert *av_audio_convert_alloc(enum SampleFormat out_fmt, int out_channels, |
| ... | ... |
@@ -28,10 +28,11 @@ |
| 28 | 28 |
|
| 29 | 29 |
#include <errno.h> |
| 30 | 30 |
#include "libavutil/avutil.h" |
| 31 |
+#include "libavutil/cpu.h" |
|
| 31 | 32 |
|
| 32 | 33 |
#define LIBAVCODEC_VERSION_MAJOR 52 |
| 33 | 34 |
#define LIBAVCODEC_VERSION_MINOR 87 |
| 34 |
-#define LIBAVCODEC_VERSION_MICRO 0 |
|
| 35 |
+#define LIBAVCODEC_VERSION_MICRO 1 |
|
| 35 | 36 |
|
| 36 | 37 |
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
| 37 | 38 |
LIBAVCODEC_VERSION_MINOR, \ |
| ... | ... |
@@ -50,6 +51,7 @@ |
| 50 | 50 |
#ifndef FF_API_PALETTE_CONTROL |
| 51 | 51 |
#define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54) |
| 52 | 52 |
#endif |
| 53 |
+#define FF_API_MM_FLAGS (LIBAVCODEC_VERSION_MAJOR < 53) |
|
| 53 | 54 |
|
| 54 | 55 |
#define AV_NOPTS_VALUE INT64_C(0x8000000000000000) |
| 55 | 56 |
#define AV_TIME_BASE 1000000 |
| ... | ... |
@@ -1657,27 +1659,25 @@ typedef struct AVCodecContext {
|
| 1657 | 1657 |
* result into program crash.) |
| 1658 | 1658 |
*/ |
| 1659 | 1659 |
unsigned dsp_mask; |
| 1660 |
-#define FF_MM_FORCE 0x80000000 /* Force usage of selected flags (OR) */ |
|
| 1661 |
- /* lower 16 bits - CPU features */ |
|
| 1662 |
-#define FF_MM_MMX 0x0001 ///< standard MMX |
|
| 1663 |
-#define FF_MM_3DNOW 0x0004 ///< AMD 3DNOW |
|
| 1664 |
-#if LIBAVCODEC_VERSION_MAJOR < 53 |
|
| 1665 |
-#define FF_MM_MMXEXT 0x0002 ///< SSE integer functions or AMD MMX ext |
|
| 1660 |
+ |
|
| 1661 |
+#if FF_API_MM_FLAGS |
|
| 1662 |
+#define FF_MM_FORCE AV_CPU_FLAG_FORCE |
|
| 1663 |
+#define FF_MM_MMX AV_CPU_FLAG_MMX |
|
| 1664 |
+#define FF_MM_3DNOW AV_CPU_FLAG_3DNOW |
|
| 1665 |
+#define FF_MM_MMXEXT AV_CPU_FLAG_MMX2 |
|
| 1666 |
+#define FF_MM_MMX2 AV_CPU_FLAG_MMX2 |
|
| 1667 |
+#define FF_MM_SSE AV_CPU_FLAG_SSE |
|
| 1668 |
+#define FF_MM_SSE2 AV_CPU_FLAG_SSE2 |
|
| 1669 |
+#define FF_MM_SSE2SLOW AV_CPU_FLAG_SSE2SLOW |
|
| 1670 |
+#define FF_MM_3DNOWEXT AV_CPU_FLAG_3DNOWEXT |
|
| 1671 |
+#define FF_MM_SSE3 AV_CPU_FLAG_SSE3 |
|
| 1672 |
+#define FF_MM_SSE3SLOW AV_CPU_FLAG_SSE3SLOW |
|
| 1673 |
+#define FF_MM_SSSE3 AV_CPU_FLAG_SSSE3 |
|
| 1674 |
+#define FF_MM_SSE4 AV_CPU_FLAG_SSE4 |
|
| 1675 |
+#define FF_MM_SSE42 AV_CPU_FLAG_SSE42 |
|
| 1676 |
+#define FF_MM_IWMMXT AV_CPU_FLAG_IWMMXT |
|
| 1677 |
+#define FF_MM_ALTIVEC AV_CPU_FLAG_ALTIVEC |
|
| 1666 | 1678 |
#endif |
| 1667 |
-#define FF_MM_MMX2 0x0002 ///< SSE integer functions or AMD MMX ext |
|
| 1668 |
-#define FF_MM_SSE 0x0008 ///< SSE functions |
|
| 1669 |
-#define FF_MM_SSE2 0x0010 ///< PIV SSE2 functions |
|
| 1670 |
-#define FF_MM_SSE2SLOW 0x40000000 ///< SSE2 supported, but usually not faster |
|
| 1671 |
- ///< than regular MMX/SSE (e.g. Core1) |
|
| 1672 |
-#define FF_MM_3DNOWEXT 0x0020 ///< AMD 3DNowExt |
|
| 1673 |
-#define FF_MM_SSE3 0x0040 ///< Prescott SSE3 functions |
|
| 1674 |
-#define FF_MM_SSE3SLOW 0x20000000 ///< SSE3 supported, but usually not faster |
|
| 1675 |
- ///< than regular MMX/SSE (e.g. Core1) |
|
| 1676 |
-#define FF_MM_SSSE3 0x0080 ///< Conroe SSSE3 functions |
|
| 1677 |
-#define FF_MM_SSE4 0x0100 ///< Penryn SSE4.1 functions |
|
| 1678 |
-#define FF_MM_SSE42 0x0200 ///< Nehalem SSE4.2 functions |
|
| 1679 |
-#define FF_MM_IWMMXT 0x0100 ///< XScale IWMMXT |
|
| 1680 |
-#define FF_MM_ALTIVEC 0x0001 ///< standard AltiVec |
|
| 1681 | 1679 |
|
| 1682 | 1680 |
/** |
| 1683 | 1681 |
* bits per sample/pixel from the demuxer (needed for huffyuv). |
| ... | ... |
@@ -94,24 +94,24 @@ struct algo algos[] = {
|
| 94 | 94 |
{"SIMPLE-C", 1, ff_simple_idct, ff_ref_idct, NO_PERM},
|
| 95 | 95 |
|
| 96 | 96 |
#if HAVE_MMX |
| 97 |
- {"MMX", 0, ff_fdct_mmx, ff_ref_fdct, NO_PERM, FF_MM_MMX},
|
|
| 97 |
+ {"MMX", 0, ff_fdct_mmx, ff_ref_fdct, NO_PERM, AV_CPU_FLAG_MMX},
|
|
| 98 | 98 |
#if HAVE_MMX2 |
| 99 |
- {"MMX2", 0, ff_fdct_mmx2, ff_ref_fdct, NO_PERM, FF_MM_MMX2},
|
|
| 100 |
- {"SSE2", 0, ff_fdct_sse2, ff_ref_fdct, NO_PERM, FF_MM_SSE2},
|
|
| 99 |
+ {"MMX2", 0, ff_fdct_mmx2, ff_ref_fdct, NO_PERM, AV_CPU_FLAG_MMX2},
|
|
| 100 |
+ {"SSE2", 0, ff_fdct_sse2, ff_ref_fdct, NO_PERM, AV_CPU_FLAG_SSE2},
|
|
| 101 | 101 |
#endif |
| 102 | 102 |
|
| 103 | 103 |
#if CONFIG_GPL |
| 104 |
- {"LIBMPEG2-MMX", 1, ff_mmx_idct, ff_ref_idct, MMX_PERM, FF_MM_MMX},
|
|
| 105 |
- {"LIBMPEG2-MMX2", 1, ff_mmxext_idct, ff_ref_idct, MMX_PERM, FF_MM_MMX2},
|
|
| 104 |
+ {"LIBMPEG2-MMX", 1, ff_mmx_idct, ff_ref_idct, MMX_PERM, AV_CPU_FLAG_MMX},
|
|
| 105 |
+ {"LIBMPEG2-MMX2", 1, ff_mmxext_idct, ff_ref_idct, MMX_PERM, AV_CPU_FLAG_MMX2},
|
|
| 106 | 106 |
#endif |
| 107 |
- {"SIMPLE-MMX", 1, ff_simple_idct_mmx, ff_ref_idct, MMX_SIMPLE_PERM, FF_MM_MMX},
|
|
| 108 |
- {"XVID-MMX", 1, ff_idct_xvid_mmx, ff_ref_idct, NO_PERM, FF_MM_MMX},
|
|
| 109 |
- {"XVID-MMX2", 1, ff_idct_xvid_mmx2, ff_ref_idct, NO_PERM, FF_MM_MMX2},
|
|
| 110 |
- {"XVID-SSE2", 1, ff_idct_xvid_sse2, ff_ref_idct, SSE2_PERM, FF_MM_SSE2},
|
|
| 107 |
+ {"SIMPLE-MMX", 1, ff_simple_idct_mmx, ff_ref_idct, MMX_SIMPLE_PERM, AV_CPU_FLAG_MMX},
|
|
| 108 |
+ {"XVID-MMX", 1, ff_idct_xvid_mmx, ff_ref_idct, NO_PERM, AV_CPU_FLAG_MMX},
|
|
| 109 |
+ {"XVID-MMX2", 1, ff_idct_xvid_mmx2, ff_ref_idct, NO_PERM, AV_CPU_FLAG_MMX2},
|
|
| 110 |
+ {"XVID-SSE2", 1, ff_idct_xvid_sse2, ff_ref_idct, SSE2_PERM, AV_CPU_FLAG_SSE2},
|
|
| 111 | 111 |
#endif |
| 112 | 112 |
|
| 113 | 113 |
#if HAVE_ALTIVEC |
| 114 |
- {"altivecfdct", 0, fdct_altivec, ff_ref_fdct, NO_PERM, FF_MM_ALTIVEC},
|
|
| 114 |
+ {"altivecfdct", 0, fdct_altivec, ff_ref_fdct, NO_PERM, AV_CPU_FLAG_ALTIVEC},
|
|
| 115 | 115 |
#endif |
| 116 | 116 |
|
| 117 | 117 |
#if ARCH_BFIN |
| ... | ... |
@@ -187,7 +187,7 @@ DECLARE_ALIGNED(8, static DCTELEM, block_org)[64]; |
| 187 | 187 |
static inline void mmx_emms(void) |
| 188 | 188 |
{
|
| 189 | 189 |
#if HAVE_MMX |
| 190 |
- if (cpu_flags & FF_MM_MMX) |
|
| 190 |
+ if (cpu_flags & AV_CPU_FLAG_MMX) |
|
| 191 | 191 |
__asm__ volatile ("emms\n\t");
|
| 192 | 192 |
#endif |
| 193 | 193 |
} |
| ... | ... |
@@ -553,7 +553,7 @@ retry: |
| 553 | 553 |
#endif |
| 554 | 554 |
|
| 555 | 555 |
#if HAVE_MMX |
| 556 |
- if(s->codec_id == CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo == FF_IDCT_AUTO && (mm_support() & FF_MM_MMX)){
|
|
| 556 |
+ if(s->codec_id == CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo == FF_IDCT_AUTO && (mm_support() & AV_CPU_FLAG_MMX)){
|
|
| 557 | 557 |
avctx->idct_algo= FF_IDCT_XVIDMMX; |
| 558 | 558 |
avctx->coded_width= 0; // force reinit |
| 559 | 559 |
// dsputil_init(&s->dsp, avctx); |
| ... | ... |
@@ -128,7 +128,7 @@ int main(int argc, char **argv) |
| 128 | 128 |
AVCodecContext *ctx; |
| 129 | 129 |
int c; |
| 130 | 130 |
DSPContext cctx, mmxctx; |
| 131 |
- int flags[2] = { FF_MM_MMX, FF_MM_MMX2 };
|
|
| 131 |
+ int flags[2] = { AV_CPU_FLAG_MMX, AV_CPU_FLAG_MMX2 };
|
|
| 132 | 132 |
int flags_size = HAVE_MMX2 ? 2 : 1; |
| 133 | 133 |
|
| 134 | 134 |
for(;;) {
|
| ... | ... |
@@ -145,11 +145,11 @@ int main(int argc, char **argv) |
| 145 | 145 |
printf("ffmpeg motion test\n");
|
| 146 | 146 |
|
| 147 | 147 |
ctx = avcodec_alloc_context(); |
| 148 |
- ctx->dsp_mask = FF_MM_FORCE; |
|
| 148 |
+ ctx->dsp_mask = AV_CPU_FLAG_FORCE; |
|
| 149 | 149 |
dsputil_init(&cctx, ctx); |
| 150 | 150 |
for (c = 0; c < flags_size; c++) {
|
| 151 | 151 |
int x; |
| 152 |
- ctx->dsp_mask = FF_MM_FORCE | flags[c]; |
|
| 152 |
+ ctx->dsp_mask = AV_CPU_FLAG_FORCE | flags[c]; |
|
| 153 | 153 |
dsputil_init(&mmxctx, ctx); |
| 154 | 154 |
|
| 155 | 155 |
for (x = 0; x < 2; x++) {
|
| ... | ... |
@@ -474,6 +474,6 @@ void ff_cavsdsp_init_mmx(CAVSDSPContext *c, AVCodecContext *avctx) |
| 474 | 474 |
{
|
| 475 | 475 |
int mm_flags = mm_support(); |
| 476 | 476 |
|
| 477 |
- if (mm_flags & FF_MM_MMX2) ff_cavsdsp_init_mmx2 (c, avctx); |
|
| 478 |
- if (mm_flags & FF_MM_3DNOW) ff_cavsdsp_init_3dnow(c, avctx); |
|
| 477 |
+ if (mm_flags & AV_CPU_FLAG_MMX2) ff_cavsdsp_init_mmx2 (c, avctx); |
|
| 478 |
+ if (mm_flags & AV_CPU_FLAG_3DNOW) ff_cavsdsp_init_3dnow(c, avctx); |
|
| 479 | 479 |
} |
| ... | ... |
@@ -79,21 +79,21 @@ int mm_support(void) |
| 79 | 79 |
family = ((eax>>8)&0xf) + ((eax>>20)&0xff); |
| 80 | 80 |
model = ((eax>>4)&0xf) + ((eax>>12)&0xf0); |
| 81 | 81 |
if (std_caps & (1<<23)) |
| 82 |
- rval |= FF_MM_MMX; |
|
| 82 |
+ rval |= AV_CPU_FLAG_MMX; |
|
| 83 | 83 |
if (std_caps & (1<<25)) |
| 84 |
- rval |= FF_MM_MMX2 |
|
| 84 |
+ rval |= AV_CPU_FLAG_MMX2 |
|
| 85 | 85 |
#if HAVE_SSE |
| 86 |
- | FF_MM_SSE; |
|
| 86 |
+ | AV_CPU_FLAG_SSE; |
|
| 87 | 87 |
if (std_caps & (1<<26)) |
| 88 |
- rval |= FF_MM_SSE2; |
|
| 88 |
+ rval |= AV_CPU_FLAG_SSE2; |
|
| 89 | 89 |
if (ecx & 1) |
| 90 |
- rval |= FF_MM_SSE3; |
|
| 90 |
+ rval |= AV_CPU_FLAG_SSE3; |
|
| 91 | 91 |
if (ecx & 0x00000200 ) |
| 92 |
- rval |= FF_MM_SSSE3; |
|
| 92 |
+ rval |= AV_CPU_FLAG_SSSE3; |
|
| 93 | 93 |
if (ecx & 0x00080000 ) |
| 94 |
- rval |= FF_MM_SSE4; |
|
| 94 |
+ rval |= AV_CPU_FLAG_SSE4; |
|
| 95 | 95 |
if (ecx & 0x00100000 ) |
| 96 |
- rval |= FF_MM_SSE42; |
|
| 96 |
+ rval |= AV_CPU_FLAG_SSE42; |
|
| 97 | 97 |
#endif |
| 98 | 98 |
; |
| 99 | 99 |
} |
| ... | ... |
@@ -103,13 +103,13 @@ int mm_support(void) |
| 103 | 103 |
if(max_ext_level >= 0x80000001){
|
| 104 | 104 |
cpuid(0x80000001, eax, ebx, ecx, ext_caps); |
| 105 | 105 |
if (ext_caps & (1<<31)) |
| 106 |
- rval |= FF_MM_3DNOW; |
|
| 106 |
+ rval |= AV_CPU_FLAG_3DNOW; |
|
| 107 | 107 |
if (ext_caps & (1<<30)) |
| 108 |
- rval |= FF_MM_3DNOWEXT; |
|
| 108 |
+ rval |= AV_CPU_FLAG_3DNOWEXT; |
|
| 109 | 109 |
if (ext_caps & (1<<23)) |
| 110 |
- rval |= FF_MM_MMX; |
|
| 110 |
+ rval |= AV_CPU_FLAG_MMX; |
|
| 111 | 111 |
if (ext_caps & (1<<22)) |
| 112 |
- rval |= FF_MM_MMX2; |
|
| 112 |
+ rval |= AV_CPU_FLAG_MMX2; |
|
| 113 | 113 |
} |
| 114 | 114 |
|
| 115 | 115 |
if (!strncmp(vendor.c, "GenuineIntel", 12) && |
| ... | ... |
@@ -117,24 +117,24 @@ int mm_support(void) |
| 117 | 117 |
/* 6/9 (pentium-m "banias"), 6/13 (pentium-m "dothan"), and 6/14 (core1 "yonah") |
| 118 | 118 |
* theoretically support sse2, but it's usually slower than mmx, |
| 119 | 119 |
* so let's just pretend they don't. */ |
| 120 |
- if (rval & FF_MM_SSE2) rval ^= FF_MM_SSE2SLOW|FF_MM_SSE2; |
|
| 121 |
- if (rval & FF_MM_SSE3) rval ^= FF_MM_SSE3SLOW|FF_MM_SSE3; |
|
| 120 |
+ if (rval & AV_CPU_FLAG_SSE2) rval ^= AV_CPU_FLAG_SSE2SLOW|AV_CPU_FLAG_SSE2; |
|
| 121 |
+ if (rval & AV_CPU_FLAG_SSE3) rval ^= AV_CPU_FLAG_SSE3SLOW|AV_CPU_FLAG_SSE3; |
|
| 122 | 122 |
} |
| 123 | 123 |
|
| 124 | 124 |
#if 0 |
| 125 | 125 |
av_log(NULL, AV_LOG_DEBUG, "%s%s%s%s%s%s%s%s%s%s%s%s\n", |
| 126 |
- (rval&FF_MM_MMX) ? "MMX ":"", |
|
| 127 |
- (rval&FF_MM_MMX2) ? "MMX2 ":"", |
|
| 128 |
- (rval&FF_MM_SSE) ? "SSE ":"", |
|
| 129 |
- (rval&FF_MM_SSE2) ? "SSE2 ":"", |
|
| 130 |
- (rval&FF_MM_SSE2SLOW) ? "SSE2(slow) ":"", |
|
| 131 |
- (rval&FF_MM_SSE3) ? "SSE3 ":"", |
|
| 132 |
- (rval&FF_MM_SSE3SLOW) ? "SSE3(slow) ":"", |
|
| 133 |
- (rval&FF_MM_SSSE3) ? "SSSE3 ":"", |
|
| 134 |
- (rval&FF_MM_SSE4) ? "SSE4.1 ":"", |
|
| 135 |
- (rval&FF_MM_SSE42) ? "SSE4.2 ":"", |
|
| 136 |
- (rval&FF_MM_3DNOW) ? "3DNow ":"", |
|
| 137 |
- (rval&FF_MM_3DNOWEXT) ? "3DNowExt ":""); |
|
| 126 |
+ (rval&AV_CPU_FLAG_MMX) ? "MMX ":"", |
|
| 127 |
+ (rval&AV_CPU_FLAG_MMX2) ? "MMX2 ":"", |
|
| 128 |
+ (rval&AV_CPU_FLAG_SSE) ? "SSE ":"", |
|
| 129 |
+ (rval&AV_CPU_FLAG_SSE2) ? "SSE2 ":"", |
|
| 130 |
+ (rval&AV_CPU_FLAG_SSE2SLOW) ? "SSE2(slow) ":"", |
|
| 131 |
+ (rval&AV_CPU_FLAG_SSE3) ? "SSE3 ":"", |
|
| 132 |
+ (rval&AV_CPU_FLAG_SSE3SLOW) ? "SSE3(slow) ":"", |
|
| 133 |
+ (rval&AV_CPU_FLAG_SSSE3) ? "SSSE3 ":"", |
|
| 134 |
+ (rval&AV_CPU_FLAG_SSE4) ? "SSE4.1 ":"", |
|
| 135 |
+ (rval&AV_CPU_FLAG_SSE42) ? "SSE4.2 ":"", |
|
| 136 |
+ (rval&AV_CPU_FLAG_3DNOW) ? "3DNow ":"", |
|
| 137 |
+ (rval&AV_CPU_FLAG_3DNOWEXT) ? "3DNowExt ":""); |
|
| 138 | 138 |
#endif |
| 139 | 139 |
return rval; |
| 140 | 140 |
} |
| ... | ... |
@@ -52,7 +52,7 @@ static void get_pixels_8x4_sym_sse2(DCTELEM *block, const uint8_t *pixels, int l |
| 52 | 52 |
|
| 53 | 53 |
void ff_dnxhd_init_mmx(DNXHDEncContext *ctx) |
| 54 | 54 |
{
|
| 55 |
- if (mm_support() & FF_MM_SSE2) {
|
|
| 55 |
+ if (mm_support() & AV_CPU_FLAG_SSE2) {
|
|
| 56 | 56 |
ctx->get_pixels_8x4_sym = get_pixels_8x4_sym_sse2; |
| 57 | 57 |
} |
| 58 | 58 |
} |
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
* MMX optimization by Nick Kurshev <nickols_k@mail.ru> |
| 23 | 23 |
*/ |
| 24 | 24 |
|
| 25 |
+#include "libavutil/cpu.h" |
|
| 25 | 26 |
#include "libavutil/x86_cpu.h" |
| 26 | 27 |
#include "libavcodec/dsputil.h" |
| 27 | 28 |
#include "libavcodec/h264dsp.h" |
| ... | ... |
@@ -2525,7 +2526,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2525 | 2525 |
int mm_flags = mm_support(); |
| 2526 | 2526 |
|
| 2527 | 2527 |
if (avctx->dsp_mask) {
|
| 2528 |
- if (avctx->dsp_mask & FF_MM_FORCE) |
|
| 2528 |
+ if (avctx->dsp_mask & AV_CPU_FLAG_FORCE) |
|
| 2529 | 2529 |
mm_flags |= (avctx->dsp_mask & 0xffff); |
| 2530 | 2530 |
else |
| 2531 | 2531 |
mm_flags &= ~(avctx->dsp_mask & 0xffff); |
| ... | ... |
@@ -2533,20 +2534,20 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2533 | 2533 |
|
| 2534 | 2534 |
#if 0 |
| 2535 | 2535 |
av_log(avctx, AV_LOG_INFO, "libavcodec: CPU flags:"); |
| 2536 |
- if (mm_flags & FF_MM_MMX) |
|
| 2536 |
+ if (mm_flags & AV_CPU_FLAG_MMX) |
|
| 2537 | 2537 |
av_log(avctx, AV_LOG_INFO, " mmx"); |
| 2538 |
- if (mm_flags & FF_MM_MMX2) |
|
| 2538 |
+ if (mm_flags & AV_CPU_FLAG_MMX2) |
|
| 2539 | 2539 |
av_log(avctx, AV_LOG_INFO, " mmx2"); |
| 2540 |
- if (mm_flags & FF_MM_3DNOW) |
|
| 2540 |
+ if (mm_flags & AV_CPU_FLAG_3DNOW) |
|
| 2541 | 2541 |
av_log(avctx, AV_LOG_INFO, " 3dnow"); |
| 2542 |
- if (mm_flags & FF_MM_SSE) |
|
| 2542 |
+ if (mm_flags & AV_CPU_FLAG_SSE) |
|
| 2543 | 2543 |
av_log(avctx, AV_LOG_INFO, " sse"); |
| 2544 |
- if (mm_flags & FF_MM_SSE2) |
|
| 2544 |
+ if (mm_flags & AV_CPU_FLAG_SSE2) |
|
| 2545 | 2545 |
av_log(avctx, AV_LOG_INFO, " sse2"); |
| 2546 | 2546 |
av_log(avctx, AV_LOG_INFO, "\n"); |
| 2547 | 2547 |
#endif |
| 2548 | 2548 |
|
| 2549 |
- if (mm_flags & FF_MM_MMX) {
|
|
| 2549 |
+ if (mm_flags & AV_CPU_FLAG_MMX) {
|
|
| 2550 | 2550 |
const int idct_algo= avctx->idct_algo; |
| 2551 | 2551 |
|
| 2552 | 2552 |
if(avctx->lowres==0){
|
| ... | ... |
@@ -2557,7 +2558,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2557 | 2557 |
c->idct_permutation_type= FF_SIMPLE_IDCT_PERM; |
| 2558 | 2558 |
#if CONFIG_GPL |
| 2559 | 2559 |
}else if(idct_algo==FF_IDCT_LIBMPEG2MMX){
|
| 2560 |
- if(mm_flags & FF_MM_MMX2){
|
|
| 2560 |
+ if(mm_flags & AV_CPU_FLAG_MMX2){
|
|
| 2561 | 2561 |
c->idct_put= ff_libmpeg2mmx2_idct_put; |
| 2562 | 2562 |
c->idct_add= ff_libmpeg2mmx2_idct_add; |
| 2563 | 2563 |
c->idct = ff_mmxext_idct; |
| ... | ... |
@@ -2570,7 +2571,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2570 | 2570 |
#endif |
| 2571 | 2571 |
}else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER) && |
| 2572 | 2572 |
idct_algo==FF_IDCT_VP3 && HAVE_YASM){
|
| 2573 |
- if(mm_flags & FF_MM_SSE2){
|
|
| 2573 |
+ if(mm_flags & AV_CPU_FLAG_SSE2){
|
|
| 2574 | 2574 |
c->idct_put= ff_vp3_idct_put_sse2; |
| 2575 | 2575 |
c->idct_add= ff_vp3_idct_add_sse2; |
| 2576 | 2576 |
c->idct = ff_vp3_idct_sse2; |
| ... | ... |
@@ -2584,12 +2585,12 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2584 | 2584 |
}else if(idct_algo==FF_IDCT_CAVS){
|
| 2585 | 2585 |
c->idct_permutation_type= FF_TRANSPOSE_IDCT_PERM; |
| 2586 | 2586 |
}else if(idct_algo==FF_IDCT_XVIDMMX){
|
| 2587 |
- if(mm_flags & FF_MM_SSE2){
|
|
| 2587 |
+ if(mm_flags & AV_CPU_FLAG_SSE2){
|
|
| 2588 | 2588 |
c->idct_put= ff_idct_xvid_sse2_put; |
| 2589 | 2589 |
c->idct_add= ff_idct_xvid_sse2_add; |
| 2590 | 2590 |
c->idct = ff_idct_xvid_sse2; |
| 2591 | 2591 |
c->idct_permutation_type= FF_SSE2_IDCT_PERM; |
| 2592 |
- }else if(mm_flags & FF_MM_MMX2){
|
|
| 2592 |
+ }else if(mm_flags & AV_CPU_FLAG_MMX2){
|
|
| 2593 | 2593 |
c->idct_put= ff_idct_xvid_mmx2_put; |
| 2594 | 2594 |
c->idct_add= ff_idct_xvid_mmx2_add; |
| 2595 | 2595 |
c->idct = ff_idct_xvid_mmx2; |
| ... | ... |
@@ -2606,7 +2607,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2606 | 2606 |
c->add_pixels_clamped = ff_add_pixels_clamped_mmx; |
| 2607 | 2607 |
c->clear_block = clear_block_mmx; |
| 2608 | 2608 |
c->clear_blocks = clear_blocks_mmx; |
| 2609 |
- if ((mm_flags & FF_MM_SSE) && |
|
| 2609 |
+ if ((mm_flags & AV_CPU_FLAG_SSE) && |
|
| 2610 | 2610 |
!(CONFIG_MPEG_XVMC_DECODER && avctx->xvmc_acceleration > 1)){
|
| 2611 | 2611 |
/* XvMCCreateBlocks() may not allocate 16-byte aligned blocks */ |
| 2612 | 2612 |
c->clear_block = clear_block_sse; |
| ... | ... |
@@ -2649,7 +2650,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2649 | 2649 |
c->put_rv40_chroma_pixels_tab[1]= ff_put_rv40_chroma_mc4_mmx; |
| 2650 | 2650 |
#endif |
| 2651 | 2651 |
|
| 2652 |
- if (mm_flags & FF_MM_MMX2) {
|
|
| 2652 |
+ if (mm_flags & AV_CPU_FLAG_MMX2) {
|
|
| 2653 | 2653 |
c->prefetch = prefetch_mmx2; |
| 2654 | 2654 |
|
| 2655 | 2655 |
c->put_pixels_tab[0][1] = put_pixels16_x2_mmx2; |
| ... | ... |
@@ -2740,7 +2741,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2740 | 2740 |
c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmx2; |
| 2741 | 2741 |
#endif |
| 2742 | 2742 |
#if HAVE_7REGS && HAVE_TEN_OPERANDS |
| 2743 |
- if( mm_flags&FF_MM_3DNOW ) |
|
| 2743 |
+ if( mm_flags&AV_CPU_FLAG_3DNOW ) |
|
| 2744 | 2744 |
c->add_hfyu_median_prediction = add_hfyu_median_prediction_cmov; |
| 2745 | 2745 |
#endif |
| 2746 | 2746 |
|
| ... | ... |
@@ -2748,7 +2749,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2748 | 2748 |
ff_vc1dsp_init_mmx(c, avctx); |
| 2749 | 2749 |
|
| 2750 | 2750 |
c->add_png_paeth_prediction= add_png_paeth_prediction_mmx2; |
| 2751 |
- } else if (mm_flags & FF_MM_3DNOW) {
|
|
| 2751 |
+ } else if (mm_flags & AV_CPU_FLAG_3DNOW) {
|
|
| 2752 | 2752 |
c->prefetch = prefetch_3dnow; |
| 2753 | 2753 |
|
| 2754 | 2754 |
c->put_pixels_tab[0][1] = put_pixels16_x2_3dnow; |
| ... | ... |
@@ -2816,13 +2817,13 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2816 | 2816 |
c->put_h264_qpel_pixels_tab[1][x+y*4] = put_h264_qpel8_mc##x##y##_##CPU;\ |
| 2817 | 2817 |
c->avg_h264_qpel_pixels_tab[0][x+y*4] = avg_h264_qpel16_mc##x##y##_##CPU;\ |
| 2818 | 2818 |
c->avg_h264_qpel_pixels_tab[1][x+y*4] = avg_h264_qpel8_mc##x##y##_##CPU; |
| 2819 |
- if((mm_flags & FF_MM_SSE2) && !(mm_flags & FF_MM_3DNOW)){
|
|
| 2819 |
+ if((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW)){
|
|
| 2820 | 2820 |
// these functions are slower than mmx on AMD, but faster on Intel |
| 2821 | 2821 |
c->put_pixels_tab[0][0] = put_pixels16_sse2; |
| 2822 | 2822 |
c->avg_pixels_tab[0][0] = avg_pixels16_sse2; |
| 2823 | 2823 |
H264_QPEL_FUNCS(0, 0, sse2); |
| 2824 | 2824 |
} |
| 2825 |
- if(mm_flags & FF_MM_SSE2){
|
|
| 2825 |
+ if(mm_flags & AV_CPU_FLAG_SSE2){
|
|
| 2826 | 2826 |
H264_QPEL_FUNCS(0, 1, sse2); |
| 2827 | 2827 |
H264_QPEL_FUNCS(0, 2, sse2); |
| 2828 | 2828 |
H264_QPEL_FUNCS(0, 3, sse2); |
| ... | ... |
@@ -2837,7 +2838,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2837 | 2837 |
H264_QPEL_FUNCS(3, 3, sse2); |
| 2838 | 2838 |
} |
| 2839 | 2839 |
#if HAVE_SSSE3 |
| 2840 |
- if(mm_flags & FF_MM_SSSE3){
|
|
| 2840 |
+ if(mm_flags & AV_CPU_FLAG_SSSE3){
|
|
| 2841 | 2841 |
H264_QPEL_FUNCS(1, 0, ssse3); |
| 2842 | 2842 |
H264_QPEL_FUNCS(1, 1, ssse3); |
| 2843 | 2843 |
H264_QPEL_FUNCS(1, 2, ssse3); |
| ... | ... |
@@ -2859,13 +2860,13 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2859 | 2859 |
c->put_h264_chroma_pixels_tab[1]= ff_put_h264_chroma_mc4_ssse3; |
| 2860 | 2860 |
c->avg_h264_chroma_pixels_tab[1]= ff_avg_h264_chroma_mc4_ssse3; |
| 2861 | 2861 |
c->add_hfyu_left_prediction = ff_add_hfyu_left_prediction_ssse3; |
| 2862 |
- if (mm_flags & FF_MM_SSE4) // not really sse4, just slow on Conroe |
|
| 2862 |
+ if (mm_flags & AV_CPU_FLAG_SSE4) // not really sse4, just slow on Conroe |
|
| 2863 | 2863 |
c->add_hfyu_left_prediction = ff_add_hfyu_left_prediction_sse4; |
| 2864 | 2864 |
#endif |
| 2865 | 2865 |
} |
| 2866 | 2866 |
#endif |
| 2867 | 2867 |
|
| 2868 |
- if(mm_flags & FF_MM_3DNOW){
|
|
| 2868 |
+ if(mm_flags & AV_CPU_FLAG_3DNOW){
|
|
| 2869 | 2869 |
c->vorbis_inverse_coupling = vorbis_inverse_coupling_3dnow; |
| 2870 | 2870 |
c->vector_fmul = vector_fmul_3dnow; |
| 2871 | 2871 |
if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
|
| ... | ... |
@@ -2873,20 +2874,20 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2873 | 2873 |
c->float_to_int16_interleave = float_to_int16_interleave_3dnow; |
| 2874 | 2874 |
} |
| 2875 | 2875 |
} |
| 2876 |
- if(mm_flags & FF_MM_3DNOWEXT){
|
|
| 2876 |
+ if(mm_flags & AV_CPU_FLAG_3DNOWEXT){
|
|
| 2877 | 2877 |
c->vector_fmul_reverse = vector_fmul_reverse_3dnow2; |
| 2878 | 2878 |
c->vector_fmul_window = vector_fmul_window_3dnow2; |
| 2879 | 2879 |
if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
|
| 2880 | 2880 |
c->float_to_int16_interleave = float_to_int16_interleave_3dn2; |
| 2881 | 2881 |
} |
| 2882 | 2882 |
} |
| 2883 |
- if(mm_flags & FF_MM_MMX2){
|
|
| 2883 |
+ if(mm_flags & AV_CPU_FLAG_MMX2){
|
|
| 2884 | 2884 |
#if HAVE_YASM |
| 2885 | 2885 |
c->scalarproduct_int16 = ff_scalarproduct_int16_mmx2; |
| 2886 | 2886 |
c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_mmx2; |
| 2887 | 2887 |
#endif |
| 2888 | 2888 |
} |
| 2889 |
- if(mm_flags & FF_MM_SSE){
|
|
| 2889 |
+ if(mm_flags & AV_CPU_FLAG_SSE){
|
|
| 2890 | 2890 |
c->vorbis_inverse_coupling = vorbis_inverse_coupling_sse; |
| 2891 | 2891 |
c->ac3_downmix = ac3_downmix_sse; |
| 2892 | 2892 |
c->vector_fmul = vector_fmul_sse; |
| ... | ... |
@@ -2901,9 +2902,9 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2901 | 2901 |
c->scalarproduct_float = ff_scalarproduct_float_sse; |
| 2902 | 2902 |
#endif |
| 2903 | 2903 |
} |
| 2904 |
- if(mm_flags & FF_MM_3DNOW) |
|
| 2904 |
+ if(mm_flags & AV_CPU_FLAG_3DNOW) |
|
| 2905 | 2905 |
c->vector_fmul_add = vector_fmul_add_3dnow; // faster than sse |
| 2906 |
- if(mm_flags & FF_MM_SSE2){
|
|
| 2906 |
+ if(mm_flags & AV_CPU_FLAG_SSE2){
|
|
| 2907 | 2907 |
c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse2; |
| 2908 | 2908 |
c->float_to_int16 = float_to_int16_sse2; |
| 2909 | 2909 |
c->float_to_int16_interleave = float_to_int16_interleave_sse2; |
| ... | ... |
@@ -2912,7 +2913,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 2912 | 2912 |
c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_sse2; |
| 2913 | 2913 |
#endif |
| 2914 | 2914 |
} |
| 2915 |
- if((mm_flags & FF_MM_SSSE3) && !(mm_flags & (FF_MM_SSE42|FF_MM_3DNOW)) && HAVE_YASM) // cachesplit |
|
| 2915 |
+ if((mm_flags & AV_CPU_FLAG_SSSE3) && !(mm_flags & (AV_CPU_FLAG_SSE42|AV_CPU_FLAG_3DNOW)) && HAVE_YASM) // cachesplit |
|
| 2916 | 2916 |
c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_ssse3; |
| 2917 | 2917 |
} |
| 2918 | 2918 |
|
| ... | ... |
@@ -1352,12 +1352,12 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 1352 | 1352 |
{
|
| 1353 | 1353 |
int mm_flags = mm_support(); |
| 1354 | 1354 |
|
| 1355 |
- if (mm_flags & FF_MM_MMX) {
|
|
| 1355 |
+ if (mm_flags & AV_CPU_FLAG_MMX) {
|
|
| 1356 | 1356 |
const int dct_algo = avctx->dct_algo; |
| 1357 | 1357 |
if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){
|
| 1358 |
- if(mm_flags & FF_MM_SSE2){
|
|
| 1358 |
+ if(mm_flags & AV_CPU_FLAG_SSE2){
|
|
| 1359 | 1359 |
c->fdct = ff_fdct_sse2; |
| 1360 |
- }else if(mm_flags & FF_MM_MMX2){
|
|
| 1360 |
+ }else if(mm_flags & AV_CPU_FLAG_MMX2){
|
|
| 1361 | 1361 |
c->fdct = ff_fdct_mmx2; |
| 1362 | 1362 |
}else{
|
| 1363 | 1363 |
c->fdct = ff_fdct_mmx; |
| ... | ... |
@@ -1375,7 +1375,7 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 1375 | 1375 |
c->hadamard8_diff[1]= hadamard8_diff_mmx; |
| 1376 | 1376 |
|
| 1377 | 1377 |
c->pix_norm1 = pix_norm1_mmx; |
| 1378 |
- c->sse[0] = (mm_flags & FF_MM_SSE2) ? sse16_sse2 : sse16_mmx; |
|
| 1378 |
+ c->sse[0] = (mm_flags & AV_CPU_FLAG_SSE2) ? sse16_sse2 : sse16_mmx; |
|
| 1379 | 1379 |
c->sse[1] = sse8_mmx; |
| 1380 | 1380 |
c->vsad[4]= vsad_intra16_mmx; |
| 1381 | 1381 |
|
| ... | ... |
@@ -1393,7 +1393,7 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 1393 | 1393 |
c->ssd_int8_vs_int16 = ssd_int8_vs_int16_mmx; |
| 1394 | 1394 |
|
| 1395 | 1395 |
|
| 1396 |
- if (mm_flags & FF_MM_MMX2) {
|
|
| 1396 |
+ if (mm_flags & AV_CPU_FLAG_MMX2) {
|
|
| 1397 | 1397 |
c->sum_abs_dctelem= sum_abs_dctelem_mmx2; |
| 1398 | 1398 |
c->hadamard8_diff[0]= hadamard8_diff16_mmx2; |
| 1399 | 1399 |
c->hadamard8_diff[1]= hadamard8_diff_mmx2; |
| ... | ... |
@@ -1406,19 +1406,19 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 1406 | 1406 |
c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_mmx2; |
| 1407 | 1407 |
} |
| 1408 | 1408 |
|
| 1409 |
- if(mm_flags & FF_MM_SSE2){
|
|
| 1409 |
+ if(mm_flags & AV_CPU_FLAG_SSE2){
|
|
| 1410 | 1410 |
c->get_pixels = get_pixels_sse2; |
| 1411 | 1411 |
c->sum_abs_dctelem= sum_abs_dctelem_sse2; |
| 1412 | 1412 |
c->hadamard8_diff[0]= hadamard8_diff16_sse2; |
| 1413 | 1413 |
c->hadamard8_diff[1]= hadamard8_diff_sse2; |
| 1414 | 1414 |
} |
| 1415 | 1415 |
|
| 1416 |
- if (CONFIG_LPC && mm_flags & (FF_MM_SSE2|FF_MM_SSE2SLOW)) {
|
|
| 1416 |
+ if (CONFIG_LPC && mm_flags & (AV_CPU_FLAG_SSE2|AV_CPU_FLAG_SSE2SLOW)) {
|
|
| 1417 | 1417 |
c->lpc_compute_autocorr = ff_lpc_compute_autocorr_sse2; |
| 1418 | 1418 |
} |
| 1419 | 1419 |
|
| 1420 | 1420 |
#if HAVE_SSSE3 |
| 1421 |
- if(mm_flags & FF_MM_SSSE3){
|
|
| 1421 |
+ if(mm_flags & AV_CPU_FLAG_SSSE3){
|
|
| 1422 | 1422 |
if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
|
| 1423 | 1423 |
c->try_8x8basis= try_8x8basis_ssse3; |
| 1424 | 1424 |
} |
| ... | ... |
@@ -1429,7 +1429,7 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) |
| 1429 | 1429 |
} |
| 1430 | 1430 |
#endif |
| 1431 | 1431 |
|
| 1432 |
- if(mm_flags & FF_MM_3DNOW){
|
|
| 1432 |
+ if(mm_flags & AV_CPU_FLAG_3DNOW){
|
|
| 1433 | 1433 |
if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
|
| 1434 | 1434 |
c->try_8x8basis= try_8x8basis_3dnow; |
| 1435 | 1435 |
} |
| ... | ... |
@@ -23,18 +23,18 @@ av_cold void ff_fft_init_mmx(FFTContext *s) |
| 23 | 23 |
{
|
| 24 | 24 |
#if HAVE_YASM |
| 25 | 25 |
int has_vectors = mm_support(); |
| 26 |
- if (has_vectors & FF_MM_SSE && HAVE_SSE) {
|
|
| 26 |
+ if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE) {
|
|
| 27 | 27 |
/* SSE for P3/P4/K8 */ |
| 28 | 28 |
s->imdct_calc = ff_imdct_calc_sse; |
| 29 | 29 |
s->imdct_half = ff_imdct_half_sse; |
| 30 | 30 |
s->fft_permute = ff_fft_permute_sse; |
| 31 | 31 |
s->fft_calc = ff_fft_calc_sse; |
| 32 |
- } else if (has_vectors & FF_MM_3DNOWEXT && HAVE_AMD3DNOWEXT) {
|
|
| 32 |
+ } else if (has_vectors & AV_CPU_FLAG_3DNOWEXT && HAVE_AMD3DNOWEXT) {
|
|
| 33 | 33 |
/* 3DNowEx for K7 */ |
| 34 | 34 |
s->imdct_calc = ff_imdct_calc_3dn2; |
| 35 | 35 |
s->imdct_half = ff_imdct_half_3dn2; |
| 36 | 36 |
s->fft_calc = ff_fft_calc_3dn2; |
| 37 |
- } else if (has_vectors & FF_MM_3DNOW && HAVE_AMD3DNOW) {
|
|
| 37 |
+ } else if (has_vectors & AV_CPU_FLAG_3DNOW && HAVE_AMD3DNOW) {
|
|
| 38 | 38 |
/* 3DNow! for K6-2/3 */ |
| 39 | 39 |
s->imdct_calc = ff_imdct_calc_3dn; |
| 40 | 40 |
s->imdct_half = ff_imdct_half_3dn; |
| ... | ... |
@@ -47,7 +47,7 @@ av_cold void ff_fft_init_mmx(FFTContext *s) |
| 47 | 47 |
av_cold void ff_dct_init_mmx(DCTContext *s) |
| 48 | 48 |
{
|
| 49 | 49 |
int has_vectors = mm_support(); |
| 50 |
- if (has_vectors & FF_MM_SSE && HAVE_SSE) |
|
| 50 |
+ if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE) |
|
| 51 | 51 |
s->dct32 = ff_dct32_float_sse; |
| 52 | 52 |
} |
| 53 | 53 |
#endif |
| ... | ... |
@@ -51,7 +51,7 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id) |
| 51 | 51 |
int mm_flags = mm_support(); |
| 52 | 52 |
|
| 53 | 53 |
#if HAVE_YASM |
| 54 |
- if (mm_flags & FF_MM_MMX) {
|
|
| 54 |
+ if (mm_flags & AV_CPU_FLAG_MMX) {
|
|
| 55 | 55 |
h->pred16x16[VERT_PRED8x8] = ff_pred16x16_vertical_mmx; |
| 56 | 56 |
h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_mmx; |
| 57 | 57 |
h->pred8x8 [VERT_PRED8x8] = ff_pred8x8_vertical_mmx; |
| ... | ... |
@@ -63,7 +63,7 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id) |
| 63 | 63 |
} |
| 64 | 64 |
} |
| 65 | 65 |
|
| 66 |
- if (mm_flags & FF_MM_MMX2) {
|
|
| 66 |
+ if (mm_flags & AV_CPU_FLAG_MMX2) {
|
|
| 67 | 67 |
h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_mmxext; |
| 68 | 68 |
h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_mmxext; |
| 69 | 69 |
h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmxext; |
| ... | ... |
@@ -77,11 +77,11 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id) |
| 77 | 77 |
} |
| 78 | 78 |
} |
| 79 | 79 |
|
| 80 |
- if (mm_flags & FF_MM_SSE) {
|
|
| 80 |
+ if (mm_flags & AV_CPU_FLAG_SSE) {
|
|
| 81 | 81 |
h->pred16x16[VERT_PRED8x8] = ff_pred16x16_vertical_sse; |
| 82 | 82 |
} |
| 83 | 83 |
|
| 84 |
- if (mm_flags & FF_MM_SSE2) {
|
|
| 84 |
+ if (mm_flags & AV_CPU_FLAG_SSE2) {
|
|
| 85 | 85 |
h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_sse2; |
| 86 | 86 |
if (codec_id == CODEC_ID_VP8) {
|
| 87 | 87 |
h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_tm_vp8_sse2; |
| ... | ... |
@@ -89,7 +89,7 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id) |
| 89 | 89 |
} |
| 90 | 90 |
} |
| 91 | 91 |
|
| 92 |
- if (mm_flags & FF_MM_SSSE3) {
|
|
| 92 |
+ if (mm_flags & AV_CPU_FLAG_SSSE3) {
|
|
| 93 | 93 |
h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_ssse3; |
| 94 | 94 |
h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_ssse3; |
| 95 | 95 |
h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_ssse3; |
| ... | ... |
@@ -744,7 +744,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c) |
| 744 | 744 |
{
|
| 745 | 745 |
int mm_flags = mm_support(); |
| 746 | 746 |
|
| 747 |
- if (mm_flags & FF_MM_MMX) {
|
|
| 747 |
+ if (mm_flags & AV_CPU_FLAG_MMX) {
|
|
| 748 | 748 |
c->h264_idct_dc_add= |
| 749 | 749 |
c->h264_idct_add= ff_h264_idct_add_mmx; |
| 750 | 750 |
c->h264_idct8_dc_add= |
| ... | ... |
@@ -755,7 +755,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c) |
| 755 | 755 |
c->h264_idct_add8 = ff_h264_idct_add8_mmx; |
| 756 | 756 |
c->h264_idct_add16intra= ff_h264_idct_add16intra_mmx; |
| 757 | 757 |
|
| 758 |
- if (mm_flags & FF_MM_MMX2) {
|
|
| 758 |
+ if (mm_flags & AV_CPU_FLAG_MMX2) {
|
|
| 759 | 759 |
c->h264_idct_dc_add= ff_h264_idct_dc_add_mmx2; |
| 760 | 760 |
c->h264_idct8_dc_add= ff_h264_idct8_dc_add_mmx2; |
| 761 | 761 |
c->h264_idct_add16 = ff_h264_idct_add16_mmx2; |
| ... | ... |
@@ -765,13 +765,13 @@ void ff_h264dsp_init_x86(H264DSPContext *c) |
| 765 | 765 |
|
| 766 | 766 |
c->h264_loop_filter_strength= h264_loop_filter_strength_mmx2; |
| 767 | 767 |
} |
| 768 |
- if(mm_flags & FF_MM_SSE2){
|
|
| 768 |
+ if(mm_flags & AV_CPU_FLAG_SSE2){
|
|
| 769 | 769 |
c->h264_idct8_add = ff_h264_idct8_add_sse2; |
| 770 | 770 |
c->h264_idct8_add4= ff_h264_idct8_add4_sse2; |
| 771 | 771 |
} |
| 772 | 772 |
|
| 773 | 773 |
#if HAVE_YASM |
| 774 |
- if (mm_flags & FF_MM_MMX2){
|
|
| 774 |
+ if (mm_flags & AV_CPU_FLAG_MMX2){
|
|
| 775 | 775 |
c->h264_v_loop_filter_chroma= ff_x264_deblock_v_chroma_mmxext; |
| 776 | 776 |
c->h264_h_loop_filter_chroma= ff_x264_deblock_h_chroma_mmxext; |
| 777 | 777 |
c->h264_v_loop_filter_chroma_intra= ff_x264_deblock_v_chroma_intra_mmxext; |
| ... | ... |
@@ -800,7 +800,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c) |
| 800 | 800 |
c->biweight_h264_pixels_tab[6]= ff_h264_biweight_4x4_mmx2; |
| 801 | 801 |
c->biweight_h264_pixels_tab[7]= ff_h264_biweight_4x2_mmx2; |
| 802 | 802 |
|
| 803 |
- if( mm_flags&FF_MM_SSE2 ){
|
|
| 803 |
+ if (mm_flags&AV_CPU_FLAG_SSE2) {
|
|
| 804 | 804 |
c->weight_h264_pixels_tab[0]= ff_h264_weight_16x16_sse2; |
| 805 | 805 |
c->weight_h264_pixels_tab[1]= ff_h264_weight_16x8_sse2; |
| 806 | 806 |
c->weight_h264_pixels_tab[2]= ff_h264_weight_8x16_sse2; |
| ... | ... |
@@ -825,7 +825,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c) |
| 825 | 825 |
c->h264_idct_add16intra = ff_h264_idct_add16intra_sse2; |
| 826 | 826 |
#endif |
| 827 | 827 |
} |
| 828 |
- if ( mm_flags&FF_MM_SSSE3 ){
|
|
| 828 |
+ if (mm_flags&AV_CPU_FLAG_SSSE3) {
|
|
| 829 | 829 |
c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_ssse3; |
| 830 | 830 |
c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_ssse3; |
| 831 | 831 |
c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_ssse3; |
| ... | ... |
@@ -429,7 +429,7 @@ void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx) |
| 429 | 429 |
{
|
| 430 | 430 |
int mm_flags = mm_support(); |
| 431 | 431 |
|
| 432 |
- if (mm_flags & FF_MM_MMX) {
|
|
| 432 |
+ if (mm_flags & AV_CPU_FLAG_MMX) {
|
|
| 433 | 433 |
c->pix_abs[0][0] = sad16_mmx; |
| 434 | 434 |
c->pix_abs[0][1] = sad16_x2_mmx; |
| 435 | 435 |
c->pix_abs[0][2] = sad16_y2_mmx; |
| ... | ... |
@@ -442,7 +442,7 @@ void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx) |
| 442 | 442 |
c->sad[0]= sad16_mmx; |
| 443 | 443 |
c->sad[1]= sad8_mmx; |
| 444 | 444 |
} |
| 445 |
- if (mm_flags & FF_MM_MMX2) {
|
|
| 445 |
+ if (mm_flags & AV_CPU_FLAG_MMX2) {
|
|
| 446 | 446 |
c->pix_abs[0][0] = sad16_mmx2; |
| 447 | 447 |
c->pix_abs[1][0] = sad8_mmx2; |
| 448 | 448 |
|
| ... | ... |
@@ -458,7 +458,7 @@ void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx) |
| 458 | 458 |
c->pix_abs[1][3] = sad8_xy2_mmx2; |
| 459 | 459 |
} |
| 460 | 460 |
} |
| 461 |
- if ((mm_flags & FF_MM_SSE2) && !(mm_flags & FF_MM_3DNOW) && avctx->codec_id != CODEC_ID_SNOW) {
|
|
| 461 |
+ if ((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW) && avctx->codec_id != CODEC_ID_SNOW) {
|
|
| 462 | 462 |
c->sad[0]= sad16_sse2; |
| 463 | 463 |
} |
| 464 | 464 |
} |
| ... | ... |
@@ -627,7 +627,7 @@ void MPV_common_init_mmx(MpegEncContext *s) |
| 627 | 627 |
{
|
| 628 | 628 |
int mm_flags = mm_support(); |
| 629 | 629 |
|
| 630 |
- if (mm_flags & FF_MM_MMX) {
|
|
| 630 |
+ if (mm_flags & AV_CPU_FLAG_MMX) {
|
|
| 631 | 631 |
const int dct_algo = s->avctx->dct_algo; |
| 632 | 632 |
|
| 633 | 633 |
s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_mmx; |
| ... | ... |
@@ -638,7 +638,7 @@ void MPV_common_init_mmx(MpegEncContext *s) |
| 638 | 638 |
s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_mmx; |
| 639 | 639 |
s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_mmx; |
| 640 | 640 |
|
| 641 |
- if (mm_flags & FF_MM_SSE2) {
|
|
| 641 |
+ if (mm_flags & AV_CPU_FLAG_SSE2) {
|
|
| 642 | 642 |
s->denoise_dct= denoise_dct_sse2; |
| 643 | 643 |
} else {
|
| 644 | 644 |
s->denoise_dct= denoise_dct_mmx; |
| ... | ... |
@@ -646,13 +646,13 @@ void MPV_common_init_mmx(MpegEncContext *s) |
| 646 | 646 |
|
| 647 | 647 |
if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){
|
| 648 | 648 |
#if HAVE_SSSE3 |
| 649 |
- if(mm_flags & FF_MM_SSSE3){
|
|
| 649 |
+ if(mm_flags & AV_CPU_FLAG_SSSE3){
|
|
| 650 | 650 |
s->dct_quantize= dct_quantize_SSSE3; |
| 651 | 651 |
} else |
| 652 | 652 |
#endif |
| 653 |
- if(mm_flags & FF_MM_SSE2){
|
|
| 653 |
+ if(mm_flags & AV_CPU_FLAG_SSE2){
|
|
| 654 | 654 |
s->dct_quantize= dct_quantize_SSE2; |
| 655 |
- } else if(mm_flags & FF_MM_MMX2){
|
|
| 655 |
+ } else if(mm_flags & AV_CPU_FLAG_MMX2){
|
|
| 656 | 656 |
s->dct_quantize= dct_quantize_MMX2; |
| 657 | 657 |
} else {
|
| 658 | 658 |
s->dct_quantize= dct_quantize_MMX; |
| ... | ... |
@@ -19,6 +19,7 @@ |
| 19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 |
+#include "libavutil/cpu.h" |
|
| 22 | 23 |
#include "libavutil/x86_cpu.h" |
| 23 | 24 |
#include "libavcodec/avcodec.h" |
| 24 | 25 |
#include "libavcodec/snow.h" |
| ... | ... |
@@ -876,8 +877,8 @@ void ff_dwt_init_x86(DWTContext *c) |
| 876 | 876 |
{
|
| 877 | 877 |
int mm_flags = mm_support(); |
| 878 | 878 |
|
| 879 |
- if (mm_flags & FF_MM_MMX) {
|
|
| 880 |
- if(mm_flags & FF_MM_SSE2 & 0){
|
|
| 879 |
+ if (mm_flags & AV_CPU_FLAG_MMX) {
|
|
| 880 |
+ if(mm_flags & AV_CPU_FLAG_SSE2 & 0){
|
|
| 881 | 881 |
c->horizontal_compose97i = ff_snow_horizontal_compose97i_sse2; |
| 882 | 882 |
#if HAVE_7REGS |
| 883 | 883 |
c->vertical_compose97i = ff_snow_vertical_compose97i_sse2; |
| ... | ... |
@@ -885,7 +886,7 @@ void ff_dwt_init_x86(DWTContext *c) |
| 885 | 885 |
c->inner_add_yblock = ff_snow_inner_add_yblock_sse2; |
| 886 | 886 |
} |
| 887 | 887 |
else{
|
| 888 |
- if(mm_flags & FF_MM_MMX2){
|
|
| 888 |
+ if(mm_flags & AV_CPU_FLAG_MMX2){
|
|
| 889 | 889 |
c->horizontal_compose97i = ff_snow_horizontal_compose97i_mmx; |
| 890 | 890 |
#if HAVE_7REGS |
| 891 | 891 |
c->vertical_compose97i = ff_snow_vertical_compose97i_mmx; |
| ... | ... |
@@ -736,7 +736,7 @@ void ff_vc1dsp_init_mmx(DSPContext* dsp, AVCodecContext *avctx) {
|
| 736 | 736 |
dsp->put_vc1_mspel_pixels_tab[11] = put_vc1_mspel_mc32_mmx; |
| 737 | 737 |
dsp->put_vc1_mspel_pixels_tab[15] = put_vc1_mspel_mc33_mmx; |
| 738 | 738 |
|
| 739 |
- if (mm_flags & FF_MM_MMX2){
|
|
| 739 |
+ if (mm_flags & AV_CPU_FLAG_MMX2){
|
|
| 740 | 740 |
dsp->avg_vc1_mspel_pixels_tab[ 0] = ff_avg_vc1_mspel_mc00_mmx2; |
| 741 | 741 |
dsp->avg_vc1_mspel_pixels_tab[ 4] = avg_vc1_mspel_mc01_mmx2; |
| 742 | 742 |
dsp->avg_vc1_mspel_pixels_tab[ 8] = avg_vc1_mspel_mc02_mmx2; |
| ... | ... |
@@ -772,23 +772,23 @@ void ff_vc1dsp_init_mmx(DSPContext* dsp, AVCodecContext *avctx) {
|
| 772 | 772 |
dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_ ## EXT |
| 773 | 773 |
|
| 774 | 774 |
#if HAVE_YASM |
| 775 |
- if (mm_flags & FF_MM_MMX) {
|
|
| 775 |
+ if (mm_flags & AV_CPU_FLAG_MMX) {
|
|
| 776 | 776 |
ASSIGN_LF(mmx); |
| 777 | 777 |
} |
| 778 | 778 |
return; |
| 779 |
- if (mm_flags & FF_MM_MMX2) {
|
|
| 779 |
+ if (mm_flags & AV_CPU_FLAG_MMX2) {
|
|
| 780 | 780 |
ASSIGN_LF(mmx2); |
| 781 | 781 |
} |
| 782 |
- if (mm_flags & FF_MM_SSE2) {
|
|
| 782 |
+ if (mm_flags & AV_CPU_FLAG_SSE2) {
|
|
| 783 | 783 |
dsp->vc1_v_loop_filter8 = ff_vc1_v_loop_filter8_sse2; |
| 784 | 784 |
dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse2; |
| 785 | 785 |
dsp->vc1_v_loop_filter16 = vc1_v_loop_filter16_sse2; |
| 786 | 786 |
dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_sse2; |
| 787 | 787 |
} |
| 788 |
- if (mm_flags & FF_MM_SSSE3) {
|
|
| 788 |
+ if (mm_flags & AV_CPU_FLAG_SSSE3) {
|
|
| 789 | 789 |
ASSIGN_LF(ssse3); |
| 790 | 790 |
} |
| 791 |
- if (mm_flags & FF_MM_SSE4) {
|
|
| 791 |
+ if (mm_flags & AV_CPU_FLAG_SSE4) {
|
|
| 792 | 792 |
dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse4; |
| 793 | 793 |
dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_sse4; |
| 794 | 794 |
} |
| ... | ... |
@@ -35,11 +35,11 @@ av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec) |
| 35 | 35 |
int mm_flags = mm_support(); |
| 36 | 36 |
|
| 37 | 37 |
if (CONFIG_VP6_DECODER && codec == CODEC_ID_VP6) {
|
| 38 |
- if (mm_flags & FF_MM_MMX) {
|
|
| 38 |
+ if (mm_flags & AV_CPU_FLAG_MMX) {
|
|
| 39 | 39 |
c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx; |
| 40 | 40 |
} |
| 41 | 41 |
|
| 42 |
- if (mm_flags & FF_MM_SSE2) {
|
|
| 42 |
+ if (mm_flags & AV_CPU_FLAG_SSE2) {
|
|
| 43 | 43 |
c->vp6_filter_diag4 = ff_vp6_filter_diag4_sse2; |
| 44 | 44 |
} |
| 45 | 45 |
} |
| ... | ... |
@@ -285,7 +285,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) |
| 285 | 285 |
int mm_flags = mm_support(); |
| 286 | 286 |
|
| 287 | 287 |
#if HAVE_YASM |
| 288 |
- if (mm_flags & FF_MM_MMX) {
|
|
| 288 |
+ if (mm_flags & AV_CPU_FLAG_MMX) {
|
|
| 289 | 289 |
c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx; |
| 290 | 290 |
c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_mmx; |
| 291 | 291 |
c->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_mmx; |
| ... | ... |
@@ -312,7 +312,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) |
| 312 | 312 |
|
| 313 | 313 |
/* note that 4-tap width=16 functions are missing because w=16 |
| 314 | 314 |
* is only used for luma, and luma is always a copy or sixtap. */ |
| 315 |
- if (mm_flags & FF_MM_MMX2) {
|
|
| 315 |
+ if (mm_flags & AV_CPU_FLAG_MMX2) {
|
|
| 316 | 316 |
VP8_LUMA_MC_FUNC(0, 16, mmxext); |
| 317 | 317 |
VP8_MC_FUNC(1, 8, mmxext); |
| 318 | 318 |
VP8_MC_FUNC(2, 4, mmxext); |
| ... | ... |
@@ -334,14 +334,14 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) |
| 334 | 334 |
c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_mmxext; |
| 335 | 335 |
} |
| 336 | 336 |
|
| 337 |
- if (mm_flags & FF_MM_SSE) {
|
|
| 337 |
+ if (mm_flags & AV_CPU_FLAG_SSE) {
|
|
| 338 | 338 |
c->vp8_idct_add = ff_vp8_idct_add_sse; |
| 339 | 339 |
c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_sse; |
| 340 | 340 |
c->put_vp8_epel_pixels_tab[0][0][0] = |
| 341 | 341 |
c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_sse; |
| 342 | 342 |
} |
| 343 | 343 |
|
| 344 |
- if (mm_flags & (FF_MM_SSE2|FF_MM_SSE2SLOW)) {
|
|
| 344 |
+ if (mm_flags & (AV_CPU_FLAG_SSE2|AV_CPU_FLAG_SSE2SLOW)) {
|
|
| 345 | 345 |
VP8_LUMA_MC_FUNC(0, 16, sse2); |
| 346 | 346 |
VP8_MC_FUNC(1, 8, sse2); |
| 347 | 347 |
VP8_BILINEAR_MC_FUNC(0, 16, sse2); |
| ... | ... |
@@ -356,7 +356,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) |
| 356 | 356 |
c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_sse2; |
| 357 | 357 |
} |
| 358 | 358 |
|
| 359 |
- if (mm_flags & FF_MM_SSE2) {
|
|
| 359 |
+ if (mm_flags & AV_CPU_FLAG_SSE2) {
|
|
| 360 | 360 |
c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_sse2; |
| 361 | 361 |
|
| 362 | 362 |
c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse2; |
| ... | ... |
@@ -368,7 +368,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) |
| 368 | 368 |
c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_sse2; |
| 369 | 369 |
} |
| 370 | 370 |
|
| 371 |
- if (mm_flags & FF_MM_SSSE3) {
|
|
| 371 |
+ if (mm_flags & AV_CPU_FLAG_SSSE3) {
|
|
| 372 | 372 |
VP8_LUMA_MC_FUNC(0, 16, ssse3); |
| 373 | 373 |
VP8_MC_FUNC(1, 8, ssse3); |
| 374 | 374 |
VP8_MC_FUNC(2, 4, ssse3); |
| ... | ... |
@@ -390,7 +390,7 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) |
| 390 | 390 |
c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_ssse3; |
| 391 | 391 |
} |
| 392 | 392 |
|
| 393 |
- if (mm_flags & FF_MM_SSE4) {
|
|
| 393 |
+ if (mm_flags & AV_CPU_FLAG_SSE4) {
|
|
| 394 | 394 |
c->vp8_idct_dc_add = ff_vp8_idct_dc_add_sse4; |
| 395 | 395 |
|
| 396 | 396 |
c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse4; |
| ... | ... |
@@ -40,7 +40,7 @@ |
| 40 | 40 |
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) |
| 41 | 41 |
|
| 42 | 42 |
#define LIBAVUTIL_VERSION_MAJOR 50 |
| 43 |
-#define LIBAVUTIL_VERSION_MINOR 24 |
|
| 43 |
+#define LIBAVUTIL_VERSION_MINOR 25 |
|
| 44 | 44 |
#define LIBAVUTIL_VERSION_MICRO 0 |
| 45 | 45 |
|
| 46 | 46 |
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |
| 47 | 47 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,44 @@ |
| 0 |
+/* |
|
| 1 |
+ * Copyright (c) 2000, 2001, 2002 Fabrice Bellard |
|
| 2 |
+ * |
|
| 3 |
+ * This file is part of FFmpeg. |
|
| 4 |
+ * |
|
| 5 |
+ * FFmpeg is free software; you can redistribute it and/or |
|
| 6 |
+ * modify it under the terms of the GNU Lesser General Public |
|
| 7 |
+ * License as published by the Free Software Foundation; either |
|
| 8 |
+ * version 2.1 of the License, or (at your option) any later version. |
|
| 9 |
+ * |
|
| 10 |
+ * FFmpeg is distributed in the hope that it will be useful, |
|
| 11 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 12 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
| 13 |
+ * Lesser General Public License for more details. |
|
| 14 |
+ * |
|
| 15 |
+ * You should have received a copy of the GNU Lesser General Public |
|
| 16 |
+ * License along with FFmpeg; if not, write to the Free Software |
|
| 17 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
| 18 |
+ */ |
|
| 19 |
+ |
|
| 20 |
+#ifndef AVUTIL_CPU_H |
|
| 21 |
+#define AVUTIL_CPU_H |
|
| 22 |
+ |
|
| 23 |
+#include "avutil.h" |
|
| 24 |
+ |
|
| 25 |
+#define AV_CPU_FLAG_FORCE 0x80000000 /* force usage of selected flags (OR) */ |
|
| 26 |
+ |
|
| 27 |
+ /* lower 16 bits - CPU features */ |
|
| 28 |
+#define AV_CPU_FLAG_MMX 0x0001 ///< standard MMX |
|
| 29 |
+#define AV_CPU_FLAG_3DNOW 0x0004 ///< AMD 3DNOW |
|
| 30 |
+#define AV_CPU_FLAG_MMX2 0x0002 ///< SSE integer functions or AMD MMX ext |
|
| 31 |
+#define AV_CPU_FLAG_SSE 0x0008 ///< SSE functions |
|
| 32 |
+#define AV_CPU_FLAG_SSE2 0x0010 ///< PIV SSE2 functions |
|
| 33 |
+#define AV_CPU_FLAG_SSE2SLOW 0x40000000 ///< SSE2 supported, but usually not faster |
|
| 34 |
+#define AV_CPU_FLAG_3DNOWEXT 0x0020 ///< AMD 3DNowExt |
|
| 35 |
+#define AV_CPU_FLAG_SSE3 0x0040 ///< Prescott SSE3 functions |
|
| 36 |
+#define AV_CPU_FLAG_SSE3SLOW 0x20000000 ///< SSE3 supported, but usually not faster t |
|
| 37 |
+#define AV_CPU_FLAG_SSSE3 0x0080 ///< Conroe SSSE3 functions |
|
| 38 |
+#define AV_CPU_FLAG_SSE4 0x0100 ///< Penryn SSE4.1 functions |
|
| 39 |
+#define AV_CPU_FLAG_SSE42 0x0200 ///< Nehalem SSE4.2 functions |
|
| 40 |
+#define AV_CPU_FLAG_IWMMXT 0x0100 ///< XScale IWMMXT |
|
| 41 |
+#define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard |
|
| 42 |
+ |
|
| 43 |
+#endif /* AVUTIL_CPU_H */ |