[Ffmpeg-devel] [PATCH] TIFF encoder (Google SoC qualification task)

Michael Niedermayer michaelni
Fri Apr 6 22:38:12 CEST 2007


Hi

On Fri, Apr 06, 2007 at 10:20:56PM +0200, Kamil Nowosad wrote:
[...]

>      if (s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE)
>          //best choose for DEFLATE
> -        s->rps = s->height;
> -    else
> +        s->rps = ((s->height - 1) / s->subsampling[1] + 1) * s->subsampling[1];
> +    else {
>          s->rps = FFMAX(8192 / (((s->width * s->bpp) >> 3) + 1), 1);     // suggest size of strip
> +        s->rps = ((s->rps - 1) / s->subsampling[1] + 1) * s->subsampling[1]; // round rps up
> +    }

hmm, doesnt the following work too?

    s->rps = s->height;
else
    s->rps = FFMAX(8192 / (((s->width * s->bpp) >> 3) + 1), 1);     // suggest size of strip
s->rps = ((s->rps - 1) / s->subsampling[1] + 1) * s->subsampling[1]; // round rps up


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070406/fabf2e78/attachment.pgp>



More information about the ffmpeg-devel mailing list