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
97f7f831
Commit
97f7f831
authored
Jun 23, 2017
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_spp: only assign function pointers if permutation matches expectations.
parent
565dc0e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
vf_spp.c
libavfilter/x86/vf_spp.c
+7
-1
No files found.
libavfilter/x86/vf_spp.c
View file @
97f7f831
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include "libavutil/attributes.h"
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/cpu.h"
#include "libavutil/crc.h"
#include "libavutil/mem.h"
#include "libavutil/mem.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/asm.h"
#include "libavfilter/vf_spp.h"
#include "libavfilter/vf_spp.h"
...
@@ -223,10 +224,15 @@ av_cold void ff_spp_init_x86(SPPContext *s)
...
@@ -223,10 +224,15 @@ av_cold void ff_spp_init_x86(SPPContext *s)
int
cpu_flags
=
av_get_cpu_flags
();
int
cpu_flags
=
av_get_cpu_flags
();
if
(
cpu_flags
&
AV_CPU_FLAG_MMX
)
{
if
(
cpu_flags
&
AV_CPU_FLAG_MMX
)
{
static
const
uint32_t
mmx_idct_perm_crc
=
0xe5e8adc4
;
uint32_t
idct_perm_crc
=
av_crc
(
av_crc_get_table
(
AV_CRC_32_IEEE
),
0
,
s
->
dct
->
idct_permutation
,
sizeof
(
s
->
dct
->
idct_permutation
));
int64_t
bps
;
int64_t
bps
;
s
->
store_slice
=
store_slice_mmx
;
s
->
store_slice
=
store_slice_mmx
;
av_opt_get_int
(
s
->
dct
,
"bits_per_sample"
,
0
,
&
bps
);
av_opt_get_int
(
s
->
dct
,
"bits_per_sample"
,
0
,
&
bps
);
if
(
bps
<=
8
)
{
if
(
bps
<=
8
&&
idct_perm_crc
==
mmx_idct_perm_crc
)
{
switch
(
s
->
mode
)
{
switch
(
s
->
mode
)
{
case
0
:
s
->
requantize
=
hardthresh_mmx
;
break
;
case
0
:
s
->
requantize
=
hardthresh_mmx
;
break
;
case
1
:
s
->
requantize
=
softthresh_mmx
;
break
;
case
1
:
s
->
requantize
=
softthresh_mmx
;
break
;
...
...
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