On 12/11/14 19:10, Vittorio Giovara wrote: > CC: [email protected] > Bug-Id: CID 743441 > --- > libavcodec/flacenc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c > index 1160da2..d5f7b35 100644 > --- a/libavcodec/flacenc.c > +++ b/libavcodec/flacenc.c > @@ -663,7 +663,8 @@ static uint64_t > find_subframe_rice_params(FlacEncodeContext *s, > int pmax = get_max_p_order(s->options.max_partition_order, > s->frame.blocksize, pred_order); > > - uint64_t bits = 8 + pred_order * sub->obits + 2 + sub->rc.coding_mode; > + uint64_t bits = 8 + (uint64_t) pred_order * sub->obits + > + 2 + sub->rc.coding_mode; > if (sub->type == FLAC_SUBFRAME_LPC) > bits += 4 + 5 + pred_order * s->options.lpc_coeff_precision; > bits += calc_rice_params(&sub->rc, pmin, pmax, sub->residual, >
pred_order range is 0-32 (from options.min/max_prediction_order) obits is bits_per_raw_sample or something around it. coding_mode is 4 or 5 why bits is uint64_t ? lu _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
