#include "rational.h"Go to the source code of this file.
Enumerations | |
| enum | AVRounding { AV_ROUND_ZERO = 0, AV_ROUND_INF = 1, AV_ROUND_DOWN = 2, AV_ROUND_UP = 3, AV_ROUND_NEAR_INF = 5 } |
Functions | |
| int64_t | av_rescale (int64_t a, int64_t b, int64_t c) |
| rescale a 64bit integer with rounding to nearest. | |
| int64_t | av_rescale_rnd (int64_t a, int64_t b, int64_t c, enum AVRounding) |
| rescale a 64bit integer with specified rounding. | |
| int64_t | av_rescale_q (int64_t a, AVRational bq, AVRational cq) |
| rescale a 64bit integer by 2 rational numbers. | |
| enum AVRounding |
Definition at line 26 of file mathematics.h.
| int64_t av_rescale | ( | int64_t | a, | |
| int64_t | b, | |||
| int64_t | c | |||
| ) |
rescale a 64bit integer with rounding to nearest.
a simple a*b/c isn't possible as it can overflow
Definition at line 108 of file mathematics.c.
Referenced by asf_build_simple_index(), av_estimate_timings_from_bit_rate(), av_gen_search(), av_seek_frame(), av_update_cur_dts(), avi_read_header(), avi_read_packet(), avi_read_seek(), compute_pkt_fields(), compute_pkt_fields2(), dc1394_read_common(), dump_format(), dv_extract_video_info(), dv_offset_reset(), dv_read_header(), mov_read_packet(), mpeg_mux_write_packet(), mxf_read_seek(), nsv_parse_NSVs_header(), output_packet(), and pcm_read_seek().
| int64_t av_rescale_q | ( | int64_t | a, | |
| AVRational | bq, | |||
| AVRational | cq | |||
| ) |
rescale a 64bit integer by 2 rational numbers.
Definition at line 112 of file mathematics.c.
Referenced by av_encode(), av_find_stream_info(), av_update_stream_timings(), decode_thread(), do_audio_out(), do_subtitle_out(), do_video_out(), fill_all_stream_timings(), http_prepare_data(), main(), mov_read_seek(), mp3_parse_vbr_tags(), ogg_interleave_per_granule(), oggvorbis_encode_frame(), output_packet(), rtcp_send_sr(), rtp_write_header(), rtsp_read_seek(), write_audio_frame(), and write_video_frame().
| int64_t av_rescale_rnd | ( | int64_t | a, | |
| int64_t | b, | |||
| int64_t | c, | |||
| enum | AVRounding | |||
| ) |
rescale a 64bit integer with specified rounding.
a simple a*b/c isn't possible as it can overflow
Definition at line 56 of file mathematics.c.
Referenced by av_rescale(), av_rescale_q(), av_rescale_rnd(), ff_nut_reset_ts(), gxf_write_media_preamble(), mov_write_edts_tag(), mov_write_mvhd_tag(), mov_write_tkhd_tag(), pcm_read_seek(), rtp_write_header(), and write_packet().
1.5.6