comparison truemotion1.c @ 2073:95d303a305d2 libavcodec

fix initialization bug in which execution overwrites essential data tables which causes trouble on subsequent runs if decoder is not disposed first
author melanson
date Fri, 11 Jun 2004 02:24:08 +0000
parents 141a9539e270
children 81802fed5b8c
comparison
equal deleted inserted replaced
2072:c200977cdf78 2073:95d303a305d2
60 int compression; 60 int compression;
61 int block_type; 61 int block_type;
62 int block_width; 62 int block_width;
63 int block_height; 63 int block_height;
64 64
65 int16_t *ydt; 65 int16_t ydt[8];
66 int16_t *cdt; 66 int16_t cdt[8];
67 int16_t *fat_ydt; 67 int16_t fat_ydt[8];
68 int16_t *fat_cdt; 68 int16_t fat_cdt[8];
69 69
70 int last_deltaset, last_vectable; 70 int last_deltaset, last_vectable;
71 71
72 unsigned int *vert_pred; 72 unsigned int *vert_pred;
73 73
144 int i; 144 int i;
145 145
146 if (delta_table_index > 3) 146 if (delta_table_index > 3)
147 return; 147 return;
148 148
149 s->ydt = ydts[delta_table_index]; 149 memcpy(s->ydt, ydts[delta_table_index], 8 * sizeof(int16_t));
150 s->cdt = cdts[delta_table_index]; 150 memcpy(s->cdt, cdts[delta_table_index], 8 * sizeof(int16_t));
151 s->fat_ydt = fat_ydts[delta_table_index]; 151 memcpy(s->fat_ydt, fat_ydts[delta_table_index], 8 * sizeof(int16_t));
152 s->fat_cdt = fat_cdts[delta_table_index]; 152 memcpy(s->fat_cdt, fat_cdts[delta_table_index], 8 * sizeof(int16_t));
153 153
154 /* Y skinny deltas need to be halved for some reason; maybe the 154 /* Y skinny deltas need to be halved for some reason; maybe the
155 * skinny Y deltas should be modified */ 155 * skinny Y deltas should be modified */
156 for (i = 0; i < 8; i++) 156 for (i = 0; i < 8; i++)
157 { 157 {