Browse code

Fix use of uninitialized data: A array element can not be used to initialized another array element of the same array.

Originally committed as revision 24479 to svn://svn.ffmpeg.org/ffmpeg/trunk

Reimar Döffinger authored on 2010/07/24 20:55:22
Showing 1 changed files
... ...
@@ -62,10 +62,11 @@ static inline int vertClassify_altivec(uint8_t src[], int stride, PPContext *c)
62 62
     vector by assuming (stride % 16) == 0, unfortunately
63 63
     this is not always true.
64 64
     */
65
+    short data_0 = ((c->nonBQP*c->ppMode.baseDcDiff)>>8) + 1;
65 66
     DECLARE_ALIGNED(16, short, data)[8] =
66 67
                     {
67
-                        ((c->nonBQP*c->ppMode.baseDcDiff)>>8) + 1,
68
-                        data[0] * 2 + 1,
68
+                        data_0,
69
+                        data_0 * 2 + 1,
69 70
                         c->QP * 2,
70 71
                         c->QP * 4
71 72
                     };