[FFmpeg-devel] [PATCH] E-AC-3 decoder, round 3

Michael Niedermayer michaelni
Wed Aug 20 01:25:39 CEST 2008


On Tue, Aug 19, 2008 at 06:54:35PM -0400, Justin Ruggles wrote:
> 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).

does any of the changes i ok-ed depend on eac3dec.c ?
if not you could commit them and resubmit what is left + eac3dec.c


> 
> > [...]
> >> @@ -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;
>     }
> }

ahh, then this one is ok as well

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I count him braver who overcomes his desires than him who conquers his
enemies for the hardest victory is over self. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080820/27748e22/attachment.pgp>



More information about the ffmpeg-devel mailing list