av1/encoder/intra_mode_search.c
// Run RD calculation with given chroma intra prediction angle., and return
// the RD cost. Update the best mode info. if the RD cost is the best so far.
Run RD calculation with given chroma intra prediction angle., and return
the RD cost. Update the best mode info. if the RD cost is the best so far.
Run RD calculation with given chroma intra prediction angle . and return the RD cost . Update the best mode info . if the RD cost is the best so far .
static int64_t pick_intra_angle_routine_sbuv(
    const AV1_COMP *const cpi, MACROBLOCK *x, BLOCK_SIZE bsize,
    int rate_overhead, int64_t best_rd_in, int *rate, RD_STATS *rd_stats,
    int *best_angle_delta, int64_t *best_rd) {
  MB_MODE_INFO *mbmi = x->e_mbd.mi[0];
  assert(!is_inter_block(mbmi));
  int this_rate;
  int64_t this_rd;
  RD_STATS tokenonly_rd_stats;
  if (!av1_super_block_uvrd(cpi, x, &tokenonly_rd_stats, bsize, best_rd_in))
    return INT64_MAX;
  this_rate = tokenonly_rd_stats.rate +
              intra_mode_info_cost_uv(cpi, x, mbmi, bsize, rate_overhead);
  this_rd = RDCOST(x->rdmult, this_rate, tokenonly_rd_stats.dist);
  if (this_rd < *best_rd) {
    *best_rd = this_rd;
    *best_angle_delta = mbmi->angle_delta[PLANE_TYPE_UV];
    *rate = this_rate;
    rd_stats->rate = tokenonly_rd_stats.rate;
    rd_stats->dist = tokenonly_rd_stats.dist;
    rd_stats->skip = tokenonly_rd_stats.skip;
  }
  return this_rd;
}
static int64_t pick_intra_angle_routine_sbuv ( const AV1_COMP * const cpi , MACROBLOCK * x , BLOCK_SIZE bsize , int rate_overhead , int64_t best_rd_in , int * rate , RD_STATS * rd_stats , int * best_angle_delta , int64_t * best_rd ) { MB_MODE_INFO * mbmi = x -> e_mbd . mi [ 0 ] ; assert ( ! is_inter_block ( mbmi ) ) ; int this_rate ; int64_t this_rd ; RD_STATS tokenonly_rd_stats ; if ( ! av1_super_block_uvrd ( cpi , x , & tokenonly_rd_stats , bsize , best_rd_in ) ) return INT64_MAX ; this_rate = tokenonly_rd_stats . rate + intra_mode_info_cost_uv ( cpi , x , mbmi , bsize , rate_overhead ) ; this_rd = RDCOST ( x -> rdmult , this_rate , tokenonly_rd_stats . dist ) ; if ( this_rd < * best_rd ) { * best_rd = this_rd ; * best_angle_delta = mbmi -> angle_delta [ PLANE_TYPE_UV ] ; * rate = this_rate ; rd_stats -> rate = tokenonly_rd_stats . rate ; rd_stats -> dist = tokenonly_rd_stats . dist ; rd_stats -> skip = tokenonly_rd_stats . skip ; } return this_rd ; }
Run RD calculation with given chroma intra prediction angle., and return
the RD cost.
Run RD calculation with given chroma intra prediction angle . and return the RD cost .