[FFmpeg-devel] [PATCH] add E-AC-3 support to AC-3 decoder

Michael Niedermayer michaelni
Tue Jun 17 22:23:34 CEST 2008


On Sat, Jun 07, 2008 at 10:30:31AM -0400, Justin Ruggles wrote:
> Hi,
> 
> Here is a patch set to incrementally add support for E-AC-3 to the AC-3
> decoder.  There are 32 total patches.  I'm just attaching them all in
> this email instead of doing the git-send-email thing.
> 
> Commit log messages:
[...]
> [PATCH 29/32] add support for E-AC-3 block decoding
[...]
> diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
> index e60a25b..efadf9e 100644
> --- a/libavcodec/ac3dec.c
> +++ b/libavcodec/ac3dec.c
> @@ -744,19 +744,23 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk)
>  
>      /* block switch flags */
>      different_transforms = 0;
> +    if (!s->eac3 || s->block_switch_syntax) {
>      for (ch = 1; ch <= fbw_channels; ch++) {
>          s->block_switch[ch] = get_bits1(gbc);
>          if(ch > 1 && s->block_switch[ch] != s->block_switch[1])
>              different_transforms = 1;
>      }
> +    }
>  
>      /* dithering flags */
> +    if (!s->eac3 || s->dither_flag_syntax) {
>      s->dither_all = 1;
>      for (ch = 1; ch <= fbw_channels; ch++) {
>          s->dither_flag[ch] = get_bits1(gbc);
>          if(!s->dither_flag[ch])
>              s->dither_all = 0;
>      }
> +    }

do the things not implicate eac3 so that it doesnzt need to be checked
explicitly? This also applies to most other s->eac3 checks

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

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- 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/20080617/b4e84154/attachment.pgp>



More information about the ffmpeg-devel mailing list