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
0686515c
Commit
0686515c
authored
Jul 15, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flashsvenc: improve some variable names and fix corresponding comments
parent
59ef6bde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
flashsvenc.c
libavcodec/flashsvenc.c
+9
-7
No files found.
libavcodec/flashsvenc.c
View file @
0686515c
...
...
@@ -156,25 +156,27 @@ static int encode_bitstream(FlashSVContext *s, AVFrame *p, uint8_t *buf,
/* loop over all block columns */
for
(
j
=
0
;
j
<
v_blocks
+
(
v_part
?
1
:
0
);
j
++
)
{
int
hp
=
j
*
block_height
;
// horizont
al position in frame
int
hs
=
(
j
<
v_blocks
)
?
block_height
:
v_part
;
// size of block
int
y_pos
=
j
*
block_height
;
// vertic
al position in frame
int
cur_blk_height
=
(
j
<
v_blocks
)
?
block_height
:
v_part
;
/* loop over all block rows */
for
(
i
=
0
;
i
<
h_blocks
+
(
h_part
?
1
:
0
);
i
++
)
{
int
wp
=
i
*
block_width
;
// vertic
al position in frame
int
ws
=
(
i
<
h_blocks
)
?
block_width
:
h_part
;
// size of block
int
x_pos
=
i
*
block_width
;
// horizont
al position in frame
int
cur_blk_width
=
(
i
<
h_blocks
)
?
block_width
:
h_part
;
int
ret
=
Z_OK
;
uint8_t
*
ptr
=
buf
+
buf_pos
;
/* copy the block to the temp buffer before compression
* (if it differs from the previous frame's block) */
res
=
copy_region_enc
(
p
->
data
[
0
],
s
->
tmpblock
,
s
->
image_height
-
(
hp
+
hs
+
1
),
wp
,
hs
,
ws
,
p
->
linesize
[
0
],
previous_frame
);
s
->
image_height
-
(
y_pos
+
cur_blk_height
+
1
),
x_pos
,
cur_blk_height
,
cur_blk_width
,
p
->
linesize
[
0
],
previous_frame
);
if
(
res
||
*
I_frame
)
{
unsigned
long
zsize
=
3
*
block_width
*
block_height
;
ret
=
compress2
(
ptr
+
2
,
&
zsize
,
s
->
tmpblock
,
3
*
ws
*
hs
,
9
);
ret
=
compress2
(
ptr
+
2
,
&
zsize
,
s
->
tmpblock
,
3
*
cur_blk_width
*
cur_blk_height
,
9
);
//ret = deflateReset(&s->zstream);
if
(
ret
!=
Z_OK
)
...
...
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