Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
b7979366
Commit
b7979366
authored
Oct 13, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codecs: theora: add decoder post processing level (fix #1303)
parent
4dde2b7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
modules/codec/theora.c
modules/codec/theora.c
+20
-0
No files found.
modules/codec/theora.c
View file @
b7979366
...
@@ -105,6 +105,8 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict );
...
@@ -105,6 +105,8 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict );
"Enforce a quality between 1 (low) and 10 (high), instead " \
"Enforce a quality between 1 (low) and 10 (high), instead " \
"of specifying a particular bitrate. This will produce a VBR stream." )
"of specifying a particular bitrate. This will produce a VBR stream." )
#define ENC_POSTPROCESS_TEXT N_("Post processing quality")
vlc_module_begin
()
vlc_module_begin
()
set_category
(
CAT_INPUT
)
set_category
(
CAT_INPUT
)
set_subcategory
(
SUBCAT_INPUT_VCODEC
)
set_subcategory
(
SUBCAT_INPUT_VCODEC
)
...
@@ -113,6 +115,8 @@ vlc_module_begin ()
...
@@ -113,6 +115,8 @@ vlc_module_begin ()
set_capability
(
"decoder"
,
100
)
set_capability
(
"decoder"
,
100
)
set_callbacks
(
OpenDecoder
,
CloseDecoder
)
set_callbacks
(
OpenDecoder
,
CloseDecoder
)
add_shortcut
(
"theora"
)
add_shortcut
(
"theora"
)
# define DEC_CFG_PREFIX "theora-"
add_integer
(
DEC_CFG_PREFIX
"postproc"
,
-
1
,
ENC_POSTPROCESS_TEXT
,
NULL
,
true
)
add_submodule
()
add_submodule
()
set_description
(
N_
(
"Theora video packetizer"
)
)
set_description
(
N_
(
"Theora video packetizer"
)
)
...
@@ -236,6 +240,7 @@ static int ProcessHeaders( decoder_t *p_dec )
...
@@ -236,6 +240,7 @@ static int ProcessHeaders( decoder_t *p_dec )
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
ogg_packet
oggpacket
;
ogg_packet
oggpacket
;
th_setup_info
*
ts
=
NULL
;
/* theora setup information */
th_setup_info
*
ts
=
NULL
;
/* theora setup information */
int
i_max_pp
,
i_pp
;
unsigned
pi_size
[
XIPH_MAX_HEADER_COUNT
];
unsigned
pi_size
[
XIPH_MAX_HEADER_COUNT
];
void
*
pp_data
[
XIPH_MAX_HEADER_COUNT
];
void
*
pp_data
[
XIPH_MAX_HEADER_COUNT
];
...
@@ -374,6 +379,21 @@ static int ProcessHeaders( decoder_t *p_dec )
...
@@ -374,6 +379,21 @@ static int ProcessHeaders( decoder_t *p_dec )
msg_Err
(
p_dec
,
"Could not allocate Theora decoder"
);
msg_Err
(
p_dec
,
"Could not allocate Theora decoder"
);
goto
error
;
goto
error
;
}
}
i_pp
=
var_InheritInteger
(
p_dec
,
DEC_CFG_PREFIX
"postproc"
);
if
(
i_pp
>=
0
&&
!
th_decode_ctl
(
p_sys
->
tcx
,
TH_DECCTL_GET_PPLEVEL_MAX
,
&
i_max_pp
,
sizeof
(
int
)
)
)
{
i_pp
=
__MIN
(
i_pp
,
i_max_pp
);
if
(
th_decode_ctl
(
p_sys
->
tcx
,
TH_DECCTL_SET_PPLEVEL
,
&
i_pp
,
sizeof
(
int
)
)
)
msg_Err
(
p_dec
,
"Failed to set post processing level to %d"
,
i_pp
);
else
msg_Dbg
(
p_dec
,
"Set post processing level to %d / %d"
,
i_pp
,
i_max_pp
);
}
}
}
else
else
{
{
...
...
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