Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
6f51674c
Commit
6f51674c
authored
May 30, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
postproc: Avoid floats in maxClipped computation
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ebe919cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
postprocess.c
libpostproc/postprocess.c
+1
-1
postprocess_internal.h
libpostproc/postprocess_internal.h
+1
-1
postprocess_template.c
libpostproc/postprocess_template.c
+1
-1
No files found.
libpostproc/postprocess.c
View file @
6f51674c
...
...
@@ -681,7 +681,7 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
ppMode
->
minAllowedY
=
16
;
ppMode
->
baseDcDiff
=
256
/
8
;
ppMode
->
flatnessThreshold
=
56
-
16
-
1
;
ppMode
->
maxClippedThreshold
=
0
.
01
;
ppMode
->
maxClippedThreshold
=
(
AVRational
){
1
,
100
}
;
ppMode
->
error
=
0
;
memset
(
temp
,
0
,
GET_MODE_BUFFER_SIZE
);
...
...
libpostproc/postprocess_internal.h
View file @
6f51674c
...
...
@@ -99,7 +99,7 @@ typedef struct PPMode{
int
minAllowedY
;
///< for brightness correction
int
maxAllowedY
;
///< for brightness correction
float
maxClippedThreshold
;
///< amount of "black" you are willing to lose to get a brightness-corrected picture
AVRational
maxClippedThreshold
;
///< amount of "black" you are willing to lose to get a brightness-corrected picture
int
maxTmpNoise
[
3
];
///< for Temporal Noise Reducing filter (Maximal sum of abs differences)
...
...
libpostproc/postprocess_template.c
View file @
6f51674c
...
...
@@ -3383,7 +3383,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
}
/* We always get a completely black picture first. */
maxClipped
=
(
uint64_t
)(
sum
*
c
.
ppMode
.
maxClippedThreshold
);
maxClipped
=
av_rescale
(
sum
,
c
.
ppMode
.
maxClippedThreshold
.
num
,
c
.
ppMode
.
maxClippedThreshold
.
den
);
clipped
=
sum
;
for
(
black
=
255
;
black
>
0
;
black
--
){
...
...
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