[Ffmpeg-devel] [PATCH] Chinese AVS video decoder

Måns Rullgård mru
Sun Jul 2 14:44:00 CEST 2006

"Stefan Gehrer" <stefan.gehrer at gmx.de> writes:

>> ive added the new files to svn, ill commit the rest of your patch as soon
>> as you add a ff_ prefix (or av*_ for anything which should be vissible to 
>> the user application) to the new non static functions
> Done, with one change: Making those put/avg_pixels* functions in
> dsputil.c non-static and prefixed with ff_ seemed to turn into quite an
> intrusive patch, instead I moved four stub functions (the *_mc00 stuff)
> from cavsdsp.c to dsputil.c

> -typedef struct {
> +DECLARE_ALIGNED_8(typedef, struct) {

Are the non-gcc versions of that macro ever used?  How do they cope
with this construct?

>  static int decode_seq_header(AVSContext *h) {
>      MpegEncContext *s = &h->s;
> -    extern const AVRational frame_rate_tab[];
> +    extern const AVRational ff_frame_rate_tab[];
> --- libavcodec/mpeg12data.h	(revision 5571)
> +++ libavcodec/mpeg12data.h	(working copy)
> @@ -332,7 +332,7 @@
>  { 0xc, 10 },
>  };
> -static const AVRational frame_rate_tab[] = {
> +const AVRational ff_frame_rate_tab[] = {

I don't like this.  IMHO ff_frame_rate_tab should be moved a .c
(mpeg12.c?), and declared in some header file that can be included
everywhere it's needed.

Attached is a patch that makes lavf detect cavs in mpegps.  It's a bit
of a hack, and it only works if the first packet of a cavs stream
begins with a cavs sequence header.  Unfortunately, it's the only way
I can think of.

M?ns Rullg?rd
mru at inprovide.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lavf-cavs.patch
Type: text/x-patch
Size: 840 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060702/e7d703e9/attachment.bin>

More information about the ffmpeg-devel mailing list