Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
9e5e76ef
Commit
9e5e76ef
authored
May 05, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: More specific ifdefs for dsputil/hpeldsp init functions
parent
ac87eaf8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
dsputil_mmx.c
libavcodec/x86/dsputil_mmx.c
+8
-8
hpeldsp_init.c
libavcodec/x86/hpeldsp_init.c
+8
-8
No files found.
libavcodec/x86/dsputil_mmx.c
View file @
9e5e76ef
...
@@ -1119,7 +1119,7 @@ void ff_vector_clip_int32_sse4 (int32_t *dst, const int32_t *src,
...
@@ -1119,7 +1119,7 @@ void ff_vector_clip_int32_sse4 (int32_t *dst, const int32_t *src,
static
av_cold
void
dsputil_init_mmx
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
static
av_cold
void
dsputil_init_mmx
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
int
mm_flags
)
int
mm_flags
)
{
{
#if HAVE_
INLINE_ASM
#if HAVE_
MMX_INLINE
const
int
high_bit_depth
=
avctx
->
bits_per_raw_sample
>
8
;
const
int
high_bit_depth
=
avctx
->
bits_per_raw_sample
>
8
;
c
->
put_pixels_clamped
=
ff_put_pixels_clamped_mmx
;
c
->
put_pixels_clamped
=
ff_put_pixels_clamped_mmx
;
...
@@ -1150,22 +1150,22 @@ static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx,
...
@@ -1150,22 +1150,22 @@ static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx,
c
->
gmc
=
gmc_mmx
;
c
->
gmc
=
gmc_mmx
;
c
->
add_bytes
=
add_bytes_mmx
;
c
->
add_bytes
=
add_bytes_mmx
;
#endif
/* HAVE_
INLINE_ASM
*/
#endif
/* HAVE_
MMX_INLINE
*/
#if HAVE_
YASM
#if HAVE_
MMX_EXTERNAL
if
(
CONFIG_H263_DECODER
||
CONFIG_H263_ENCODER
)
{
if
(
CONFIG_H263_DECODER
||
CONFIG_H263_ENCODER
)
{
c
->
h263_v_loop_filter
=
ff_h263_v_loop_filter_mmx
;
c
->
h263_v_loop_filter
=
ff_h263_v_loop_filter_mmx
;
c
->
h263_h_loop_filter
=
ff_h263_h_loop_filter_mmx
;
c
->
h263_h_loop_filter
=
ff_h263_h_loop_filter_mmx
;
}
}
c
->
vector_clip_int32
=
ff_vector_clip_int32_mmx
;
c
->
vector_clip_int32
=
ff_vector_clip_int32_mmx
;
#endif
/* HAVE_
YASM
*/
#endif
/* HAVE_
MMX_EXTERNAL
*/
}
}
static
av_cold
void
dsputil_init_mmxext
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
static
av_cold
void
dsputil_init_mmxext
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
int
mm_flags
)
int
mm_flags
)
{
{
#if HAVE_
INLINE_ASM
#if HAVE_
MMXEXT_INLINE
const
int
high_bit_depth
=
avctx
->
bits_per_raw_sample
>
8
;
const
int
high_bit_depth
=
avctx
->
bits_per_raw_sample
>
8
;
if
(
!
high_bit_depth
&&
avctx
->
idct_algo
==
FF_IDCT_XVIDMMX
)
{
if
(
!
high_bit_depth
&&
avctx
->
idct_algo
==
FF_IDCT_XVIDMMX
)
{
...
@@ -1173,7 +1173,7 @@ static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
...
@@ -1173,7 +1173,7 @@ static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
c
->
idct_add
=
ff_idct_xvid_mmxext_add
;
c
->
idct_add
=
ff_idct_xvid_mmxext_add
;
c
->
idct
=
ff_idct_xvid_mmxext
;
c
->
idct
=
ff_idct_xvid_mmxext
;
}
}
#endif
/* HAVE_
INLINE_ASM
*/
#endif
/* HAVE_
MMXEXT_INLINE
*/
#if HAVE_MMXEXT_EXTERNAL
#if HAVE_MMXEXT_EXTERNAL
SET_QPEL_FUNCS
(
avg_qpel
,
0
,
16
,
mmxext
,
);
SET_QPEL_FUNCS
(
avg_qpel
,
0
,
16
,
mmxext
,
);
...
@@ -1202,7 +1202,7 @@ static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
...
@@ -1202,7 +1202,7 @@ static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
static
av_cold
void
dsputil_init_sse
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
static
av_cold
void
dsputil_init_sse
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
int
mm_flags
)
int
mm_flags
)
{
{
#if HAVE_
INLINE_ASM
#if HAVE_
SSE_INLINE
const
int
high_bit_depth
=
avctx
->
bits_per_raw_sample
>
8
;
const
int
high_bit_depth
=
avctx
->
bits_per_raw_sample
>
8
;
if
(
!
high_bit_depth
)
{
if
(
!
high_bit_depth
)
{
...
@@ -1214,7 +1214,7 @@ static av_cold void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx,
...
@@ -1214,7 +1214,7 @@ static av_cold void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx,
}
}
c
->
vector_clipf
=
vector_clipf_sse
;
c
->
vector_clipf
=
vector_clipf_sse
;
#endif
/* HAVE_
INLINE_ASM
*/
#endif
/* HAVE_
SSE_INLINE
*/
}
}
static
av_cold
void
dsputil_init_sse2
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
static
av_cold
void
dsputil_init_sse2
(
DSPContext
*
c
,
AVCodecContext
*
avctx
,
...
...
libavcodec/x86/hpeldsp_init.c
View file @
9e5e76ef
...
@@ -150,7 +150,7 @@ void ff_avg_pixels8_xy2_3dnow(uint8_t *block, const uint8_t *pixels,
...
@@ -150,7 +150,7 @@ void ff_avg_pixels8_xy2_3dnow(uint8_t *block, const uint8_t *pixels,
static
void
hpeldsp_init_mmx
(
HpelDSPContext
*
c
,
int
flags
,
int
mm_flags
)
static
void
hpeldsp_init_mmx
(
HpelDSPContext
*
c
,
int
flags
,
int
mm_flags
)
{
{
#if HAVE_
INLINE_ASM
#if HAVE_
MMX_INLINE
SET_HPEL_FUNCS
(
put
,
[
0
],
16
,
mmx
);
SET_HPEL_FUNCS
(
put
,
[
0
],
16
,
mmx
);
SET_HPEL_FUNCS
(
put_no_rnd
,
[
0
],
16
,
mmx
);
SET_HPEL_FUNCS
(
put_no_rnd
,
[
0
],
16
,
mmx
);
SET_HPEL_FUNCS
(
avg
,
[
0
],
16
,
mmx
);
SET_HPEL_FUNCS
(
avg
,
[
0
],
16
,
mmx
);
...
@@ -158,12 +158,12 @@ static void hpeldsp_init_mmx(HpelDSPContext *c, int flags, int mm_flags)
...
@@ -158,12 +158,12 @@ static void hpeldsp_init_mmx(HpelDSPContext *c, int flags, int mm_flags)
SET_HPEL_FUNCS
(
put
,
[
1
],
8
,
mmx
);
SET_HPEL_FUNCS
(
put
,
[
1
],
8
,
mmx
);
SET_HPEL_FUNCS
(
put_no_rnd
,
[
1
],
8
,
mmx
);
SET_HPEL_FUNCS
(
put_no_rnd
,
[
1
],
8
,
mmx
);
SET_HPEL_FUNCS
(
avg
,
[
1
],
8
,
mmx
);
SET_HPEL_FUNCS
(
avg
,
[
1
],
8
,
mmx
);
#endif
/* HAVE_
INLINE_ASM
*/
#endif
/* HAVE_
MMX_INLINE
*/
}
}
static
void
hpeldsp_init_mmxext
(
HpelDSPContext
*
c
,
int
flags
,
int
mm_flags
)
static
void
hpeldsp_init_mmxext
(
HpelDSPContext
*
c
,
int
flags
,
int
mm_flags
)
{
{
#if HAVE_
YASM
#if HAVE_
MMXEXT_EXTERNAL
c
->
put_pixels_tab
[
0
][
1
]
=
ff_put_pixels16_x2_mmxext
;
c
->
put_pixels_tab
[
0
][
1
]
=
ff_put_pixels16_x2_mmxext
;
c
->
put_pixels_tab
[
0
][
2
]
=
put_pixels16_y2_mmxext
;
c
->
put_pixels_tab
[
0
][
2
]
=
put_pixels16_y2_mmxext
;
...
@@ -192,12 +192,12 @@ static void hpeldsp_init_mmxext(HpelDSPContext *c, int flags, int mm_flags)
...
@@ -192,12 +192,12 @@ static void hpeldsp_init_mmxext(HpelDSPContext *c, int flags, int mm_flags)
c
->
put_no_rnd_pixels_tab
[
1
][
1
]
=
ff_put_no_rnd_pixels8_x2_exact_mmxext
;
c
->
put_no_rnd_pixels_tab
[
1
][
1
]
=
ff_put_no_rnd_pixels8_x2_exact_mmxext
;
c
->
put_no_rnd_pixels_tab
[
1
][
2
]
=
ff_put_no_rnd_pixels8_y2_exact_mmxext
;
c
->
put_no_rnd_pixels_tab
[
1
][
2
]
=
ff_put_no_rnd_pixels8_y2_exact_mmxext
;
}
}
#endif
/* HAVE_
YASM
*/
#endif
/* HAVE_
MMXEXT_EXTERNAL
*/
}
}
static
void
hpeldsp_init_3dnow
(
HpelDSPContext
*
c
,
int
flags
,
int
mm_flags
)
static
void
hpeldsp_init_3dnow
(
HpelDSPContext
*
c
,
int
flags
,
int
mm_flags
)
{
{
#if HAVE_
YASM
#if HAVE_
AMD3DNOW_EXTERNAL
c
->
put_pixels_tab
[
0
][
1
]
=
ff_put_pixels16_x2_3dnow
;
c
->
put_pixels_tab
[
0
][
1
]
=
ff_put_pixels16_x2_3dnow
;
c
->
put_pixels_tab
[
0
][
2
]
=
put_pixels16_y2_3dnow
;
c
->
put_pixels_tab
[
0
][
2
]
=
put_pixels16_y2_3dnow
;
...
@@ -226,19 +226,19 @@ static void hpeldsp_init_3dnow(HpelDSPContext *c, int flags, int mm_flags)
...
@@ -226,19 +226,19 @@ static void hpeldsp_init_3dnow(HpelDSPContext *c, int flags, int mm_flags)
c
->
put_no_rnd_pixels_tab
[
1
][
1
]
=
ff_put_no_rnd_pixels8_x2_exact_3dnow
;
c
->
put_no_rnd_pixels_tab
[
1
][
1
]
=
ff_put_no_rnd_pixels8_x2_exact_3dnow
;
c
->
put_no_rnd_pixels_tab
[
1
][
2
]
=
ff_put_no_rnd_pixels8_y2_exact_3dnow
;
c
->
put_no_rnd_pixels_tab
[
1
][
2
]
=
ff_put_no_rnd_pixels8_y2_exact_3dnow
;
}
}
#endif
/* HAVE_
YASM
*/
#endif
/* HAVE_
AMD3DNOW_EXTERNAL
*/
}
}
static
void
hpeldsp_init_sse2
(
HpelDSPContext
*
c
,
int
flags
,
int
mm_flags
)
static
void
hpeldsp_init_sse2
(
HpelDSPContext
*
c
,
int
flags
,
int
mm_flags
)
{
{
#if HAVE_
YASM
#if HAVE_
SSE2_EXTERNAL
if
(
!
(
mm_flags
&
AV_CPU_FLAG_SSE2SLOW
))
{
if
(
!
(
mm_flags
&
AV_CPU_FLAG_SSE2SLOW
))
{
// these functions are slower than mmx on AMD, but faster on Intel
// these functions are slower than mmx on AMD, but faster on Intel
c
->
put_pixels_tab
[
0
][
0
]
=
ff_put_pixels16_sse2
;
c
->
put_pixels_tab
[
0
][
0
]
=
ff_put_pixels16_sse2
;
c
->
put_no_rnd_pixels_tab
[
0
][
0
]
=
ff_put_pixels16_sse2
;
c
->
put_no_rnd_pixels_tab
[
0
][
0
]
=
ff_put_pixels16_sse2
;
c
->
avg_pixels_tab
[
0
][
0
]
=
ff_avg_pixels16_sse2
;
c
->
avg_pixels_tab
[
0
][
0
]
=
ff_avg_pixels16_sse2
;
}
}
#endif
/* HAVE_
YASM
*/
#endif
/* HAVE_
SSE2_EXTERNAL
*/
}
}
void
ff_hpeldsp_init_x86
(
HpelDSPContext
*
c
,
int
flags
)
void
ff_hpeldsp_init_x86
(
HpelDSPContext
*
c
,
int
flags
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment