[FFmpeg-soc] [soc]: r391 - jpeg2000/j2kenc.c

Michael Niedermayer michaelni at gmx.at
Fri Jul 13 21:50:57 CEST 2007


Hi

On Fri, Jul 13, 2007 at 11:36:29AM +0200, k.nowosad wrote:
> Author: k.nowosad
> Date: Fri Jul 13 11:36:28 2007
> New Revision: 391
> 
> Log:
> replaced rate_control with mechanism based on AVFrame.quality field
[...]
> @@ -1234,7 +1206,9 @@ static void encode_tile(J2kEncoderContex
>      }
>  
>      av_log(s->avctx, AV_LOG_DEBUG, "rate control\n");
> -    rate_control(s, tile, tileno);
> +    truncpassess(s, tile, tile->mindr +
> +            (tile->maxdr - tile->mindr) * s->picture->quality / (FF_LAMBDA_MAX-1));
> +    encode_packets(s, tile, tileno);
>      av_log(s->avctx, AV_LOG_DEBUG, "after rate control\n");
>  }
>  

can you explain what mindr and maxdr are doing? this does not seem
correct
if you wish to implement some spatial complexity adaptive quantization
then that should depend on AVCodecContext.spatial_cplx_masking



> @@ -1288,7 +1262,7 @@ static int encode_frame(AVCodecContext *
>      s->Ysiz = avctx->height;
>  
>      s->nguardbits = 1;
> -    s->maxtilelen = 5000;
> +    s->picture->quality = FFMAX(--s->picture->quality, 0);

why -- ?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- 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-soc/attachments/20070713/5fbde04c/attachment.pgp>


More information about the FFmpeg-soc mailing list