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
46375e9a
Commit
46375e9a
authored
Apr 12, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/diracdec: use av_malloc(z)_array
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f683895d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
diracdec.c
libavcodec/diracdec.c
+8
-8
No files found.
libavcodec/diracdec.c
View file @
46375e9a
...
...
@@ -336,8 +336,8 @@ static int alloc_sequence_buffers(DiracContext *s)
w
=
FFALIGN
(
CALC_PADDING
(
w
,
MAX_DWT_LEVELS
),
8
);
/* FIXME: Should this be 16 for SSE??? */
h
=
top_padding
+
CALC_PADDING
(
h
,
MAX_DWT_LEVELS
)
+
max_yblen
/
2
;
s
->
plane
[
i
].
idwt_buf_base
=
av_mallocz
((
w
+
max_xblen
)
*
h
*
sizeof
(
IDWTELEM
));
s
->
plane
[
i
].
idwt_tmp
=
av_malloc
((
w
+
16
)
*
sizeof
(
IDWTELEM
));
s
->
plane
[
i
].
idwt_buf_base
=
av_mallocz
_array
((
w
+
max_xblen
),
h
*
sizeof
(
IDWTELEM
));
s
->
plane
[
i
].
idwt_tmp
=
av_malloc
_array
((
w
+
16
),
sizeof
(
IDWTELEM
));
s
->
plane
[
i
].
idwt_buf
=
s
->
plane
[
i
].
idwt_buf_base
+
top_padding
*
w
;
if
(
!
s
->
plane
[
i
].
idwt_buf_base
||
!
s
->
plane
[
i
].
idwt_tmp
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -347,12 +347,12 @@ static int alloc_sequence_buffers(DiracContext *s)
h
=
s
->
source
.
height
;
/* fixme: allocate using real stride here */
s
->
sbsplit
=
av_malloc
(
sbwidth
*
sbheight
);
s
->
blmotion
=
av_malloc
(
sbwidth
*
sbheight
*
16
*
sizeof
(
*
s
->
blmotion
));
s
->
edge_emu_buffer_base
=
av_malloc
((
w
+
64
)
*
MAX_BLOCKSIZE
);
s
->
sbsplit
=
av_malloc
_array
(
sbwidth
,
sbheight
);
s
->
blmotion
=
av_malloc
_array
(
sbwidth
,
sbheight
*
16
*
sizeof
(
*
s
->
blmotion
));
s
->
edge_emu_buffer_base
=
av_malloc
_array
((
w
+
64
),
MAX_BLOCKSIZE
);
s
->
mctmp
=
av_malloc
((
w
+
64
+
MAX_BLOCKSIZE
)
*
(
h
+
MAX_BLOCKSIZE
)
*
sizeof
(
*
s
->
mctmp
));
s
->
mcscratch
=
av_malloc
((
w
+
64
)
*
MAX_BLOCKSIZE
);
s
->
mctmp
=
av_malloc
_array
((
w
+
64
+
MAX_BLOCKSIZE
),
(
h
+
MAX_BLOCKSIZE
)
*
sizeof
(
*
s
->
mctmp
));
s
->
mcscratch
=
av_malloc
_array
((
w
+
64
),
MAX_BLOCKSIZE
);
if
(
!
s
->
sbsplit
||
!
s
->
blmotion
||
!
s
->
mctmp
||
!
s
->
mcscratch
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -754,7 +754,7 @@ static void decode_lowdelay(DiracContext *s)
struct
lowdelay_slice
*
slices
;
int
slice_num
=
0
;
slices
=
av_mallocz
(
s
->
lowdelay
.
num_x
*
s
->
lowdelay
.
num_y
*
sizeof
(
struct
lowdelay_slice
));
slices
=
av_mallocz
_array
(
s
->
lowdelay
.
num_x
,
s
->
lowdelay
.
num_y
*
sizeof
(
struct
lowdelay_slice
));
align_get_bits
(
&
s
->
gb
);
/*[DIRAC_STD] 13.5.2 Slices. slice(sx,sy) */
...
...
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