]> granicus.if.org Git - libvpx/commitdiff
Merge "[svc] Make size of empty frame to be 16x16 all the time"
authorMinghai Shang <minghai@google.com>
Wed, 27 May 2015 17:48:59 +0000 (17:48 +0000)
committerGerrit Code Review <noreply-gerritcodereview@google.com>
Wed, 27 May 2015 17:49:00 +0000 (17:49 +0000)
1  2 
vp9/encoder/vp9_encoder.c
vp9/encoder/vp9_firstpass.c

index db79eb514f14229b653c474a28de51c75e187241,f99bd14fc18684dc50b42aff8d672d2ca9ae5aef..91624182d5d3b62d2b8d2d822cf2d3703801c5ed
@@@ -3476,14 -3474,19 +3476,21 @@@ static void encode_frame_to_data_rate(V
      }
    }
    if (is_two_pass_svc(cpi) && cm->error_resilient_mode == 0) {
-     // Use the last frame context for the empty frame.
+     // Use context 0 for intra only empty frame, but the last frame context
+     // for other empty frames.
+     if (cpi->svc.encode_empty_frame_state == ENCODING) {
+       if (cpi->svc.encode_intra_empty_frame != 0)
+         cm->frame_context_idx = 0;
+       else
+         cm->frame_context_idx = FRAME_CONTEXTS - 1;
+     } else {
      cm->frame_context_idx =
-         (cpi->svc.encode_empty_frame_state == ENCODING) ? FRAME_CONTEXTS - 1 :
          cpi->svc.spatial_layer_id * cpi->svc.number_temporal_layers +
          cpi->svc.temporal_layer_id;
+     }
  
 +    cm->frame_parallel_decoding_mode = oxcf->frame_parallel_decoding_mode;
 +
      // The probs will be updated based on the frame type of its previous
      // frame if frame_parallel_decoding_mode is 0. The type may vary for
      // the frame after a key frame in base layer since we may drop enhancement
Simple merge