]> granicus.if.org Git - libvpx/commitdiff
Fix decimation_count in drop_frame
authorYunqing Wang <yunqingwang@google.com>
Thu, 7 Jun 2012 17:57:21 +0000 (13:57 -0400)
committerYunqing Wang <yunqingwang@google.com>
Thu, 7 Jun 2012 18:47:37 +0000 (14:47 -0400)
Frame dropping decision is made by evaluating both current frame
and next frame's buffer_level. If both buffer_levels are less
than drop_mark, next frame is dropped. When frame dropping is
over, namely, buffer_level becomes normal again, we need to
reset decimation_count to 0.

Change-Id: Iae182612e61e0da367fbd43afdc90738d975d1a3

vp8/encoder/onyx_if.c

index 57183d02b0801b19bd751a328118671ed4b7d7c7..fb01ea732369c8579fed2b33811e3a0a887aceaa 100644 (file)
@@ -3466,6 +3466,8 @@ static void encode_frame_to_data_rate
         else
             cpi->decimation_count = cpi->decimation_factor;
     }
+    else
+        cpi->decimation_count = 0;
 
     // Decide how big to make the frame
     if (!vp8_pick_frame_size(cpi))