avcodec: estimate output bitrate for uncompressed video codecs
authorTobias Rapp <t.rapp@noa-archive.com>
Mon, 6 Mar 2017 07:53:28 +0000 (08:53 +0100)
committerTobias Rapp <t.rapp@noa-archive.com>
Fri, 17 Mar 2017 10:55:16 +0000 (11:55 +0100)
commit205b8fd078e50aa3f7f401646dbb73de1bb35a10
treeabbe5fa686d8d01a1c3bde998e712e5c26f6a561
parent8db301deadfcf113fb274881e65afcbe3e1bd645
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>
49 files changed:
libavcodec/internal.h
libavcodec/r210enc.c
libavcodec/rawenc.c
libavcodec/utils.c
libavcodec/v210enc.c
libavcodec/v308enc.c
libavcodec/v408enc.c
libavcodec/v410enc.c
libavcodec/y41penc.c
tests/ref/fate/v410enc
tests/ref/vsynth/vsynth1-bpp1
tests/ref/vsynth/vsynth1-bpp15
tests/ref/vsynth/vsynth1-r210
tests/ref/vsynth/vsynth1-rgb
tests/ref/vsynth/vsynth1-v210
tests/ref/vsynth/vsynth1-v210-10
tests/ref/vsynth/vsynth1-v308
tests/ref/vsynth/vsynth1-v408
tests/ref/vsynth/vsynth1-y41p
tests/ref/vsynth/vsynth1-yuv
tests/ref/vsynth/vsynth2-bpp1
tests/ref/vsynth/vsynth2-bpp15
tests/ref/vsynth/vsynth2-r210
tests/ref/vsynth/vsynth2-rgb
tests/ref/vsynth/vsynth2-v210
tests/ref/vsynth/vsynth2-v210-10
tests/ref/vsynth/vsynth2-v308
tests/ref/vsynth/vsynth2-v408
tests/ref/vsynth/vsynth2-y41p
tests/ref/vsynth/vsynth2-yuv
tests/ref/vsynth/vsynth3-bpp1
tests/ref/vsynth/vsynth3-bpp15
tests/ref/vsynth/vsynth3-r210
tests/ref/vsynth/vsynth3-rgb
tests/ref/vsynth/vsynth3-v210
tests/ref/vsynth/vsynth3-v210-10
tests/ref/vsynth/vsynth3-v308
tests/ref/vsynth/vsynth3-v408
tests/ref/vsynth/vsynth3-yuv
tests/ref/vsynth/vsynth_lena-bpp1
tests/ref/vsynth/vsynth_lena-bpp15
tests/ref/vsynth/vsynth_lena-r210
tests/ref/vsynth/vsynth_lena-rgb
tests/ref/vsynth/vsynth_lena-v210
tests/ref/vsynth/vsynth_lena-v210-10
tests/ref/vsynth/vsynth_lena-v308
tests/ref/vsynth/vsynth_lena-v408
tests/ref/vsynth/vsynth_lena-y41p
tests/ref/vsynth/vsynth_lena-yuv