[XviD-devel] RD stuff and more
Radek Czyz
syskin at ihug.com.au
Tue Mar 23 09:46:55 CET 2004
Michael Militzer wrote:
> Apart from the fact that we're moving completely off-topic, I don't quite
> understand what's so different about R + lambda*D^2 instead of using
> R + lambda*D. Couldn't you achieve exactly the same by simply using a
> different distortion metric (sum of absolute cubic error or something
> else)? That's the some as using SSE instead of SAD for D - nonetheless,
> the basic cost function remains linear.
Yes you are right - it's just a different distortion metric. It's just
that sum-of-squared errors (either in pixel domain or dct domain) has
some "real" properties, ie is an energy (as used in SNR).
You are ablsolutely right, if we just concider it a different metric,
it's no longer something weird :)
> Michael
Right, I have a question for you. I'm rewriting fast qpel refinement
(very nice stuff) and I'm trying to understand how it works.
I have problems seeing what happens after you check first three (or two)
qpel positions. The code says:
if(best_sad <= data->iMinSAD2) return;
best_sad is the best sad found in halfpel search. data->iMinSAD2 was
reset before the three qpel checks, so now contains either best_sad (or
less) if we've got a new best - or the best sad of the three checks (if
none was good enough).
As I understand, it will "return" if we found one better match (equal),
will "return" if we haven't found anything good ( < ) and will only not
return if two of the three checks are better than best halfpel.
Okay I'm confused. Is this correct? Also, one of the three lines
actually says:
if(best_sad < data->iMinSAD2) return;
That's very different, because now the function will not return if only
one better match is found. Which is correct?
I also have some problems understanding what happens next.... would you
be so kind and explain what's going on there? If I understand it, I
should be able to implement my version like it should be.
Thanks a lot,
Radek
More information about the XviD-devel
mailing list