[FFmpeg-soc] [PATCH] jpeg2k : support higher sample precision

Michael Niedermayer michaelni at gmx.at
Wed Jun 24 17:58:16 CEST 2009


On Wed, Jun 24, 2009 at 01:42:08PM +0000, Jai Menon wrote:
> On Wed, Jun 24, 2009 at 1:27 PM, Michael Niedermayer<michaelni at gmx.at> wrote:
> > On Sun, Jun 21, 2009 at 04:35:20PM +0000, Jai Menon wrote:
[...]
> > [...]
> >> @@ -806,6 +815,26 @@
> >>
> >>          line += s->picture.linesize[0];
> >>      }
> >> +    } else {
> >> +        for (; y < tile->comp[0].coord[1][1] - s->image_offset_y; y++) {
> >> +            uint16_t *dst;
> >> +            x = tile->comp[0].coord[0][0] - s->image_offset_x;
> >> +            dst = line + x * s->ncomponents * 2;
> >> +            for (; x < tile->comp[0].coord[0][1] - s->image_offset_x; x++) {
> >> +                for (compno = 0; compno < s->ncomponents; compno++) {
> >
> >> +                    *src[compno] = av_rescale(*src[compno], (1 << 16) - 1,
> >> +                                              (1 << s->cbps[compno]) - 1);
> >
> > av_rescale is too slow
> 
> So just (*src[compno]/((1 << s->cbps[compno]) - 1)) * ((1 << 16) - 1) ?

* is slow
/ s slower

"src" << C
it should be

[...]
-- 
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: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20090624/f3aae496/attachment.pgp>


More information about the FFmpeg-soc mailing list