comparison mpegvideo.c @ 262:7d941b8c4e84 libavcodec

mpeg4 b-frames :) create slightly more correct headers & add "ffmpeg" user-data section
author michaelni
date Tue, 12 Mar 2002 22:54:25 +0000
parents b8d11794f675
children 4e9e728021d8
comparison
equal deleted inserted replaced
261:d6521bbbab5e 262:7d941b8c4e84
428 if (s->pict_type == B_TYPE) { 428 if (s->pict_type == B_TYPE) {
429 for(i=0;i<3;i++) { 429 for(i=0;i<3;i++) {
430 s->current_picture[i] = s->aux_picture[i]; 430 s->current_picture[i] = s->aux_picture[i];
431 } 431 }
432 } else { 432 } else {
433 s->last_non_b_pict_type= s->pict_type;
433 for(i=0;i<3;i++) { 434 for(i=0;i<3;i++) {
434 /* swap next and last */ 435 /* swap next and last */
435 tmp = s->last_picture[i]; 436 tmp = s->last_picture[i];
436 s->last_picture[i] = s->next_picture[i]; 437 s->last_picture[i] = s->next_picture[i];
437 s->next_picture[i] = tmp; 438 s->next_picture[i] = tmp;
743 #else 744 #else
744 gmc1_motion(s, dest_y, dest_cb, dest_cr, 0, 745 gmc1_motion(s, dest_y, dest_cb, dest_cr, 0,
745 ref_picture, 0, 746 ref_picture, 0,
746 16); 747 16);
747 #endif 748 #endif
748 }else if(s->quarter_sample){ 749 }else if(s->quarter_sample && dir==0){ //FIXME
749 qpel_motion(s, dest_y, dest_cb, dest_cr, 0, 750 qpel_motion(s, dest_y, dest_cb, dest_cr, 0,
750 ref_picture, 0, 751 ref_picture, 0,
751 0, pix_op, qpix_op, 752 0, pix_op, qpix_op,
752 s->mv[dir][0][0], s->mv[dir][0][1], 16); 753 s->mv[dir][0][0], s->mv[dir][0][1], 16);
753 }else{ 754 }else{
928 } 929 }
929 } 930 }
930 else if (s->h263_pred || s->h263_aic) 931 else if (s->h263_pred || s->h263_aic)
931 s->mbintra_table[mb_x + mb_y*s->mb_width]=1; 932 s->mbintra_table[mb_x + mb_y*s->mb_width]=1;
932 933
933 /* update motion predictor */ 934 /* update motion predictor, not for B-frames as they need the motion_val from the last P/S-Frame */
934 if (s->out_format == FMT_H263) { 935 if (s->out_format == FMT_H263) {
936 if(s->pict_type!=B_TYPE){
935 int xy, wrap, motion_x, motion_y; 937 int xy, wrap, motion_x, motion_y;
936 938
937 wrap = 2 * s->mb_width + 2; 939 wrap = 2 * s->mb_width + 2;
938 xy = 2 * mb_x + 1 + (2 * mb_y + 1) * wrap; 940 xy = 2 * mb_x + 1 + (2 * mb_y + 1) * wrap;
939 if (s->mb_intra) { 941 if (s->mb_intra) {
952 s->motion_val[xy + wrap][0] = motion_x; 954 s->motion_val[xy + wrap][0] = motion_x;
953 s->motion_val[xy + wrap][1] = motion_y; 955 s->motion_val[xy + wrap][1] = motion_y;
954 s->motion_val[xy + 1 + wrap][0] = motion_x; 956 s->motion_val[xy + 1 + wrap][0] = motion_x;
955 s->motion_val[xy + 1 + wrap][1] = motion_y; 957 s->motion_val[xy + 1 + wrap][1] = motion_y;
956 } 958 }
959 }
957 } 960 }
958 961
959 if (!s->intra_only) { 962 if (!s->intra_only) {
960 UINT8 *dest_y, *dest_cb, *dest_cr; 963 UINT8 *dest_y, *dest_cb, *dest_cr;
961 UINT8 *mbskip_ptr; 964 UINT8 *mbskip_ptr;