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
dbb9117d
Commit
dbb9117d
authored
Sep 07, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flashsv2enc: move blockbuffer realloc to reconfigure_at_keyframe()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
9b6467fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
flashsv2enc.c
libavcodec/flashsv2enc.c
+6
-8
No files found.
libavcodec/flashsv2enc.c
View file @
dbb9117d
...
...
@@ -554,16 +554,9 @@ static int encode_block(FlashSV2Context *s, Palette * palette, Block * b,
int
dist
,
int
keyframe
)
{
unsigned
buf_size
=
b
->
width
*
b
->
height
*
6
;
uint8_t
*
buf
;
uint8_t
*
buf
=
s
->
blockbuffer
;
int
res
;
av_fast_malloc
(
&
s
->
blockbuffer
,
&
s
->
blockbuffer_size
,
buf_size
);
if
(
!
s
->
blockbuffer
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Could not allocate block buffer.
\n
"
);
return
AVERROR
(
ENOMEM
);
}
buf
=
s
->
blockbuffer
;
if
(
b
->
flags
&
COLORSPACE_15_7
)
{
encode_15_7
(
palette
,
b
,
src
,
stride
,
dist
);
}
else
{
...
...
@@ -826,6 +819,11 @@ static int reconfigure_at_keyframe(FlashSV2Context * s, const uint8_t * image,
init_blocks
(
s
,
s
->
frame_blocks
,
s
->
encbuffer
,
s
->
databuffer
);
init_blocks
(
s
,
s
->
key_blocks
,
s
->
keybuffer
,
0
);
av_fast_malloc
(
&
s
->
blockbuffer
,
&
s
->
blockbuffer_size
,
block_width
*
block_height
*
6
);
if
(
!
s
->
blockbuffer
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Could not allocate block buffer.
\n
"
);
return
AVERROR
(
ENOMEM
);
}
}
s
->
use15_7
=
optimum_use15_7
(
s
);
...
...
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