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
978ae13f
Commit
978ae13f
authored
Dec 06, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/mjpegenc: move end padding/alignment to ff_mjpeg_escape_FF()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
9fcd58ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
mjpegenc.c
libavcodec/mjpegenc.c
+9
-5
No files found.
libavcodec/mjpegenc.c
View file @
978ae13f
...
...
@@ -326,10 +326,17 @@ end:
void
ff_mjpeg_escape_FF
(
PutBitContext
*
pb
,
int
start
)
{
int
size
=
put_bits_count
(
pb
)
-
start
*
8
;
int
size
;
int
i
,
ff_count
;
uint8_t
*
buf
=
pb
->
buf
+
start
;
int
align
=
(
-
(
size_t
)(
buf
))
&
3
;
int
pad
=
(
-
put_bits_count
(
pb
))
&
7
;
if
(
pad
)
put_bits
(
pb
,
pad
,
(
1
<<
pad
)
-
1
);
flush_put_bits
(
pb
);
size
=
put_bits_count
(
pb
)
-
start
*
8
;
av_assert1
((
size
&
7
)
==
0
);
size
>>=
3
;
...
...
@@ -381,11 +388,8 @@ void ff_mjpeg_encode_stuffing(MpegEncContext *s)
int
length
,
i
;
PutBitContext
*
pbc
=
&
s
->
pb
;
int
mb_y
=
s
->
mb_y
-
!
s
->
mb_x
;
length
=
(
-
put_bits_count
(
pbc
))
&
7
;
if
(
length
)
put_bits
(
pbc
,
length
,
(
1
<<
length
)
-
1
);
flush_put_bits
(
&
s
->
pb
);
ff_mjpeg_escape_FF
(
&
s
->
pb
,
s
->
esc_pos
);
ff_mjpeg_escape_FF
(
pbc
,
s
->
esc_pos
);
if
((
s
->
avctx
->
active_thread_type
&
FF_THREAD_SLICE
)
&&
mb_y
<
s
->
mb_height
)
put_marker
(
pbc
,
RST0
+
(
mb_y
&
7
));
...
...
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