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
0dadbbbf
Commit
0dadbbbf
authored
Apr 22, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/snow: use FF_ALLOC(Z)_ARRAY_OR_GOTO
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
47ec0b0b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
snow.c
libavcodec/snow.c
+6
-6
No files found.
libavcodec/snow.c
View file @
0dadbbbf
...
@@ -455,11 +455,11 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
...
@@ -455,11 +455,11 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
width
=
s
->
avctx
->
width
;
width
=
s
->
avctx
->
width
;
height
=
s
->
avctx
->
height
;
height
=
s
->
avctx
->
height
;
FF_ALLOCZ_
OR_GOTO
(
avctx
,
s
->
spatial_idwt_buffer
,
width
*
height
*
sizeof
(
IDWTELEM
),
fail
);
FF_ALLOCZ_
ARRAY_OR_GOTO
(
avctx
,
s
->
spatial_idwt_buffer
,
width
,
height
*
sizeof
(
IDWTELEM
),
fail
);
FF_ALLOCZ_
OR_GOTO
(
avctx
,
s
->
spatial_dwt_buffer
,
width
*
height
*
sizeof
(
DWTELEM
),
fail
);
//FIXME this does not belong here
FF_ALLOCZ_
ARRAY_OR_GOTO
(
avctx
,
s
->
spatial_dwt_buffer
,
width
,
height
*
sizeof
(
DWTELEM
),
fail
);
//FIXME this does not belong here
FF_ALLOCZ_
OR_GOTO
(
avctx
,
s
->
temp_dwt_buffer
,
width
*
sizeof
(
DWTELEM
),
fail
);
FF_ALLOCZ_
ARRAY_OR_GOTO
(
avctx
,
s
->
temp_dwt_buffer
,
width
,
sizeof
(
DWTELEM
),
fail
);
FF_ALLOCZ_
OR_GOTO
(
avctx
,
s
->
temp_idwt_buffer
,
width
*
sizeof
(
IDWTELEM
),
fail
);
FF_ALLOCZ_
ARRAY_OR_GOTO
(
avctx
,
s
->
temp_idwt_buffer
,
width
,
sizeof
(
IDWTELEM
),
fail
);
FF_ALLOC_
OR_GOTO
(
avctx
,
s
->
run_buffer
,
((
width
+
1
)
>>
1
)
*
((
height
+
1
)
>>
1
)
*
sizeof
(
*
s
->
run_buffer
),
fail
);
FF_ALLOC_
ARRAY_OR_GOTO
(
avctx
,
s
->
run_buffer
,
((
width
+
1
)
>>
1
),
((
height
+
1
)
>>
1
)
*
sizeof
(
*
s
->
run_buffer
),
fail
);
for
(
i
=
0
;
i
<
MAX_REF_FRAMES
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_REF_FRAMES
;
i
++
)
{
for
(
j
=
0
;
j
<
MAX_REF_FRAMES
;
j
++
)
for
(
j
=
0
;
j
<
MAX_REF_FRAMES
;
j
++
)
...
@@ -488,7 +488,7 @@ int ff_snow_common_init_after_header(AVCodecContext *avctx) {
...
@@ -488,7 +488,7 @@ int ff_snow_common_init_after_header(AVCodecContext *avctx) {
if
((
ret
=
ff_get_buffer
(
s
->
avctx
,
s
->
mconly_picture
,
if
((
ret
=
ff_get_buffer
(
s
->
avctx
,
s
->
mconly_picture
,
AV_GET_BUFFER_FLAG_REF
))
<
0
)
AV_GET_BUFFER_FLAG_REF
))
<
0
)
return
ret
;
return
ret
;
FF_ALLOCZ_
OR_GOTO
(
avctx
,
s
->
scratchbuf
,
FFMAX
(
s
->
mconly_picture
->
linesize
[
0
],
2
*
avctx
->
width
+
256
)
*
7
*
MB_SIZE
,
fail
);
FF_ALLOCZ_
ARRAY_OR_GOTO
(
avctx
,
s
->
scratchbuf
,
FFMAX
(
s
->
mconly_picture
->
linesize
[
0
],
2
*
avctx
->
width
+
256
),
7
*
MB_SIZE
,
fail
);
emu_buf_size
=
FFMAX
(
s
->
mconly_picture
->
linesize
[
0
],
2
*
avctx
->
width
+
256
)
*
(
2
*
MB_SIZE
+
HTAPS_MAX
-
1
);
emu_buf_size
=
FFMAX
(
s
->
mconly_picture
->
linesize
[
0
],
2
*
avctx
->
width
+
256
)
*
(
2
*
MB_SIZE
+
HTAPS_MAX
-
1
);
FF_ALLOC_OR_GOTO
(
avctx
,
s
->
emu_edge_buffer
,
emu_buf_size
,
fail
);
FF_ALLOC_OR_GOTO
(
avctx
,
s
->
emu_edge_buffer
,
emu_buf_size
,
fail
);
}
}
...
...
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