[FFmpeg-devel] JPEG2000 decoder

rukhsana afroz rukhsana.afroz at gmail.com
Tue May 24 10:10:16 CEST 2011

Hi Michael,

On Fri, May 20, 2011 at 10:49 PM, rukhsana afroz
<rukhsana.afroz at gmail.com>wrote:

> Hi Michael,
> On Thu, May 19, 2011 at 3:38 PM, rukhsana afroz <rukhsana.afroz at gmail.com>wrote:
>> On Thu, May 19, 2011 at 3:32 PM, rukhsana afroz <rukhsana.afroz at gmail.com
>> > wrote:
>>> Hi Michael,
>>> On Sun, May 15, 2011 at 5:00 PM, Michael Niedermayer <michaelni at gmx.at>wrote:
>>>> We will have to implement multiple codeword segments.
>>>> Also sofar, good work!
>>> Sorry for the late reply. If I implement codeblock segment, its going to
>>> affect from packet decoding process to the subsequent deoding process till
>>> the last. Therefore, I have to be properly planned in order to accomplish
>>> these changes. Here, I have put patch for incorporating multiple codeblock
>>> segment. I had to create two more structures and modify J2KCblk sturucture
>>> as well. This patch is just for the modification/creation on the structures.
>>> I am also writing some miscellaneous function and I will post those in my
>>> subsequent emails.
> I have modified the decode_packet function incorporating multiple codeword
> segment. Here, I have attached the patch for the required changes. I have
> taken the help from jasper code while writing this code, because only the
> document is not sufficient to incorporate these changes. I have not tested
> this code yet. Once, I test it, I also let you know. If you have any
> suggestion on this patch, please let me know.

While doing arithmetic coding operation in decode_cblk function one
term/variable is "bpno". Coding operation (decode_sigpass, decode_refpass,
decode_clpass) uses this variable to determine the data of each codeblock in
different contexts. This variable has been set in our decoder:

bpno = cblk->nonzerobits - 1

And, jasper has set this variable as follows:

bpno = band->roishift + band->numbps - 1 - (cblk->numimsbs + (seg->passno +
i - cblk->firstpassno + 2) / 3);

band->roishift is the value got from processing the RGN marker and
band->numbps is also the value got from some other marker. Our decoder has
not processed this marker.  cblk->numimsbs is similar to our decoder's
cblk->nonzerobits. Other part of this variable is segment specific and that
makes sense. I need you suggestion on how to set this variable. I will
explain more tomorrow on IRC chat.


        Rukhsana Ruby
Phd Student
Department of Electrical & Computer Engineering
The University of British Columbia

More information about the ffmpeg-devel mailing list