Quoting Claudio KLaN Ciccani:
> >> f = (srect->h << 16) / drect->h;
> >>+ h = drect->h;
> >>
> >> Aop_xy( gfxs, gfxs->dst_org, drect->x, drect->y, gfxs->dst_pitch );
> >> Bop_xy( gfxs, gfxs->src_org, srect->x, srect->y, gfxs->src_pitch );
> >>
> >>- while (drect->h--) {
> >>+ while (h--) {
> >> RUN_PIPELINE();
> >>
> >> Aop_next( gfxs, gfxs->dst_pitch );
> >>@@ -4648,6 +4652,39 @@
> >> Bop_next( gfxs, gfxs->src_pitch );
> >> }
> >> }
> >>+
> >>+ /* scale other planes */
> >>+ if (gfxs->src_format == DSPF_YV12 || gfxs->src_format == DSPF_I420)
> >>{
> >>+ void *splane1 = gfxs->src_org + (gfxs->src_pitch *
> >>gfxs->src_height)
> >>+ + ((gfxs->src_pitch * srect->y) / 4) + (srect->x
> >>/ 2);
> >>+ void *splane2 = splane1 + ((gfxs->src_pitch * gfxs->src_height) /
> >>4);
> >>+ void *dplane1 = gfxs->dst_org + (gfxs->dst_pitch *
> >>gfxs->dst_height)
> >>+ + ((gfxs->dst_pitch * drect->y) / 4) + (drect->x
> >>/ 2);
> >>+ void *dplane2 = dplane1 + ((gfxs->dst_pitch * gfxs->dst_height) /
> >>4);
> >>+ int spitch = gfxs->src_pitch / 2;
> >>+ int dpitch = gfxs->dst_pitch / 2;
> >>+
> >>+ gfxs->length = drect->w / 2;
> >>+ h = drect->h / 2;
> >>+ i = 0;
> >>+
> >>+ while (h--) {
> >>+ gfxs->Bop = splane1 + (i >> 16) * spitch;
> >>+ gfxs->Aop = dplane1;
> >>
> >>
> >
> >You should use ?op_xy() and ?op_next() to do this stuff.
> >
> >
> I can use ?op_xy but not ?op_next because I'm processing two
> planes at once to save time.
>
> >>+
> >>+ RUN_PIPELINE();
> >>+
> >>+ gfxs->Bop = splane2 + (i >> 16) * spitch;
> >>+ gfxs->Aop = dplane2;
> >>+
> >>+ RUN_PIPELINE();
> >>+
> >>+ dplane1 += dpitch;
> >>+ dplane2 += dpitch;
> >>
> >>
> >
> >I think blitting the planes one at a time would be better.
> >
> >
> It would be only slower, according to me.
I think it would be faster, if planes are stored sequentially
in memory one after the other.
--
Best regards,
Denis Oliver Kropp
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
Convergence GmbH