]> granicus.if.org Git - libvpx/commitdiff
Removing non-executable code from encoder_encode().
authorDmitry Kovalev <dkovalev@google.com>
Mon, 25 Aug 2014 23:48:31 +0000 (16:48 -0700)
committerDmitry Kovalev <dkovalev@google.com>
Tue, 26 Aug 2014 00:57:32 +0000 (17:57 -0700)
We don't output invisible frames with VP9.

Change-Id: I7b874d3ac454c1b2966d5d7d72e12a864b49afae

vp9/vp9_cx_iface.c

index 0130e9d9e60e35ea07abcb09d8b8f48765ffb873..5ff02d88206402cab9502c252cfce380a92aed92 100644 (file)
@@ -912,7 +912,7 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t  *ctx,
 #endif
 
         // Pack invisible frames with the next visible frame
-        if (cpi->common.show_frame == 0
+        if (!cpi->common.show_frame
 #if CONFIG_SPATIAL_SVC
             || (is_spatial_svc(cpi) &&
                 cpi->svc.spatial_layer_id < cpi->svc.number_spatial_layers - 1)
@@ -944,18 +944,6 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t  *ctx,
             )
           pkt.data.frame.flags |= VPX_FRAME_IS_KEY;
 
-        if (cpi->common.show_frame == 0) {
-          pkt.data.frame.flags |= VPX_FRAME_IS_INVISIBLE;
-
-          // This timestamp should be as close as possible to the
-          // prior PTS so that if a decoder uses pts to schedule when
-          // to do this, we start right after last frame was decoded.
-          // Invisible frames have no duration.
-          pkt.data.frame.pts =
-              ticks_to_timebase_units(timebase, cpi->last_time_stamp_seen) + 1;
-          pkt.data.frame.duration = 0;
-        }
-
         if (cpi->droppable)
           pkt.data.frame.flags |= VPX_FRAME_IS_DROPPABLE;