]> granicus.if.org Git - libvpx/commitdiff
Enforce key frame placement
authorYaowu Xu <yaowu@google.com>
Tue, 21 Jan 2014 22:07:45 +0000 (14:07 -0800)
committerYaowu Xu <yaowu@google.com>
Tue, 21 Jan 2014 22:08:43 +0000 (14:08 -0800)
Change-Id: I2f85c6b058638571d68a7209779de8ca8168934f

vp9/encoder/vp9_firstpass.c

index 0a5af18cb23d50997c92398d856faed8f78c562c..fe57af28496e7d858271a4d062ac175a4db7fe1f 100644 (file)
@@ -2060,7 +2060,8 @@ void vp9_get_second_pass_params(VP9_COMP *cpi) {
   this_frame_coded_error = this_frame.coded_error;
 
   // keyframe and section processing !
-  if (rc->frames_to_key == 0) {
+  if (rc->frames_to_key == 0 ||
+      (cpi->common.frame_flags & FRAMEFLAGS_KEY)) {
     // Define next KF group and assign bits to it
     this_frame_copy = this_frame;
     find_next_key_frame(cpi, &this_frame_copy);