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
e3fac208
Commit
e3fac208
authored
Jul 26, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_spp: use AVDCT
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
932ff709
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
vf_spp.c
libavfilter/vf_spp.c
+7
-6
vf_spp.h
libavfilter/vf_spp.h
+2
-4
No files found.
libavfilter/vf_spp.c
View file @
e3fac208
...
...
@@ -232,9 +232,9 @@ static void filter(SPPContext *p, uint8_t *dst, uint8_t *src,
const
int
y1
=
y
+
offset
[
i
+
count
-
1
][
1
];
const
int
index
=
x1
+
y1
*
linesize
;
p
->
pdsp
.
get_pixels
(
block
,
p
->
src
+
index
,
linesize
);
p
->
fdsp
.
fdct
(
block
);
p
->
requantize
(
block2
,
block
,
qp
,
p
->
idsp
.
idct_permutation
);
p
->
idsp
.
idct
(
block2
);
p
->
dct
->
fdct
(
block
);
p
->
requantize
(
block2
,
block
,
qp
,
p
->
dct
->
idct_permutation
);
p
->
dct
->
idct
(
block2
);
add_block
(
p
->
temp
+
index
,
linesize
,
block2
);
}
}
...
...
@@ -377,11 +377,11 @@ static av_cold int init(AVFilterContext *ctx)
SPPContext
*
spp
=
ctx
->
priv
;
spp
->
avctx
=
avcodec_alloc_context3
(
NULL
);
if
(
!
spp
->
avctx
)
spp
->
dct
=
avcodec_dct_alloc
();
if
(
!
spp
->
avctx
||
!
spp
->
dct
)
return
AVERROR
(
ENOMEM
);
ff_idctdsp_init
(
&
spp
->
idsp
,
spp
->
avctx
);
ff_fdctdsp_init
(
&
spp
->
fdsp
,
spp
->
avctx
);
ff_pixblockdsp_init
(
&
spp
->
pdsp
,
spp
->
avctx
);
avcodec_dct_init
(
spp
->
dct
);
spp
->
store_slice
=
store_slice_c
;
switch
(
spp
->
mode
)
{
case
MODE_HARD
:
spp
->
requantize
=
hardthresh_c
;
break
;
...
...
@@ -402,6 +402,7 @@ static av_cold void uninit(AVFilterContext *ctx)
avcodec_close
(
spp
->
avctx
);
av_freep
(
&
spp
->
avctx
);
}
av_freep
(
&
spp
->
dct
);
av_freep
(
&
spp
->
non_b_qp_table
);
}
...
...
libavfilter/vf_spp.h
View file @
e3fac208
...
...
@@ -24,8 +24,7 @@
#include "libavcodec/avcodec.h"
#include "libavcodec/pixblockdsp.h"
#include "libavcodec/idctdsp.h"
#include "libavcodec/fdctdsp.h"
#include "libavcodec/avdct.h"
#include "avfilter.h"
#define MAX_LEVEL 6
/* quality levels */
...
...
@@ -41,9 +40,8 @@ typedef struct {
uint8_t
*
src
;
int16_t
*
temp
;
AVCodecContext
*
avctx
;
IDCTDSPContext
idsp
;
FDCTDSPContext
fdsp
;
PixblockDSPContext
pdsp
;
AVDCT
*
dct
;
int8_t
*
non_b_qp_table
;
int
non_b_qp_alloc_size
;
int
use_bframe_qp
;
...
...
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