summaryrefslogtreecommitdiff
path: root/vpxenc.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2016-01-18 14:03:45 -0500
committerRonald S. Bultje <rsbultje@gmail.com>2016-01-18 14:05:07 -0500
commit9134e9f8bbb4e27684c2e48936c91b67797c79f9 (patch)
tree1c3c69ab94223c04584b296e439d36be8ee7aa98 /vpxenc.c
parentc0307e6cea0fcd79577eaa107f76b07acaf1d4e6 (diff)
downloadlibvpx-9134e9f8bbb4e27684c2e48936c91b67797c79f9.tar.gz
libvpx-9134e9f8bbb4e27684c2e48936c91b67797c79f9.tar.bz2
libvpx-9134e9f8bbb4e27684c2e48936c91b67797c79f9.zip
Use input framerate as timebase if none was explicitly specified.
After patch: $ vpxenc tennis_sif.y4m --end-usage=q -q 20 -o x.ivf --ivf --codec=vp9 --limit=30 $ ffmpeg -i x.ivf -i tennis_sif.y4m -lavfi psnr -f null - [..] [Parsed_psnr_0 @ 0x7f8913c21e40] PSNR y:43.270594 u:46.300362 v:47.011172 average:44.097994 min:43.460704 max:52.509271 Before patch: $ vpxenc tennis_sif.y4m --end-usage=q -q 20 -o x.ivf --ivf --codec=vp9 --limit=30 $ ffmpeg -i x.ivf -i tennis_sif.y4m -lavfi psnr -f null - [..] [Parsed_psnr_0 @ 0x7fbdaac22780] PSNR y:27.427366 u:41.505376 v:36.853477 average:28.990890 min:22.219454 max:52.509271 $ ffmpeg -i x.ivf -f rawvideo x.yuv $ ffmpeg -f rawvideo -vcodec rawvideo -video_size 352x240 -framerate 29.97 -i x.yuv -i tennis_sif.y4m -lavfi psnr -f null - [..] [Parsed_psnr_0 @ 0x7fadf9e013a0] PSNR y:43.270594 u:46.300362 v:47.011172 average:44.097994 min:43.460704 max:52.509271 Change-Id: Ifac2d6c2ff8379b2d318fe5cfe4be0bf1bc9f27f
Diffstat (limited to 'vpxenc.c')
-rw-r--r--vpxenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vpxenc.c b/vpxenc.c
index db8fcafa1..8798e6918 100644
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -2074,6 +2074,8 @@ int main(int argc, const char **argv_) {
if (!global.have_framerate) {
global.framerate.num = input.framerate.numerator;
global.framerate.den = input.framerate.denominator;
+ FOREACH_STREAM(stream->config.cfg.g_timebase.den = global.framerate.num;
+ stream->config.cfg.g_timebase.num = global.framerate.den);
}
FOREACH_STREAM(set_default_kf_interval(stream, &global));