[FFmpeg-devel] [PATCH] E-AC-3 decoder, round 3
Justin Ruggles
justinruggles
Wed Aug 20 00:54:35 CEST 2008
Hi,
Thanks for the review.
Michael Niedermayer wrote:
> On Sun, Aug 17, 2008 at 07:30:26PM -0400, Justin Ruggles wrote:
>> Hi,
>>
>> Here is a new patch to complete support for E-AC-3 decoding within the
>> current AC-3 decoder. It will be followed up by a cosmetic commit to
>> indent and align.
>>
>> -Justin
>>
> [...]
>> @@ -533,10 +547,27 @@
>> }
>> }
>>
>> +static void get_transform_coeffs_ch(AC3DecodeContext *s, int blk, int ch,
>> + mant_groups *m)
>> +{
>> + if (!s->channel_uses_aht[ch]) {
>> + ac3_get_transform_coeffs_ch(s, ch, m);
>> + } else {
>> + /* if AHT is used, mantissas for all blocks are encoded in the first
>> + block of the frame. */
>> + int bin;
>> + if (!blk)
>
>> + ff_eac3_get_transform_coeffs_aht_ch(s, ch);
>
> am i blind? or where is this function, i cannot find it in this patch
> nor in svn
oops! I forgot to svn add eac3dec.c. I have attached the whole file
here. It would be applied in the same commit with the rest of these
changes (minus the part you said to commit separately).
> [...]
>> @@ -870,6 +965,7 @@
>> }
>>
>> /* bit allocation information */
>> + if (s->bit_allocation_syntax) {
>> if (get_bits1(gbc)) {
>> s->bit_alloc_params.slow_decay = ff_ac3_slow_decay_tab[get_bits(gbc, 2)] >> s->bit_alloc_params.sr_shift;
>> s->bit_alloc_params.fast_decay = ff_ac3_fast_decay_tab[get_bits(gbc, 2)] >> s->bit_alloc_params.sr_shift;
>> @@ -882,35 +978,78 @@
>> av_log(s->avctx, AV_LOG_ERROR, "new bit allocation info must be present in block 0\n");
>> return -1;
>> }
>> + }
>
> you inconsistently use
> s->bit_allocation_syntax && get_bits1(gbc) and above
I think that the patch by itself is misleading. Here is the whole block
with the patch applied (simplified for email readability), after
reindentation:
/* bit allocation information */
if (s->bit_allocation_syntax) {
if (get_bits1(gbc)) {
Get a bunch of params from the bitstream.
} else if (!blk) {
av_log(s->avctx, AV_LOG_ERROR, "...");
return -1;
}
}
I don't see anything wrong. Maybe I'm misunderstanding your review?
-Justin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eac3dec.c
Type: text/x-csrc
Size: 17955 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080819/02480851/attachment.c>
More information about the ffmpeg-devel
mailing list