diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2005-03-04 12:47:38 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2005-03-04 12:47:38 +0000 |
commit | 2f944356bf51a397aa7ba596d13763e30b4f5823 (patch) | |
tree | 17b897658a9a772374c9f6a7934635afe4836367 /libavcodec/mpegvideo.c | |
parent | 2f1e1ed3ddc80e3d0f62f4c2ac57b972365b30df (diff) | |
download | ffmpeg-2f944356bf51a397aa7ba596d13763e30b4f5823.tar.gz |
H.264: decode arbitrary frame orders and allow B-frames as references.
Originally committed as revision 4003 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 89103aed94..cfb884362a 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1471,7 +1471,8 @@ alloc: pic= (AVFrame*)&s->picture[i]; } - pic->reference= s->pict_type != B_TYPE && !s->dropable ? 3 : 0; + pic->reference= (s->pict_type != B_TYPE || s->codec_id == CODEC_ID_H264) + && !s->dropable ? 3 : 0; pic->coded_picture_number= s->coded_picture_number++; @@ -1566,7 +1567,7 @@ void MPV_frame_end(MpegEncContext *s) XVMC_field_end(s); }else #endif - if(s->unrestricted_mv && s->pict_type != B_TYPE && !s->intra_only && !(s->flags&CODEC_FLAG_EMU_EDGE)) { + if(s->unrestricted_mv && s->current_picture.reference && !s->intra_only && !(s->flags&CODEC_FLAG_EMU_EDGE)) { draw_edges(s->current_picture.data[0], s->linesize , s->h_edge_pos , s->v_edge_pos , EDGE_WIDTH ); draw_edges(s->current_picture.data[1], s->uvlinesize, s->h_edge_pos>>1, s->v_edge_pos>>1, EDGE_WIDTH/2); draw_edges(s->current_picture.data[2], s->uvlinesize, s->h_edge_pos>>1, s->v_edge_pos>>1, EDGE_WIDTH/2); |