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
258414d0
Commit
258414d0
authored
Sep 30, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: fdct: Initialize optimized fdct implementations in the standard way
parent
0b8b2ae5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
dsputilenc_mmx.c
libavcodec/x86/dsputilenc_mmx.c
+11
-11
No files found.
libavcodec/x86/dsputilenc_mmx.c
View file @
258414d0
...
...
@@ -946,6 +946,7 @@ hadamard_func(ssse3)
av_cold
void
ff_dsputilenc_init_mmx
(
DSPContext
*
c
,
AVCodecContext
*
avctx
)
{
int
cpu_flags
=
av_get_cpu_flags
();
const
int
dct_algo
=
avctx
->
dct_algo
;
#if HAVE_YASM
int
bit_depth
=
avctx
->
bits_per_raw_sample
;
...
...
@@ -965,18 +966,9 @@ av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx)
#if HAVE_INLINE_ASM
if
(
INLINE_MMX
(
cpu_flags
))
{
const
int
dct_algo
=
avctx
->
dct_algo
;
if
(
avctx
->
bits_per_raw_sample
<=
8
&&
(
dct_algo
==
FF_DCT_AUTO
||
dct_algo
==
FF_DCT_MMX
))
{
if
(
cpu_flags
&
AV_CPU_FLAG_SSE2
)
{
c
->
fdct
=
ff_fdct_sse2
;
}
else
if
(
cpu_flags
&
AV_CPU_FLAG_MMXEXT
)
{
c
->
fdct
=
ff_fdct_mmxext
;
}
else
{
c
->
fdct
=
ff_fdct_mmx
;
}
}
(
dct_algo
==
FF_DCT_AUTO
||
dct_algo
==
FF_DCT_MMX
))
c
->
fdct
=
ff_fdct_mmx
;
c
->
diff_bytes
=
diff_bytes_mmx
;
c
->
sum_abs_dctelem
=
sum_abs_dctelem_mmx
;
...
...
@@ -1000,6 +992,10 @@ av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx)
}
if
(
INLINE_MMXEXT
(
cpu_flags
))
{
if
(
avctx
->
bits_per_raw_sample
<=
8
&&
(
dct_algo
==
FF_DCT_AUTO
||
dct_algo
==
FF_DCT_MMX
))
c
->
fdct
=
ff_fdct_mmxext
;
c
->
sum_abs_dctelem
=
sum_abs_dctelem_mmxext
;
c
->
vsad
[
4
]
=
vsad_intra16_mmxext
;
...
...
@@ -1011,6 +1007,10 @@ av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx)
}
if
(
INLINE_SSE2
(
cpu_flags
))
{
if
(
avctx
->
bits_per_raw_sample
<=
8
&&
(
dct_algo
==
FF_DCT_AUTO
||
dct_algo
==
FF_DCT_MMX
))
c
->
fdct
=
ff_fdct_sse2
;
c
->
sum_abs_dctelem
=
sum_abs_dctelem_sse2
;
}
...
...
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