[FFmpeg-devel] [PATCH v9 2/3] libavcodec/jpeg2000dec.c: Add support for PPT marker

Michael Niedermayer michael at niedermayer.cc
Wed Apr 1 22:28:20 EEST 2020


On Wed, Apr 01, 2020 at 08:01:48AM +0530, Gautam Ramakrishnan wrote:
> On Wed, Apr 1, 2020 at 6:17 AM Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> >
> > On Tue, Mar 31, 2020 at 05:32:41PM +0530, gautamramk at gmail.com wrote:
> > > From: Gautam Ramakrishnan <gautamramk at gmail.com>
> > >
> > > This patch adds functional changes to support the
> > > PPT marker.
> > > ---
> > >  libavcodec/jpeg2000dec.c | 85 +++++++++++++++++++++++++++++++++++-----
> > >  1 file changed, 76 insertions(+), 9 deletions(-)
> >
> > can you explain why the jpeg2000_decode_packet* function is / needs to be
> > split for this ?
> > iam asking as it duplicates quite some code in the previous patch
> >
> so, if we can represent packet header as H and data as D,
> without a PPT marker, the packet data is represented as
> HDHDHDHD.....
> However, with the PPT marker, this is changed to
> HHHHHHHHHDDDDDDD.....
> The jpeg2000_decode_packet() decodes a packet in the HD format.
> However, to decode packets in packed form (this change should apply
> even if PPM marker support is added), I thought it would be better if we
> break the function to decode header and data separately.

Is there any plan/need to call the 2 functions differently than always
first one and immedeatly the 2nd ?
Because if they are always called in order then the calling code would be
duplicated a few times
The data they read isnt one after the other but still they seem to be
called the same way as before ...

Thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200401/a673b573/attachment.sig>


More information about the ffmpeg-devel mailing list