[FFmpeg-devel] JPEG2000 decoder
rukhsana afroz
rukhsana.afroz at gmail.com
Sun May 15 09:18:59 CEST 2011
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.
However, I have checked jasper code, its csty value is 6 and it keeps COD
marker's csty without replacing COC marker's csty. Therefore, SOP and EPH
have been processed in their code. Please let me know, how you do think this
problem. Should my logic be:
if COC_csty is ZERO
s->codsty.csty = COD_csty;
end
Or, the current decoder does just replace like the following:
s->codsty.csty = COC_csty
I think, I will be able to better explain you stuffs in IRC chat.
--
Rukhsana Ruby
Phd Student
Department of Electrical & Computer Engineering
The University of British Columbia
============================
More information about the ffmpeg-devel
mailing list