[FFmpeg-devel] [PATCH] Redesign the video size and rate abbreviations system
Stefano Sabatini
stefano.sabatini-lala
Sat Jun 2 19:18:56 CEST 2007
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.
>
[...]
> Index: libavcodec/avcodec.h
> ===================================================================
> --- libavcodec/avcodec.h (revision 9165)
> +++ libavcodec/avcodec.h (working copy)
> @@ -3143,6 +3143,65 @@
>
> extern unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
>
> +/**
> + * Contains a video size abbreviation.
> + */
> +typedef struct {
> + const char *abbr;
> + int frame_width, frame_height
> +} AVVideoSizeAbbr;
[...]
Oops, missed this (no ";" at the end of the filed declaration, warning
issued).
Cheers
--
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: redesign-video-size-and-rate-abbrs-01.patch
Type: text/x-diff
Size: 13632 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070602/8fe2d151/attachment.patch>
More information about the ffmpeg-devel
mailing list