Commit 4ee9175b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Rename vlc_reduce to vlc_ureduce so that we won't get into troubles if

we ever need to reborn vlc_reduce for some unanticipated reason
parent 21d7f14b
...@@ -1013,7 +1013,7 @@ typedef __int64 off_t; ...@@ -1013,7 +1013,7 @@ typedef __int64 off_t;
# include <tchar.h> # include <tchar.h>
#endif #endif
VLC_EXPORT( vlc_bool_t, vlc_reduce, ( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ) ); VLC_EXPORT( vlc_bool_t, vlc_ureduce, ( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ) );
VLC_EXPORT( char **, vlc_parse_cmdline, ( const char *, int * ) ); VLC_EXPORT( char **, vlc_parse_cmdline, ( const char *, int * ) );
/* vlc_wraptext (defined in src/extras/libc.c) */ /* vlc_wraptext (defined in src/extras/libc.c) */
......
...@@ -181,7 +181,7 @@ struct module_symbols_t ...@@ -181,7 +181,7 @@ struct module_symbols_t
void * (*vlc_opendir_inner) (const char *); void * (*vlc_opendir_inner) (const char *);
void * (*vlc_readdir_inner) (void *); void * (*vlc_readdir_inner) (void *);
int (*vlc_closedir_inner) (void *); int (*vlc_closedir_inner) (void *);
vlc_bool_t (*vlc_reduce_inner) (unsigned *, unsigned *, uint64_t, uint64_t, uint64_t); vlc_bool_t (*vlc_ureduce_inner) (unsigned *, unsigned *, uint64_t, uint64_t, uint64_t);
char ** (*vlc_parse_cmdline_inner) (const char *, int *); char ** (*vlc_parse_cmdline_inner) (const char *, int *);
char * (*vlc_wraptext_inner) (const char *, int, vlc_bool_t); char * (*vlc_wraptext_inner) (const char *, int, vlc_bool_t);
vlc_iconv_t (*vlc_iconv_open_inner) (const char *, const char *); vlc_iconv_t (*vlc_iconv_open_inner) (const char *, const char *);
...@@ -548,7 +548,7 @@ struct module_symbols_t ...@@ -548,7 +548,7 @@ struct module_symbols_t
# define vlc_opendir (p_symbols)->vlc_opendir_inner # define vlc_opendir (p_symbols)->vlc_opendir_inner
# define vlc_readdir (p_symbols)->vlc_readdir_inner # define vlc_readdir (p_symbols)->vlc_readdir_inner
# define vlc_closedir (p_symbols)->vlc_closedir_inner # define vlc_closedir (p_symbols)->vlc_closedir_inner
# define vlc_reduce (p_symbols)->vlc_reduce_inner # define vlc_ureduce (p_symbols)->vlc_ureduce_inner
# define vlc_parse_cmdline (p_symbols)->vlc_parse_cmdline_inner # define vlc_parse_cmdline (p_symbols)->vlc_parse_cmdline_inner
# define vlc_wraptext (p_symbols)->vlc_wraptext_inner # define vlc_wraptext (p_symbols)->vlc_wraptext_inner
# define vlc_iconv_open (p_symbols)->vlc_iconv_open_inner # define vlc_iconv_open (p_symbols)->vlc_iconv_open_inner
...@@ -918,7 +918,7 @@ struct module_symbols_t ...@@ -918,7 +918,7 @@ struct module_symbols_t
((p_symbols)->vlc_opendir_inner) = vlc_opendir; \ ((p_symbols)->vlc_opendir_inner) = vlc_opendir; \
((p_symbols)->vlc_readdir_inner) = vlc_readdir; \ ((p_symbols)->vlc_readdir_inner) = vlc_readdir; \
((p_symbols)->vlc_closedir_inner) = vlc_closedir; \ ((p_symbols)->vlc_closedir_inner) = vlc_closedir; \
((p_symbols)->vlc_reduce_inner) = vlc_reduce; \ ((p_symbols)->vlc_ureduce_inner) = vlc_ureduce; \
((p_symbols)->vlc_parse_cmdline_inner) = vlc_parse_cmdline; \ ((p_symbols)->vlc_parse_cmdline_inner) = vlc_parse_cmdline; \
((p_symbols)->vlc_wraptext_inner) = vlc_wraptext; \ ((p_symbols)->vlc_wraptext_inner) = vlc_wraptext; \
((p_symbols)->vlc_iconv_open_inner) = vlc_iconv_open; \ ((p_symbols)->vlc_iconv_open_inner) = vlc_iconv_open; \
......
...@@ -665,12 +665,12 @@ static int OpenEncoder( vlc_object_t *p_this ) ...@@ -665,12 +665,12 @@ static int OpenEncoder( vlc_object_t *p_this )
if( p_enc->fmt_in.video.i_aspect ) if( p_enc->fmt_in.video.i_aspect )
{ {
int64_t i_num, i_den; uint64_t i_num, i_den;
int i_dst_num, i_dst_den; unsigned i_dst_num, i_dst_den;
i_num = p_enc->fmt_in.video.i_aspect * (int64_t)p_sys->ti.height; i_num = p_enc->fmt_in.video.i_aspect * (int64_t)p_sys->ti.height;
i_den = VOUT_ASPECT_FACTOR * p_sys->ti.width; i_den = VOUT_ASPECT_FACTOR * p_sys->ti.width;
vlc_reduce( &i_dst_num, &i_dst_den, i_num, i_den, 0 ); vlc_ureduce( &i_dst_num, &i_dst_den, i_num, i_den, 0 );
p_sys->ti.aspect_numerator = i_dst_num; p_sys->ti.aspect_numerator = i_dst_num;
p_sys->ti.aspect_denominator = i_dst_den; p_sys->ti.aspect_denominator = i_dst_den;
} }
......
...@@ -386,7 +386,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -386,7 +386,7 @@ static int Open ( vlc_object_t *p_this )
i_num = p_enc->fmt_in.video.i_aspect * i_num = p_enc->fmt_in.video.i_aspect *
(int64_t)p_enc->fmt_in.video.i_height; (int64_t)p_enc->fmt_in.video.i_height;
i_den = VOUT_ASPECT_FACTOR * p_enc->fmt_in.video.i_width; i_den = VOUT_ASPECT_FACTOR * p_enc->fmt_in.video.i_width;
vlc_reduce( &i_dst_num, &i_dst_den, i_num, i_den, 0 ); vlc_ureduce( &i_dst_num, &i_dst_den, i_num, i_den, 0 );
p_sys->param.vui.i_sar_width = i_dst_num; p_sys->param.vui.i_sar_width = i_dst_num;
p_sys->param.vui.i_sar_height = i_dst_den; p_sys->param.vui.i_sar_height = i_dst_den;
......
...@@ -463,8 +463,8 @@ int vlc_iconv_close( vlc_iconv_t cd ) ...@@ -463,8 +463,8 @@ int vlc_iconv_close( vlc_iconv_t cd )
* reduce a fraction * reduce a fraction
* (adapted from libavcodec, author Michael Niedermayer <michaelni@gmx.at>) * (adapted from libavcodec, author Michael Niedermayer <michaelni@gmx.at>)
*****************************************************************************/ *****************************************************************************/
vlc_bool_t vlc_reduce( unsigned *pi_dst_nom, unsigned *pi_dst_den, vlc_bool_t vlc_ureduce( unsigned *pi_dst_nom, unsigned *pi_dst_den,
uint64_t i_nom, uint64_t i_den, uint64_t i_max ) uint64_t i_nom, uint64_t i_den, uint64_t i_max )
{ {
vlc_bool_t b_exact = 1; vlc_bool_t b_exact = 1;
uint64_t i_gcd; uint64_t i_gcd;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment