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
d01dbeb8
Commit
d01dbeb8
authored
Apr 30, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify
Originally committed as revision 3097 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
1545acea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
utils.c
libavcodec/utils.c
+5
-11
No files found.
libavcodec/utils.c
View file @
d01dbeb8
...
...
@@ -776,15 +776,11 @@ int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max)
assert
(
den
!=
0
);
if
(
den
<
0
){
den
=
-
den
;
nom
=
-
nom
;
}
if
(
den
<
0
)
return
av_reduce
(
dst_nom
,
dst_den
,
-
nom
,
-
den
,
max
);
if
(
nom
<
0
){
nom
=
-
nom
;
sign
=
1
;
}
sign
=
nom
<
0
;
nom
=
ABS
(
nom
);
gcd
=
ff_gcd
(
nom
,
den
);
nom
/=
gcd
;
...
...
@@ -814,9 +810,7 @@ int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max)
assert
(
ff_gcd
(
nom
,
den
)
==
1
);
if
(
sign
)
nom
=
-
nom
;
*
dst_nom
=
nom
;
*
dst_nom
=
sign
?
-
nom
:
nom
;
*
dst_den
=
den
;
return
exact
;
...
...
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