[FFmpeg-devel] JPEG2000 decoder
Rukhsana Ruby
rukhsana.afroz at gmail.com
Tue Aug 16 08:11:15 CEST 2011
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.
Thanks
--
Rukhsana Ruby
Phd Student
Department of Electrical & Computer Engineering
The University of British Columbia
============================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-j2k-Rename-dwt.o-file-by-j2k_dwt.o.patch
Type: application/octet-stream
Size: 1092 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110815/61c8d2a6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-j2k-Fix-the-bug-on-band-coordinate-calculation.patch
Type: application/octet-stream
Size: 5626 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110815/61c8d2a6/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-j2k-Define-jasper-constants-and-implement-transfer-f.patch
Type: application/octet-stream
Size: 7909 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110815/61c8d2a6/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-j2k-Implement-component-printing-function.patch
Type: application/octet-stream
Size: 1317 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110815/61c8d2a6/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-j2k-Process-packet-header-presence-bit-in-COC-marker.patch
Type: application/octet-stream
Size: 5753 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110815/61c8d2a6/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-j2k-Implement-multiple-codeblock-segment-feature.patch
Type: application/octet-stream
Size: 13021 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110815/61c8d2a6/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-j2k-Replace-CODEC_CAP_EXPERIMENTAL-const-of-j2k-AVco.patch
Type: application/octet-stream
Size: 725 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110815/61c8d2a6/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-j2k-Reimplement-arithmetic-decoding-procedure.patch
Type: application/octet-stream
Size: 5043 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110815/61c8d2a6/attachment-0007.obj>
More information about the ffmpeg-devel
mailing list