Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
52831460
Commit
52831460
authored
Jul 10, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We only have to reduce unsigned fractions in VLC
(someone show me a screen with a negative pixel resolution)
parent
856bb692
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
20 deletions
+6
-20
include/vlc_common.h
include/vlc_common.h
+1
-1
include/vlc_symbols.h
include/vlc_symbols.h
+1
-1
src/extras/libc.c
src/extras/libc.c
+4
-18
No files found.
include/vlc_common.h
View file @
52831460
...
...
@@ -998,7 +998,7 @@ typedef __int64 off_t;
# include <tchar.h>
#endif
VLC_EXPORT
(
vlc_bool_t
,
vlc_reduce
,
(
int
*
,
int
*
,
int64_t
,
int64_t
,
int64_t
)
);
VLC_EXPORT
(
vlc_bool_t
,
vlc_reduce
,
(
unsigned
*
,
unsigned
*
,
uint64_t
,
uint64_t
,
u
int64_t
)
);
VLC_EXPORT
(
char
**
,
vlc_parse_cmdline
,
(
const
char
*
,
int
*
)
);
/* vlc_wraptext (defined in src/extras/libc.c) */
...
...
include/vlc_symbols.h
View file @
52831460
...
...
@@ -181,7 +181,7 @@ struct module_symbols_t
void
*
(
*
vlc_opendir_inner
)
(
const
char
*
);
void
*
(
*
vlc_readdir_inner
)
(
void
*
);
int
(
*
vlc_closedir_inner
)
(
void
*
);
vlc_bool_t
(
*
vlc_reduce_inner
)
(
int
*
,
int
*
,
int64_t
,
int64_t
,
int64_t
);
vlc_bool_t
(
*
vlc_reduce_inner
)
(
unsigned
*
,
unsigned
*
,
uint64_t
,
uint64_t
,
u
int64_t
);
char
**
(
*
vlc_parse_cmdline_inner
)
(
const
char
*
,
int
*
);
char
*
(
*
vlc_wraptext_inner
)
(
const
char
*
,
int
,
vlc_bool_t
);
vlc_iconv_t
(
*
vlc_iconv_open_inner
)
(
const
char
*
,
const
char
*
);
...
...
src/extras/libc.c
View file @
52831460
...
...
@@ -463,11 +463,11 @@ int vlc_iconv_close( vlc_iconv_t cd )
* reduce a fraction
* (adapted from libavcodec, author Michael Niedermayer <michaelni@gmx.at>)
*****************************************************************************/
vlc_bool_t
vlc_reduce
(
int
*
pi_dst_nom
,
int
*
pi_dst_den
,
int64_t
i_nom
,
int64_t
i_den
,
int64_t
i_max
)
vlc_bool_t
vlc_reduce
(
unsigned
*
pi_dst_nom
,
unsigned
*
pi_dst_den
,
uint64_t
i_nom
,
uint64_t
i_den
,
u
int64_t
i_max
)
{
vlc_bool_t
b_exact
=
1
,
b_sign
=
0
;
int64_t
i
_gcd
;
vlc_bool_t
b_exact
=
1
;
uint64_t
u
_gcd
;
if
(
i_den
==
0
)
{
...
...
@@ -476,18 +476,6 @@ vlc_bool_t vlc_reduce( int *pi_dst_nom, int *pi_dst_den,
return
1
;
}
if
(
i_den
<
0
)
{
i_den
=
-
i_den
;
i_nom
=
-
i_nom
;
}
if
(
i_nom
<
0
)
{
i_nom
=
-
i_nom
;
b_sign
=
1
;
}
i_gcd
=
GCD
(
i_nom
,
i_den
);
i_nom
/=
i_gcd
;
i_den
/=
i_gcd
;
...
...
@@ -518,8 +506,6 @@ vlc_bool_t vlc_reduce( int *pi_dst_nom, int *pi_dst_den,
i_den
=
i_a1_den
;
}
if
(
b_sign
)
i_nom
=
-
i_nom
;
*
pi_dst_nom
=
i_nom
;
*
pi_dst_den
=
i_den
;
...
...
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