Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
e07d5bbb
Commit
e07d5bbb
authored
Jan 23, 2010
by
Kaarlo Raiha
Committed by
Rémi Denis-Courmont
Jan 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add option to disable dvd subtitle transparency to spudec
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
d2edbc8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
8 deletions
+19
-8
modules/codec/spudec/parse.c
modules/codec/spudec/parse.c
+10
-7
modules/codec/spudec/spudec.c
modules/codec/spudec/spudec.c
+7
-0
modules/codec/spudec/spudec.h
modules/codec/spudec/spudec.h
+2
-1
No files found.
modules/codec/spudec/parse.c
View file @
e07d5bbb
...
...
@@ -293,11 +293,14 @@ static int ParseControlSeq( decoder_t *p_dec, subpicture_t *p_spu,
return
VLC_EGENERIC
;
}
b_cmd_alpha
=
true
;
spu_data_cmd
.
pi_alpha
[
3
]
=
(
p_sys
->
buffer
[
i_index
+
1
]
>>
4
)
&
0x0f
;
spu_data_cmd
.
pi_alpha
[
2
]
=
(
p_sys
->
buffer
[
i_index
+
1
])
&
0x0f
;
spu_data_cmd
.
pi_alpha
[
1
]
=
(
p_sys
->
buffer
[
i_index
+
2
]
>>
4
)
&
0x0f
;
spu_data_cmd
.
pi_alpha
[
0
]
=
(
p_sys
->
buffer
[
i_index
+
2
])
&
0x0f
;
if
(
!
p_sys
->
b_disabletrans
)
{
/* If we want to use original transparency values */
b_cmd_alpha
=
true
;
spu_data_cmd
.
pi_alpha
[
3
]
=
(
p_sys
->
buffer
[
i_index
+
1
]
>>
4
)
&
0x0f
;
spu_data_cmd
.
pi_alpha
[
2
]
=
(
p_sys
->
buffer
[
i_index
+
1
])
&
0x0f
;
spu_data_cmd
.
pi_alpha
[
1
]
=
(
p_sys
->
buffer
[
i_index
+
2
]
>>
4
)
&
0x0f
;
spu_data_cmd
.
pi_alpha
[
0
]
=
(
p_sys
->
buffer
[
i_index
+
2
])
&
0x0f
;
}
i_index
+=
3
;
break
;
...
...
@@ -464,7 +467,7 @@ static int ParseRLE( decoder_t *p_dec,
bool
b_empty_top
=
true
;
unsigned
int
i_skipped_top
=
0
,
i_skipped_bottom
=
0
;
unsigned
int
i_transparent_code
=
0
;
/* Colormap statistics */
int
i_border
=
-
1
;
int
stats
[
4
];
stats
[
0
]
=
stats
[
1
]
=
stats
[
2
]
=
stats
[
3
]
=
0
;
...
...
@@ -613,7 +616,7 @@ static int ParseRLE( decoder_t *p_dec,
p_spu
->
i_width
,
i_height
,
p_spu
->
i_x
,
i_y
);
#endif
}
/* Handle color if no palette was found */
if
(
!
p_spu_data
->
b_palette
)
{
...
...
modules/codec/spudec/spudec.c
View file @
e07d5bbb
...
...
@@ -42,6 +42,10 @@ static int DecoderOpen ( vlc_object_t * );
static
int
PacketizerOpen
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
#define DVDSUBTRANS_DISABLE_TEXT N_("Disable DVD subtitle transparency")
#define DVDSUBTRANS_DISABLE_LONGTEXT N_("Removes all transparency effects " \
"used in DVD subtitles.")
vlc_module_begin
()
set_description
(
N_
(
"DVD subtitles decoder"
)
)
set_capability
(
"decoder"
,
50
)
...
...
@@ -49,6 +53,8 @@ vlc_module_begin ()
set_subcategory
(
SUBCAT_INPUT_SCODEC
)
set_callbacks
(
DecoderOpen
,
Close
)
add_bool
(
"dvdsub-transparency"
,
false
,
NULL
,
DVDSUBTRANS_DISABLE_TEXT
,
DVDSUBTRANS_DISABLE_LONGTEXT
,
true
)
add_submodule
()
set_description
(
N_
(
"DVD subtitles packetizer"
)
)
set_capability
(
"packetizer"
,
50
)
...
...
@@ -79,6 +85,7 @@ static int DecoderOpen( vlc_object_t *p_this )
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
)
);
p_sys
->
b_packetizer
=
false
;
p_sys
->
b_disabletrans
=
var_InheritBool
(
p_dec
,
"dvdsub-transparency"
);
p_sys
->
i_spu_size
=
0
;
p_sys
->
i_spu
=
0
;
p_sys
->
p_block
=
NULL
;
...
...
modules/codec/spudec/spudec.h
View file @
e07d5bbb
...
...
@@ -25,7 +25,8 @@
struct
decoder_sys_t
{
int
b_packetizer
;
bool
b_packetizer
;
bool
b_disabletrans
;
mtime_t
i_pts
;
unsigned
int
i_spu_size
;
...
...
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