comparison h264.c @ 2641:c337f851d0f9 libavcodec

fix storage of motion vectors for frames with more than 4096 macroblocks.
author lorenm
date Tue, 03 May 2005 21:49:18 +0000
parents d5de8b677bad
children 42528c1f0246
comparison
equal deleted inserted replaced
2640:d5de8b677bad 2641:c337f851d0f9
207 * block_offset[ 0..23] for frame macroblocks 207 * block_offset[ 0..23] for frame macroblocks
208 * block_offset[24..47] for field macroblocks 208 * block_offset[24..47] for field macroblocks
209 */ 209 */
210 int block_offset[2*(16+8)]; 210 int block_offset[2*(16+8)];
211 211
212 uint16_t *mb2b_xy; //FIXME are these 4 a good idea? 212 uint32_t *mb2b_xy; //FIXME are these 4 a good idea?
213 uint16_t *mb2b8_xy; 213 uint32_t *mb2b8_xy;
214 int b_stride; //FIXME use s->b4_stride 214 int b_stride; //FIXME use s->b4_stride
215 int b8_stride; 215 int b8_stride;
216 216
217 int halfpel_flag; 217 int halfpel_flag;
218 int thirdpel_flag; 218 int thirdpel_flag;
2665 } 2665 }
2666 2666
2667 memset(h->slice_table_base, -1, big_mb_num * sizeof(uint8_t)); 2667 memset(h->slice_table_base, -1, big_mb_num * sizeof(uint8_t));
2668 h->slice_table= h->slice_table_base + s->mb_stride + 1; 2668 h->slice_table= h->slice_table_base + s->mb_stride + 1;
2669 2669
2670 CHECKED_ALLOCZ(h->mb2b_xy , big_mb_num * sizeof(uint16_t)); 2670 CHECKED_ALLOCZ(h->mb2b_xy , big_mb_num * sizeof(uint32_t));
2671 CHECKED_ALLOCZ(h->mb2b8_xy , big_mb_num * sizeof(uint16_t)); 2671 CHECKED_ALLOCZ(h->mb2b8_xy , big_mb_num * sizeof(uint32_t));
2672 for(y=0; y<s->mb_height; y++){ 2672 for(y=0; y<s->mb_height; y++){
2673 for(x=0; x<s->mb_width; x++){ 2673 for(x=0; x<s->mb_width; x++){
2674 const int mb_xy= x + y*s->mb_stride; 2674 const int mb_xy= x + y*s->mb_stride;
2675 const int b_xy = 4*x + 4*y*h->b_stride; 2675 const int b_xy = 4*x + 4*y*h->b_stride;
2676 const int b8_xy= 2*x + 2*y*h->b8_stride; 2676 const int b8_xy= 2*x + 2*y*h->b8_stride;