Mercurial > libavcodec.hg
comparison svq1dec.c @ 6481:493dc59d469a libavcodec
add FF_ prefix to all (frame)_TYPE usage
author | aurel |
---|---|
date | Sun, 09 Mar 2008 23:31:02 +0000 |
parents | b79673718ed8 |
children | 48759bfbd073 |
comparison
equal
deleted
inserted
replaced
6480:6f01a499e785 | 6481:493dc59d469a |
---|---|
573 /* frame type */ | 573 /* frame type */ |
574 s->pict_type= get_bits (bitbuf, 2)+1; | 574 s->pict_type= get_bits (bitbuf, 2)+1; |
575 if(s->pict_type==4) | 575 if(s->pict_type==4) |
576 return -1; | 576 return -1; |
577 | 577 |
578 if (s->pict_type == I_TYPE) { | 578 if (s->pict_type == FF_I_TYPE) { |
579 | 579 |
580 /* unknown fields */ | 580 /* unknown fields */ |
581 if (s->f_code == 0x50 || s->f_code == 0x60) { | 581 if (s->f_code == 0x50 || s->f_code == 0x60) { |
582 int csum = get_bits (bitbuf, 16); | 582 int csum = get_bits (bitbuf, 16); |
583 | 583 |
676 return result; | 676 return result; |
677 } | 677 } |
678 | 678 |
679 //FIXME this avoids some confusion for "B frames" without 2 references | 679 //FIXME this avoids some confusion for "B frames" without 2 references |
680 //this should be removed after libavcodec can handle more flexible picture types & ordering | 680 //this should be removed after libavcodec can handle more flexible picture types & ordering |
681 if(s->pict_type==B_TYPE && s->last_picture_ptr==NULL) return buf_size; | 681 if(s->pict_type==FF_B_TYPE && s->last_picture_ptr==NULL) return buf_size; |
682 | 682 |
683 if(avctx->hurry_up && s->pict_type==B_TYPE) return buf_size; | 683 if(avctx->hurry_up && s->pict_type==FF_B_TYPE) return buf_size; |
684 if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==B_TYPE) | 684 if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==FF_B_TYPE) |
685 ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=I_TYPE) | 685 ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=FF_I_TYPE) |
686 || avctx->skip_frame >= AVDISCARD_ALL) | 686 || avctx->skip_frame >= AVDISCARD_ALL) |
687 return buf_size; | 687 return buf_size; |
688 | 688 |
689 if(MPV_frame_start(s, avctx) < 0) | 689 if(MPV_frame_start(s, avctx) < 0) |
690 return -1; | 690 return -1; |
703 linesize= s->uvlinesize; | 703 linesize= s->uvlinesize; |
704 } | 704 } |
705 | 705 |
706 current = s->current_picture.data[i]; | 706 current = s->current_picture.data[i]; |
707 | 707 |
708 if(s->pict_type==B_TYPE){ | 708 if(s->pict_type==FF_B_TYPE){ |
709 previous = s->next_picture.data[i]; | 709 previous = s->next_picture.data[i]; |
710 }else{ | 710 }else{ |
711 previous = s->last_picture.data[i]; | 711 previous = s->last_picture.data[i]; |
712 } | 712 } |
713 | 713 |
714 if (s->pict_type == I_TYPE) { | 714 if (s->pict_type == FF_I_TYPE) { |
715 /* keyframe */ | 715 /* keyframe */ |
716 for (y=0; y < height; y+=16) { | 716 for (y=0; y < height; y+=16) { |
717 for (x=0; x < width; x+=16) { | 717 for (x=0; x < width; x+=16) { |
718 result = svq1_decode_block_intra (&s->gb, ¤t[x], linesize); | 718 result = svq1_decode_block_intra (&s->gb, ¤t[x], linesize); |
719 if (result != 0) | 719 if (result != 0) |