[FFmpeg-devel] [RFC PATCH] libavcodec/jpeg2000_parser: Add jpeg2000 parser

Michael Niedermayer michael at niedermayer.cc
Fri May 29 02:31:10 EEST 2020


On Fri, May 29, 2020 at 12:33:01AM +0530, gautamramk at gmail.com wrote:
> From: Gautam Ramakrishnan <gautamramk at gmail.com>
> 
> I have attempted to write a JPEG2000 Parser. Have tested
> by generating a file containing 14 frames, as mentioned
> by Micheal. Have also tried testing with various packet
> sizes by setting -frame_size option. Need feedback on the
> code and on further testing.
> ---
>  libavcodec/Makefile          |   1 +
>  libavcodec/jpeg2000_parser.c | 190 +++++++++++++++++++++++++++++++++++
>  libavcodec/parsers.c         |   1 +
>  3 files changed, 192 insertions(+)
>  create mode 100644 libavcodec/jpeg2000_parser.c

can you add some test to fate for this ?
(doesnt need to be related to the tests you did, but can of course)
such a test would also make it easy for others to test the code on
less common hardware like big endian ...
This can also be very simple test if its not easy


> 
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index d0917a656f..1f7c91a91b 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -1073,6 +1073,7 @@ OBJS-$(CONFIG_H261_PARSER)             += h261_parser.o
>  OBJS-$(CONFIG_H263_PARSER)             += h263_parser.o
>  OBJS-$(CONFIG_H264_PARSER)             += h264_parser.o h264_sei.o h264data.o
>  OBJS-$(CONFIG_HEVC_PARSER)             += hevc_parser.o hevc_data.o
> +OBJS-$(CONFIG_JPEG2000_PARSER)         += jpeg2000_parser.o
>  OBJS-$(CONFIG_MJPEG_PARSER)            += mjpeg_parser.o
>  OBJS-$(CONFIG_MLP_PARSER)              += mlp_parse.o mlp_parser.o mlp.o
>  OBJS-$(CONFIG_MPEG4VIDEO_PARSER)       += mpeg4video_parser.o h263.o \
> diff --git a/libavcodec/jpeg2000_parser.c b/libavcodec/jpeg2000_parser.c
> new file mode 100644
> index 0000000000..c28b694219

> --- /dev/null
> +++ b/libavcodec/jpeg2000_parser.c
> @@ -0,0 +1,190 @@
> +/*
> + * JPEG2000 parser

> + * Copyright (c) 2000, 2001 Fabrice Bellard

Thats ok if you used code from fabrice but you probably want to
add your name assuming you wrote the parser

[...]

thx
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The smallest minority on earth is the individual. Those who deny 
individual rights cannot claim to be defenders of minorities. - Ayn Rand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200529/7e4c8fd6/attachment.sig>


More information about the ffmpeg-devel mailing list