[FFmpeg-soc] [soc]: r2021 -?in?eac3:?ac3dec.h?ac3dec_data.c?ac3dec_data.h eac3dec.c

Michael Niedermayer michaelni at gmx.at
Fri Mar 28 18:56:25 CET 2008


On Fri, Mar 28, 2008 at 06:32:38PM +0100, Bartlomiej Wolowiec wrote:
> On czwartek, 27 marca 2008, Michael Niedermayer wrote:
> > > 1.
> > > enum AACAC3FrameFlag{
> > >     FRAME_COMPLETE,
> > >     FRAME_START,
> > >     FRAME_CONTINUATION
> > >     };
> > > removal of stream_type z AACAC3ParseContext, change of int
> > > (*sync)(struct AACAC3ParseContext *hdr_info)
> > > to
> > > int (*sync)(struct AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag)
> > >
> > > 2.change of stream_type to frame_type
> > >
> > > 3.change of ff_aac_ac3_parse to make it react correctly to result
> > > returned in flag.
> >
> > ok
> 
> this is the first patch: 
> "removal of stream_type in AACAC3ParseContext and adding AACAC3FrameFlag"
[...]

> +typedef enum{
> +    /** finishes portions of data */
> +    FRAME_COMPLETE,
> +    /** starts portions of data
> +     * (if there are any frames in the buffer they're send) */
> +    FRAME_START,
> +    /** continues portions of data (adds them to buffer) */
> +    FRAME_CONTINUATION
> +}AACAC3FrameFlag;

[...]
> -static int ac3_sync(AACAC3ParseContext *hdr_info)
> +static int ac3_sync(AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag)
>  {
>      int err;
>      AC3HeaderInfo hdr;
> @@ -137,6 +137,9 @@
>      hdr_info->bit_rate = hdr.bit_rate;
>      hdr_info->channels = hdr.channels;
>      hdr_info->samples = AC3_FRAME_SIZE;
> +
> +    *flag = (hdr.stream_type == EAC3_STREAM_TYPE_INDEPENDENT)?
> +        FRAME_START:FRAME_CONTINUATION;
>      return hdr.frame_size;
>  }


There are 3 types in EAC3
Type 0: always start a frame and may or may not have further parts following
Type 1: never start a frame and may or may not have further parts following
Type 2: always start a frame and never have further parts following

That is
|T0 | T0 T1 | T0 T1 T1 ... T1 | T2 |
are all and the only valid combinations accoriding to my spec

I cannot map this to your code at all

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- 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-soc/attachments/20080328/d245683c/attachment.pgp>


More information about the FFmpeg-soc mailing list