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
33895451
Commit
33895451
authored
Jul 02, 2012
by
Ronald S. Bultje
Committed by
Martin Storsjö
Jul 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snow: remove a VLA used for edge emulation
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
fb93e61e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
snow.c
libavcodec/snow.c
+4
-0
snow.h
libavcodec/snow.h
+1
-0
snowenc.c
libavcodec/snowenc.c
+1
-1
No files found.
libavcodec/snow.c
View file @
33895451
...
...
@@ -395,6 +395,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
SnowContext
*
s
=
avctx
->
priv_data
;
int
width
,
height
;
int
i
,
j
,
ret
;
int
emu_buf_size
;
s
->
avctx
=
avctx
;
s
->
max_ref_frames
=
1
;
//just make sure its not an invalid value in case of no initial keyframe
...
...
@@ -462,6 +463,8 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
return
ret
;
}
FF_ALLOC_OR_GOTO
(
avctx
,
s
->
scratchbuf
,
s
->
mconly_picture
.
linesize
[
0
]
*
7
*
MB_SIZE
,
fail
);
emu_buf_size
=
s
->
mconly_picture
.
linesize
[
0
]
*
(
2
*
MB_SIZE
+
HTAPS_MAX
-
1
);
FF_ALLOC_OR_GOTO
(
avctx
,
s
->
emu_edge_buffer
,
emu_buf_size
,
fail
);
return
0
;
fail
:
...
...
@@ -648,6 +651,7 @@ av_cold void ff_snow_common_end(SnowContext *s)
av_freep
(
&
s
->
block
);
av_freep
(
&
s
->
scratchbuf
);
av_freep
(
&
s
->
emu_edge_buffer
);
for
(
i
=
0
;
i
<
MAX_REF_FRAMES
;
i
++
){
av_freep
(
&
s
->
ref_mvs
[
i
]);
...
...
libavcodec/snow.h
View file @
33895451
...
...
@@ -165,6 +165,7 @@ typedef struct SnowContext{
MpegEncContext
m
;
// needed for motion estimation, should not be used for anything else, the idea is to eventually make the motion estimation independent of MpegEncContext, so this will be removed then (FIXME/XXX)
uint8_t
*
scratchbuf
;
uint8_t
*
emu_edge_buffer
;
}
SnowContext
;
/* Tables */
...
...
libavcodec/snowenc.c
View file @
33895451
...
...
@@ -675,7 +675,7 @@ static int get_block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index, uin
uint8_t
*
src
=
s
->
input_picture
.
data
[
plane_index
];
IDWTELEM
*
pred
=
(
IDWTELEM
*
)
s
->
m
.
obmc_scratchpad
+
plane_index
*
block_size
*
block_size
*
4
;
uint8_t
*
cur
=
s
->
scratchbuf
;
uint8_t
tmp
[
ref_stride
*
(
2
*
MB_SIZE
+
HTAPS_MAX
-
1
)]
;
uint8_t
*
tmp
=
s
->
emu_edge_buffer
;
const
int
b_stride
=
s
->
b_width
<<
s
->
block_max_depth
;
const
int
b_height
=
s
->
b_height
<<
s
->
block_max_depth
;
const
int
w
=
p
->
width
;
...
...
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