On Fri, Nov 14, 2014 at 8:48 PM, Justin Ruggles
<[email protected]> wrote:
> On 11/14/2014 02:47 PM, Luca Barbato wrote:
>>
>> 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 ?
>
>
> Because it's a counter for all bits in the frame.

Sorry I lost track of this one, is the patch ok or not? ^^
-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to