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
36ba39d1
Commit
36ba39d1
authored
Jul 15, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flashsvenc: fix some comment typos
parent
e5902d60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
flashsvenc.c
libavcodec/flashsvenc.c
+13
-14
No files found.
libavcodec/flashsvenc.c
View file @
36ba39d1
...
...
@@ -33,25 +33,24 @@
* The picture is divided into blocks that are zlib-compressed.
*
* The decoder is fed complete frames, the frameheader contains:
*
4
bits of block width
* 12bits of frame width
*
4
bits of block height
* 12bits of frame height
*
4
bits of block width
* 12
bits of frame width
*
4
bits of block height
* 12
bits of frame height
*
* Directly after the header are the compressed blocks. The blocks
* have their compressed size represented with 16
bits in the begini
g.
* have their compressed size represented with 16
bits in the beginnin
g.
* If the size = 0 then the block is unchanged from the previous frame.
* All blocks are decompressed until the buffer is consumed.
*
* Encoding ideas
, a
basic encoder would just use a fixed block size.
* Block sizes can be multip
el
s of 16, from 16 to 256. The blocks don't
* Encoding ideas
: A
basic encoder would just use a fixed block size.
* Block sizes can be multip
le
s of 16, from 16 to 256. The blocks don't
* have to be quadratic. A brute force search with a set of different
* block sizes should give a better result than to just use a fixed size.
*/
/* TODO:
* Don't reencode the frame in brute force mode if the frame is a dupe. Speed up.
* Make the difference check faster.
*
* TODO:
* Don't reencode the frame in brute force mode if the frame is a dupe.
* Speed up. Make the difference check faster.
*/
#include <stdio.h>
...
...
@@ -156,12 +155,12 @@ 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
;
// horiz position in frame
int
hp
=
j
*
block_height
;
// horiz
ontal
position in frame
int
hs
=
(
j
<
v_blocks
)
?
block_height
:
v_part
;
// size of block
/* loop over all block rows */
for
(
i
=
0
;
i
<
h_blocks
+
(
h_part
?
1
:
0
);
i
++
)
{
int
wp
=
i
*
block_width
;
// vert position in frame
int
wp
=
i
*
block_width
;
// vert
ical
position in frame
int
ws
=
(
i
<
h_blocks
)
?
block_width
:
h_part
;
// size of block
int
ret
=
Z_OK
;
uint8_t
*
ptr
;
...
...
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