comparison mpegvideo.c @ 280:3dc1ca4ba717 libavcodec

fixing epzs & mpeg1 (hopefully now really ...)
author michaelni
date Fri, 22 Mar 2002 16:51:44 +0000
parents ae5c33165d5c
children 1fc96b02142e
comparison
equal deleted inserted replaced
279:ae5c33165d5c 280:3dc1ca4ba717
172 perror("malloc"); 172 perror("malloc");
173 goto fail; 173 goto fail;
174 } 174 }
175 } 175 }
176 176
177 if (s->out_format == FMT_H263 || s->encoding) { 177 if (s->out_format == FMT_H263) {
178 int size; 178 int size;
179 /* MV prediction */ 179 /* MV prediction */
180 size = (2 * s->mb_width + 2) * (2 * s->mb_height + 2); 180 size = (2 * s->mb_width + 2) * (2 * s->mb_height + 2);
181 s->motion_val = malloc(size * 2 * sizeof(INT16)); 181 s->motion_val = malloc(size * 2 * sizeof(INT16));
182 if (s->motion_val == NULL) 182 if (s->motion_val == NULL)
959 } 959 }
960 } 960 }
961 else if (s->h263_pred || s->h263_aic) 961 else if (s->h263_pred || s->h263_aic)
962 s->mbintra_table[mb_x + mb_y*s->mb_width]=1; 962 s->mbintra_table[mb_x + mb_y*s->mb_width]=1;
963 963
964 /* update motion predictor, not for B-frames as they need the motion_val from the last P/S-Frame 964 /* update motion predictor, not for B-frames as they need the motion_val from the last P/S-Frame */
965 motion_val is needed for encodig too, as the ME needs it */ 965 if (s->out_format == FMT_H263) {
966 if (s->out_format == FMT_H263 || s->encoding) {
967 if(s->pict_type!=B_TYPE){ 966 if(s->pict_type!=B_TYPE){
968 int xy, wrap, motion_x, motion_y; 967 int xy, wrap, motion_x, motion_y;
969 968
970 wrap = 2 * s->mb_width + 2; 969 wrap = 2 * s->mb_width + 2;
971 xy = 2 * mb_x + 1 + (2 * mb_y + 1) * wrap; 970 xy = 2 * mb_x + 1 + (2 * mb_y + 1) * wrap;