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
cc7fac99
Commit
cc7fac99
authored
May 22, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwt: return errors from ff_slice_buffer_init()
parent
c89e428e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
dwt.c
libavcodec/dwt.c
+4
-3
dwt.h
libavcodec/dwt.h
+3
-3
snowdec.c
libavcodec/snowdec.c
+6
-1
No files found.
libavcodec/dwt.c
View file @
cc7fac99
...
...
@@ -22,9 +22,9 @@
#include "dsputil.h"
#include "dwt.h"
void
ff_slice_buffer_init
(
slice_buffer
*
buf
,
int
line_count
,
int
max_allocated_lines
,
int
line_width
,
IDWTELEM
*
base_buffer
)
int
ff_slice_buffer_init
(
slice_buffer
*
buf
,
int
line_count
,
int
max_allocated_lines
,
int
line_width
,
IDWTELEM
*
base_buffer
)
{
int
i
;
...
...
@@ -53,6 +53,7 @@ void ff_slice_buffer_init(slice_buffer *buf, int line_count,
}
buf
->
data_stack_top
=
max_allocated_lines
-
1
;
return
0
;
}
IDWTELEM
*
ff_slice_buffer_load_line
(
slice_buffer
*
buf
,
int
line
)
...
...
libavcodec/dwt.h
View file @
cc7fac99
...
...
@@ -137,9 +137,9 @@ typedef struct DWTContext {
: ff_slice_buffer_load_line((slice_buf), \
(line_num)))
void
ff_slice_buffer_init
(
slice_buffer
*
buf
,
int
line_count
,
int
max_allocated_lines
,
int
line_width
,
IDWTELEM
*
base_buffer
);
int
ff_slice_buffer_init
(
slice_buffer
*
buf
,
int
line_count
,
int
max_allocated_lines
,
int
line_width
,
IDWTELEM
*
base_buffer
);
void
ff_slice_buffer_release
(
slice_buffer
*
buf
,
int
line
);
void
ff_slice_buffer_flush
(
slice_buffer
*
buf
);
void
ff_slice_buffer_destroy
(
slice_buffer
*
buf
);
...
...
libavcodec/snowdec.c
View file @
cc7fac99
...
...
@@ -396,7 +396,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
// realloc slice buffer for the case that spatial_decomposition_count changed
ff_slice_buffer_destroy
(
&
s
->
sb
);
ff_slice_buffer_init
(
&
s
->
sb
,
s
->
plane
[
0
].
height
,
(
MB_SIZE
>>
s
->
block_max_depth
)
+
s
->
spatial_decomposition_count
*
8
+
1
,
s
->
plane
[
0
].
width
,
s
->
spatial_idwt_buffer
);
if
((
res
=
ff_slice_buffer_init
(
&
s
->
sb
,
s
->
plane
[
0
].
height
,
(
MB_SIZE
>>
s
->
block_max_depth
)
+
s
->
spatial_decomposition_count
*
8
+
1
,
s
->
plane
[
0
].
width
,
s
->
spatial_idwt_buffer
))
<
0
)
return
res
;
for
(
plane_index
=
0
;
plane_index
<
3
;
plane_index
++
){
Plane
*
p
=
&
s
->
plane
[
plane_index
];
...
...
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