]> granicus.if.org Git - libvpx/commitdiff
vp8: Condition decimation drop logic on drop_frames_allowed
authorMarco Paniconi <marpan@google.com>
Fri, 1 Oct 2021 20:16:56 +0000 (13:16 -0700)
committerMarco Paniconi <marpan@google.com>
Fri, 1 Oct 2021 20:19:29 +0000 (13:19 -0700)
This allows user to make sure frame will be encoded
when drop_frames is set off (on the fly), no matter
the state of the buffer.

Change-Id: Ia7b39b93fe3721dd586bdbede72c525db87b6890

vp8/encoder/onyx_if.c

index c57c7464695064382fbd96da50fabd709614b217..8466bba7c741191fbed568dd5b73c09d0d88c5f2 100644 (file)
@@ -3481,7 +3481,7 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size,
    * Note that dropping a key frame can be problematic if spatial
    * resampling is also active
    */
-  if (cpi->decimation_factor > 0) {
+  if (cpi->decimation_factor > 0 && cpi->drop_frames_allowed) {
     switch (cpi->decimation_factor) {
       case 1:
         cpi->per_frame_bandwidth = cpi->per_frame_bandwidth * 3 / 2;