Mercurial > libavcodec.hg
comparison rv40.c @ 9903:305536ce781f libavcodec
RV3/4 intra types array causes alignment issues (at least on ARM5), thus change
its stride and offset to always have align 4.
author | kostya |
---|---|
date | Wed, 01 Jul 2009 15:08:02 +0000 |
parents | d418640c8d86 |
children | d0f2f4e4436c |
comparison
equal
deleted
inserted
replaced
9902:9bdf9fe9018c | 9903:305536ce781f |
---|---|
162 int i, j, k, v; | 162 int i, j, k, v; |
163 int A, B, C; | 163 int A, B, C; |
164 int pattern; | 164 int pattern; |
165 int8_t *ptr; | 165 int8_t *ptr; |
166 | 166 |
167 for(i = 0; i < 4; i++, dst += s->b4_stride){ | 167 for(i = 0; i < 4; i++, dst += r->intra_types_stride){ |
168 if(!i && s->first_slice_line){ | 168 if(!i && s->first_slice_line){ |
169 pattern = get_vlc2(gb, aic_top_vlc.table, AIC_TOP_BITS, 1); | 169 pattern = get_vlc2(gb, aic_top_vlc.table, AIC_TOP_BITS, 1); |
170 dst[0] = (pattern >> 2) & 2; | 170 dst[0] = (pattern >> 2) & 2; |
171 dst[1] = (pattern >> 1) & 2; | 171 dst[1] = (pattern >> 1) & 2; |
172 dst[2] = pattern & 2; | 172 dst[2] = pattern & 2; |
179 * The first one (used for retrieving a pair of coefficients) is | 179 * The first one (used for retrieving a pair of coefficients) is |
180 * constructed from the top, top right and left coefficients | 180 * constructed from the top, top right and left coefficients |
181 * The second one (used for retrieving only one coefficient) is | 181 * The second one (used for retrieving only one coefficient) is |
182 * top + 10 * left. | 182 * top + 10 * left. |
183 */ | 183 */ |
184 A = ptr[-s->b4_stride + 1]; // it won't be used for the last coefficient in a row | 184 A = ptr[-r->intra_types_stride + 1]; // it won't be used for the last coefficient in a row |
185 B = ptr[-s->b4_stride]; | 185 B = ptr[-r->intra_types_stride]; |
186 C = ptr[-1]; | 186 C = ptr[-1]; |
187 pattern = A + (B << 4) + (C << 8); | 187 pattern = A + (B << 4) + (C << 8); |
188 for(k = 0; k < MODE2_PATTERNS_NUM; k++) | 188 for(k = 0; k < MODE2_PATTERNS_NUM; k++) |
189 if(pattern == rv40_aic_table_index[k]) | 189 if(pattern == rv40_aic_table_index[k]) |
190 break; | 190 break; |