[Ffmpeg-cvslog] r6876 - trunk/libavcodec/motion_est.c

Corey Hickey bugfood-ml
Wed Dec 13 01:47:35 CET 2006


Michael Niedermayer wrote:
> Hi
> 
> On Mon, Dec 11, 2006 at 02:07:23PM -0800, Corey Hickey wrote:
>> michael wrote:
>>> Author: michael
>>> Date: Fri Nov  3 00:36:39 2006
>>> New Revision: 6876
>>>
>>> Modified:
>>>   trunk/libavcodec/motion_est.c
>>>
>>> Log:
>>> new I/P frame selection heuristic
>>> PSNR/bitrate is slightly better for my (short) test videos
>>> more tests welcome ...
>>>
>>>
>>> Modified: trunk/libavcodec/motion_est.c
>>> ==============================================================================
>>> --- trunk/libavcodec/motion_est.c	(original)
>>> +++ trunk/libavcodec/motion_est.c	Fri Nov  3 00:36:39 2006
>>> @@ -1178,13 +1178,11 @@
>>>         vard= check_input_motion(s, mb_x, mb_y, 1);
>>>
>>>         if((vard+128)>>8 < c->avctx->me_threshold){
>>> +            int p_score= FFMIN(vard, 
>>> varc-500+(s->lambda2>>FF_LAMBDA_SHIFT)*100);
>>> +            int i_score= varc-500+(s->lambda2>>FF_LAMBDA_SHIFT)*20;
>> Could you please give me a really quick explanation of what information 
>> is stored in vard and varc? I see where they are assigned but I don't 
>> understand the rest of the code well enough to figure it out from context.
> 
> vard is sum of squared differences with the estimated motion vector
> varc is the variance of the block (sum of squared (p[y][x]-average))

Thanks. I understand a little more now. To clarify, though, do you mean 
that vard is the sum of squared differences between the pixels of a 
predicted block and the corresponding pixels in the source frame?

...such that, in other words, a low vard would mean the motion vector 
accurately predicts the block?

Thanks again,
Corey




More information about the ffmpeg-cvslog mailing list