shithub: libvpx

Download patch

ref: 76108b4269451406ef6e45dbd28eed9f7142bb5d
parent: 11bf7ea354cb69755e1f0e1a71351b166ae30677
author: Johnny Klonaris <[email protected]>
date: Sat Mar 12 16:06:31 EST 2016

Allows sub-second frame rates in vp9

This is the identical change submitted for vp8 here:
https://chromium-review.googlesource.com/#/c/274107/

Tested this change on Mac OSX (10.10) and Linux
(Linux Mint 17 / Ubuntu 14.04) and in both cases:

- downloaded and compiled latest source for libvpx and ffmpeg
- confirmed ffmpeg would build sub-second frame rate webm files
  via the previous patch
- confirmed ffmpeg would *not* build fps < 1 for vp9
- made this change, recompiled libvpn and ffmpeg
- confirmed ffmpeg would now create the same webm with
  fps < 1
- confirmed the resulting file would play and was vp9 (e.g.
  would not play in Firefox (Linux version complained it was
  VP9 but mostly could play it) or older vlc, etc., but does
  play just fine in Google Chrome and a newer version of vlc.

Sorry I didn't catch this last time - but this seems a solid
change and it's handy to be able to create frame rates
less than one second.

-jk

Change-Id: I38fa32148de8c4c359f228cf08b9a4b83b5a52fb

--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -158,7 +158,7 @@
   RANGE_CHECK(cfg, g_w,                   1, 65535);  // 16 bits available
   RANGE_CHECK(cfg, g_h,                   1, 65535);  // 16 bits available
   RANGE_CHECK(cfg, g_timebase.den,        1, 1000000000);
-  RANGE_CHECK(cfg, g_timebase.num,        1, cfg->g_timebase.den);
+  RANGE_CHECK(cfg, g_timebase.num,        1, 1000000000);
   RANGE_CHECK_HI(cfg, g_profile,          3);
 
   RANGE_CHECK_HI(cfg, rc_max_quantizer,   63);