[FFmpeg-devel] [PATCH] Redesign the video size and rate abbreviations system

Michael Niedermayer michaelni
Sat Jun 2 22:23:30 CEST 2007


Hi

On Sat, Jun 02, 2007 at 07:18:56PM +0200, Stefano Sabatini wrote:
> On date Saturday 2007-06-02 17:30:22 +0200, Stefano Sabatini encoded:
> > Hi to all FFmpeg developers.
> > 
> > This patch tries to fix some problems with the video size and rate
> > abbreviations system of FFmpeg, some of which have been discussed in
> > the "List supported video size and rate abbreviations" thread.
> > 
> > Suggested changelog message:
> > "Redesigns the video size and rate abbreviations system" 
> > 
> > The patch does as follows:
> > 
> > * moves the size and rate abbreviations system code (AbvEntry struct
> >   definition, frame_abvs array, parse_image_size and parse_frame_rate
> >   functions) from libavformat/utils.c to libavcodec/utils.c.
> > 
> > * splits the frame_abvs array into two different video size and rate
> >   abbreviations arrays (defined by two distinct struct) in this way:
> > 
> >   * AbvEntry -> AVVideoSizeAbbr
> >              -> AVVideoRateAbbr
> >   * frame_abvs -> avcodec_video_rate_abbrs
> >                -> avcodec_video_size_abbrs
> >   
> >   AVVideo{Size,Rate}Abbr are defined in libavcodec/avcodec.h, 
> >   avcodec_video_{size,rate}_abbrs are defined in libavcodec/utils.c
> >   and exported in libavcodec/avcodec.h.
> > 
> > * changes the names of the functions parse_image_size and
> >   parse_frame_rate in this way:
> > 
> >   * parse_image_size -> avcodec_parse_video_size
> >   * parse_frame_rate -> avcodec_parse_video_rate
> >   
> >   Every parse_image_size and parse_frame_rate invocation present in
> >   the code (namely in ffmpeg.c, ffplay.c and ffserver.c) is changed
> >   accordingly.
> > 
> > * updates the documentation.

so many things in a single patch :(
please split it


[...]
> +AVVideoRateAbbr avcodec_video_rate_abbrs[] = {
> +    { "ntsc",      30000, 1001 },
> +    { "pal",          25,    1 },
> +    { "qntsc",     30000, 1001 }, /* VCD compliant ntsc */
> +    { "qpal",         25,    1 }, /* VCD compliant pal */
> +    { "sntsc",     30000, 1001 }, /* square pixel ntsc */
> +    { "spal",         25,    1 }, /* square pixel pal */
> +    { "film",         24,    1 },
> +    { "ntsc-film", 24000, 1001 },
> +};

this could use AVRational

also iam not happy with the parsing stuff, this rather should be done
with AVOption somehow

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070602/778b2db8/attachment.pgp>



More information about the ffmpeg-devel mailing list