Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
bf63eb4b
Commit
bf63eb4b
authored
21 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
av_d2q() documentation
Originally committed as revision 2522 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
11498da3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/rational.c
+4
-0
4 additions, 0 deletions
libavcodec/rational.c
with
4 additions
and
0 deletions
libavcodec/rational.c
+
4
−
0
View file @
bf63eb4b
...
...
@@ -51,6 +51,10 @@ AVRational av_sub_q(AVRational b, AVRational c){
return
b
;
}
/**
* Converts a double precission floating point number to a AVRational.
* @param max the maximum allowed numerator and denominator
*/
AVRational
av_d2q
(
double
d
,
int
max
){
AVRational
a
;
int
exponent
=
FFMAX
(
(
int
)(
log
(
ABS
(
d
)
+
1e-20
)
/
log
(
2
)),
0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment