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
6cdde20b
Commit
6cdde20b
authored
Feb 03, 2016
by
Timothy Gu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dirac_dwt: Don't pass information in context as arguments
parent
6c0318c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
dirac_dwt.c
libavcodec/dirac_dwt.c
+10
-3
dirac_dwt_template.c
libavcodec/dirac_dwt_template.c
+9
-16
No files found.
libavcodec/dirac_dwt.c
View file @
6cdde20b
...
@@ -39,12 +39,19 @@ int ff_spatial_idwt_init2(DWTContext *d, uint8_t *buffer, int width, int height,
...
@@ -39,12 +39,19 @@ int ff_spatial_idwt_init2(DWTContext *d, uint8_t *buffer, int width, int height,
{
{
int
ret
=
0
;
int
ret
=
0
;
d
->
buffer
=
buffer
;
d
->
width
=
width
;
d
->
height
=
height
;
d
->
stride
=
stride
;
d
->
decomposition_count
=
decomposition_count
;
d
->
temp
=
temp
;
if
(
bit_depth
==
8
)
if
(
bit_depth
==
8
)
ret
=
ff_spatial_idwt_init2_8bit
(
d
,
buffer
,
width
,
height
,
stride
,
type
,
decomposition_count
,
temp
);
ret
=
ff_spatial_idwt_init2_8bit
(
d
,
type
);
else
if
(
bit_depth
==
10
)
else
if
(
bit_depth
==
10
)
ret
=
ff_spatial_idwt_init2_10bit
(
d
,
buffer
,
width
,
height
,
stride
,
type
,
decomposition_count
,
temp
);
ret
=
ff_spatial_idwt_init2_10bit
(
d
,
type
);
else
if
(
bit_depth
==
12
)
else
if
(
bit_depth
==
12
)
ret
=
ff_spatial_idwt_init2_12bit
(
d
,
buffer
,
width
,
height
,
stride
,
type
,
decomposition_count
,
temp
);
ret
=
ff_spatial_idwt_init2_12bit
(
d
,
type
);
else
else
av_log
(
NULL
,
AV_LOG_WARNING
,
"Unsupported bit depth = %i
\n
"
,
bit_depth
);
av_log
(
NULL
,
AV_LOG_WARNING
,
"Unsupported bit depth = %i
\n
"
,
bit_depth
);
...
...
libavcodec/dirac_dwt_template.c
View file @
6cdde20b
...
@@ -516,39 +516,32 @@ static void RENAME(spatial_compose_dd137i_init)(DWTCompose *cs, uint8_t *buffer,
...
@@ -516,39 +516,32 @@ static void RENAME(spatial_compose_dd137i_init)(DWTCompose *cs, uint8_t *buffer,
cs
->
y
=
-
5
;
cs
->
y
=
-
5
;
}
}
static
int
RENAME
(
ff_spatial_idwt_init2
)(
DWTContext
*
d
,
uint8_t
*
buffer
,
int
width
,
int
height
,
static
int
RENAME
(
ff_spatial_idwt_init2
)(
DWTContext
*
d
,
enum
dwt_type
type
)
int
stride
,
enum
dwt_type
type
,
int
decomposition_count
,
uint8_t
*
temp
)
{
{
int
level
;
int
level
;
d
->
buffer
=
buffer
;
d
->
temp
=
(
uint8_t
*
)(((
TYPE
*
)
d
->
temp
)
+
8
);
d
->
width
=
width
;
d
->
height
=
height
;
d
->
stride
=
stride
;
d
->
decomposition_count
=
decomposition_count
;
d
->
temp
=
(
uint8_t
*
)(((
TYPE
*
)
temp
)
+
8
);
for
(
level
=
decomposition_count
-
1
;
level
>=
0
;
level
--
){
for
(
level
=
d
->
decomposition_count
-
1
;
level
>=
0
;
level
--
){
int
hl
=
height
>>
level
;
int
hl
=
d
->
height
>>
level
;
int
stride_l
=
stride
<<
level
;
int
stride_l
=
d
->
stride
<<
level
;
switch
(
type
){
switch
(
type
){
case
DWT_DIRAC_DD9_7
:
case
DWT_DIRAC_DD9_7
:
RENAME
(
spatial_compose_dd97i_init
)(
d
->
cs
+
level
,
buffer
,
hl
,
stride_l
);
RENAME
(
spatial_compose_dd97i_init
)(
d
->
cs
+
level
,
d
->
buffer
,
hl
,
stride_l
);
break
;
break
;
case
DWT_DIRAC_LEGALL5_3
:
case
DWT_DIRAC_LEGALL5_3
:
RENAME
(
spatial_compose53i_init2
)(
d
->
cs
+
level
,
buffer
,
hl
,
stride_l
);
RENAME
(
spatial_compose53i_init2
)(
d
->
cs
+
level
,
d
->
buffer
,
hl
,
stride_l
);
break
;
break
;
case
DWT_DIRAC_DD13_7
:
case
DWT_DIRAC_DD13_7
:
RENAME
(
spatial_compose_dd137i_init
)(
d
->
cs
+
level
,
buffer
,
hl
,
stride_l
);
RENAME
(
spatial_compose_dd137i_init
)(
d
->
cs
+
level
,
d
->
buffer
,
hl
,
stride_l
);
break
;
break
;
case
DWT_DIRAC_HAAR0
:
case
DWT_DIRAC_HAAR0
:
case
DWT_DIRAC_HAAR1
:
case
DWT_DIRAC_HAAR1
:
d
->
cs
[
level
].
y
=
1
;
d
->
cs
[
level
].
y
=
1
;
break
;
break
;
case
DWT_DIRAC_DAUB9_7
:
case
DWT_DIRAC_DAUB9_7
:
RENAME
(
spatial_compose97i_init2
)(
d
->
cs
+
level
,
buffer
,
hl
,
stride_l
);
RENAME
(
spatial_compose97i_init2
)(
d
->
cs
+
level
,
d
->
buffer
,
hl
,
stride_l
);
break
;
break
;
default:
default:
d
->
cs
[
level
].
y
=
0
;
d
->
cs
[
level
].
y
=
0
;
...
...
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