[FFmpeg-devel] [PATCH] add E-AC-3 support to AC-3 decoder
Michael Niedermayer
michaelni
Sat Jun 7 19:55:08 CEST 2008
On Sat, Jun 07, 2008 at 12:43:51PM -0400, Justin Ruggles wrote:
> Michael Niedermayer wrote:
> > On Sat, Jun 07, 2008 at 10:30:31AM -0400, Justin Ruggles wrote:
> >> @@ -49,7 +49,6 @@ static const uint8_t surround_levels[4] = { 2, 4, 0, 4 };
> >> int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
> >> {
> >> int frame_size_code;
> >> - int num_blocks;
> >>
> >> memset(hdr, 0, sizeof(*hdr));
> >>
> >> @@ -97,6 +96,7 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
> >> hdr->bit_rate = (ff_ac3_bitrate_tab[frame_size_code>>1] * 1000) >> hdr->sr_shift;
> >> hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
> >> hdr->frame_size = ff_ac3_frame_size_tab[frame_size_code][hdr->sr_code] * 2;
> >> + hdr->num_blocks = 6;
> >> hdr->frame_type = EAC3_FRAME_TYPE_AC3_CONVERT; //EAC3_FRAME_TYPE_INDEPENDENT;
> >> } else {
> >> /* Enhanced AC-3 */
> >> @@ -118,9 +118,9 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
> >> return AC3_PARSE_ERROR_SAMPLE_RATE;
> >> hdr->sample_rate = ff_ac3_sample_rate_tab[sr_code2] / 2;
> >> hdr->sr_shift = 1;
> >> - num_blocks = 6;
> >> + hdr->num_blocks = 6;
> >
> > cant these = 6 be factored out before the if/elses?
>
> new version of PATCH 01/32 attached.
ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- 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/20080607/f0b4c22a/attachment.pgp>
More information about the ffmpeg-devel
mailing list