Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
cb36febc
Commit
cb36febc
authored
Oct 07, 2012
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: cavs: call ff_cavsdsp_init_x86() under if (ARCH_X86)
parent
f101eab1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
15 deletions
+26
-15
cavsdsp.c
libavcodec/cavsdsp.c
+2
-1
cavsdsp.h
libavcodec/cavsdsp.h
+1
-1
Makefile
libavcodec/x86/Makefile
+1
-1
cavsdsp.c
libavcodec/x86/cavsdsp.c
+22
-12
No files found.
libavcodec/cavsdsp.c
View file @
cb36febc
...
@@ -546,5 +546,6 @@ av_cold void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx) {
...
@@ -546,5 +546,6 @@ av_cold void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx) {
c
->
cavs_idct8_add
=
cavs_idct8_add_c
;
c
->
cavs_idct8_add
=
cavs_idct8_add_c
;
c
->
idct_perm
=
FF_NO_IDCT_PERM
;
c
->
idct_perm
=
FF_NO_IDCT_PERM
;
if
(
HAVE_MMX
)
ff_cavsdsp_init_mmx
(
c
,
avctx
);
if
(
ARCH_X86
)
ff_cavsdsp_init_x86
(
c
,
avctx
);
}
}
libavcodec/cavsdsp.h
View file @
cb36febc
...
@@ -37,6 +37,6 @@ typedef struct CAVSDSPContext {
...
@@ -37,6 +37,6 @@ typedef struct CAVSDSPContext {
}
CAVSDSPContext
;
}
CAVSDSPContext
;
void
ff_cavsdsp_init
(
CAVSDSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_cavsdsp_init
(
CAVSDSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_cavsdsp_init_
mmx
(
CAVSDSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_cavsdsp_init_
x86
(
CAVSDSPContext
*
c
,
AVCodecContext
*
avctx
);
#endif
/* AVCODEC_CAVSDSP_H */
#endif
/* AVCODEC_CAVSDSP_H */
libavcodec/x86/Makefile
View file @
cb36febc
...
@@ -2,6 +2,7 @@ OBJS += x86/fmtconvert_init.o
...
@@ -2,6 +2,7 @@ OBJS += x86/fmtconvert_init.o
OBJS-$(CONFIG_AAC_DECODER)
+=
x86/sbrdsp_init.o
OBJS-$(CONFIG_AAC_DECODER)
+=
x86/sbrdsp_init.o
OBJS-$(CONFIG_AC3DSP)
+=
x86/ac3dsp_init.o
OBJS-$(CONFIG_AC3DSP)
+=
x86/ac3dsp_init.o
OBJS-$(CONFIG_CAVS_DECODER)
+=
x86/cavsdsp.o
OBJS-$(CONFIG_DNXHD_ENCODER)
+=
x86/dnxhdenc.o
OBJS-$(CONFIG_DNXHD_ENCODER)
+=
x86/dnxhdenc.o
OBJS-$(CONFIG_FFT)
+=
x86/fft_init.o
OBJS-$(CONFIG_FFT)
+=
x86/fft_init.o
OBJS-$(CONFIG_H264DSP)
+=
x86/h264dsp_init.o
OBJS-$(CONFIG_H264DSP)
+=
x86/h264dsp_init.o
...
@@ -29,7 +30,6 @@ MMX-OBJS += x86/dsputil_mmx.o \
...
@@ -29,7 +30,6 @@ MMX-OBJS += x86/dsputil_mmx.o \
x86/idct_sse2_xvid.o
\
x86/idct_sse2_xvid.o
\
x86/simple_idct.o
\
x86/simple_idct.o
\
MMX-OBJS-$(CONFIG_CAVS_DECODER)
+=
x86/cavsdsp.o
MMX-OBJS-$(CONFIG_DWT)
+=
x86/snowdsp.o
MMX-OBJS-$(CONFIG_DWT)
+=
x86/snowdsp.o
MMX-OBJS-$(CONFIG_ENCODERS)
+=
x86/dsputilenc_mmx.o
\
MMX-OBJS-$(CONFIG_ENCODERS)
+=
x86/dsputilenc_mmx.o
\
x86/motion_est.o
x86/motion_est.o
...
...
libavcodec/x86/cavsdsp.c
View file @
cb36febc
...
@@ -25,11 +25,13 @@
...
@@ -25,11 +25,13 @@
#include "libavutil/common.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/cavsdsp.h"
#include "libavcodec/cavsdsp.h"
#include "dsputil_mmx.h"
#include "dsputil_mmx.h"
#include "config.h"
#if
HAVE_INLINE_ASM
#if
(HAVE_MMXEXT_INLINE || HAVE_AMD3DNOW_INLINE)
/* in/out: mma=mma+mmb, mmb=mmb-mma */
/* in/out: mma=mma+mmb, mmb=mmb-mma */
#define SUMSUB_BA( a, b ) \
#define SUMSUB_BA( a, b ) \
...
@@ -433,15 +435,12 @@ static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, ui
...
@@ -433,15 +435,12 @@ static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, ui
"pavgb " #temp ", " #a " \n\t"\
"pavgb " #temp ", " #a " \n\t"\
"mov" #size " " #a ", " #b " \n\t"
"mov" #size " " #a ", " #b " \n\t"
QPEL_CAVS
(
put_
,
PUT_OP
,
3
dnow
)
#endif
/* (HAVE_MMXEXT_INLINE || HAVE_AMD3DNOW_INLINE) */
QPEL_CAVS
(
avg_
,
AVG_3DNOW_OP
,
3
dnow
)
#if HAVE_MMXEXT_INLINE
QPEL_CAVS
(
put_
,
PUT_OP
,
mmx2
)
QPEL_CAVS
(
put_
,
PUT_OP
,
mmx2
)
QPEL_CAVS
(
avg_
,
AVG_MMX2_OP
,
mmx2
)
QPEL_CAVS
(
avg_
,
AVG_MMX2_OP
,
mmx2
)
CAVS_MC
(
put_
,
8
,
3
dnow
)
CAVS_MC
(
put_
,
16
,
3
dnow
)
CAVS_MC
(
avg_
,
8
,
3
dnow
)
CAVS_MC
(
avg_
,
16
,
3
dnow
)
CAVS_MC
(
put_
,
8
,
mmx2
)
CAVS_MC
(
put_
,
8
,
mmx2
)
CAVS_MC
(
put_
,
16
,
mmx2
)
CAVS_MC
(
put_
,
16
,
mmx2
)
CAVS_MC
(
avg_
,
8
,
mmx2
)
CAVS_MC
(
avg_
,
8
,
mmx2
)
...
@@ -463,6 +462,16 @@ static void ff_cavsdsp_init_mmx2(CAVSDSPContext* c, AVCodecContext *avctx) {
...
@@ -463,6 +462,16 @@ static void ff_cavsdsp_init_mmx2(CAVSDSPContext* c, AVCodecContext *avctx) {
c
->
cavs_idct8_add
=
cavs_idct8_add_mmx
;
c
->
cavs_idct8_add
=
cavs_idct8_add_mmx
;
c
->
idct_perm
=
FF_TRANSPOSE_IDCT_PERM
;
c
->
idct_perm
=
FF_TRANSPOSE_IDCT_PERM
;
}
}
#endif
/* HAVE_MMXEXT_INLINE */
#if HAVE_AMD3DNOW_INLINE
QPEL_CAVS
(
put_
,
PUT_OP
,
3
dnow
)
QPEL_CAVS
(
avg_
,
AVG_3DNOW_OP
,
3
dnow
)
CAVS_MC
(
put_
,
8
,
3
dnow
)
CAVS_MC
(
put_
,
16
,
3
dnow
)
CAVS_MC
(
avg_
,
8
,
3
dnow
)
CAVS_MC
(
avg_
,
16
,
3
dnow
)
static
void
ff_cavsdsp_init_3dnow
(
CAVSDSPContext
*
c
,
AVCodecContext
*
avctx
)
{
static
void
ff_cavsdsp_init_3dnow
(
CAVSDSPContext
*
c
,
AVCodecContext
*
avctx
)
{
#define dspfunc(PFX, IDX, NUM) \
#define dspfunc(PFX, IDX, NUM) \
...
@@ -480,15 +489,16 @@ static void ff_cavsdsp_init_3dnow(CAVSDSPContext* c, AVCodecContext *avctx) {
...
@@ -480,15 +489,16 @@ static void ff_cavsdsp_init_3dnow(CAVSDSPContext* c, AVCodecContext *avctx) {
c
->
cavs_idct8_add
=
cavs_idct8_add_mmx
;
c
->
cavs_idct8_add
=
cavs_idct8_add_mmx
;
c
->
idct_perm
=
FF_TRANSPOSE_IDCT_PERM
;
c
->
idct_perm
=
FF_TRANSPOSE_IDCT_PERM
;
}
}
#endif
/* HAVE_AMD3DNOW_INLINE */
#endif
/* HAVE_INLINE_ASM */
av_cold
void
ff_cavsdsp_init_x86
(
CAVSDSPContext
*
c
,
AVCodecContext
*
avctx
)
void
ff_cavsdsp_init_mmx
(
CAVSDSPContext
*
c
,
AVCodecContext
*
avctx
)
{
{
int
mm_flags
=
av_get_cpu_flags
();
int
mm_flags
=
av_get_cpu_flags
();
#if HAVE_
INLINE_ASM
#if HAVE_
MMXEXT_INLINE
if
(
mm_flags
&
AV_CPU_FLAG_MMXEXT
)
ff_cavsdsp_init_mmx2
(
c
,
avctx
);
if
(
mm_flags
&
AV_CPU_FLAG_MMXEXT
)
ff_cavsdsp_init_mmx2
(
c
,
avctx
);
#endif
/* HAVE_MMXEXT_INLINE */
#if HAVE_AMD3DNOW_INLINE
if
(
mm_flags
&
AV_CPU_FLAG_3DNOW
)
ff_cavsdsp_init_3dnow
(
c
,
avctx
);
if
(
mm_flags
&
AV_CPU_FLAG_3DNOW
)
ff_cavsdsp_init_3dnow
(
c
,
avctx
);
#endif
/* HAVE_
INLINE_ASM
*/
#endif
/* HAVE_
AMD3DNOW_INLINE
*/
}
}
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