diff options
author | Tobias Rapp <t.rapp@noa-archive.com> | 2017-03-06 08:53:28 +0100 |
---|---|---|
committer | Tobias Rapp <t.rapp@noa-archive.com> | 2017-03-17 11:55:16 +0100 |
commit | 205b8fd078e50aa3f7f401646dbb73de1bb35a10 (patch) | |
tree | abbe5fa686d8d01a1c3bde998e712e5c26f6a561 /libavcodec/internal.h | |
parent | 8db301deadfcf113fb274881e65afcbe3e1bd645 (diff) |
avcodec: estimate output bitrate for uncompressed video codecs
Allows to get a more realistic total bitrate (and estimated file size)
in avi_write_header. Previously a static default value of 200k was
assumed.
Adds an internal helper function for bitrate guessing.
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r-- | libavcodec/internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 6e93eeb1a9..e5f132a673 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -363,4 +363,10 @@ int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, i int ff_alloc_a53_sei(const AVFrame *frame, size_t prefix_len, void **data, size_t *sei_size); +/** + * Get an estimated video bitrate based on frame size, frame rate and coded + * bits per pixel. + */ +int64_t ff_guess_coded_bitrate(AVCodecContext *avctx); + #endif /* AVCODEC_INTERNAL_H */ |