av1/encoder/encode_strategy.c
// Don't allow a show_existing_frame to coincide with an error resilient or
// S-Frame. An exception can be made in the case of a keyframe, since it does
// not depend on any previous frames.
Don't allow a show_existing_frame to coincide with an error resilient or
S-Frame. An exception can be made in the case of a keyframe, since it does
not depend on any previous frames.
Don ' t allow a show_existing_frame to coincide with an error resilient or S - Frame . An exception can be made in the case of a keyframe since it does not depend on any previous frames .
static int allow_show_existing(const AV1_COMP *const cpi,
                               unsigned int frame_flags) {
  if (cpi->common.current_frame.frame_number == 0) return 0;
  const struct lookahead_entry *lookahead_src =
      av1_lookahead_peek(cpi->lookahead, 0, cpi->compressor_stage);
  if (lookahead_src == NULL) return 1;
  const int is_error_resilient =
      cpi->oxcf.error_resilient_mode ||
      (lookahead_src->flags & AOM_EFLAG_ERROR_RESILIENT);
  const int is_s_frame =
      cpi->oxcf.s_frame_mode || (lookahead_src->flags & AOM_EFLAG_SET_S_FRAME);
  const int is_key_frame =
      (cpi->rc.frames_to_key == 0) || (frame_flags & FRAMEFLAGS_KEY);
  return !(is_error_resilient || is_s_frame) || is_key_frame;
}
static int allow_show_existing ( const AV1_COMP * const cpi , unsigned int frame_flags ) { if ( cpi -> common . current_frame . frame_number == 0 ) return 0 ; const struct lookahead_entry * lookahead_src = av1_lookahead_peek ( cpi -> lookahead , 0 , cpi -> compressor_stage ) ; if ( lookahead_src == NULL ) return 1 ; const int is_error_resilient = cpi -> oxcf . error_resilient_mode || ( lookahead_src -> flags & AOM_EFLAG_ERROR_RESILIENT ) ; const int is_s_frame = cpi -> oxcf . s_frame_mode || ( lookahead_src -> flags & AOM_EFLAG_SET_S_FRAME ) ; const int is_key_frame = ( cpi -> rc . frames_to_key == 0 ) || ( frame_flags & FRAMEFLAGS_KEY ) ; return ! ( is_error_resilient || is_s_frame ) || is_key_frame ; }
Don't allow a show_existing_frame to coincide with an error resilient or
S-Frame.
Don ' t allow a show_existing_frame to coincide with an error resilient or S - Frame .