[FFmpeg-devel] DVCPRO HD: request for review
Michael Niedermayer
michaelni
Fri Aug 29 22:11:02 CEST 2008
On Fri, Aug 29, 2008 at 11:36:48AM -0700, Roman V. Shaposhnik wrote:
> On Fri, 2008-08-29 at 20:20 +0200, Michael Niedermayer wrote:
> > So i ask again, where is that prommised cleanup?
>
> It will follow either today or tomorrow if you stop distracting
> me from it. I need to run a bunch of tests on different
> architectures to determine which scheme of replacing the tables
> would be the fastest one. I don't want to repeat the mistake
> that Dan has originally made where he replaced tables with
> calculations only to discover that they were slower. The formulas
> are *highly* irregular. For example here's what it takes to
> calculate placement for 1080i60:
> case s1080i60:
> X = (j*2+(h%2))*9 + k%9;
> Y = (i*3+k/9)*2 + (h/2);
>
> if (X >= 80) {
> if (Y<4*8) {
> X = (Y/4)*10 + X - 80;
> Y %= 4;
> }
> else if (Y<4*8+3*8) {
> Y -= 4*8;
> X += (Y/3)*10 - 80;
> Y = 64 + Y%3;
> }
> else {
> X = ((Y-4*8-3*8)*10 + X - 80)*2;
> Y = 67;
> }
> } else
> Y += 4;
> May be it can be optimized via some clever formula manipulation
> but not much. The formulas will remain highly irregular. So, the
well, some naive formular manipulation:
if(X >= 80) {
if(Y<56) {
X+= tab1[Y];
Y = tab0[Y];
}else{
X = ((Y-64)*10 + X)*2;
Y = 67;
}
}else
Y += 4;
[...]
> P.S. Besides you, yourself, have repeatedly indicated that you
> do accept temporary commits of suboptimal code provided that
> a replacement is committed really quickly. Heck! You even
> admitted you do it yourself. So, why can't I? Especially
> in a piece of code that I still maintain?
You can but there really is more than just the tables, the code did not
pass review with some final list of whats left to make it clean. It seems
you misunderstood me ok-ing some parts and not commenting others, that
really wasnt supposed to mean the others are ok ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The educated differ from the uneducated as much as the living from the
dead. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080829/3e8a2124/attachment.pgp>
More information about the ffmpeg-devel
mailing list