[FFmpeg-devel] [PATCH] RoQ video encoder (take 4)

Eric Lasota riot
Fri Jun 15 01:58:55 CEST 2007


Loren Merritt wrote:
> Lambda (or equivalently, quantizer) is the only thing that a ratecontrol 
> algorithm can decide. Distortion isn't known until after you encode the 
> frame.

The old progressive reducer (which got dropped in favor of lambda-based 
rate control) could simultaneously target output size, distortion, or 
lambda.  When I modified it to target distortion, it hit within 1% of 
its target every time the target was achievable.

> The reason no such mode exists is 
> that you haven't written it.
>
>   

for (i=0; i<numBlocks; i++) {
    dist += sortOptions[i].list->sorted[0]->dist;
    ...
}
...
while (calculate_size(&sizeCalc) > sizeUpperLimit || 
(calculate_size(&sizeCalc) > sizeLowerLimit && dist < enc->target_dist)) {
    ...
    dist += sortOptionsSorted[0]->distIncrease;
    ...
}





More information about the ffmpeg-devel mailing list