[FFmpeg-devel] [PATCH 4/4] libavcodec/jpeg2000dec: Support for PPM marker
Michael Niedermayer
michael at niedermayer.cc
Tue Jul 14 00:27:10 EEST 2020
On Mon, Jul 13, 2020 at 10:50:02PM +0530, gautamramk at gmail.com wrote:
> From: Gautam Ramakrishnan <gautamramk at gmail.com>
>
> This patch adds support for PPM marker for JPEG2000
> decoder. It allows the samples p1_03.j2k and p1_05.j2k
> to be decoded.
> ---
> libavcodec/jpeg2000dec.c | 107 +++++++++++++++++++++++++++++++++++----
> 1 file changed, 97 insertions(+), 10 deletions(-)
[...]
> @@ -2189,8 +2266,18 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
> // Packet length, tile-part header
> ret = get_plt(s, len);
> break;
> + case JPEG2000_PPM:
> + // Packed headers, main header
> + ret = get_ppm(s, len);
> + break;
> case JPEG2000_PPT:
> // Packed headers, tile-part header
> + if (s->has_ppm) {
> + av_log(s->avctx, AV_LOG_ERROR,
> + "Cannot have both PPT and PPM marker.\n");
> + return AVERROR_INVALIDDATA;
> + }
is a similar check needed before get_ppm() ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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/20200713/bc8986e8/attachment.sig>
More information about the ffmpeg-devel
mailing list