[FFmpeg-devel] [PATCH 2/2] avcodec/jpeg2000dwt: merge rescaling with interleave in 9/7 int IDWT

Michael Niedermayer michaelni at gmx.at
Mon Jun 3 13:23:38 CEST 2013


On Sun, Jun 02, 2013 at 10:04:24PM +0000, Paul B Mahol wrote:
> On 6/2/13, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Tha fate tests change because the edge mirroring was wrong before this
> > commit
> >
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavcodec/jpeg2000dwt.c             |   14 ++++----------
> >  tests/ref/vsynth/vsynth1-jpeg2000-97 |    4 ++--
> >  tests/ref/vsynth/vsynth2-jpeg2000-97 |    4 ++--
> >  3 files changed, 8 insertions(+), 14 deletions(-)
> >
> > diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c
> > index 13712d9..cc7ca8a 100644
> > --- a/libavcodec/jpeg2000dwt.c
> > +++ b/libavcodec/jpeg2000dwt.c
> > @@ -431,12 +431,6 @@ static void sr_1d97_int(int32_t *p, int i0, int i1)
> >
> >      extend97_int(p, i0, i1);
> >
> > -    /*step 1*/
> > -    for (i = i0 / 2 - 1; i < i1 / 2 + 2; i++)
> > -        p[2 * i]      = ((p[2 * i] * I_LFTG_K)     + (1 << 15)) >> 16;
> > -    /* step 2*/
> > -    for (i = i0 / 2 - 2; i < i1 / 2 + 2; i++)
> > -        p[2 * i + 1]  = ((p[2 * i + 1] * I_LFTG_X) + (1 << 15)) >> 16;
> >      /* step 3*/
> 
> This comment becomes pointless.
> 
> >      for (i = i0 / 2 - 1; i < i1 / 2 + 2; i++)
> >          p[2 * i]     -= (I_LFTG_DELTA * (p[2 * i - 1] + p[2 * i + 1]) + (1
> > << 15)) >> 16;
> > @@ -473,9 +467,9 @@ static void dwt_decode97_int(DWTContext *s, int32_t *t)
> >              int i, j = 0;
> >              // copy with interleaving
> >              for (i = mh; i < lh; i += 2, j++)
> > -                l[i] = data[w * lp + j];
> > +                l[i] = ((data[w * lp + j] * I_LFTG_K) + (1 << 15)) >> 16;
> >              for (i = 1 - mh; i < lh; i += 2, j++)
> > -                l[i] = data[w * lp + j];
> > +                l[i] = ((data[w * lp + j] * I_LFTG_X) + (1 << 15)) >> 16;
> >
> >              sr_1d97_int(line, mh, mh + lh);
> >
> > @@ -489,9 +483,9 @@ static void dwt_decode97_int(DWTContext *s, int32_t *t)
> >              int i, j = 0;
> >              // copy with interleaving
> 
> This one too.

fixed them

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

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- 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/20130603/07860eec/attachment.asc>


More information about the ffmpeg-devel mailing list