Changeset 4ee9175bcfbfa255152c367ba6a8cdad74b9cbe1
- Timestamp:
- 13/07/05 19:51:13
(3 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1121277073 +0000
- git-parent:
[21d7f14bbe121b27de988a11ca8d8664d1fb27c5]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1121277073 +0000
- Message:
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
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| re6a2e27 |
r4ee9175 |
|
| 1014 | 1014 | #endif |
|---|
| 1015 | 1015 | |
|---|
| 1016 | | VLC_EXPORT( vlc_bool_t, vlc_reduce, ( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ) ); |
|---|
| | 1016 | VLC_EXPORT( vlc_bool_t, vlc_ureduce, ( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ) ); |
|---|
| 1017 | 1017 | VLC_EXPORT( char **, vlc_parse_cmdline, ( const char *, int * ) ); |
|---|
| 1018 | 1018 | |
|---|
| re6a2e27 |
r4ee9175 |
|
| 182 | 182 | void * (*vlc_readdir_inner) (void *); |
|---|
| 183 | 183 | int (*vlc_closedir_inner) (void *); |
|---|
| 184 | | vlc_bool_t (*vlc_reduce_inner) (unsigned *, unsigned *, uint64_t, uint64_t, uint64_t); |
|---|
| | 184 | vlc_bool_t (*vlc_ureduce_inner) (unsigned *, unsigned *, uint64_t, uint64_t, uint64_t); |
|---|
| 185 | 185 | char ** (*vlc_parse_cmdline_inner) (const char *, int *); |
|---|
| 186 | 186 | char * (*vlc_wraptext_inner) (const char *, int, vlc_bool_t); |
|---|
| … | … | |
| 549 | 549 | # define vlc_readdir (p_symbols)->vlc_readdir_inner |
|---|
| 550 | 550 | # define vlc_closedir (p_symbols)->vlc_closedir_inner |
|---|
| 551 | | # define vlc_reduce (p_symbols)->vlc_reduce_inner |
|---|
| | 551 | # define vlc_ureduce (p_symbols)->vlc_ureduce_inner |
|---|
| 552 | 552 | # define vlc_parse_cmdline (p_symbols)->vlc_parse_cmdline_inner |
|---|
| 553 | 553 | # define vlc_wraptext (p_symbols)->vlc_wraptext_inner |
|---|
| … | … | |
| 919 | 919 | ((p_symbols)->vlc_readdir_inner) = vlc_readdir; \ |
|---|
| 920 | 920 | ((p_symbols)->vlc_closedir_inner) = vlc_closedir; \ |
|---|
| 921 | | ((p_symbols)->vlc_reduce_inner) = vlc_reduce; \ |
|---|
| | 921 | ((p_symbols)->vlc_ureduce_inner) = vlc_ureduce; \ |
|---|
| 922 | 922 | ((p_symbols)->vlc_parse_cmdline_inner) = vlc_parse_cmdline; \ |
|---|
| 923 | 923 | ((p_symbols)->vlc_wraptext_inner) = vlc_wraptext; \ |
|---|
| rfe087a3 |
r4ee9175 |
|
| 666 | 666 | if( p_enc->fmt_in.video.i_aspect ) |
|---|
| 667 | 667 | { |
|---|
| 668 | | int64_t i_num, i_den; |
|---|
| 669 | | int i_dst_num, i_dst_den; |
|---|
| | 668 | uint64_t i_num, i_den; |
|---|
| | 669 | unsigned i_dst_num, i_dst_den; |
|---|
| 670 | 670 | |
|---|
| 671 | 671 | i_num = p_enc->fmt_in.video.i_aspect * (int64_t)p_sys->ti.height; |
|---|
| 672 | 672 | i_den = VOUT_ASPECT_FACTOR * p_sys->ti.width; |
|---|
| 673 | | vlc_reduce( &i_dst_num, &i_dst_den, i_num, i_den, 0 ); |
|---|
| | 673 | vlc_ureduce( &i_dst_num, &i_dst_den, i_num, i_den, 0 ); |
|---|
| 674 | 674 | p_sys->ti.aspect_numerator = i_dst_num; |
|---|
| 675 | 675 | p_sys->ti.aspect_denominator = i_dst_den; |
|---|
| rfe087a3 |
r4ee9175 |
|
| 387 | 387 | (int64_t)p_enc->fmt_in.video.i_height; |
|---|
| 388 | 388 | i_den = VOUT_ASPECT_FACTOR * p_enc->fmt_in.video.i_width; |
|---|
| 389 | | vlc_reduce( &i_dst_num, &i_dst_den, i_num, i_den, 0 ); |
|---|
| | 389 | vlc_ureduce( &i_dst_num, &i_dst_den, i_num, i_den, 0 ); |
|---|
| 390 | 390 | |
|---|
| 391 | 391 | p_sys->param.vui.i_sar_width = i_dst_num; |
|---|
| r3df44d6 |
r4ee9175 |
|
| 464 | 464 | * (adapted from libavcodec, author Michael Niedermayer <michaelni@gmx.at>) |
|---|
| 465 | 465 | *****************************************************************************/ |
|---|
| 466 | | vlc_bool_t vlc_reduce( unsigned *pi_dst_nom, unsigned *pi_dst_den, |
|---|
| 467 | | uint64_t i_nom, uint64_t i_den, uint64_t i_max ) |
|---|
| | 466 | vlc_bool_t vlc_ureduce( unsigned *pi_dst_nom, unsigned *pi_dst_den, |
|---|
| | 467 | uint64_t i_nom, uint64_t i_den, uint64_t i_max ) |
|---|
| 468 | 468 | { |
|---|
| 469 | 469 | vlc_bool_t b_exact = 1; |
|---|