[Sumover-dev] [svn commit] r4138 - in vic/branches/mpeg4/codec: p64
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Fri Apr 4 16:15:22 BST 2008
Author: douglask
Date: Fri Apr 4 16:15:17 2008
New Revision: 4138
Modified:
vic/branches/mpeg4/codec/dct.cpp
vic/branches/mpeg4/codec/p64/p64.cpp
Log:
Merge changes from OPAL's H.261 vic codec code
>From OpenMash, fixed nasty bug on the "which blocks have just changed" table
(called marks_ in the P64decode world)
Modified: vic/branches/mpeg4/codec/dct.cpp
==============================================================================
--- vic/branches/mpeg4/codec/dct.cpp (original)
+++ vic/branches/mpeg4/codec/dct.cpp Fri Apr 4 16:15:17 2008
@@ -105,6 +105,10 @@
#define FA4 (1.306562965f)
#define FA5 (0.382683433f)
+#ifdef B0
+#undef B0
+#endif
+
/*
* these magic numbers are scaling factors for each coef of the 1-d
* AA&N DCT. The scale factor for coef 0 is 1 and coef 1<=n<=7 is
@@ -314,7 +318,7 @@
double v = first_stage[i >> 3];
v *= first_stage[i & 7];
double q = double(in[i]);
- out[i] = v / q;
+ out[i] = float(v / q);
}
}
Modified: vic/branches/mpeg4/codec/p64/p64.cpp
==============================================================================
--- vic/branches/mpeg4/codec/p64/p64.cpp (original)
+++ vic/branches/mpeg4/codec/p64/p64.cpp Fri Apr 4 16:15:17 2008
@@ -140,6 +140,7 @@
miny_ = height_;
maxx_ = 0;
maxy_ = 0;
+ marks_ = 0;
allocate();
}
@@ -328,7 +329,10 @@
break;
}
r = COLZAG[k++];
- blk[r] = qt[v & 0xff];
+ if (qt)
+ blk[r] = qt[v & 0xff];
+ else
+ blk[r] = 0;
++nc;
#ifdef INT_64
m0 |= (INT_64)1 << r;
@@ -443,7 +447,7 @@
u_int r11 = in[4] << 24 | in[5] << 16 | in[6] << 8 | in[7];
in += stride;
- u_int r20, r21;
+ u_int r20 = 0, r21 = 0;
u_int mask = 0xff00ff;
for (int k = 6; --k >= 0; ) {
/* load next row */
More information about the Sumover-dev
mailing list