[FFmpeg-devel] JPEG2000 decoder

Michael Niedermayer michaelni at gmx.at
Mon Aug 29 02:41:26 CEST 2011


On Mon, Aug 15, 2011 at 11:11:15PM -0700, Rukhsana Ruby wrote:
> Hi Michael,
> 
> On Mon, Aug 1, 2011 at 3:46 PM, Michael Niedermayer <michaelni at gmx.at>wrote:
> 
> > On Mon, Aug 01, 2011 at 12:56:07PM -0700, Rukhsana Ruby wrote:
> > > Hi Michael,
> > >
> > > On Wed, Jul 27, 2011 at 4:45 PM, Rukhsana Ruby <rukhsana.afroz at gmail.com
> > >wrote:
> > >
> > > > Hi Michael,
> > > >
> > > > Will you be able to be online again on IRC? I truly appreciate your
> > help.
> > > >
> > > > Thanks
> > > >
> > > >
> > > > On Wed, Jul 20, 2011 at 5:54 PM, Rukhsana Ruby <
> > rukhsana.afroz at gmail.com>wrote:
> > > >
> > > >> Hi Michael,
> > > >>
> > > >> I do not ask you to come online for hours, just for a few minutes. I
> > found
> > > >> arithmetic encoding is working for the current decode, but after
> > decoding
> > > >> component data differs between ours and jasper's. Its may be for our
> > data
> > > >> representation. If you could come online, I could show you data very
> > easily
> > > >> and this way my time would be saved a way more. In fact, I am stuck in
> > this
> > > >> position. I truly appreciate your help.
> > > >>
> > > >> Thanks
> > > >>
> > > >>
> > > >> On Tue, Jul 19, 2011 at 1:25 PM, Rukhsana Ruby <
> > rukhsana.afroz at gmail.com>wrote:
> > > >>
> > > >>> Hi Michael,
> > > >>>
> > > >>> Could you please be online on IRC for a while?
> > > >>>
> > > >>> Thanks
> > > >>>
> > > >>> On Fri, Jul 15, 2011 at 6:14 PM, Michael Niedermayer <
> > michaelni at gmx.at>wrote:
> > > >>>
> > > >>>> 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
> > > >>>>
> > > >>>> [...]
> > > >>>> --
> > > >>>>
> > > >>>
> > >
> > > I have put two pastebins (with partial data) which are the component data
> > > before dequantization. These data is for the file which can be decoded
> > > correctly. I think, data representation is way different between ours and
> > > jaspers and therefore we see the difference in each and every byte of
> > > component data. I want to modify ffmpeg's code so that data
> > representation
> > > looks similar to jasper. Could you please tell me how i can do it?
> > > Otherwise, its impossible to debug for the file which cannot be decoded
> > at
> > > all.
> > >
> > > ffmpeg:
> > > http://pastebin.com/kAMmZh30
> > >
> > > jasper:
> > > http://pastebin.com/mya6RxNS
> > >
> >
> >
> Here I have attached a few patches for final commit in ffmpeg main
> repository.

These patches dont apply cleanly to ffmpeg git

also please tell me which file is decoded more correct with these
patches than without, so i can test it

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- 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/20110829/148f4c6c/attachment.asc>


More information about the ffmpeg-devel mailing list