summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorJeff Downs <heydowns@borg.com>2007-09-26 13:28:13 +0000
committerAndreas Ă–man <andreas@lonelycoder.com>2007-09-26 13:28:13 +0000
commit2ddcf84bb713f5ae2ff0f89fa361294253a822a1 (patch)
tree27a41256cb501ff20a48c8c178863d07474284b1 /libavcodec/mpegvideo.c
parentb925ef61dd7b6ea847b0811b4b48abf51abd534c (diff)
h264/PAFF preparation: use DELAYED_PIC_REF to mark non-refs frames as held for delayed output
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 Originally committed as revision 10592 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 30fb0faf07..c2c8f13d4d 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -907,8 +907,13 @@ alloc:
pic= (AVFrame*)&s->picture[i];
}
- pic->reference= (s->pict_type != B_TYPE || s->codec_id == CODEC_ID_H264)
- && !s->dropable ? 3 : 0;
+ pic->reference= 0;
+ if (!s->dropable){
+ if (s->codec_id == CODEC_ID_H264)
+ pic->reference = s->picture_structure;
+ else if (s->pict_type != B_TYPE)
+ pic->reference = 3;
+ }
pic->coded_picture_number= s->coded_picture_number++;