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

Vitor vitor1001
Fri Jun 15 10:16:43 CEST 2007


Hi

Michael Niedermayer wrote:
> Hi
>   
>   
>> Deciding the macroblock types requires being indexed.  It's a 
>> chicken-and-egg problem I decided to sidestep completely.  Thresholding 
>> never quite worked when I tried it, though that's probably the best option.
>>     
>
> its not hard to show that thresholding cannot work in many cases
>
> take a completely black (y=0 u=v=128) frame next frame is y=1 u=v=128)
> this can trivially be encoded with no quality loss with a single codebook
> but if you use a threashold it will use 0,0 motion vectors and be worse
>   

We could nevertheless do a thresholding to see if even a 2x2 codebook 
with no distortion would still be worse. So in your example, while there 
would be no quality gain, we could gain a lot of time in the 2x2 
codebook generation if lambda is not very very big, since it will see 
that motion search will have a lower ratedistortion than a perfect 2x2 
cb coding. Your example shows also that to implement this idea it is 
necessary to add the 4x4 cb subblocks to 2x2 cb generation or it won't 
be any 2x2 cb to encode the only 4x4 cb.

But this idea will only speed up really easy frames...

-Vitor





More information about the ffmpeg-devel mailing list