avcodec/flacenc: Do not copy unused udata array -> 5x faster calc_rice_params()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/137/head
Michael Niedermayer 10 years ago
parent d0ac2f59aa
commit d3dcd28812
  1. 4
      libavcodec/flacenc.c

@ -667,7 +667,9 @@ static uint64_t calc_rice_params(RiceContext *rc, int pmin, int pmax,
bits[i] = calc_optimal_rice_params(&tmp_rc, i, sums, n, pred_order); bits[i] = calc_optimal_rice_params(&tmp_rc, i, sums, n, pred_order);
if (bits[i] < bits[opt_porder]) { if (bits[i] < bits[opt_porder]) {
opt_porder = i; opt_porder = i;
*rc = tmp_rc; rc->coding_mode = tmp_rc.coding_mode;
rc->porder = tmp_rc.porder;
memcpy(rc->params, tmp_rc.params, sizeof(rc->params));
} }
if (i == pmin) if (i == pmin)
break; break;

Loading…
Cancel
Save