Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
external
ffmpeg
Commits
17337f54
Commit
17337f54
authored
Aug 28, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: Split inline and external assembly #ifdefs
parent
43b73d59
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
130 additions
and
141 deletions
+130
-141
libavcodec/dct-test.c
libavcodec/dct-test.c
+2
-2
libavcodec/imgconvert.c
libavcodec/imgconvert.c
+4
-4
libavcodec/x86/ac3dsp.asm
libavcodec/x86/ac3dsp.asm
+4
-4
libavcodec/x86/dct32.asm
libavcodec/x86/dct32.asm
+1
-1
libavcodec/x86/dsputil.asm
libavcodec/x86/dsputil.asm
+3
-3
libavcodec/x86/dsputil_mmx.c
libavcodec/x86/dsputil_mmx.c
+10
-11
libavcodec/x86/dsputilenc_mmx.c
libavcodec/x86/dsputilenc_mmx.c
+4
-4
libavcodec/x86/fft.asm
libavcodec/x86/fft.asm
+4
-4
libavcodec/x86/h264_chromamc_10bit.asm
libavcodec/x86/h264_chromamc_10bit.asm
+2
-2
libavcodec/x86/h264_idct_10bit.asm
libavcodec/x86/h264_idct_10bit.asm
+8
-8
libavcodec/x86/h264_intrapred_10bit.asm
libavcodec/x86/h264_intrapred_10bit.asm
+13
-13
libavcodec/x86/h264_qpel.c
libavcodec/x86/h264_qpel.c
+2
-2
libavcodec/x86/h264dsp_init.c
libavcodec/x86/h264dsp_init.c
+5
-5
libavcodec/x86/mpegvideoenc.c
libavcodec/x86/mpegvideoenc.c
+12
-18
libavfilter/x86/gradfun.c
libavfilter/x86/gradfun.c
+8
-10
libavfilter/x86/yadif.c
libavfilter/x86/yadif.c
+6
-8
libavresample/x86/audio_convert.asm
libavresample/x86/audio_convert.asm
+17
-17
libavresample/x86/audio_mix.asm
libavresample/x86/audio_mix.asm
+5
-5
libavutil/internal.h
libavutil/internal.h
+3
-3
libavutil/x86/float_dsp.asm
libavutil/x86/float_dsp.asm
+2
-2
libswscale/swscale.c
libswscale/swscale.c
+1
-1
libswscale/utils.c
libswscale/utils.c
+6
-6
libswscale/x86/swscale.c
libswscale/x86/swscale.c
+3
-3
libswscale/x86/yuv2rgb.c
libswscale/x86/yuv2rgb.c
+5
-5
No files found.
libavcodec/dct-test.c
View file @
17337f54
...
...
@@ -85,7 +85,7 @@ static const struct algo fdct_tab[] = {
{
"IJG-AAN-INT"
,
ff_fdct_ifast
,
SCALE_PERM
},
{
"IJG-LLM-INT"
,
ff_jpeg_fdct_islow_8
,
NO_PERM
},
#if HAVE_MMX
&& HAVE
_INLINE
_ASM
#if HAVE_MMX_INLINE
{
"MMX"
,
ff_fdct_mmx
,
NO_PERM
,
AV_CPU_FLAG_MMX
},
{
"MMXEXT"
,
ff_fdct_mmx2
,
NO_PERM
,
AV_CPU_FLAG_MMXEXT
},
{
"SSE2"
,
ff_fdct_sse2
,
NO_PERM
,
AV_CPU_FLAG_SSE2
},
...
...
@@ -108,7 +108,7 @@ static const struct algo idct_tab[] = {
{
"INT"
,
ff_j_rev_dct
,
MMX_PERM
},
{
"SIMPLE-C"
,
ff_simple_idct_8
,
NO_PERM
},
#if HAVE_MMX
&& HAVE
_INLINE
_ASM
#if HAVE_MMX_INLINE
{
"SIMPLE-MMX"
,
ff_simple_idct_mmx
,
MMX_SIMPLE_PERM
,
AV_CPU_FLAG_MMX
},
{
"XVID-MMX"
,
ff_idct_xvid_mmx
,
NO_PERM
,
AV_CPU_FLAG_MMX
,
1
},
{
"XVID-MMXEXT"
,
ff_idct_xvid_mmx2
,
NO_PERM
,
AV_CPU_FLAG_MMXEXT
,
1
},
...
...
libavcodec/imgconvert.c
View file @
17337f54
...
...
@@ -39,7 +39,7 @@
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#if HAVE_MMX
&& HAVE_YASM
#if HAVE_MMX
_EXTERNAL
#include "x86/dsputil_mmx.h"
#endif
...
...
@@ -52,7 +52,7 @@
#define FF_PIXEL_PACKED 1
/**< only one components containing all the channels */
#define FF_PIXEL_PALETTE 2
/**< one components containing indexes for a palette */
#if HAVE_MMX
&& HAVE_YASM
#if HAVE_MMX
_EXTERNAL
#define deinterlace_line_inplace ff_deinterlace_line_inplace_mmx
#define deinterlace_line ff_deinterlace_line_mmx
#else
...
...
@@ -877,7 +877,7 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width,
return
0
;
}
#if !
(
HAVE_MMX
&& HAVE_YASM)
#if !HAVE_MMX
_EXTERNAL
/* filter parameters: [-1 4 2 4 -1] // 8 */
static
void
deinterlace_line_c
(
uint8_t
*
dst
,
const
uint8_t
*
lum_m4
,
const
uint8_t
*
lum_m3
,
...
...
@@ -926,7 +926,7 @@ static void deinterlace_line_inplace_c(uint8_t *lum_m4, uint8_t *lum_m3,
lum
++
;
}
}
#endif
#endif
/* !HAVE_MMX_EXTERNAL */
/* deinterlacing : 2 temporal taps, 3 spatial taps linear filter. The
top field is copied as is, but the bottom field is deinterlaced
...
...
libavcodec/x86/ac3dsp.asm
View file @
17337f54
...
...
@@ -73,7 +73,7 @@ AC3_EXPONENT_MIN mmx
%define LOOP_ALIGN ALIGN 16
AC3_EXPONENT_MIN
mmxext
%endif
%if HAVE_SSE
%if HAVE_SSE
2_EXTERNAL
INIT_XMM
AC3_EXPONENT_MIN
ss
e2
%endif
...
...
@@ -385,7 +385,7 @@ cglobal ac3_compute_mantissa_size_sse2, 1,2,4, mant_cnt, sum
pabsd
%
1
,
%
1
%endmacro
%if HAVE_AMD3DNOW
%if HAVE_AMD3DNOW
_EXTERNAL
INIT_MMX
cglobal
ac3_extract_exponents_3dnow
,
3
,
3
,
0
,
exp
,
coef
,
len
add
expq
,
lenq
...
...
@@ -453,11 +453,11 @@ cglobal ac3_extract_exponents_%1, 3,3,4, exp, coef, len
REP_RET
%endmacro
%if HAVE_SSE
%if HAVE_SSE
2_EXTERNAL
INIT_XMM
%define PABSD PABSD_MMX
AC3_EXTRACT_EXPONENTS
ss
e2
%if HAVE_SSSE3
%if HAVE_SSSE3
_EXTERNAL
%define PABSD PABSD_SSSE3
AC3_EXTRACT_EXPONENTS
ss
se3
%endif
...
...
libavcodec/x86/dct32.asm
View file @
17337f54
...
...
@@ -193,7 +193,7 @@ ps_p1p1m1m1: dd 0, 0, 0x80000000, 0x80000000, 0, 0, 0x80000000, 0x80000000
INIT_YMM
avx
SECTION
_TEXT
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
; void ff_dct32_float_avx(FFTSample *out, const FFTSample *in)
cglobal
dct32_float
,
2
,
3
,
8
,
out
,
in
,
tmp
; pass 1
...
...
libavcodec/x86/dsputil.asm
View file @
17337f54
...
...
@@ -1169,7 +1169,7 @@ ALIGN 16
INIT_XMM
ss
e
VECTOR_FMUL_REVERSE
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_YMM
avx
VECTOR_FMUL_REVERSE
%endif
...
...
@@ -1199,7 +1199,7 @@ ALIGN 16
INIT_XMM
ss
e
VECTOR_FMUL_ADD
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_YMM
avx
VECTOR_FMUL_ADD
%endif
...
...
@@ -1245,7 +1245,7 @@ cglobal butterflies_float_interleave, 4,4,3, dst, src0, src1, len
INIT_XMM
ss
e
BUTTERFLIES_FLOAT_INTERLEAVE
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_YMM
avx
BUTTERFLIES_FLOAT_INTERLEAVE
%endif
...
...
libavcodec/x86/dsputil_mmx.c
View file @
17337f54
...
...
@@ -2812,7 +2812,7 @@ static void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx,
static
void
dsputil_init_3dnowext
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
int
mm_flags
)
{
#if HAVE_
6REGS && HAVE_INLINE_ASM
#if HAVE_
AMD3DNOWEXT_INLINE && HAVE_6REGS
c
->
vector_fmul_window
=
vector_fmul_window_3dnowext
;
#endif
}
...
...
@@ -2926,11 +2926,10 @@ static void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx,
static
void
dsputil_init_ssse3
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
int
mm_flags
)
{
#if HAVE_SSSE3
const
int
high_bit_depth
=
avctx
->
bits_per_raw_sample
>
8
;
const
int
bit_depth
=
avctx
->
bits_per_raw_sample
;
#if HAVE_INLINE
_ASM
#if HAVE_
SSSE3_
INLINE
if
(
!
high_bit_depth
&&
CONFIG_H264QPEL
)
{
H264_QPEL_FUNCS
(
1
,
0
,
ssse3
);
H264_QPEL_FUNCS
(
1
,
1
,
ssse3
);
...
...
@@ -2945,8 +2944,9 @@ static void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx,
H264_QPEL_FUNCS
(
3
,
2
,
ssse3
);
H264_QPEL_FUNCS
(
3
,
3
,
ssse3
);
}
#endif
/* HAVE_INLINE_ASM */
#if HAVE_YASM
#endif
/* HAVE_SSSE3_INLINE */
#if HAVE_SSSE3_EXTERNAL
if
(
bit_depth
==
10
&&
CONFIG_H264QPEL
)
{
H264_QPEL_FUNCS_10
(
1
,
0
,
ssse3_cache64
);
H264_QPEL_FUNCS_10
(
2
,
0
,
ssse3_cache64
);
...
...
@@ -2969,21 +2969,20 @@ static void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx,
if
(
!
(
mm_flags
&
(
AV_CPU_FLAG_SSE42
|
AV_CPU_FLAG_3DNOW
)))
// cachesplit
c
->
scalarproduct_and_madd_int16
=
ff_scalarproduct_and_madd_int16_ssse3
;
c
->
bswap_buf
=
ff_bswap32_buf_ssse3
;
#endif
#endif
#endif
/* HAVE_SSSE3_EXTERNAL */
}
static
void
dsputil_init_sse4
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
int
mm_flags
)
{
#if HAVE_
YASM
#if HAVE_
SSE4_EXTERNAL
c
->
vector_clip_int32
=
ff_vector_clip_int32_sse4
;
#endif
#endif
/* HAVE_SSE4_EXTERNAL */
}
static
void
dsputil_init_avx
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
int
mm_flags
)
{
#if HAVE_AVX
&& HAVE_YASM
#if HAVE_AVX
_EXTERNAL
const
int
bit_depth
=
avctx
->
bits_per_raw_sample
;
if
(
bit_depth
==
10
)
{
...
...
@@ -3003,7 +3002,7 @@ static void dsputil_init_avx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
c
->
butterflies_float_interleave
=
ff_butterflies_float_interleave_avx
;
c
->
vector_fmul_reverse
=
ff_vector_fmul_reverse_avx
;
c
->
vector_fmul_add
=
ff_vector_fmul_add_avx
;
#endif
#endif
/* HAVE_AVX_EXTERNAL */
}
void
ff_dsputil_init_mmx
(
DSPContext
*
c
,
AVCodecContext
*
avctx
)
...
...
libavcodec/x86/dsputilenc_mmx.c
View file @
17337f54
...
...
@@ -982,7 +982,7 @@ DCT_SAD_FUNC(mmx2)
DCT_SAD_FUNC
(
sse2
)
#undef MMABS
#if HAVE_SSSE3
#if HAVE_SSSE3
_INLINE
#define MMABS(a,z) MMABS_SSSE3(a,z)
DCT_SAD_FUNC
(
ssse3
)
#undef MMABS
...
...
@@ -1062,7 +1062,7 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si
#undef SCALE_OFFSET
#undef PMULHRW
#if HAVE_SSSE3
#if HAVE_SSSE3
_INLINE
#undef PHADDD
#define DEF(x) x ## _ssse3
#define SET_RND(x)
...
...
@@ -1081,7 +1081,7 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si
#undef SCALE_OFFSET
#undef PMULHRW
#undef PHADDD
#endif /
/
HAVE_SSSE3
#endif
/
*
HAVE_SSSE3
_INLINE */
#endif
/* HAVE_INLINE_ASM */
...
...
@@ -1161,7 +1161,7 @@ void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
c
->
sum_abs_dctelem
=
sum_abs_dctelem_sse2
;
}
#if HAVE_SSSE3
#if HAVE_SSSE3
_INLINE
if
(
mm_flags
&
AV_CPU_FLAG_SSSE3
){
if
(
!
(
avctx
->
flags
&
CODEC_FLAG_BITEXACT
)){
c
->
try_8x8basis
=
try_8x8basis_ssse3
;
...
...
libavcodec/x86/fft.asm
View file @
17337f54
...
...
@@ -305,7 +305,7 @@ IF%1 mova Z(1), m5
INIT_YMM
avx
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
align
16
fft8_avx:
mova
m0
,
Z
(
0
)
...
...
@@ -552,7 +552,7 @@ DEFINE_ARGS zc, w, n, o1, o3
INIT_YMM
avx
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
%macro INTERL_AVX 5
vunpckhps
%
3
,
%
2
,
%
1
vunpcklps
%
2
,
%
2
,
%
1
...
...
@@ -793,7 +793,7 @@ align 8
dispatch_tab
%+
fullsuffix
:
pointer
list_of_fft
%endmacro
; DECL_FFT
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_YMM
avx
DECL_FFT
6
DECL_FFT
6
,
_interleave
...
...
@@ -1100,6 +1100,6 @@ DECL_IMDCT POSROTATESHUF_3DNOW
INIT_YMM
avx
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
DECL_IMDCT
POSROTATESHUF_AVX
%endif
libavcodec/x86/h264_chromamc_10bit.asm
View file @
17337f54
...
...
@@ -252,7 +252,7 @@ cglobal %1_h264_chroma_mc2_10, 6,7
%define CHROMAMC_AVG NOTHING
INIT_XMM
ss
e2
CHROMA_MC8
put
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_XMM
avx
CHROMA_MC8
put
%endif
...
...
@@ -264,7 +264,7 @@ CHROMA_MC2 put
%define PAVG pavgw
INIT_XMM
ss
e2
CHROMA_MC8
avg
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_XMM
avx
CHROMA_MC8
avg
%endif
...
...
libavcodec/x86/h264_idct_10bit.asm
View file @
17337f54
...
...
@@ -80,7 +80,7 @@ cglobal h264_idct_add_10, 3,3
INIT_XMM
ss
e2
IDCT_ADD_10
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_XMM
avx
IDCT_ADD_10
%endif
...
...
@@ -110,7 +110,7 @@ add4x4_idct %+ SUFFIX:
INIT_XMM
ss
e2
ALIGN
16
ADD4x4IDCT
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_XMM
avx
ALIGN
16
ADD4x4IDCT
...
...
@@ -150,7 +150,7 @@ cglobal h264_idct_add16_10, 5,6
INIT_XMM
ss
e2
IDCT_ADD16_10
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_XMM
avx
IDCT_ADD16_10
%endif
...
...
@@ -216,7 +216,7 @@ cglobal h264_idct8_dc_add_10,3,3,7
INIT_XMM
ss
e2
IDCT8_DC_ADD
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_XMM
avx
IDCT8_DC_ADD
%endif
...
...
@@ -287,7 +287,7 @@ cglobal h264_idct_add16intra_10,5,7,8
INIT_XMM
ss
e2
IDCT_ADD16INTRA_10
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_XMM
avx
IDCT_ADD16INTRA_10
%endif
...
...
@@ -324,7 +324,7 @@ cglobal h264_idct_add8_10,5,8,7
INIT_XMM
ss
e2
IDCT_ADD8
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_XMM
avx
IDCT_ADD8
%endif
...
...
@@ -501,7 +501,7 @@ h264_idct8_add1_10 %+ SUFFIX:
INIT_XMM
ss
e2
IDCT8_ADD
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_XMM
avx
IDCT8_ADD
%endif
...
...
@@ -541,7 +541,7 @@ cglobal h264_idct8_add4_10, 0,7,16
INIT_XMM
ss
e2
IDCT8_ADD4
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_XMM
avx
IDCT8_ADD4
%endif
libavcodec/x86/h264_intrapred_10bit.asm
View file @
17337f54
...
...
@@ -84,7 +84,7 @@ INIT_XMM
PRED4x4_DR
ss
e2
%define PALIGNR PALIGNR_SSSE3
PRED4x4_DR
ss
se3
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED4x4_DR
avx
%endif
...
...
@@ -124,7 +124,7 @@ INIT_XMM
PRED4x4_VR
ss
e2
%define PALIGNR PALIGNR_SSSE3
PRED4x4_VR
ss
se3
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED4x4_VR
avx
%endif
...
...
@@ -167,7 +167,7 @@ INIT_XMM
PRED4x4_HD
ss
e2
%define PALIGNR PALIGNR_SSSE3
PRED4x4_HD
ss
se3
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED4x4_HD
avx
%endif
...
...
@@ -238,7 +238,7 @@ cglobal pred4x4_down_left_10_%1, 3,3
INIT_XMM
PRED4x4_DL
ss
e2
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED4x4_DL
avx
%endif
...
...
@@ -267,7 +267,7 @@ cglobal pred4x4_vertical_left_10_%1, 3,3
INIT_XMM
PRED4x4_VL
ss
e2
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED4x4_VL
avx
%endif
...
...
@@ -577,7 +577,7 @@ cglobal pred8x8l_top_dc_10_%1, 4,4,6
INIT_XMM
PRED8x8L_TOP_DC
ss
e2
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED8x8L_TOP_DC
avx
%endif
...
...
@@ -636,7 +636,7 @@ cglobal pred8x8l_dc_10_%1, 4,6,6
INIT_XMM
PRED8x8L_DC
ss
e2
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED8x8L_DC
avx
%endif
...
...
@@ -671,7 +671,7 @@ cglobal pred8x8l_vertical_10_%1, 4,4,6
INIT_XMM
PRED8x8L_VERTICAL
ss
e2
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED8x8L_VERTICAL
avx
%endif
...
...
@@ -728,7 +728,7 @@ INIT_XMM
PRED8x8L_HORIZONTAL
ss
e2
%define PALIGNR PALIGNR_SSSE3
PRED8x8L_HORIZONTAL
ss
se3
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED8x8L_HORIZONTAL
avx
%endif
...
...
@@ -797,7 +797,7 @@ INIT_XMM
PRED8x8L_DOWN_LEFT
ss
e2
%define PALIGNR PALIGNR_SSSE3
PRED8x8L_DOWN_LEFT
ss
se3
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED8x8L_DOWN_LEFT
avx
%endif
...
...
@@ -872,7 +872,7 @@ INIT_XMM
PRED8x8L_DOWN_RIGHT
ss
e2
%define PALIGNR PALIGNR_SSSE3
PRED8x8L_DOWN_RIGHT
ss
se3
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED8x8L_DOWN_RIGHT
avx
%endif
...
...
@@ -943,7 +943,7 @@ INIT_XMM
PRED8x8L_VERTICAL_RIGHT
ss
e2
%define PALIGNR PALIGNR_SSSE3
PRED8x8L_VERTICAL_RIGHT
ss
se3
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED8x8L_VERTICAL_RIGHT
avx
%endif
...
...
@@ -1005,7 +1005,7 @@ INIT_XMM
PRED8x8L_HORIZONTAL_UP
ss
e2
%define PALIGNR PALIGNR_SSSE3
PRED8x8L_HORIZONTAL_UP
ss
se3
%if HAVE_AVX
%if HAVE_AVX
_EXTERNAL
INIT_AVX
PRED8x8L_HORIZONTAL_UP
avx
%endif
...
...
libavcodec/x86/h264_qpel.c
View file @
17337f54
...
...
@@ -1174,7 +1174,7 @@ QPEL_H264_V_XMM(put_, PUT_OP, sse2)
QPEL_H264_V_XMM
(
avg_
,
AVG_MMX2_OP
,
sse2
)
QPEL_H264_HV_XMM
(
put_
,
PUT_OP
,
sse2
)
QPEL_H264_HV_XMM
(
avg_
,
AVG_MMX2_OP
,
sse2
)
#if HAVE_SSSE3
#if HAVE_SSSE3
_INLINE
QPEL_H264_H_XMM
(
put_
,
PUT_OP
,
ssse3
)
QPEL_H264_H_XMM
(
avg_
,
AVG_MMX2_OP
,
ssse3
)
QPEL_H264_HV2_XMM
(
put_
,
PUT_OP
,
ssse3
)
...
...
@@ -1188,7 +1188,7 @@ H264_MC_4816(3dnow)
H264_MC_4816
(
mmx2
)
H264_MC_816
(
H264_MC_V
,
sse2
)
H264_MC_816
(
H264_MC_HV
,
sse2
)
#if HAVE_SSSE3
#if HAVE_SSSE3
_INLINE
H264_MC_816
(
H264_MC_H
,
ssse3
)
H264_MC_816
(
H264_MC_HV
,
ssse3
)
#endif
...
...
libavcodec/x86/h264dsp_init.c
View file @
17337f54
...
...
@@ -39,7 +39,7 @@ IDCT_ADD_FUNC(8_dc, 10, sse2)
IDCT_ADD_FUNC
(
8
,
8
,
mmx
)
IDCT_ADD_FUNC
(
8
,
8
,
sse2
)
IDCT_ADD_FUNC
(
8
,
10
,
sse2
)
#if HAVE_AVX
#if HAVE_AVX
_EXTERNAL
IDCT_ADD_FUNC
(,
10
,
avx
)
IDCT_ADD_FUNC
(
8
_dc
,
10
,
avx
)
IDCT_ADD_FUNC
(
8
,
10
,
avx
)
...
...
@@ -64,7 +64,7 @@ IDCT_ADD_REP_FUNC(, 16intra, 8, mmx)
IDCT_ADD_REP_FUNC
(,
16
intra
,
8
,
mmx2
)
IDCT_ADD_REP_FUNC
(,
16
intra
,
8
,
sse2
)
IDCT_ADD_REP_FUNC
(,
16
intra
,
10
,
sse2
)
#if HAVE_AVX
#if HAVE_AVX
_EXTERNAL
IDCT_ADD_REP_FUNC
(,
16
,
10
,
avx
)
IDCT_ADD_REP_FUNC
(,
16
intra
,
10
,
avx
)
#endif
...
...
@@ -79,7 +79,7 @@ IDCT_ADD_REP_FUNC2(, 8, 8, mmx)
IDCT_ADD_REP_FUNC2
(,
8
,
8
,
mmx2
)
IDCT_ADD_REP_FUNC2
(,
8
,
8
,
sse2
)
IDCT_ADD_REP_FUNC2
(,
8
,
10
,
sse2
)
#if HAVE_AVX
#if HAVE_AVX
_EXTERNAL
IDCT_ADD_REP_FUNC2
(,
8
,
10
,
avx
)
#endif
...
...
@@ -353,7 +353,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
c
->
biweight_h264_pixels_tab
[
1
]
=
ff_h264_biweight_8_10_sse4
;
c
->
biweight_h264_pixels_tab
[
2
]
=
ff_h264_biweight_4_10_sse4
;
}
#if HAVE_AVX
#if HAVE_AVX
_EXTERNAL
if
(
mm_flags
&
AV_CPU_FLAG_AVX
)
{
c
->
h264_idct_dc_add
=
c
->
h264_idct_add
=
ff_h264_idct_add_10_avx
;
...
...
@@ -377,7 +377,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
c
->
h264_h_loop_filter_luma_intra
=
ff_deblock_h_luma_intra_10_avx
;
#endif
/* HAVE_ALIGNED_STACK */
}
#endif
/* HAVE_AVX */
#endif
/* HAVE_AVX
_EXTERNAL
*/
}
}
}
...
...
libavcodec/x86/mpegvideoenc.c
View file @
17337f54
...
...
@@ -26,20 +26,18 @@
#include "libavcodec/mpegvideo.h"
#include "dsputil_mmx.h"
#if HAVE_INLINE_ASM
extern
uint16_t
ff_inv_zigzag_direct16
[
64
];
#if HAVE_MMX
#if HAVE_MMX
_INLINE
#define COMPILE_TEMPLATE_MMXEXT 0
#define COMPILE_TEMPLATE_SSE2 0
#define COMPILE_TEMPLATE_SSSE3 0
#define RENAME(a) a ## _MMX
#define RENAMEl(a) a ## _mmx
#include "mpegvideoenc_template.c"
#endif
/* HAVE_MMX */
#endif
/* HAVE_MMX
_INLINE
*/
#if HAVE_MMXEXT
#if HAVE_MMXEXT
_INLINE
#undef COMPILE_TEMPLATE_SSSE3
#undef COMPILE_TEMPLATE_SSE2
#undef COMPILE_TEMPLATE_MMXEXT
...
...
@@ -51,9 +49,9 @@ extern uint16_t ff_inv_zigzag_direct16[64];
#define RENAME(a) a ## _MMX2
#define RENAMEl(a) a ## _mmx2
#include "mpegvideoenc_template.c"
#endif
/* HAVE_MMXEXT */
#endif
/* HAVE_MMXEXT
_INLINE
*/
#if HAVE_SSE2
#if HAVE_SSE2
_INLINE
#undef COMPILE_TEMPLATE_MMXEXT
#undef COMPILE_TEMPLATE_SSE2
#undef COMPILE_TEMPLATE_SSSE3
...
...
@@ -65,9 +63,9 @@ extern uint16_t ff_inv_zigzag_direct16[64];
#define RENAME(a) a ## _SSE2
#define RENAMEl(a) a ## _sse2
#include "mpegvideoenc_template.c"
#endif
/* HAVE_SSE2 */
#endif
/* HAVE_SSE2
_INLINE
*/
#if HAVE_SSSE3
#if HAVE_SSSE3
_INLINE
#undef COMPILE_TEMPLATE_MMXEXT
#undef COMPILE_TEMPLATE_SSE2
#undef COMPILE_TEMPLATE_SSSE3
...
...
@@ -79,33 +77,29 @@ extern uint16_t ff_inv_zigzag_direct16[64];
#define RENAME(a) a ## _SSSE3
#define RENAMEl(a) a ## _sse2
#include "mpegvideoenc_template.c"
#endif
/* HAVE_SSSE3 */
#endif
/* HAVE_INLINE_ASM */
#endif
/* HAVE_SSSE3_INLINE */
void
ff_MPV_encode_init_x86
(
MpegEncContext
*
s
)
{
#if HAVE_INLINE_ASM
int
mm_flags
=
av_get_cpu_flags
();
const
int
dct_algo
=
s
->
avctx
->
dct_algo
;
if
(
dct_algo
==
FF_DCT_AUTO
||
dct_algo
==
FF_DCT_MMX
)
{
#if HAVE_MMX
#if HAVE_MMX
_INLINE
if
(
mm_flags
&
AV_CPU_FLAG_MMX
&&
HAVE_MMX
)
s
->
dct_quantize
=
dct_quantize_MMX
;
#endif
#if HAVE_MMXEXT
#if HAVE_MMXEXT
_INLINE
if
(
mm_flags
&
AV_CPU_FLAG_MMXEXT
&&
HAVE_MMXEXT
)
s
->
dct_quantize
=
dct_quantize_MMX2
;
#endif
#if HAVE_SSE2
#if HAVE_SSE2
_INLINE
if
(
mm_flags
&
AV_CPU_FLAG_SSE2
&&
HAVE_SSE2
)
s
->
dct_quantize
=
dct_quantize_SSE2
;
#endif
#if HAVE_SSSE3
#if HAVE_SSSE3
_INLINE
if
(
mm_flags
&
AV_CPU_FLAG_SSSE3
)
s
->
dct_quantize
=
dct_quantize_SSSE3
;
#endif
}
#endif
/* HAVE_INLINE_ASM */
}
libavfilter/x86/gradfun.c
View file @
17337f54
...
...
@@ -29,7 +29,7 @@
DECLARE_ALIGNED
(
16
,
static
const
uint16_t
,
pw_7f
)[
8
]
=
{
0x7F
,
0x7F
,
0x7F
,
0x7F
,
0x7F
,
0x7F
,
0x7F
,
0x7F
};
DECLARE_ALIGNED
(
16
,
static
const
uint16_t
,
pw_ff
)[
8
]
=
{
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
};
#if HAVE_MMXEXT
#if HAVE_MMXEXT
_INLINE
static
void
gradfun_filter_line_mmx2
(
uint8_t
*
dst
,
uint8_t
*
src
,
uint16_t
*
dc
,
int
width
,
int
thresh
,
const
uint16_t
*
dithers
)
{
intptr_t
x
;
...
...
@@ -77,7 +77,7 @@ static void gradfun_filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc, i
}
#endif
#if HAVE_SSSE3
#if HAVE_SSSE3
_INLINE
static
void
gradfun_filter_line_ssse3
(
uint8_t
*
dst
,
uint8_t
*
src
,
uint16_t
*
dc
,
int
width
,
int
thresh
,
const
uint16_t
*
dithers
)
{
intptr_t
x
;
...
...
@@ -122,9 +122,9 @@ static void gradfun_filter_line_ssse3(uint8_t *dst, uint8_t *src, uint16_t *dc,
:
"memory"
);
}
#endif /
/
HAVE_SSSE3
#endif
/
*
HAVE_SSSE3
_INLINE */
#if HAVE_SSE
#if HAVE_SSE
2_INLINE
static
void
gradfun_blur_line_sse2
(
uint16_t
*
dc
,
uint16_t
*
buf
,
uint16_t
*
buf1
,
uint8_t
*
src
,
int
src_linesize
,
int
width
)
{
#define BLURV(load)\
...
...
@@ -165,7 +165,7 @@ static void gradfun_blur_line_sse2(uint16_t *dc, uint16_t *buf, uint16_t *buf1,
BLURV
(
"movdqa"
);
}
}