comparison h264.c @ 5772:65b71bd21a4d libavcodec

Fix h->curr_pic_num for field pictures. Necessary for proper PAFF support. patch by Jeff Downs, heydowns a borg d com original thread: Subject: [FFmpeg-devel] [PATCH] Implement PAFF in H.264 Date: 18/09/07 20:30
author andoma
date Thu, 04 Oct 2007 06:43:58 +0000
parents 5290a3850c03
children e3d7a78e2df3
comparison
equal deleted inserted replaced
5771:5290a3850c03 5772:65b71bd21a4d
3740 3740
3741 if(s->picture_structure==PICT_FRAME){ 3741 if(s->picture_structure==PICT_FRAME){
3742 h->curr_pic_num= h->frame_num; 3742 h->curr_pic_num= h->frame_num;
3743 h->max_pic_num= 1<< h->sps.log2_max_frame_num; 3743 h->max_pic_num= 1<< h->sps.log2_max_frame_num;
3744 }else{ 3744 }else{
3745 h->curr_pic_num= 2*h->frame_num; 3745 h->curr_pic_num= 2*h->frame_num + 1;
3746 h->max_pic_num= 1<<(h->sps.log2_max_frame_num + 1); 3746 h->max_pic_num= 1<<(h->sps.log2_max_frame_num + 1);
3747 } 3747 }
3748 3748
3749 if(h->nal_unit_type == NAL_IDR_SLICE){ 3749 if(h->nal_unit_type == NAL_IDR_SLICE){
3750 get_ue_golomb(&s->gb); /* idr_pic_id */ 3750 get_ue_golomb(&s->gb); /* idr_pic_id */