[FFmpeg-devel] [PATCH]lavf/img2dec: xbm autodetection
Michael Niedermayer
michael at niedermayer.cc
Sat Mar 5 21:12:00 CET 2016
On Sat, Mar 05, 2016 at 07:29:01PM +0100, Carl Eugen Hoyos wrote:
> Hi!
>
> Not sure how useful this patch is.
>
> Please comment, Carl Eugen
> Makefile | 1 +
> allformats.c | 1 +
> img2dec.c | 8 ++++++++
> 3 files changed, 10 insertions(+)
> 0debba60a1363edb619fa5ec358815b92ac480e8 patchxbm.diff
> diff --git a/libavformat/Makefile b/libavformat/Makefile
> index dc931d9..8981e08 100644
> --- a/libavformat/Makefile
> +++ b/libavformat/Makefile
> @@ -227,6 +227,7 @@ OBJS-$(CONFIG_IMAGE_SGI_PIPE_DEMUXER) += img2dec.o img2.o
> OBJS-$(CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER) += img2dec.o img2.o
> OBJS-$(CONFIG_IMAGE_TIFF_PIPE_DEMUXER) += img2dec.o img2.o
> OBJS-$(CONFIG_IMAGE_WEBP_PIPE_DEMUXER) += img2dec.o img2.o
> +OBJS-$(CONFIG_IMAGE_XBM_PIPE_DEMUXER) += img2dec.o img2.o
> OBJS-$(CONFIG_INGENIENT_DEMUXER) += ingenientdec.o rawdec.o
> OBJS-$(CONFIG_IPMOVIE_DEMUXER) += ipmovie.o
> OBJS-$(CONFIG_IRCAM_DEMUXER) += ircamdec.o ircam.o pcm.o
> diff --git a/libavformat/allformats.c b/libavformat/allformats.c
> index 94f258d..0f992d8 100644
> --- a/libavformat/allformats.c
> +++ b/libavformat/allformats.c
> @@ -359,6 +359,7 @@ void av_register_all(void)
> REGISTER_DEMUXER (IMAGE_SUNRAST_PIPE, image_sunrast_pipe);
> REGISTER_DEMUXER (IMAGE_TIFF_PIPE, image_tiff_pipe);
> REGISTER_DEMUXER (IMAGE_WEBP_PIPE, image_webp_pipe);
> + REGISTER_DEMUXER (IMAGE_XBM_PIPE, image_xbm_pipe);
>
> /* external libraries */
> REGISTER_MUXER (CHROMAPRINT, chromaprint);
> diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
> index 019793f..24e8940 100644
> --- a/libavformat/img2dec.c
> +++ b/libavformat/img2dec.c
> @@ -860,6 +860,13 @@ static int webp_probe(AVProbeData *p)
> return 0;
> }
>
> +static int xbm_probe(AVProbeData *p)
> +{
> + if (memcmp(p->buf, "#define image_width ", 20))
> + return 0;
> + return AVPROBE_SCORE_MAX - 1;
> +}
are whitespaces always that way and is that alwas the first line ?
if so then the patch LGTM
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160305/b0115c68/attachment.sig>
More information about the ffmpeg-devel
mailing list