[FFmpeg-devel] JPEG2000 decoder

Michael Niedermayer michaelni at gmx.at
Sat Jul 16 03:14:42 CEST 2011


On Sun, Jul 10, 2011 at 08:46:04AM -0700, rukhsana afroz wrote:
> Hi Michael,
> 
> On Fri, Jul 8, 2011 at 4:57 AM, rukhsana afroz <rukhsana.afroz at gmail.com>wrote:
> 
> > Hi Michael,
> >
> >
> > On Thu, Jul 7, 2011 at 8:09 AM, rukhsana afroz <rukhsana.afroz at gmail.com>wrote:
> >
> >> Hi Michael,
> >>
> >> Please respond to me whenever you see this message. I truly appreciate
> >> your help. I will not take much of your time.
> >>
> >> Thanks
> >>
> >>
> >> On Thu, Jul 7, 2011 at 7:19 AM, rukhsana afroz <rukhsana.afroz at gmail.com>wrote:
> >>
> >>> Hi Michael,
> >>>
> >>>
> >>> On Thu, Jul 7, 2011 at 7:11 AM, rukhsana afroz <rukhsana.afroz at gmail.com
> >>> > wrote:
> >>>
> >>>> Hi Michael,
> >>>>
> >>>> It would be great if you could manage 10/20 minutes for me. In your
> >>>> convenient time, I will be on IRC.
> >>>>
> >>>> Thanks
> >>>>
> >>>>
> >>>>
> >>>> On Wed, Jul 6, 2011 at 6:43 PM, rukhsana afroz <
> >>>> rukhsana.afroz at gmail.com> wrote:
> >>>>
> >>>>> Hi Michael,
> >>>>>
> >>>>> Are you in vacation? I dont see you online.  I urgently need your help
> >>>>> on one thing. If you could tell me your convenient time, I can be online on
> >>>>> IRC during that time.
> >>>>>
> >>>>>
> >>>>> Thanks
> >>>>>
> >>>>> --
> >>>>> Rukhsana Ruby
> >>>>> Phd Student
> >>>>> Department of Electrical & Computer Engineering
> >>>>> The University of British Columbia
> >>>>> ============================
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>>
> >>>>
> >>> The current bug is due to the incorrect calculation of band coordiantes.
> >>> This is due to the following variables in SIZ marker:
> >>>
> >>> XRsizi:Horizontal separation of a sample of ith component with respect to
> >>> the reference grid. There is one
> >>>       occurrence of this parameter for each component.
> >>> YRsizi:Vertical separation of a sample of ith component with respect to
> >>> the reference grid. There is one
> >>>       occurrence of this parameter for each component.
> >>>
> >>> XRsizi: 2, YRsizi: 1 for the file p1_01.j2k. I am not very sure how to
> >>> use these variables correctly to calculate band coordinate. I truly
> >>> appreciate your help.
> >>>
> >>>
> >>> Thanks
> >>>
> >>>
> >>>
> > I have fixed the bug in the calculation of band coordinates. Now, I have
> > found new bug. I need your help on this. If you could reply, that would be
> > very helpful for me.
> 
> 
> I have fixed the bug on calculating the band coordinates and now arithmetic
> encoding is working. I have one question, after dequantization before
> inverse wavelet transform, should the component data of our decoder match
> with jasper's decoder. I am finding mismatch between both data.

yes they should match.
It may be that the way things are stored differs, like sign/abs vs
twos completent or things like that but the values should (ignoring
how they are represented) match


> Also, I am
> getting memory leak while printing component data. My code for printing
> component data is below:
> 
> static void printcomp(J2kDecoderContext *s, J2kComponent *comp) {
>     int i, j;
> 
>     av_log(s->avctx, AV_LOG_INFO, "y: %d\n", comp->coord[1][1] -
> comp->coord[1][0]);
>     for( i = 0; i < comp->coord[1][1] - comp->coord[1][0]; i++){
>        for( j = 0; j < comp->coord[0][1] - comp->coord[0][0]; j++)
>      av_log(s->avctx, AV_LOG_INFO, "0x%x ", *(comp->data + j));
> 

>        if (i < comp->coord[1][1] - comp->coord[1][0] - 1)
>             comp->data = comp->data + comp->coord[0][1] - comp->coord[0][0];

that does more than just printing
and to debug memleaks try valgrind, its quite powerfull and will
pinpoint exactly where the leak is

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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20110716/0a106b35/attachment.asc>


More information about the ffmpeg-devel mailing list