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
7fa1f02c
Commit
7fa1f02c
authored
Oct 15, 2011
by
JULIAN GARDNER
Committed by
Michael Niedermayer
Oct 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvbsub: Move setting of *dvb_encode_rle() up
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
d5f4857a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
dvbsub.c
libavcodec/dvbsub.c
+7
-11
No files found.
libavcodec/dvbsub.c
View file @
7fa1f02c
...
...
@@ -321,14 +321,17 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s,
if
(
!
s
->
hide_state
)
{
for
(
object_id
=
0
;
object_id
<
h
->
num_rects
;
object_id
++
)
{
/* Object Data segment */
void
(
*
dvb_encode_rle
)(
uint8_t
**
pq
,
const
uint8_t
*
bitmap
,
int
linesize
,
int
w
,
int
h
);
/* bpp_index maths */
if
(
h
->
rects
[
object_id
]
->
nb_colors
<=
4
)
{
/* 2 bpp, some decoders do not support it correctly */
bpp_index
=
0
;
dvb_encode_rle
=
dvb_encode_rle2
;
}
else
if
(
h
->
rects
[
object_id
]
->
nb_colors
<=
16
)
{
/* 4 bpp, standard encoding */
bpp_index
=
1
;
dvb_encode_rle
=
dvb_encode_rle4
;
}
else
{
return
-
1
;
}
...
...
@@ -345,19 +348,12 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s,
non_modifying_color_flag */
{
uint8_t
*
ptop_field_len
,
*
pbottom_field_len
,
*
top_ptr
,
*
bottom_ptr
;
void
(
*
dvb_encode_rle
)(
uint8_t
**
pq
,
const
uint8_t
*
bitmap
,
int
linesize
,
int
w
,
int
h
);
ptop_field_len
=
q
;
q
+=
2
;
pbottom_field_len
=
q
;
q
+=
2
;
if
(
bpp_index
==
0
)
dvb_encode_rle
=
dvb_encode_rle2
;
else
dvb_encode_rle
=
dvb_encode_rle4
;
top_ptr
=
q
;
dvb_encode_rle
(
&
q
,
h
->
rects
[
object_id
]
->
pict
.
data
[
0
],
h
->
rects
[
object_id
]
->
w
*
2
,
h
->
rects
[
object_id
]
->
w
,
h
->
rects
[
object_id
]
->
h
>>
1
);
...
...
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