[FFmpeg-devel] JPEG2000 decoder

Michael Niedermayer michaelni at gmx.at
Mon May 16 01:42:04 CEST 2011


Hi ruby

On Sun, May 15, 2011 at 12:18:59AM -0700, rukhsana afroz wrote:
> On Sun, May 8, 2011 at 6:38 PM, rukhsana afroz <rukhsana.afroz at gmail.com>wrote:
> 
> >
> >
> > On Sun, May 8, 2011 at 1:36 PM, rukhsana afroz <rukhsana.afroz at gmail.com>wrote:
> >
> >> Hi Michael,
> >>
> >> Sorry for the late reply.
> >>   On Fri, May 6, 2011 at 9:43 AM, Michael Niedermayer <michaelni at gmx.at>wrote:
> >>
> >>>
> >>> The buffer no of course not but where it points does, look:
> >>> using  the following:
> >>> --- ref-src/src//libjasper/jpc/jpc_t2dec.c  2007-01-19 22:43:07.000000000
> >>> +0100
> >>> +++ src//libjasper/jpc/jpc_t2dec.c  2011-05-06 18:23:44.234826999 +0200
> >>> @@ -455,6 +455,7 @@
> >>>          jpc_pi_prcno(pi), jpc_pi_lyrno(pi))) {
> >>>            return -1;
> >>>        }
> >>> +       fprintf(stderr, "after decode_packet %d\n",
> >>>  jas_stream_getrwcount(in));
> >>>  ++dec->numpkts;
> >>>    }
> >>>
> >>>
> >>> --- a/libavcodec/j2kdec.c
> >>> +++ b/libavcodec/j2kdec.c
> >>> @@ -583,6 +583,7 @@ static int decode_packets(J2kDecoderContext *s,
> >>> J2kTile *tile)
> >>>                         if (decode_packet(s, codsty, rlevel, precno,
> >>> layno, qntsty->expn +
> >>>                                           (reslevelno ?
> >>> 3*(reslevelno-1)+1 : 0), qntsty->nguardbits))
> >>>                             return -1;
> >>> +            av_log(s->avctx, AV_LOG_ERROR, "after decode_packet %d\n",
> >>> s->buf - s->buf_start);
> >>>                     }
> >>>                 }
> >>>             }
> >>>
> >>> f
> >>
> >>
> Hi Michael,
> 
> I am re-writing the function "decode_packet". Now, I am actually at the
> beginning of this function. I have confusion with the problems I have
> described here. When I process the COD marker, I found the coding style of
> this marker is 6. According to page 45 (Table A-13), if 2nd LSB of csty is
> 1, the packet header should have SOP marker and if 3rd LSB of csty is 1, the
> packet header should have EPH header. Since, these marker are not must, our
> decoder did not implemnet this. I have implemneted these marker while
> decoding packet header. But the problem i found with the file p1_01.j2k has
> also COC marker. According to the spec when COC marker comes, the parameters
> of COC marker will be replaced by COD marker parameters. I found in marker,
> csty value is 0. It means packet should not have SOP or EPH headers.

the COC coding style is described in A-22
2nd and 3rd bits are reserved 

My spec is Date: 16 March 2000 / JPEG 2000 Part I Final Committee Draft Version 1.0
So unless you have a newer one i think these 2 COD bits cannot be
overriden by COC.


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110516/5e825fdf/attachment.asc>


More information about the ffmpeg-devel mailing list