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
666e29fe
Commit
666e29fe
authored
Jun 02, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/mathematics/av_add_stable: Avoid av_cmp_q() call
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
e9add0d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
mathematics.c
libavutil/mathematics.c
+3
-4
No files found.
libavutil/mathematics.c
View file @
666e29fe
...
...
@@ -198,11 +198,10 @@ int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t i
if
(
m
%
d
==
0
)
return
ts
+
m
/
d
;
if
(
av_cmp_q
(
inc_tb
,
ts_tb
)
<
0
)
{
//increase step is too small for even 1 step to be representable
if
(
m
<
d
)
return
ts
;
}
else
{
{
int64_t
old
=
av_rescale_q
(
ts
,
ts_tb
,
inc_tb
);
int64_t
old_ts
=
av_rescale_q
(
old
,
inc_tb
,
ts_tb
);
return
av_rescale_q
(
old
+
1
,
inc_tb
,
ts_tb
)
+
(
ts
-
old_ts
);
...
...
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