Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
600e3556
Commit
600e3556
authored
Aug 13, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: avoid double upconversion
parent
d827399d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+6
-4
No files found.
modules/codec/avcodec/encoder.c
View file @
600e3556
...
...
@@ -32,6 +32,8 @@
# include "config.h"
#endif
#include <math.h>
#include <vlc_common.h>
#include <vlc_aout.h>
#include <vlc_sout.h>
...
...
@@ -379,10 +381,10 @@ int OpenEncoder( vlc_object_t *p_this )
f_val
=
var_GetFloat
(
p_enc
,
ENC_CFG_PREFIX
"qscale"
);
p_sys
->
i_quality
=
0
;
if
(
f_val
<
0
.
01
||
f_val
>
255
.
0
)
f_val
=
0
;
if
(
f_val
<
.
01
f
||
f_val
>
255
.
f
)
f_val
=
0
.
f
;
else
p_sys
->
i_quality
=
(
int
)(
FF_QP2LAMBDA
*
f_val
+
0
.
5
);
p_sys
->
i_quality
=
lroundf
(
FF_QP2LAMBDA
*
f_val
);
psz_val
=
var_GetString
(
p_enc
,
ENC_CFG_PREFIX
"hq"
);
p_sys
->
i_hq
=
FF_MB_DECISION_RD
;
...
...
@@ -536,7 +538,7 @@ int OpenEncoder( vlc_object_t *p_this )
}
if
(
p_sys
->
f_i_quant_factor
!=
0
.
0
)
if
(
p_sys
->
f_i_quant_factor
!=
0
.
f
)
p_context
->
i_quant_factor
=
p_sys
->
f_i_quant_factor
;
p_context
->
noise_reduction
=
p_sys
->
i_noise_reduction
;
...
...
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